org.exoplatform.gwtframework.ui.client.window
Class Window

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.SimplePanel
                  extended by com.google.gwt.user.client.ui.PopupPanel
                      extended by com.google.gwt.user.client.ui.DecoratedPopupPanel
                          extended by com.google.gwt.user.client.ui.DialogBox
                              extended by org.exoplatform.gwtframework.ui.client.window.Window
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasCloseHandlers<com.google.gwt.user.client.ui.PopupPanel>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.safehtml.client.HasSafeHtml, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.EventPreview, com.google.gwt.user.client.ui.AcceptsOneWidget, com.google.gwt.user.client.ui.HasAnimation, com.google.gwt.user.client.ui.HasHTML, com.google.gwt.user.client.ui.HasOneWidget, com.google.gwt.user.client.ui.HasText, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.MouseListener, com.google.gwt.user.client.ui.SourcesPopupEvents, java.lang.Iterable<com.google.gwt.user.client.ui.Widget>, CloseClickHandler, HasCloseClickHandlers, HasMaximizeHandlers, HasRestoreHandlers, MaximizeHandler, RestoreHandler
Direct Known Subclasses:
GWTDialogsWindow, ResizeableWindow

public class Window
extends com.google.gwt.user.client.ui.DialogBox
implements CloseClickHandler, HasCloseClickHandlers, MaximizeHandler, HasMaximizeHandlers, RestoreHandler, HasRestoreHandlers

Window component that can be modal or not and dragged by user. It has close and maximize/restore buttons.

Version:
$Id: Mar 2, 2011 10:04:33 AM anya $
Author:
Ann Zhuleva

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.DialogBox
com.google.gwt.user.client.ui.DialogBox.Caption, com.google.gwt.user.client.ui.DialogBox.CaptionImpl
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel
com.google.gwt.user.client.ui.PopupPanel.PositionCallback
 
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
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
protected  MaximizeButton maximizeButton
          Maximize window button.
protected  com.google.gwt.user.client.ui.Panel parent
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
protected Window()
           
  Window(java.lang.String title)
           
  Window(java.lang.String title, com.google.gwt.user.client.ui.Image icon)
           
 
Method Summary
 void addCloseClickHandler(CloseClickHandler handler)
          Adds CloseClickHandler handler.
 void addMaximizeHandler(MaximizeHandler handler)
          Adds MaximizeHandler handler.
 void addRestoreHandler(RestoreHandler handler)
          Adds RestoreHandler handler.
 void addWindowButton(WindowButton windowButton)
          Adds button to window's header.
protected  void beginDragging(com.google.gwt.event.dom.client.MouseDownEvent event)
           
 void center()
           
protected  void continueDragging(com.google.gwt.event.dom.client.MouseMoveEvent event)
           
 void destroy()
          Destroy the window.
protected  void endDragging(com.google.gwt.event.dom.client.MouseUpEvent event)
           
 int getHeight()
           
 com.google.gwt.user.client.ui.Image getIcon()
           
 java.lang.String getTitle()
           
 int getWidth()
           
 void hide()
           
 boolean isCanClose()
           
 boolean isCanMaximize()
           
 boolean isMaximized()
           
 void onCloseClick()
          Perform actions on close window click.
 void onMaximize()
          Maximize window.
 void onRestore()
          Restore window size
 void removeWindowButton(WindowButton windowButton)
          Removes button from window's header.
 void setCanClose(boolean canClose)
          Set whether window has close button for it's closing.
 void setCanMaximize(boolean canMaximize)
          Set whether window has maximize/restore button for maximizing/restoring back.
 void setHeight(int height)
           
 void setIcon(com.google.gwt.user.client.ui.Image icon)
          Set icon displayed near the window's title.
 void setTitle(java.lang.String title)
          Set title at the header of the window.
 void setWidth(int width)
           
 void show()
           
 void show(com.google.gwt.user.client.ui.Panel parent)
           
 void showCentered()
           
 void showCentered(com.google.gwt.user.client.ui.Panel parent)
           
 
Methods inherited from class com.google.gwt.user.client.ui.DialogBox
doAttachChildren, doDetachChildren, getCaption, getHTML, getText, onBrowserEvent, onEnsureDebugId, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseUp, onPreviewNativeEvent, setHTML, setHTML, setText
 
Methods inherited from class com.google.gwt.user.client.ui.DecoratedPopupPanel
clear, getCellElement, getWidget, iterator, remove, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel
addAutoHidePartner, addCloseHandler, addPopupListener, getContainerElement, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, hide, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setHeight, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setVisible, setWidth, showRelativeTo
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, disown, orphan, remove
 
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, onAttach, onDetach, onLoad, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Field Detail

maximizeButton

protected MaximizeButton maximizeButton
Maximize window button.


parent

protected com.google.gwt.user.client.ui.Panel parent
Constructor Detail

Window

protected Window()

Window

public Window(java.lang.String title)
Parameters:
title - title of the window

Window

public Window(java.lang.String title,
              com.google.gwt.user.client.ui.Image icon)
