|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.Container<T>
com.extjs.gxt.ui.client.widget.ScrollContainer<Component>
com.extjs.gxt.ui.client.widget.LayoutContainer
com.extjs.gxt.ui.client.widget.ContentPanel
com.extjs.gxt.ui.client.widget.Window
public class Window
A specialized content panel intended for use as an application window.
Code snippet:Window w = new Window(); w.setHeading("Product Information"); w.setModal(true); w.setSize(600, 400); w.setMaximizable(true); w.setToolTip("The ExtGWT product page..."); w.setUrl("http://www.extjs.com/products/gxt"); w.show();
setActive(boolean)
.setActive(boolean)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary | |
---|---|
protected int |
ariaMoveResizeDistance
|
protected ToolButton |
closeBtn
|
protected Draggable |
dragger
|
protected WindowManager |
manager
|
protected boolean |
removeFromParentOnHide
|
protected ToolButton |
restoreBtn
|
Fields inherited from class com.extjs.gxt.ui.client.widget.ContentPanel |
---|
bbarStyle, bodStyle, body, bwrap, bwrapStyle, collapseStyle, fbar, footerStyle, frame, head, headerStyle, headerTextStyle, tbarStyle |
Fields inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
attachChildren, enableLayout, layoutExecuted, layoutNeeded, layoutOnAttach, layoutOnChange |
Fields inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustSize, cacheSizes, ensureVisibilityOnSizing, height, lastSize, layer, shim, width |
Fields inherited from class com.extjs.gxt.ui.client.widget.Component |
---|
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
Window()
Creates a new window. |
Method Summary | |
---|---|
void |
addWindowListener(WindowListener listener)
Adds a listener to receive window events. |
protected void |
afterShow()
|
void |
alignTo(com.google.gwt.user.client.Element elem,
java.lang.String pos,
int[] offsets)
Aligns the window to the specified element. |
void |
center()
Centers the window in the viewport. |
void |
close()
Deprecated. |
void |
close(Button b)
Deprecated. |
protected ComponentEvent |
createComponentEvent(com.google.gwt.user.client.Event event)
|
protected Layer |
createGhost()
|
protected void |
doFocus()
|
protected void |
endDrag(DragEvent de,
boolean canceled)
|
protected void |
fitContainer()
|
void |
focus()
Focus the window. |
boolean |
getConstrain()
Returns true if the window is constrained. |
com.google.gwt.user.client.Element |
getContainer()
Returns the windows's container element. |
Draggable |
getDraggable()
Returns the window's draggable instance. |
com.google.gwt.user.client.ui.Widget |
getFocusWidget()
Returns the focus widget. |
int |
getInitialWidth()
Returns the window's initial width. |
int |
getMinHeight()
Returns the min height. |
int |
getMinWidth()
Returns the min width. |
protected ModalPanel |
getModalPanel()
|
Resizable |
getResizable()
Returns the window's resizable instance. |
protected Layer |
ghost()
|
void |
hide()
Hide this component. |
void |
hide(Button buttonPressed)
Hides the window. |
protected void |
initTools()
|
boolean |
isAutoHide()
Returns true if auto hide is enabled. |
boolean |
isBlinkModal()
Returns true if modal blinking is enabled. |
boolean |
isClosable()
Returns true if the window is closable. |
boolean |
isDraggable()
Returns true if the panel is draggable. |
boolean |
isMaximizable()
Returns true if window maximizing is enabled. |
boolean |
isMaximized()
Returns true if the window is maximized. |
boolean |
isMinimizable()
Returns true if window minimizing is enabled. |
boolean |
isModal()
Returns true if modal behavior is enabled. |
boolean |
isOnEsc()
Returns true if the window is closed when the esc key is pressed. |
boolean |
isPlain()
Returns true if the plain style is enabled. |
boolean |
isResizable()
Returns true if window resizing is enabled. |
void |
maximize()
Fits the window within its current container and automatically replaces the 'maximize' tool button with the 'restore' tool button. |
void |
minimize()
Placeholder method for minimizing the window. |
protected void |
moveDrag(DragEvent de)
|
void |
onComponentEvent(ComponentEvent ce)
Any events a component receives will be forwarded to this method. |
protected void |
onDetach()
|
protected void |
onEndResize(ResizeEvent re)
|
protected void |
onFocus(ComponentEvent ce)
|
protected void |
onHide()
|
protected void |
onKeyPress(WindowEvent we)
|
protected void |
onRender(com.google.gwt.user.client.Element parent,
int pos)
Subclasses must override and ensure setElement is called for lazy rendered components. |
protected void |
onStartResize(ResizeEvent re)
|
protected void |
onWindowResize(int width,
int height)
|
void |
removeWindowListener(WindowListener listener)
Removes a previously added listener. |
void |
restore()
Restores a maximized window back to its original size and position prior to being maximized and also replaces the 'restore' tool button with the 'maximize' tool button. |
void |
setActive(boolean active)
Makes this the active window by showing its shadow, or deactivates it by hiding its shadow. |
void |
setAutoHide(boolean autoHide)
True to hide the window when the user clicks outside of the window's bounds (defaults to false, pre-render). |
void |
setBlinkModal(boolean blinkModal)
True to blink the window when the user clicks outside of the windows bounds (defaults to false). |
void |
setClosable(boolean closable)
True to display the 'close' tool button and allow the user to close the window, false to hide the button and disallow closing the window (default to true). |
void |
setConstrain(boolean constrain)
True to constrain the window to the Viewport , false to allow it to
fall outside of the Viewport (defaults to true). |
void |
setContainer(com.google.gwt.user.client.Element container)
Sets the container element to be used to size and position the window when maximized. |
void |
setDraggable(boolean draggable)
True to enable dragging of this Panel (defaults to false). |
void |
setFocusWidget(com.google.gwt.user.client.ui.Widget focusWidget)
Widget to be given focus when the window is focused). |
void |
setHeading(java.lang.String text)
Sets the title text for the panel. |
void |
setInitialWidth(int initialWidth)
The width of the window if no width has been specified (defaults to 300). |
void |
setMaximizable(boolean maximizable)
True to display the 'maximize' tool button and allow the user to maximize the window, false to hide the button and disallow maximizing the window (defaults to false). |
void |
setMinHeight(int minHeight)
The minimum height in pixels allowed for this window (defaults to 100). |
void |
setMinimizable(boolean minimizable)
True to display the 'minimize' tool button and allow the user to minimize the window, false to hide the button and disallow minimizing the window (defaults to false). |
void |
setMinWidth(int minWidth)
The minimum width in pixels allowed for this window (defaults to 200). |
void |
setModal(boolean modal)
True to make the window modal and mask everything behind it when displayed, false to display it without restricting access to other UI elements (defaults to false). |
void |
setOnEsc(boolean onEsc)
Allows override of the built-in processing for the escape key. |
void |
setPagePosition(int x,
int y)
Sets the page XY position of the component. |
void |
setPlain(boolean plain)
True to render the window body with a transparent background so that it will blend into the framing elements, false to add a lighter background color to visually highlight the body element and separate it more distinctly from the surrounding frame (defaults to false). |
void |
setPosition(int left,
int top)
Sets the left and top of the component. |
void |
setResizable(boolean resizable)
True to allow user resizing at each edge and corner of the window, false to disable resizing (defaults to true). |
void |
setZIndex(int zIndex)
|
void |
show()
Shows the window, rendering it first if necessary, or activates it and brings it to front if hidden. |
protected void |
showWindow(boolean show)
|
protected void |
startDrag(DragEvent de)
|
void |
toBack()
Sends this window to the back of (lower z-index than) any other visible windows. |
void |
toFront()
Brings this window to the front of any other visible windows. |
protected void |
unghost(DragEvent de)
|
Methods inherited from class com.extjs.gxt.ui.client.widget.LayoutContainer |
---|
add, add, addText, findComponent, getLayout, getWindowResizeDelay, insert, insert, isLayoutOnChange, isMonitorWindowResize, layout, layout, onBlur, remove, removeAll, setLayout, setLayoutData, setLayoutOnChange, setMonitorWindowResize, setWindowResizeDelay |
Methods inherited from class com.extjs.gxt.ui.client.widget.ScrollContainer |
---|
addScrollListener, afterRender, getHScrollPosition, getScrollMode, getVScrollPosition, removeScrollListener, scrollIntoView, setHScrollPosition, setScrollMode, setVScrollPosition |
Methods inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
add, adjustIndex, adopt, createContainerEvent, disable, doLayout, doLayout, enable, findItem, getItem, getItemByItemId, getItemCount, getItems, getWidget, indexOf, insert, isLayoutNeeded, iterator, onAfterLayout, onAttach, onBeforeLayoutExcecuted, onInsert, onLayoutExcecuted, onRemove, orphan, remove, removeAll, scrollIntoView, setLayoutNeeded, wrapWidget |
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustPosition, adjustSize, getBounds, getHeight, getHeight, getPosition, getPositionEl, getResizeEl, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, hideShadow, hideShim, hideUnders, isAutoHeight, isAutoWidth, isDeferHeight, isShim, onPosition, onShow, onUnload, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPixelSize, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, setLayoutData |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Draggable dragger
protected WindowManager manager
protected ToolButton restoreBtn
protected ToolButton closeBtn
protected int ariaMoveResizeDistance
protected boolean removeFromParentOnHide
Constructor Detail |
---|
public Window()
Method Detail |
---|
public void addWindowListener(WindowListener listener)
listener
- the listenerpublic void alignTo(com.google.gwt.user.client.Element elem, java.lang.String pos, int[] offsets)
elem
- the element to align to.pos
- the position to align to (see El.alignTo(com.google.gwt.user.client.Element, java.lang.String, int[])
for more
details)offsets
- the offsetspublic void setHeading(java.lang.String text)
ContentPanel
setHeading
in class ContentPanel
text
- the title textpublic void center()
@Deprecated public void close()
@Deprecated public void close(Button b)
public void focus()
focus
in class Component
public boolean getConstrain()
public com.google.gwt.user.client.Element getContainer()
public Draggable getDraggable()
public com.google.gwt.user.client.ui.Widget getFocusWidget()
public int getInitialWidth()
public int getMinHeight()
public int getMinWidth()
public Resizable getResizable()
public void hide()
Component
hide
in class Component
public void hide(Button buttonPressed)
buttonPressed
- the button that was pressed or nullpublic boolean isAutoHide()
public boolean isBlinkModal()
public boolean isClosable()
public boolean isDraggable()
public boolean isMaximizable()
public boolean isMaximized()
public boolean isMinimizable()
public boolean isModal()
public boolean isOnEsc()
public boolean isPlain()
public boolean isResizable()
public void maximize()
public void minimize()
public void onComponentEvent(ComponentEvent ce)
Component
Component.onBrowserEvent(com.google.gwt.user.client.Event)
method
should not be overridden or modified.
onComponentEvent
in class ContentPanel
ce
- the base eventpublic void removeWindowListener(WindowListener listener)
listener
- the listener to removepublic void restore()
public void setActive(boolean active)
public void setAutoHide(boolean autoHide)
autoHide
- true for auto hidepublic void setBlinkModal(boolean blinkModal)
blinkModal
- true to blinkpublic void setClosable(boolean closable)
closable
- true to enable closingpublic void setConstrain(boolean constrain)
Viewport
, false to allow it to
fall outside of the Viewport (defaults to true).
constrain
- true to constrain, otherwise falsepublic void setContainer(com.google.gwt.user.client.Element container)
container
- the container elementpublic void setDraggable(boolean draggable)
draggable
- the draggable to statepublic void setFocusWidget(com.google.gwt.user.client.ui.Widget focusWidget)
focusWidget
- the focus widgetpublic void setInitialWidth(int initialWidth)
initialWidth
- the initial widthpublic void setMaximizable(boolean maximizable)
maximizable
- the maximizable statepublic void setMinHeight(int minHeight)
minHeight
- the min heightpublic void setMinimizable(boolean minimizable)
minimizable
- true to enabled minimizingpublic void setMinWidth(int minWidth)
minWidth
- the minimum heightpublic void setModal(boolean modal)
modal
- true for modalpublic void setOnEsc(boolean onEsc)
onEsc
- true to close window on esc key presspublic void setPagePosition(int x, int y)
BoxComponent
BoxComponent.setPosition(int, int)
. This method fires the Move event.
setPagePosition
in class BoxComponent
x
- the x coordinatey
- the y coordinatepublic void setPlain(boolean plain)
plain
- true to enable the plain stylepublic void setPosition(int left, int top)
BoxComponent
BoxComponent.setPagePosition(int, int)
. This method fires the move event.
setPosition
in class BoxComponent
left
- the new lefttop
- the new toppublic void setResizable(boolean resizable)
resizable
- true to enabled resizingpublic void setZIndex(int zIndex)
setZIndex
in class Component
public void show()
show
in class Component
public void toBack()
public void toFront()
protected void afterShow()
protected ComponentEvent createComponentEvent(com.google.gwt.user.client.Event event)
createComponentEvent
in class BoxComponent
protected Layer createGhost()
protected void doFocus()
protected void endDrag(DragEvent de, boolean canceled)
protected void fitContainer()
protected ModalPanel getModalPanel()
protected Layer ghost()
protected void initTools()
initTools
in class ContentPanel
protected void moveDrag(DragEvent de)
protected void onDetach()
onDetach
in class Component
protected void onFocus(ComponentEvent ce)
onFocus
in class LayoutContainer
protected void onEndResize(ResizeEvent re)
protected void onKeyPress(WindowEvent we)
protected void onRender(com.google.gwt.user.client.Element parent, int pos)
Component
onRender
in class ContentPanel
parent
- the target elementpos
- the insert locationprotected void onStartResize(ResizeEvent re)
protected void onWindowResize(int width, int height)
onWindowResize
in class Component
protected void showWindow(boolean show)
protected void onHide()
onHide
in class BoxComponent
protected void startDrag(DragEvent de)
protected void unghost(DragEvent de)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |