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

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
                                  extended by org.exoplatform.gwtframework.ui.client.window.ResizeableWindow
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

public class ResizeableWindow
extends Window

Window component with ability to resize. Created by The eXo Platform SAS .

Version:
$
Author:
Vitaliy Gulyy

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
static int BORDER_BOTTOM
          Bottom border that enables resize
static int BORDER_LEFT
          Left border that enables resize
static int BORDER_RIGHT
          Right border that enables resize
static int BORDER_TOP
          Top border that enables resize
static int HEADER_HEIGHT
          Height of this window header
static int MIN_HEIGHT
          Minimal window height
static int MIN_WIDTH
          Minimal width
 
Fields inherited from class org.exoplatform.gwtframework.ui.client.window.Window
maximizeButton, parent
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
ResizeableWindow()
          Creates new instance of ResizeableWindow
ResizeableWindow(java.lang.String title)
          Creates new instance of ResizeableWindow with specified title
 
Method Summary
 void add(com.google.gwt.user.client.ui.Widget w)
          Add content widget to this window
protected  boolean checkMaximizeRestore(com.google.gwt.user.client.Event event)
          Checks whether the mouse cursor over this window and if so - maximizes or restores this window.
protected  boolean isStartResizing(com.google.gwt.user.client.Event event)
          Checks whether the mouse cursor is places over edges of this window and if so starts resizing
 void onBrowserEvent(com.google.gwt.user.client.Event event)
          Handling browser's events
 void onMaximize()
          Resize child widget after this window was maximized.
 void onRestore()
          Resize child widget after this window was restored from maximized state.
 void setHeight(int height)
          Sets new height of this window
 void setWidth(int width)
          Sets new width of this window
 void stopResizing()
          Stops resizing of this window
 
Methods inherited from class org.exoplatform.gwtframework.ui.client.window.Window
addCloseClickHandler, addMaximizeHandler, addRestoreHandler, addWindowButton, beginDragging, center, continueDragging, destroy, endDragging, getHeight, getIcon, getTitle, getWidth, hide, isCanClose, isCanMaximize, isMaximized, onCloseClick, removeWindowButton, setCanClose, setCanMaximize, setIcon, setTitle, show, show, showCentered, showCentered
 
Methods inherited from class com.google.gwt.user.client.ui.DialogBox
doAttachChildren, doDetachChildren, getCaption, getHTML, getText, 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
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

BORDER_LEFT

public static final int BORDER_LEFT
Left border that enables resize

See Also:
Constant Field Values

BORDER_RIGHT

public static final int BORDER_RIGHT
Right border that enables resize

See Also:
Constant Field Values

BORDER_TOP

public static final int BORDER_TOP
Top border that enables resize

See Also:
Constant Field Values

BORDER_BOTTOM

public static final int BORDER_BOTTOM
Bottom border that enables resize

See Also:
Constant Field Values

MIN_HEIGHT

public static final int MIN_HEIGHT
Minimal window height

See Also:
Constant Field Values

MIN_WIDTH

public static final int MIN_WIDTH
Minimal width

See Also:
Constant Field Values

HEADER_HEIGHT

public static final int HEADER_HEIGHT
Height of this window header

See Also:
Constant Field Values
Constructor Detail

ResizeableWindow

public ResizeableWindow()
Creates new instance of ResizeableWindow


ResizeableWindow

public ResizeableWindow(java.lang.String title)
Creates new instance of ResizeableWindow with specified title

Parameters:
title - initial title of this window
Method Detail

onBrowserEvent

public void onBrowserEvent(com.google.gwt.user.client.Event event)
Handling browser's events

Specified by:
onBrowserEvent in interface com.google.gwt.user.client.EventListener
Overrides:
onBrowserEvent in class com.google.gwt.user.client.ui.DialogBox
See Also:
DialogBox.onBrowserEvent(com.google.gwt.user.client.Event)

setHeight

public void setHeight(int height)
Sets new height of this window

Overrides:
setHeight in class Window
Parameters:
height - the height to set
See Also:
Window.setHeight(int)

setWidth

public void setWidth(int width)
Sets new width of this window

Overrides:
setWidth in class Window
Parameters:
width - the width to set
See Also:
Window.setWidth(int)

onMaximize

public void onMaximize()
Resize child widget after this window was maximized.

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

onRestore

public void onRestore()
Resize child widget after this window was restored from maximized state.

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

checkMaximizeRestore

protected boolean checkMaximizeRestore(com.google.gwt.user.client.Event event)
Checks whether the mouse cursor over this window and if so - maximizes or restores this window.

Parameters:
event - MouseDown event
Returns:
true is this window was maximized or restored, false otherwise

isStartResizing

protected boolean isStartResizing(com.google.gwt.user.client.Event event)
Checks whether the mouse cursor is places over edges of this window and if so starts resizing

Parameters:
event - MouseDown event
Returns:
true is resizing was started, false otherwise

stopResizing

public void stopResizing()
Stops resizing of this window


add

public void add(com.google.gwt.user.client.ui.Widget w)
Add content widget to this window

Specified by:
add in interface com.google.gwt.user.client.ui.HasWidgets
Overrides:
add in class com.google.gwt.user.client.ui.SimplePanel
See Also:
SimplePanel.add(com.google.gwt.user.client.ui.Widget)


Copyright © 2013 eXo Platform SAS. All Rights Reserved.