|
||||||||||
| 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.WindowHeaderWidget
public class WindowHeaderWidget
Represents a Window's header bar's Widget.
| Nested Class Summary | |
|---|---|
static class |
WindowHeaderWidget.Description
|
| 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 | |
|---|---|
WindowHeaderWidget(float width,
float height,
java.lang.String title)
Creates a new WindowHeaderWidget. |
|
WindowHeaderWidget(float width,
float height,
WindowHeaderWidget.Description desc,
java.lang.String title)
Creates a new WindowHeaderWidget. |
|
WindowHeaderWidget(org.openmali.types.twodee.Sized2fRO size,
java.lang.String title)
Creates a new WindowHeaderWidget. |
|
WindowHeaderWidget(org.openmali.types.twodee.Sized2fRO size,
WindowHeaderWidget.Description desc,
java.lang.String title)
Creates a new WindowHeaderWidget. |
|
| Method Summary | |
|---|---|
protected Button |
createCloseButton(WindowHeaderWidget.Description desc)
This method creates the close button for the Window. |
protected Button |
createTitleLabel(Button.Description buttonDesc)
This method creates the close button for the Window. |
TextAlignment |
getAlignment()
|
Texture |
getBackground()
|
org.openmali.vecmath2.Colorf |
getBackgroundColor()
|
float |
getBackgroundTileHeight()
|
org.openmali.types.twodee.Sized2fRO |
getBackgroundTileSize()
|
float |
getBackgroundTileWidth()
|
Button |
getCloseButton()
|
java.awt.Font |
getFont()
|
org.openmali.vecmath2.Colorf |
getFontColor()
|
java.lang.String |
getText()
|
float |
getTransparency()
|
protected void |
init()
This method is called when the WidgetContainer is set. |
boolean |
isMouseOverBar(float relX,
float relY)
Checks, if the mouse is over the bar (not over any Button, etc.). |
HUDPickResult |
pick(int canvasX,
int canvasY,
HUDPickResult.HUDPickReason pickReason,
org.jagatoo.input.devices.components.MouseButton button,
long when,
long meta,
int flags)
Tests whether a Widget is under the cursor and runs the approriate methods if true. |
void |
setAlignment(TextAlignment alignment)
Sets the horizontal and vertical alignment of the text |
void |
setBackground(org.openmali.vecmath2.Colorf color)
Sets the background color of the Widget. |
void |
setBackground(java.lang.String texture)
Sets the background Texture of the Widget. |
void |
setBackground(Texture texture)
Sets the background texture of the Widget. |
void |
setBackgroundTileSize(float tileWidth,
float tileHeight)
Sets the background tile size. |
void |
setBackgroundTileSize(org.openmali.types.twodee.Sized2fRO tileSize)
Sets the background tile size. |
void |
setFont(java.awt.Font font)
Sets the new Font to be used |
void |
setFontColor(org.openmali.vecmath2.Colorf color)
Sets the new color to be used |
protected boolean |
setSize(float width,
float height,
boolean forced)
|
void |
setText(java.lang.String title)
Sets the new text to be displayed |
| 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.openmali.types.twodee.Sized2f |
|---|
setHeight, setWidth |
| Constructor Detail |
|---|
public WindowHeaderWidget(float width,
float height,
WindowHeaderWidget.Description desc,
java.lang.String title)
public WindowHeaderWidget(org.openmali.types.twodee.Sized2fRO size,
WindowHeaderWidget.Description desc,
java.lang.String title)
public WindowHeaderWidget(float width,
float height,
java.lang.String title)
public WindowHeaderWidget(org.openmali.types.twodee.Sized2fRO size,
java.lang.String title)
| Method Detail |
|---|
public float getTransparency()
getTransparency in interface Widgetpublic void setBackground(Texture texture)
setBackground in interface BackgroundSettabletexture - the texture resource to usepublic void setBackground(java.lang.String texture)
setBackground in interface BackgroundSettabletexture - the texture resource to usepublic Texture getBackground()
getBackground in interface BackgroundSettablepublic void setBackground(org.openmali.vecmath2.Colorf color)
setBackground in interface BackgroundSettablecolor - the color to usepublic org.openmali.vecmath2.Colorf getBackgroundColor()
getBackgroundColor in interface BackgroundSettable
public void setBackgroundTileSize(float tileWidth,
float tileHeight)
setBackgroundTileSize in interface BackgroundSettabletileWidth - the tile width (or negative for no tiling of width)tileHeight - the tile height (or negative for no tiling of height)public void setBackgroundTileSize(org.openmali.types.twodee.Sized2fRO tileSize)
setBackgroundTileSize in interface BackgroundSettabletileSize - the tile size (or null for no tiling)public org.openmali.types.twodee.Sized2fRO getBackgroundTileSize()
getBackgroundTileSize in interface BackgroundSettablepublic float getBackgroundTileWidth()
getBackgroundTileWidth in interface BackgroundSettablepublic float getBackgroundTileHeight()
getBackgroundTileHeight in interface BackgroundSettablepublic void setText(java.lang.String title)
setText in interface TextWidgettitle - the new Textpublic java.lang.String getText()
getText in interface TextWidgetpublic void setFont(java.awt.Font font)
setFont in interface TextWidgetfont - the new Fontpublic java.awt.Font getFont()
getFont in interface TextWidgetpublic void setFontColor(org.openmali.vecmath2.Colorf color)
setFontColor in interface TextWidgetcolor - the new colorpublic org.openmali.vecmath2.Colorf getFontColor()
getFontColor in interface TextWidgetpublic void setAlignment(TextAlignment alignment)
setAlignment in interface TextWidgetpublic TextAlignment getAlignment()
getAlignment in interface TextWidgetpublic Button getCloseButton()
public boolean isMouseOverBar(float relX,
float relY)
relX - relY -
public HUDPickResult pick(int canvasX,
int canvasY,
HUDPickResult.HUDPickReason pickReason,
org.jagatoo.input.devices.components.MouseButton button,
long when,
long meta,
int flags)
pick in interface Widgetpick in class RectangularWidgetcanvasX - the x position of the mouse on the Canvas3DcanvasY - the y position of the mouse on the Canvas3DpickReason - the action which caused this pick operationbutton - the mouse-button, that caused the pickingwhen - the timestamp of the pickingmeta - this could be either the lastPressTime, lastReleaseTime, buttonsState mask or the page-move-boolean. (depends on the pickReason)
protected boolean setSize(float width,
float height,
boolean forced)
setSize in class WidgetBaseprotected Button createTitleLabel(Button.Description buttonDesc)
buttonDesc - the Button.Description for the close Button
protected Button createCloseButton(WindowHeaderWidget.Description desc)
desc - the WindowHeaderWidget.Description
protected void init()
init in class WidgetBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||