public class FloatingDiv extends Div
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFHEIGHT |
protected static int |
DEFWIDTH |
protected static int |
MINHEIGHT |
protected static int |
MINWIDTH |
static String |
RSN_CLOSE
Close reason
IWindowClosed.closed(String): the dialog was closed by the close button or by pressing the hider. |
| Constructor and Description |
|---|
FloatingDiv() |
FloatingDiv(boolean modal) |
FloatingDiv(boolean modal,
boolean resizable) |
FloatingDiv(boolean modal,
boolean resizable,
int widthinpx,
int heightinpx) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
beforeCreateContent() |
protected void |
callCloseHandler(String closeReason)
Internal use: call the registered "close" handler with the close reason.
|
void |
close()
Close this floater and cause it to be destroyed from the UI without calling the
close handler.
|
static void |
close(NodeBase node)
Can be called from panels that know they are inside a FloatingDiv/Window/Dialog to close
the surrounding dialog.
|
void |
closePressed()
Close the window !AND CALL THE CLOSE HANDLER!.
|
Dimension |
getBrowserWindowSize()
Exposed call to get browser window size.
|
Rect |
getClientBounds()
Exposed client bounds.
|
IWindowClosed |
getOnClose()
Get the current "onClose" handler: a handler to call when the window is closed.
|
Div |
internalGetHider() |
void |
internalSetHider(Div hider) |
boolean |
isAutoClose() |
boolean |
isModal()
Returns T if this is a MODAL window, obscuring windows it is on top of.
|
boolean |
isResizable() |
FloatingDiv |
modal() |
FloatingDiv |
modal(boolean yes) |
protected void |
onClosed(String closeReason)
Can be overridden to handle close events inside a subclass.
|
void |
onRemoveFromPage(Page p)
Overridden to tell the floating thing handler to remove this floater from
the stack.
|
FloatingDiv |
resizable() |
void |
setAutoClose(boolean autoClose)
When set (which is the default), clicking outside the dialog will automatically close (cancel) it.
|
void |
setDimensions(int width,
int height)
Change the width and height for the dialog - only valid before it has been
built!! The minimum size is 250x200 pixels.
|
void |
setOnClose(IWindowClosed onClose)
Set the current "onClose" handler: a handler to call when the window is closed.
|
void |
setOnSizeAndPositionChange(INotify<NodeBase> onSizeAndPositionChange)
Exposed listener setter for notification on size and/or position change.
|
FloatingDiv |
size(int width,
int height) |
void |
verticallyAlignToCenter()
Position floater into center of screen vertically.
|
FloatingDiv |
width(int pxsl) |
afterCreateContent, componentHandleWebAction, fadeIn, fadeOut, getCustomUpdatesCallJS, getDragHandler, getDropBody, getDropHandler, getDropMode, getReturnPressed, setDragHandler, setDropBody, setDropHandler, setReturnPressed, slideDown, slideUp, tb, visitadd, add, add, addTable, addTableForLayout, addTableForLayout, appendTreeErrors, canContain, createFrame, delegateTo, disableAllChildControlsDeep, findChildIndex, forceRebuild, getChild, getChildCount, getChildren, getDeepChildren, getDelegate, getErrorFence, getTextContents, hasError, internalAdd, internalCheckNotDirty, internalClearDelta, internalClearDeltaFully, internalCreateFrame, internalGetNodeCount, internalGetOldChildren, internalOnBeforeRender, internalShelve, internalUnshelve, iterator, onRefresh, removeAllChildren, removeChild, removeChild, replaceChild, setErrorFence, setErrorFence, setText, setValue, undelegatedAdd, undelegatedGetChild$, acceptRequestParameter, addBinding, addCssClass, addGlobalMessage, addNotificationListener, alignToLeft, alignToLeft, alignToMiddle, alignToMiddle, alignTopToBottom, alignTopToBottom, alignToRight, alignToRight, alignToTop, alignToTop, appendAfterMe, appendBeforeMe, appendCreateJS, appendJavascript, appendJQuerySelector, appendJsCustomUpdatesContributor, appendShowOverflowTextAsTitleJs, appendStatement, bind, bind, bindErrors, build, calcTestID, changed, changedJavascriptState, clearFocusRequested, clearGlobalMessage, clearGlobalMessage, clearGlobalMessage, clearMessage, clearValidationFailure, componentHandleWebDataRequest, createContent, createStatement, findComponentBundle, findParent, getActualID, getAllocationTracepoint, getBindingErrors, getBindingList, getCalculatedTestID, getClicked, getComponentBundle, getComponentDataURL, getComponentDataURL, getComponentInfo, getComponentJSONURL, getCreateJS, getCssClass, getErrorList, getErrorLocation, getFocusID, getMessage, getOnClickJS, getOnMouseDownJS, getOnSizeAndPositionChange, getPage, getParent, getParent, getParent, getParentOfTypes, getSharedContext, getSharedContextFactory, getSpecialAttribute, getSpecialAttributeList, getTag, getTestID, getTestRepeatId, getThemedResourceRURL, getTitle, getUserObject, handleDrop, hasCssClass, hasParent, internalGetOldParent, internalGetParent, internalHasChangedAttributes, internalNeedClickHandler, internalOnClicked, internalOnValueChanged, internalRenderJavascriptDelta, internalRenderJavascriptState, internalSetHasChangedAttributes, internalSetHasChangedAttributes, internalSetLogAllocations, internalSetTag, isAttached, isBuilt, isFocusable, isFocusRequested, isRendersOwnClose, isStretchHeight, lc, notify, notifyParentOrOpenerPage, onAddedToPage, onBeforeFullRender, onBeforeRender, onForceRebuild, onHeaderContributors, onShelve, onUnshelve, refresh, remove, removeBinding, removeCssClass, renderJavascriptDelta, renderJavascriptState, renderJavascriptState, replaceWith, setBrowserWindowSize, setCalculcatedId, setCalculcatedId, setClicked, setClientBounds, setComponentBundle, setCssClass, setErrorLocation, setFocus, setMessage, setOnClickJS, setOnMouseDownJS, setOverrideTitle, setSpecialAttribute, setStretchHeight, setTestID, setTestRepeatID, setTitle, setUserObject, toStringgetBackgroundAttachment, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorderBottomColor, getBorderBottomStyle, getBorderBottomWidth, getBorderLeftColor, getBorderLeftStyle, getBorderLeftWidth, getBorderRightColor, getBorderRightStyle, getBorderRightWidth, getBorderTopColor, getBorderTopStyle, getBorderTopWidth, getBottom, getCachedStyle, getClear, getColor, getDisplay, getFloat, getFontFamily, getFontSize, getFontSizeAdjust, getFontStyle, getFontVariant, getFontWeight, getHeight, getLeft, getLineHeight, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOverflow, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPosition, getRight, getTextAlign, getTop, getTransform, getVerticalAlign, getVisibility, getWidth, getZIndex, internalSetDisplay, setBackgroundAttachment, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorder, setBorderBottomColor, setBorderBottomStyle, setBorderBottomWidth, setBorderColor, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderStyle, setBorderTopColor, setBorderTopStyle, setBorderTopWidth, setBorderWidth, setBottom, setBottom, setCachedStyle, setClear, setColor, setDisplay, setFloat, setFontFamily, setFontSize, setFontSizeAdjust, setFontStyle, setFontVariant, setFontWeight, setHeight, setLeft, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPosition, setRight, setRight, setTextAlign, setTop, setTop, setTransform, setVerticalAlign, setVisibility, setWidth, setZIndexclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static final String RSN_CLOSE
IWindowClosed.closed(String): the dialog was closed by the close button or by pressing the hider.protected static final int DEFWIDTH
protected static final int DEFHEIGHT
protected static final int MINWIDTH
protected static final int MINHEIGHT
public FloatingDiv()
public FloatingDiv(boolean modal)
public FloatingDiv(boolean modal,
boolean resizable)
public FloatingDiv(boolean modal,
boolean resizable,
int widthinpx,
int heightinpx)
@Nonnull public FloatingDiv size(int width, int height)
@Nonnull public FloatingDiv resizable()
@Nonnull public FloatingDiv modal(boolean yes)
@Nonnull public FloatingDiv modal()
@Nonnull public FloatingDiv width(int pxsl)
public void setDimensions(int width,
int height)
width - height - public boolean isModal()
public boolean isResizable()
public void onRemoveFromPage(Page p)
onRemoveFromPage in class NodeBaseNodeBase.onRemoveFromPage(to.etc.domui.dom.html.Page)protected void beforeCreateContent()
beforeCreateContent in class NodeBasepublic boolean isAutoClose()
public void setAutoClose(boolean autoClose)
autoClose - @Nullable public final IWindowClosed getOnClose()
close()).public final void setOnClose(@Nullable IWindowClosed onClose)
close()).onClose - protected final void callCloseHandler(@Nonnull String closeReason) throws Exception
reasonCode - Exceptionprotected void onClosed(@Nonnull String closeReason) throws Exception
closeReason - Exceptionpublic void closePressed()
throws Exception
close(). This code represents the "cancel" action
for dialogs.Exception@OverridingMethodsMustInvokeSuper public void close()
closePressed().public static void close(@Nonnull NodeBase node)
node - public void verticallyAlignToCenter()
public Rect getClientBounds()
getClientBounds in class NodeBaseNodeBase.getClientBounds()public Dimension getBrowserWindowSize()
getBrowserWindowSize in class NodeBaseNodeBase.getClientBounds()public final void setOnSizeAndPositionChange(@Nonnull INotify<NodeBase> onSizeAndPositionChange)
getClientBounds() in order to read size and position after change.setOnSizeAndPositionChange in class NodeBaseto.etc.domui.dom.html.NodeBase#setOnSizeAndPositionChange()Copyright © 2017 etc.to. All rights reserved.