Parameters:
title - title of the window
icon - icon of the window
Method Detail

beginDragging

protected void beginDragging(com.google.gwt.event.dom.client.MouseDownEvent event)
Overrides:
beginDragging in class com.google.gwt.user.client.ui.DialogBox
See Also:
DialogBox.beginDragging(com.google.gwt.event.dom.client.MouseDownEvent)

continueDragging

protected void continueDragging(com.google.gwt.event.dom.client.MouseMoveEvent event)
Overrides:
continueDragging in class com.google.gwt.user.client.ui.DialogBox

endDragging

protected void endDragging(com.google.gwt.event.dom.client.MouseUpEvent event)
Overrides:
endDragging in class com.google.gwt.user.client.ui.DialogBox
See Also:
DialogBox.endDragging(com.google.gwt.event.dom.client.MouseUpEvent)

addCloseClickHandler

public void addCloseClickHandler(CloseClickHandler handler)
Description copied from interface: HasCloseClickHandlers
Adds CloseClickHandler handler.

Specified by:
addCloseClickHandler in interface HasCloseClickHandlers
Parameters:
handler - close window click handler
See Also:
HasCloseClickHandlers.addCloseClickHandler(org.exoplatform.gwtframework.ui.client.window.CloseClickHandler)

onCloseClick

public void onCloseClick()
Description copied from interface: CloseClickHandler
Perform actions on close window click.

Specified by:
onCloseClick in interface CloseClickHandler
See Also:
CloseClickHandler.onCloseClick()

getTitle

public java.lang.String getTitle()
Overrides:
getTitle in class com.google.gwt.user.client.ui.PopupPanel
Returns:
the title title at the header of the window

setTitle

public void setTitle(java.lang.String title)
Set title at the header of the window.

Overrides:
setTitle in class com.google.gwt.user.client.ui.PopupPanel
Parameters:
title - the title to set

getIcon

public com.google.gwt.user.client.ui.Image getIcon()
Returns:
the icon

setIcon

public void setIcon(com.google.gwt.user.client.ui.Image icon)
Set icon displayed near the window's title.

Parameters:
icon - the icon to set

getHeight

public int getHeight()
Returns:
the height

setHeight

public void setHeight(int height)
Parameters:
height - the height to set

getWidth

public int getWidth()
Returns:
the width

setWidth

public void setWidth(int width)
Parameters:
width - the width to set

isCanClose

public boolean isCanClose()
Returns:
the canClose

setCanClose

public void setCanClose(boolean canClose)
Set whether window has close button for it's closing.

Parameters:
canClose - the canClose to set

isCanMaximize

public boolean isCanMaximize()
Returns:
the canMaximize

setCanMaximize

public void setCanMaximize(boolean canMaximize)
Set whether window has maximize/restore button for maximizing/restoring back. By default the value is false.

Parameters:
canMaximize - the canMaximize to set

addWindowButton

public void addWindowButton(WindowButton windowButton)
Adds button to window's header.

Parameters:
windowButton -

removeWindowButton

public void removeWindowButton(WindowButton windowButton)
Removes button from window's header.

Parameters:
windowButton -

destroy

public void destroy()
Destroy the window.


addMaximizeHandler

public void addMaximizeHandler(MaximizeHandler handler)
Description copied from interface: HasMaximizeHandlers
Adds MaximizeHandler handler.

Specified by:
addMaximizeHandler in interface HasMaximizeHandlers
Parameters:
handler - maximize window handler
See Also:
HasMaximizeHandlers.addMaximizeHandler(org.exoplatform.gwtframework.ui.client.window.MaximizeHandler)

onMaximize

public void onMaximize()
Description copied from interface: MaximizeHandler
Maximize window.

Specified by:
onMaximize in interface MaximizeHandler
See Also:
MaximizeHandler.onMaximize()

addRestoreHandler

public void addRestoreHandler(RestoreHandler handler)
Description copied from interface: HasRestoreHandlers
Adds RestoreHandler handler.

Specified by:
addRestoreHandler in interface HasRestoreHandlers
Parameters:
handler - restore window handler
See Also:
HasRestoreHandlers.addRestoreHandler(org.exoplatform.gwtframework.ui.client.window.RestoreHandler)

onRestore

public void onRestore()
Description copied from interface: RestoreHandler
Restore window size

Specified by:
onRestore in interface RestoreHandler
See Also:
RestoreHandler.onRestore()

isMaximized

public boolean isMaximized()

center

public void center()
Overrides:
center in class com.google.gwt.user.client.ui.PopupPanel

show

public void show()
Overrides:
show in class com.google.gwt.user.client.ui.DialogBox

show

public void show(com.google.gwt.user.client.ui.Panel parent)

showCentered

public void showCentered(com.google.gwt.user.client.ui.Panel parent)

showCentered

public void showCentered()

hide

public void hide()
Overrides:
hide in class com.google.gwt.user.client.ui.DialogBox


Copyright © 2013 eXo Platform SAS. All Rights Reserved.