|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.ui.hud.base.WidgetBase
org.xith3d.ui.hud.base.RectangularWidget
org.xith3d.ui.hud.base.RectangularContentPaneWrapper
org.xith3d.ui.hud.base.Window
public abstract class Window
This class represents a simple Window above the HUD.
| Nested Class Summary | |
|---|---|
static class |
Window.CloseOperation
This enum can be used for the setCloseOperation() method of a Window. |
| Nested classes/interfaces inherited from interface org.xith3d.ui.hud.base.Widget |
|---|
Widget.DescriptionBase |
| Field Summary |
|---|
| Fields inherited from class org.xith3d.ui.hud.base.WidgetBase |
|---|
containerListeners, transformGroup, translation, Z_INDEX_UNIT, Z_INDEX_UNIT_ASSEMBLER |
| Constructor Summary | |
|---|---|
Window(ContentPaneWrapper contentPaneWrapper)
Creates a new undecorated Window. |
|
Window(ContentPaneWrapper contentPaneWrapper,
java.lang.String title)
Creates a new Window. |
|
Window(ContentPaneWrapper contentPaneWrapper,
WindowHeaderWidget.Description headerDesc,
java.lang.String title)
Creates a new Window. |
|
Window(ContentPaneWrapper contentPaneWrapper,
WindowHeaderWidget headerWidget)
Creates a new Window. |
|
Window(WidgetContainer contentPane)
Creates a new undecorated Window. |
|
Window(WidgetContainer contentPane,
java.lang.String title)
Creates a new Window. |
|
Window(WidgetContainer contentPane,
WindowHeaderWidget.Description headerDesc,
java.lang.String title)
Creates a new Window. |
|
Window(WidgetContainer contentPane,
WindowHeaderWidget headerWidget)
Creates a new Window. |
|
| Method Summary | |
|---|---|
void |
addFrameListener(WindowListener l)
Deprecated. Please use addWindowListener(WindowListener) instead. |
void |
addWindowListener(WindowListener l)
Adds a new WindowListener. |
protected boolean |
checkDragStartCondition(org.openmali.vecmath2.Tuple2f postionOnFrame)
|
protected abstract WindowHeaderWidget |
createHeaderWidget(WindowHeaderWidget.Description headerDesc,
java.lang.String title)
Creates the header Widget for this decorated Window. |
void |
detach(boolean delayed)
Removes the Widget from its Container. |
WidgetContainer |
getContentPane()
|
ContentPaneWrapper |
getContentPaneWrapper()
|
Window.CloseOperation |
getDefaultCloseOperation()
|
WindowHeaderWidget |
getHeaderWidget()
|
float |
getInnerHeight()
|
float |
getInnerWidth()
|
float |
getResX()
|
float |
getResY()
|
float |
getTransparency()
|
protected void |
init()
This method is called when the WidgetContainer is set. |
boolean |
isCloseButtonVisible()
|
boolean |
isDecorated()
|
boolean |
isPaneDraggingEnabled()
|
protected void |
onCloseButtonClicked()
This event is fired, if the close button on the Header-Widget was clicked. |
void |
onDetached()
This method is called right before the Widget has been detached from its WidgetContainer. |
void |
onFocusLost()
This event is fired, when the focus is lost by a Widget. |
void |
onKeyPressed(org.jagatoo.input.devices.components.Key key,
long when)
This event is fired, when a key is pressed on a focused Widget. |
void |
onKeyReleased(org.jagatoo.input.devices.components.Key key,
long when)
This event is fired, when a key is released on a focused Widget. |
void |
onKeyTyped(char ch,
long when)
This event is fired when a key is typed on the keyboard. |
void |
onMouseButtonPressed(org.jagatoo.input.devices.components.MouseButton button,
int x,
int y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
This event is fired, when a mouse button is pressed on a focused Widget. |
void |
onMouseButtonReleased(org.jagatoo.input.devices.components.MouseButton button,
int x,
int y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
This event is fired, when a mouse button is released on a focused Widget. |
void |
onMouseLeft(boolean isTopMost,
boolean hasFocus)
This method is called when the mouse left the Widget area |
void |
onMouseMoved(int x,
int y,
int buttonsState,
long when,
boolean isTopMost,
boolean hasFocus)
This event is fired, when the mouse is moved on a Widget. |
void |
onMouseUnbound()
This event is fired, when the mouse is released. |
void |
onMouseWheelMoved(int delta,
boolean isPageMove,
int x,
int y,
long when,
boolean isTopMost)
This event is fired, when the mouse wheel is moved on a Widget. |
void |
removeFrameListener(WindowListener l)
Deprecated. Please use removeWindowListener(WindowListener) instead. |
void |
removeWindowListener(WindowListener l)
Removes a WindowListener. |
void |
setCloseButtonVisible(boolean visible)
Sets the close button visible of hidden. |
void |
setContainer(WidgetContainer container)
Sets this Widget's container |
void |
setDefaultCloseOperation(Window.CloseOperation op)
Sets the default (if not overridden) CloseOperation to be executed when the close Button was clicked. |
boolean |
setLocation(float locX,
float locY,
boolean forced)
|
void |
setPaneDraggingEnabled(boolean enabled)
Sets pane-dragging enabled or disabled. |
protected boolean |
setSize(float width,
float height,
boolean forced)
|
void |
setVisible(boolean visible)
Sets wheather this Widget is visible or not |
| Methods inherited from class org.xith3d.ui.hud.base.RectangularContentPaneWrapper |
|---|
pick |
| Methods inherited from class org.xith3d.ui.hud.base.RectangularWidget |
|---|
getPickHeight, getPickSGZPosition, getPickWidth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xith3d.ui.hud.base.BorderSettable |
|---|
getBorder, setBorder, setBorder |
| Methods inherited from interface org.openmali.types.twodee.Sized2f |
|---|
setHeight, setWidth |
| Constructor Detail |
|---|
public Window(WidgetContainer contentPane,
WindowHeaderWidget.Description headerDesc,
java.lang.String title)
contentPane - the Widget that visually defines the Window.headerDesc - the description of this Window's header (or null for an undecorated Window)title - this Window's title
public Window(WidgetContainer contentPane,
WindowHeaderWidget headerWidget)
contentPane - the Widget that visually defines the Window.headerWidget - a Widget, that defines this Window's header (or null for an undecorated Window)
public Window(WidgetContainer contentPane,
java.lang.String title)
contentPane - the Widget that visually defines the Window.title - this Window's header (or null for an undecorated Window)public Window(WidgetContainer contentPane)
contentPane - the Widget that visually defines the Window.
public Window(ContentPaneWrapper contentPaneWrapper,
WindowHeaderWidget.Description headerDesc,
java.lang.String title)
contentPaneWrapper - the Widget that visually defines the Window.headerDesc - the description of this Widget's header (or null for an undecorated Window)title - this Frame's title (unappreciated, if titleDesc is null)
public Window(ContentPaneWrapper contentPaneWrapper,
WindowHeaderWidget headerWidget)
contentPaneWrapper - the Widget that visually defines the Window.headerWidget - a Widget, that defines this Window's header (or null for an undecorated Window)
public Window(ContentPaneWrapper contentPaneWrapper,
java.lang.String title)
contentPaneWrapper - the Widget that visually defines the Window.title - this Frame's title (or null for an undecorated Frame)public Window(ContentPaneWrapper contentPaneWrapper)
contentPaneWrapper - the Widget that visually defines the Window.| Method Detail |
|---|
public boolean isDecorated()
public WindowHeaderWidget getHeaderWidget()
public float getTransparency()
getTransparency in interface Widget
public boolean setLocation(float locX,
float locY,
boolean forced)
setLocation in class WidgetBasepublic void setDefaultCloseOperation(Window.CloseOperation op)
op - the default close operation or null for no operationpublic Window.CloseOperation getDefaultCloseOperation()
public void setCloseButtonVisible(boolean visible)
visible -
java.lang.UnsupportedOperationException - if this is an undecorated Windowpublic boolean isCloseButtonVisible()
java.lang.UnsupportedOperationException - if this is an undecorated Windowpublic void setPaneDraggingEnabled(boolean enabled)
public boolean isPaneDraggingEnabled()
protected boolean checkDragStartCondition(org.openmali.vecmath2.Tuple2f postionOnFrame)
public void onMouseButtonPressed(org.jagatoo.input.devices.components.MouseButton button,
int x,
int y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
onMouseButtonPressed in interface WidgetonMouseButtonPressed in class WidgetBasebutton - the button that was pressedx - the current mouse x positiony - the current mouse y positionisTopMost - is this Widget topMosthasFocus - is this Widget focusednet.jtank.input.MouseCodepublic void onMouseUnbound()
onMouseUnbound in interface WidgetonMouseUnbound in class WidgetBase
public void onMouseButtonReleased(org.jagatoo.input.devices.components.MouseButton button,
int x,
int y,
long when,
long lastWhen,
boolean isTopMost,
boolean hasFocus)
onMouseButtonReleased in interface WidgetonMouseButtonReleased in class WidgetBasebutton - the button that was releasedx - the current mouse x positiony - the current mouse y positionisTopMost - is this Widget topMosthasFocus - is this Widget focusednet.jtank.input.MouseCode
public void onMouseMoved(int x,
int y,
int buttonsState,
long when,
boolean isTopMost,
boolean hasFocus)
onMouseMoved in interface WidgetonMouseMoved in class WidgetBasex - the new X coordinatey - the new Y coordinateisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onMouseWheelMoved(int delta,
boolean isPageMove,
int x,
int y,
long when,
boolean isTopMost)
onMouseWheelMoved in interface WidgetonMouseWheelMoved in class WidgetBasedelta - a positive value when the wheel was moved upx - the current mouse x positiony - the current mouse y positionisTopMost - is this Widget topMostpublic void onFocusLost()
onFocusLost in interface WidgetonFocusLost in class WidgetBase
public void onMouseLeft(boolean isTopMost,
boolean hasFocus)
onMouseLeft in interface WidgetonMouseLeft in class WidgetBaseisTopMost - is this Widget topMosthasFocus - is this Widget focused
public void onKeyPressed(org.jagatoo.input.devices.components.Key key,
long when)
onKeyPressed in interface WidgetonKeyPressed in class WidgetBasekey - the key that was pressedwhen - the keyevent's timestamp
public void onKeyReleased(org.jagatoo.input.devices.components.Key key,
long when)
onKeyReleased in interface WidgetonKeyReleased in class WidgetBasekey - the key that was releasedwhen - the keyevent's timestamp
public void onKeyTyped(char ch,
long when)
onKeyTyped in interface WidgetonKeyTyped in class WidgetBasech - the typed key's characterwhen - the keyevent's timestamp@Deprecated public void addFrameListener(WindowListener l)
addWindowListener(WindowListener) instead.
l - the new WindowListener@Deprecated public void removeFrameListener(WindowListener l)
removeWindowListener(WindowListener) instead.
l - the WindowListener to removepublic void addWindowListener(WindowListener l)
l - the new WindowListenerpublic void removeWindowListener(WindowListener l)
l - the WindowListener to removepublic final ContentPaneWrapper getContentPaneWrapper()
getContentPaneWrapper in interface ContentPaneWrapperpublic final WidgetContainer getContentPane()
getContentPane in interface ContentPaneWrapperpublic final float getInnerWidth()
public final float getInnerHeight()
public final float getResX()
public final float getResY()
public void detach(boolean delayed)
detach in interface Widgetdetach in class WidgetBasedelayed - if true, the widget is detached with the next frame, but not instantly.public void onDetached()
onDetached in interface WidgetonDetached in class WidgetBaseprotected void onCloseButtonClicked()
WidgetBase.detach()public void setVisible(boolean visible)
setVisible in interface WidgetsetVisible in class WidgetBasevisible - visible?
protected boolean setSize(float width,
float height,
boolean forced)
setSize in class WidgetBase
protected abstract WindowHeaderWidget createHeaderWidget(WindowHeaderWidget.Description headerDesc,
java.lang.String title)
headerDesc - the description for the header Widgettitle - the Window's title
protected void init()
init in class WidgetBasepublic void setContainer(WidgetContainer container)
setContainer in interface WidgetsetContainer in class WidgetBasecontainer - the new Container
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||