|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.widgetideas.client.ResizableWidgetCollection
public class ResizableWidgetCollection
A collection of ResizableWidget
that periodically checks the outer
dimensions of a widget and redraws it as necessary. Every
ResizableWidgetCollection
uses a timer, so consider the cost when
adding one.
Typically, a ResizableWidgetCollection
is only needed if you expect
your widgets to resize based on window resizing or other events. Fixed sized
Widgets do not need to be added to a ResizableWidgetCollection
as
they cannot be resized.
Constructor Summary | |
---|---|
|
ResizableWidgetCollection()
Create a ResizableWidget. |
|
ResizableWidgetCollection(boolean resizeCheckingEnabled)
Constructor. |
|
ResizableWidgetCollection(int resizeCheckDelay)
Constructor. |
protected |
ResizableWidgetCollection(int resizeCheckDelay,
boolean resizeCheckingEnabled)
Constructor. |
Method Summary | |
---|---|
void |
add(ResizableWidget widget)
Add a resizable widget to the collection. |
void |
checkWidgetSize()
Check to see if any Widgets have been resized and call their handlers appropriately. |
static ResizableWidgetCollection |
get()
Get the globally accessible ResizableWidgetCollection . |
int |
getResizeCheckDelay()
Get the delay between resize checks in milliseconds. |
boolean |
isResizeCheckingEnabled()
Check whether or not resize checking is enabled. |
void |
onWindowResized(int width,
int height)
Called when the browser window is resized. |
void |
remove(ResizableWidget widget)
Remove a ResizableWidget from the collection. |
void |
setResizeCheckDelay(int resizeCheckDelay)
Set the delay between resize checks in milliseconds. |
void |
setResizeCheckingEnabled(boolean enabled)
Set whether or not resize checking is enabled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResizableWidgetCollection()
public ResizableWidgetCollection(boolean resizeCheckingEnabled)
resizeCheckingEnabled
- false to disable resize checkingpublic ResizableWidgetCollection(int resizeCheckDelay)
resizeCheckDelay
- the delay between checks in millisecondsprotected ResizableWidgetCollection(int resizeCheckDelay, boolean resizeCheckingEnabled)
Method Detail |
---|
public static ResizableWidgetCollection get()
ResizableWidgetCollection
. In most
cases, the global collection can be used for all ResizableWidget
s.
ResizableWidgetCollection
public void add(ResizableWidget widget)
widget
- the resizable widget to addpublic void checkWidgetSize()
public int getResizeCheckDelay()
public boolean isResizeCheckingEnabled()
public void onWindowResized(int width, int height)
onWindowResized
in interface com.google.gwt.user.client.WindowResizeListener
width
- the width of the window's client area.height
- the height of the window's client area.public void remove(ResizableWidget widget)
ResizableWidget
from the collection.
widget
- the widget to removepublic void setResizeCheckDelay(int resizeCheckDelay)
resizeCheckDelay
- the new delaypublic void setResizeCheckingEnabled(boolean enabled)
enabled
- true to enable the resize checking timer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |