|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.matthiasmann.twl.Widget
de.matthiasmann.twl.AnimatedWindow
public class AnimatedWindow
A simple animated window - it changes size
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class de.matthiasmann.twl.Widget |
|---|
Widget.OffscreenMouseAdjustments, Widget.RenderOffscreen |
| Field Summary |
|---|
| Fields inherited from class de.matthiasmann.twl.Widget |
|---|
STATE_DISABLED, STATE_HAS_FOCUSED_CHILD, STATE_HAS_OPEN_POPUPS, STATE_KEYBOARD_FOCUS |
| Constructor Summary | |
|---|---|
AnimatedWindow()
|
|
| Method Summary | |
|---|---|
void |
addCallback(java.lang.Runnable cb)
|
int |
getMinHeight()
Returns the minimum height of the widget. |
int |
getMinWidth()
Returns the minimum width of the widget. |
BooleanModel |
getModel()
|
int |
getNumAnimSteps()
|
int |
getPreferredInnerHeight()
Computes the preferred inner height (the size of the widget without the border) The default implementation uses the current position of the children. |
int |
getPreferredInnerWidth()
Computes the preferred inner width (the size of the widget without the border) The default implementation uses the current position of the children. |
boolean |
handleEvent(Event evt)
Called when an event occurred that this widget could be interested in. |
boolean |
isAnimating()
|
boolean |
isClosed()
|
boolean |
isClosing()
|
boolean |
isOpen()
|
boolean |
isOpening()
|
protected void |
layout()
Called when the layoutInvalid flag is set. |
protected void |
paint(GUI gui)
Paints this widget and it's children. |
void |
removeCallback(java.lang.Runnable cb)
|
void |
setModel(BooleanModel model)
|
void |
setNumAnimSteps(int numAnimSteps)
|
void |
setState(boolean open)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnimatedWindow()
| Method Detail |
|---|
public void addCallback(java.lang.Runnable cb)
public void removeCallback(java.lang.Runnable cb)
public int getNumAnimSteps()
public void setNumAnimSteps(int numAnimSteps)
public void setState(boolean open)
public BooleanModel getModel()
public void setModel(BooleanModel model)
public boolean isOpen()
public boolean isOpening()
public boolean isClosed()
public boolean isClosing()
public boolean isAnimating()
public boolean handleEvent(Event evt)
WidgetThe default implementation handles only keyboard events and delegates
them to the child widget which has keyboard focus.
If focusKey handling is enabled then this widget cycles the keyboard
focus through it's children.
If the key was not consumed by a child or focusKey and an inputMap is
specified then the event is translated by the InputMap and
handleKeyStrokeAction is called when a mapping was found.
If the widget wants to receive mouse events then it must return true for all mouse events except for MOUSE_WHEEL (which is optional) event. Otherwise the following mouse event are not send. Before mouse movement or button events are send a MOUSE_ENTERED event is send first.
handleEvent in class Widgetevt - The event - do not store this object - it may be reused
Widget.setFocusKeyEnabled(boolean),
Widget.handleKeyStrokeAction(java.lang.String, de.matthiasmann.twl.Event),
Widget.setInputMap(de.matthiasmann.twl.InputMap)public int getMinWidth()
Widget
getMinWidth in class Widgetpublic int getMinHeight()
Widget
getMinHeight in class Widgetpublic int getPreferredInnerWidth()
Widget
getPreferredInnerWidth in class Widgetpublic int getPreferredInnerHeight()
Widget
getPreferredInnerHeight in class Widgetprotected void layout()
Widget
layout in class Widgetprotected void paint(GUI gui)
WidgetA subclass should overwrite paintWidget() instead of this function.
The default implementation calls the following method in order:
Widget.paintBackground(de.matthiasmann.twl.GUI)Widget.paintWidget(de.matthiasmann.twl.GUI)Widget.paintChildren(de.matthiasmann.twl.GUI)Widget.paintOverlay(de.matthiasmann.twl.GUI)
paint in class Widgetgui - the GUI object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||