org.xith3d.ui.hud.widgets
Class Panel

java.lang.Object
  extended by org.xith3d.ui.hud.base.WidgetBase
      extended by org.xith3d.ui.hud.base.RectangularWidget
          extended by org.xith3d.ui.hud.base.WidgetContainerBase
              extended by org.xith3d.ui.hud.widgets.Panel
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.types.twodee.Positioned2f, org.openmali.types.twodee.Positioned2fRO, org.openmali.types.twodee.Sized2f, org.openmali.types.twodee.Sized2fRO, BackgroundSettable, BackgroundSettableWidget, BorderSettable, PaddingSettable, Widget, WidgetContainer, ScrollbarListener
Direct Known Subclasses:
ButtonsLeftMenusCenterMenuGroupWidget, MenuBase

public class Panel
extends WidgetContainerBase
implements BackgroundSettableWidget


Nested Class Summary
static class Panel.Description
          This class is used to describe a Panel Widget.
 
Nested classes/interfaces inherited from interface org.xith3d.ui.hud.base.Widget
Widget.DescriptionBase
 
Nested classes/interfaces inherited from interface org.xith3d.ui.hud.base.WidgetContainer
WidgetContainer.FocusMoveDirection
 
Field Summary
 
Fields inherited from class org.xith3d.ui.hud.base.WidgetContainerBase
childrenTG
 
Fields inherited from class org.xith3d.ui.hud.base.WidgetBase
containerListeners, transformGroup, translation, Z_INDEX_UNIT, Z_INDEX_UNIT_ASSEMBLER
 
Constructor Summary
Panel(float width, float height)
          Creates a new Panel with the given width and height
Panel(float width, float height, boolean withDefaultBG)
          Creates a new Panel with the given width and height
Panel(float width, float height, org.openmali.vecmath2.Colorf backgroundColor)
          Creates a new Panel with the given width and height
Panel(float width, float height, float resX, float resY)
          Creates a new Panel with the given width and height.
Panel(float width, float height, float resX, float resY, boolean withDefaultBG)
          Creates a new Panel with the given width and height.
Panel(float width, float height, float resX, float resY, org.openmali.vecmath2.Colorf backgroundColor)
          Creates a new Panel with the given width and height
Panel(float width, float height, float resX, float resY, int zIndex)
          Creates a new Panel with the given width, height and z-index.
Panel(float width, float height, float resX, float resY, int zIndex, boolean withDefaultBG)
          Creates a new Panel with the given width, height and z-index.
Panel(float width, float height, float resX, float resY, int zIndex, org.openmali.vecmath2.Colorf backgroundColor)
          Creates a new Panel with the given width and height
Panel(float width, float height, float resX, float resY, int zIndex, java.lang.String backgroundTex)
          Creates a new Panel with the given width, height and z-index.
Panel(float width, float height, float resX, float resY, int zIndex, Texture backgroundTex)
          Creates a new Panel with the given width, height and z-index.
Panel(float width, float height, float resX, float resY, java.lang.String backgroundTex)
          Creates a new Panel with the given width and height.
Panel(float width, float height, float resX, float resY, Texture backgroundTex)
          Creates a new Panel with the given width and height.
Panel(float width, float height, int zIndex)
          Creates a new Panel with the given width, height and z-index.
Panel(float width, float height, int zIndex, boolean withDefaultBG)
          Creates a new Panel with the given width, height and z-index.
Panel(float width, float height, int zIndex, org.openmali.vecmath2.Colorf backgroundColor)
          Creates a new Panel with the given width and height
Panel(float width, float height, int zIndex, java.lang.String backgroundTex)
          Creates a new Panel with the given width, height and z-index.
Panel(float width, float height, int zIndex, Texture backgroundTex)
          Creates a new Panel with the given width, height and z-index.
Panel(float width, float height, java.lang.String backgroundTex)
          Creates a new WidgetContainer with the given width and height.
Panel(float width, float height, Texture backgroundTex)
          Creates a new Panel with the given width and height.
Panel(org.openmali.types.twodee.Sized2fRO size)
          Creates a new Panel with the given width and height
Panel(org.openmali.types.twodee.Sized2fRO size, boolean withDefaultBG)
          Creates a new Panel with the given width and height
Panel(org.openmali.types.twodee.Sized2fRO size, org.openmali.vecmath2.Colorf backgroundColor)
          Creates a new Panel with the given width and height
Panel(org.openmali.types.twodee.Sized2fRO size, int zIndex)
          Creates a new Panel with the given width, height and z-index.
Panel(org.openmali.types.twodee.Sized2fRO size, int zIndex, boolean withDefaultBG)
          Creates a new Panel with the given width, height and z-index.
Panel(org.openmali.types.twodee.Sized2fRO size, int zIndex, org.openmali.vecmath2.Colorf backgroundColor)
          Creates a new Panel with the given width and height
Panel(org.openmali.types.twodee.Sized2fRO size, int zIndex, java.lang.String backgroundTex)
          Creates a new Panel with the given width, height and z-index.
Panel(org.openmali.types.twodee.Sized2fRO size, int zIndex, Texture backgroundTex)
          Creates a new Panel with the given width, height and z-index.
Panel(org.openmali.types.twodee.Sized2fRO size, java.lang.String backgroundTex)
          Creates a new WidgetContainer with the given width and height.
Panel(org.openmali.types.twodee.Sized2fRO size, Texture backgroundTex)
          Creates a new Panel with the given width and height.
Panel(org.openmali.types.twodee.Sized2fRO size, org.openmali.vecmath2.Tuple2f resolution)
          Creates a new Panel with the given width and height.
Panel(org.openmali.types.twodee.Sized2fRO size, org.openmali.vecmath2.Tuple2f resolution, boolean withDefaultBG)
          Creates a new Panel with the given width and height.
Panel(org.openmali.types.twodee.Sized2fRO size, org.openmali.vecmath2.Tuple2f resolution, org.openmali.vecmath2.Colorf backgroundColor)
          Creates a new Panel with the given width and height
Panel(org.openmali.types.twodee.Sized2fRO size, org.openmali.vecmath2.Tuple2f resolution, int zIndex)
          Creates a new Panel with the given width, height and z-index.
Panel(org.openmali.types.twodee.Sized2fRO size, org.openmali.vecmath2.Tuple2f resolution, int zIndex, boolean withDefaultBG)
          Creates a new Panel with the given width, height and z-index.
Panel(org.openmali.types.twodee.Sized2fRO size, org.openmali.vecmath2.Tuple2f resolution, int zIndex, org.openmali.vecmath2.Colorf backgroundColor)
          Creates a new Panel with the given width and height
Panel(org.openmali.types.twodee.Sized2fRO size, org.openmali.vecmath2.Tuple2f resolution, int zIndex, java.lang.String backgroundTex)
          Creates a new Panel with the given width, height and z-index.
Panel(org.openmali.types.twodee.Sized2fRO size, org.openmali.vecmath2.Tuple2f resolution, int zIndex, Texture backgroundTex)
          Creates a new Panel with the given width, height and z-index.
Panel(org.openmali.types.twodee.Sized2fRO size, org.openmali.vecmath2.Tuple2f resolution, java.lang.String backgroundTex)
          Creates a new Panel with the given width and height.
Panel(org.openmali.types.twodee.Sized2fRO size, org.openmali.vecmath2.Tuple2f resolution, Texture backgroundTex)
          Creates a new Panel with the given width and height.
 
Method Summary
 Texture getBackground()
          
 org.openmali.vecmath2.Colorf getBackgroundColor()
          
 float getBackgroundTileHeight()
          
 org.openmali.types.twodee.Sized2fRO getBackgroundTileSize()
          
 float getBackgroundTileWidth()
          
 Border getBorder()
          
 Texture getForeground()
          
 float getTransparency()
          
protected  void init()
          This method is called when the WidgetContainer is set.
 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 setBorder(Border.Description borderDesc)
          Creates a new Border from the given Border.Desctiption and invokes setBorder(Border).
 void setBorder(Border border)
          Sets the Border to use for this BorderSettable Widget.
 void setForeground(java.lang.String texture)
          Sets the foreground texture of the WidgetContainer.
 void setForeground(Texture texture)
          Sets the foreground texture of the WidgetContainer.
 boolean setSize(float width, float height, boolean forced)
          
 void update()
          Updates the Widget's internals.
 
Methods inherited from class org.xith3d.ui.hud.base.WidgetContainerBase
addContainerScrollListener, addWidget, addWidget, addWidget, addWidget, addWidget, addWidget, addWidget, addWidget, addWidget, addWidget, addWidgetCentered, addWidgetCentered, clear, focus, getChildrenOffset, getChildrenOffsetX, getChildrenOffsetY, getCurrentFocusedWidget, getCurrentFocusedWidget, getEqualHeight, getEqualWidth, getInnerAspect, getInnerHeight, getInnerSize, getInnerWidth, getLayout, getLocationCanvas2HUD, getLocationHUD2Canvas, getLocationHUD2SG, getLocationSG2HUD, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getResAspect, getResolution, getResX, getResY, getScrollScale, getScrollScaleX, getScrollScaleY, getSGGroup, getSGPixelHeight, getSGPixelSize, getSGPixelWidth, getSizeCanvas2HUD, getSizeHUD2Canvas, getSizeHUD2SG, getSizeOfPixels, getSizeOnHUD, getSizeSG2HUD, getWidgets, isClippingEnbaled, moveFocus, onControllerAxisChanged, onControllerButtonPressed, onControllerButtonReleased, onDetached, onFocusGained, onFocusLost, onInputStateChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseUnbound, onScrollbarValueChanged, pick, removeContainerScrollListener, removeWidget, setChildrenOffset, setClippingEnabled, setContainer, setLayout, setPadding, setPadding, setScrollScale, setScrollScale, setTransparency, setVisible, updateTranslation
 
Methods inherited from class org.xith3d.ui.hud.base.RectangularWidget
getPickHeight, getPickSGZPosition, getPickWidth
 
Methods inherited from class org.xith3d.ui.hud.base.WidgetBase
addContainerListener, addFocusListener, addInputListener, addLocationListener, addSizeListener, addVisibilityListener, detach, detach, getAspect, getAssembly, getCachedToolTipWidget, getContainer, getContextMenu, getCursor, getHeight, getHUD, getInheritedCursor, getLeft, getLocation, getName, getSGNode, getSGZPosition, getSize, getToolTip, getTop, getUserObject, getWidgetAssembler, getWidth, getZIndex, hasFocus, hasFocus, hasToolTip, isClickable, isDraggable, isFocussable, isInitialized, isInitializing, isPickable, isVisible, onAddedToContainer, onAddedToHUD, onMouseButtonPressed, onMouseButtonReleased, onMouseEntered, onMouseLeft, onMouseMoved, onMouseStopped, onMouseWheelMoved, onRemovedFromContainer, pickWidgetAssembler, removeContainerListener, removeFocusListener, removeInputListener, removeLocationListener, removeSizeListener, removeVisibilityListener, requestFocus, setAssembly, setCachedToolTipWidget, setClickable, setContextMenu, setCursor, setDraggable, setFocussable, setHeight, setLocation, setLocation, setLocation, setName, setPickable, setSize, setSize, setSize, setToolTip, setTransparency, setUserObject, setWidth, setZIndex, toString
 
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.Widget
addContainerListener, addFocusListener, addInputListener, addLocationListener, addSizeListener, addVisibilityListener, detach, detach, getAspect, getAssembly, getCachedToolTipWidget, getContainer, getContextMenu, getCursor, getHeight, getHUD, getInheritedCursor, getLeft, getLocation, getName, getSGNode, getSGZPosition, getSize, getToolTip, getTop, getUserObject, getWidth, getZIndex, hasFocus, hasFocus, hasToolTip, isClickable, isDraggable, isFocussable, isPickable, isVisible, onControllerAxisChanged, onControllerButtonPressed, onControllerButtonReleased, onDetached, onFocusGained, onFocusLost, onInputStateChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseButtonPressed, onMouseButtonReleased, onMouseEntered, onMouseLeft, onMouseMoved, onMouseStopped, onMouseUnbound, onMouseWheelMoved, pick, removeContainerListener, removeFocusListener, removeInputListener, removeLocationListener, removeSizeListener, removeVisibilityListener, requestFocus, setAssembly, setCachedToolTipWidget, setClickable, setContainer, setContextMenu, setCursor, setDraggable, setFocussable, setLocation, setLocation, setName, setPickable, setSize, setSize, setSize, setToolTip, setTransparency, setUserObject, setVisible, setZIndex
 
Methods inherited from interface org.openmali.types.twodee.Sized2f
setHeight, setWidth
 

Constructor Detail

Panel

public Panel(float width,
             float height,
             float resX,
             float resY,
             int zIndex,
             boolean withDefaultBG)
Creates a new Panel with the given width, height and z-index. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
resX - the x-size of the WidgetContainer's resolution
resY - the y-size of the WidgetContainer's resolution
zIndex - the z-index of this Widget
withDefaultBG - apply (theme-)default background?

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             org.openmali.vecmath2.Tuple2f resolution,
             int zIndex,
             boolean withDefaultBG)
Creates a new Panel with the given width, height and z-index. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
size - the new size of this Widget
resolution - the resolution of the WidgetContainer
zIndex - the z-index of this Widget
withDefaultBG - apply (theme-)default background texture?

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             org.openmali.vecmath2.Tuple2f resolution,
             int zIndex)
Creates a new Panel with the given width, height and z-index. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
size - the new size of this Widget
resolution - the resolution of the WidgetContainer
zIndex - the z-index of this Widget

Panel

public Panel(float width,
             float height,
             float resX,
             float resY,
             int zIndex)
Creates a new Panel with the given width, height and z-index. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
resX - the x-size of the WidgetContainer's resolution
resY - the y-size of the WidgetContainer's resolution
zIndex - the z-index of this Widget

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             org.openmali.vecmath2.Tuple2f resolution,
             int zIndex,
             java.lang.String backgroundTex)
Creates a new Panel with the given width, height and z-index. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
size - the new size of this Widget
resolution - the resolution of the WidgetContainer
zIndex - the z-index of this Widget
backgroundTex - the background texture

Panel

public Panel(float width,
             float height,
             float resX,
             float resY,
             int zIndex,
             java.lang.String backgroundTex)
Creates a new Panel with the given width, height and z-index. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
resX - the x-size of the WidgetContainer's resolution
resY - the y-size of the WidgetContainer's resolution
zIndex - the z-index of this Widget
backgroundTex - the background texture

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             org.openmali.vecmath2.Tuple2f resolution,
             int zIndex,
             Texture backgroundTex)
Creates a new Panel with the given width, height and z-index. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
size - the new size of this Widget
resolution - the resolution of the WidgetContainer
zIndex - the z-index of this Widget
backgroundTex - the background texture

Panel

public Panel(float width,
             float height,
             float resX,
             float resY,
             int zIndex,
             Texture backgroundTex)
Creates a new Panel with the given width, height and z-index. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
resX - the x-size of the WidgetContainer's resolution
resY - the y-size of the WidgetContainer's resolution
zIndex - the z-index of this Widget
backgroundTex - the background texture

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             org.openmali.vecmath2.Tuple2f resolution,
             boolean withDefaultBG)
Creates a new Panel with the given width and height. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
size - the new size of this Widget
resolution - the resolution of the WidgetContainer
withDefaultBG - apply (theme-)default background?

Panel

public Panel(float width,
             float height,
             float resX,
             float resY,
             boolean withDefaultBG)
Creates a new Panel with the given width and height. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
resX - the x-size of the WidgetContainer's resolution
resY - the y-size of the WidgetContainer's resolution
withDefaultBG - apply (theme-)default background?

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             org.openmali.vecmath2.Tuple2f resolution)
Creates a new Panel with the given width and height. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
size - the new size of this Widget
resolution - the resolution of the WidgetContainer

Panel

public Panel(float width,
             float height,
             float resX,
             float resY)
Creates a new Panel with the given width and height. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
resX - the x-size of the WidgetContainer's resolution
resY - the y-size of the WidgetContainer's resolution

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             org.openmali.vecmath2.Tuple2f resolution,
             java.lang.String backgroundTex)
Creates a new Panel with the given width and height. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
size - the new size of this Widget
resolution - the resolution of the WidgetContainer
backgroundTex - the background texture

Panel

public Panel(float width,
             float height,
             float resX,
             float resY,
             java.lang.String backgroundTex)
Creates a new Panel with the given width and height. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
resX - the x-size of the WidgetContainer's resolution
resY - the y-size of the WidgetContainer's resolution
backgroundTex - the background texture

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             org.openmali.vecmath2.Tuple2f resolution,
             Texture backgroundTex)
Creates a new Panel with the given width and height. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
size - the new size of this Widget
resolution - the resolution of the WidgetContainer
backgroundTex - the background texture

Panel

public Panel(float width,
             float height,
             float resX,
             float resY,
             Texture backgroundTex)
Creates a new Panel with the given width and height. The Panel will have a differen coordinate system then it's parent WidgetContainer.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
resX - the x-size of the WidgetContainer's resolution
resY - the y-size of the WidgetContainer's resolution
backgroundTex - the background texture

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             int zIndex,
             boolean withDefaultBG)
Creates a new Panel with the given width, height and z-index.

Parameters:
size - the new size of this Widget
zIndex - the z-index of this Widget
withDefaultBG - apply (theme-)default background?

Panel

public Panel(float width,
             float height,
             int zIndex,
             boolean withDefaultBG)
Creates a new Panel with the given width, height and z-index.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
zIndex - the z-index of this Widget
withDefaultBG - apply (theme-)default background?

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             int zIndex)
Creates a new Panel with the given width, height and z-index.

Parameters:
size - the new size of this Widget
zIndex - the z-index of this Widget

Panel

public Panel(float width,
             float height,
             int zIndex)
Creates a new Panel with the given width, height and z-index.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
zIndex - the z-index of this Widget

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             int zIndex,
             java.lang.String backgroundTex)
Creates a new Panel with the given width, height and z-index.

Parameters:
size - the new size of this Widget
zIndex - the z-index of this Widget
backgroundTex - the background texture

Panel

public Panel(float width,
             float height,
             int zIndex,
             java.lang.String backgroundTex)
Creates a new Panel with the given width, height and z-index.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
zIndex - the z-index of this Widget
backgroundTex - the background texture

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             int zIndex,
             Texture backgroundTex)
Creates a new Panel with the given width, height and z-index.

Parameters:
size - the new size of this Widget
zIndex - the z-index of this Widget
backgroundTex - the background texture

Panel

public Panel(float width,
             float height,
             int zIndex,
             Texture backgroundTex)
Creates a new Panel with the given width, height and z-index.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
zIndex - the z-index of this Widget
backgroundTex - the background texture

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             boolean withDefaultBG)
Creates a new Panel with the given width and height

Parameters:
size - the new size of this Widget
withDefaultBG - apply (theme-)default background?

Panel

public Panel(float width,
             float height,
             boolean withDefaultBG)
Creates a new Panel with the given width and height

Parameters:
width - the new width of this Widget
height - the new height of this Widget
withDefaultBG - apply (theme-)default background?

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size)
Creates a new Panel with the given width and height

Parameters:
size - the new size of this Widget

Panel

public Panel(float width,
             float height)
Creates a new Panel with the given width and height

Parameters:
width - the new width of this Widget
height - the new height of this Widget

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             org.openmali.vecmath2.Colorf backgroundColor)
Creates a new Panel with the given width and height

Parameters:
size - the new size of this Widget
backgroundColor - the background color

Panel

public Panel(float width,
             float height,
             org.openmali.vecmath2.Colorf backgroundColor)
Creates a new Panel with the given width and height

Parameters:
width - the new width of this Widget
height - the new height of this Widget
backgroundColor - the background color

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             int zIndex,
             org.openmali.vecmath2.Colorf backgroundColor)
Creates a new Panel with the given width and height

Parameters:
size - the new size of this Widget
zIndex - the z-index of this Widget
backgroundColor - the background color

Panel

public Panel(float width,
             float height,
             int zIndex,
             org.openmali.vecmath2.Colorf backgroundColor)
Creates a new Panel with the given width and height

Parameters:
width - the new width of this Widget
height - the new height of this Widget
zIndex - the z-index of this Widget
backgroundColor - the background color

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             org.openmali.vecmath2.Tuple2f resolution,
             org.openmali.vecmath2.Colorf backgroundColor)
Creates a new Panel with the given width and height

Parameters:
size - the new size of this Widget
resolution - the resolution of the WidgetContainer
backgroundColor - the background color

Panel

public Panel(float width,
             float height,
             float resX,
             float resY,
             org.openmali.vecmath2.Colorf backgroundColor)
Creates a new Panel with the given width and height

Parameters:
width - the new width of this Widget
height - the new height of this Widget
resX - the x-size of the WidgetContainer's resolution
resY - the y-size of the WidgetContainer's resolution
backgroundColor - the background color

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             org.openmali.vecmath2.Tuple2f resolution,
             int zIndex,
             org.openmali.vecmath2.Colorf backgroundColor)
Creates a new Panel with the given width and height

Parameters:
size - the new size of this Widget
resolution - the resolution of the WidgetContainer
zIndex - the z-index of this Widget
backgroundColor - the background color

Panel

public Panel(float width,
             float height,
             float resX,
             float resY,
             int zIndex,
             org.openmali.vecmath2.Colorf backgroundColor)
Creates a new Panel with the given width and height

Parameters:
width - the new width of this Widget
height - the new height of this Widget
resX - the x-size of the WidgetContainer's resolution
resY - the y-size of the WidgetContainer's resolution
zIndex - the z-index of this Widget
backgroundColor - the background color

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             java.lang.String backgroundTex)
Creates a new WidgetContainer with the given width and height.

Parameters:
size - the new size of this Widget
backgroundTex - the background texture

Panel

public Panel(float width,
             float height,
             java.lang.String backgroundTex)
Creates a new WidgetContainer with the given width and height.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
backgroundTex - the background texture

Panel

public Panel(org.openmali.types.twodee.Sized2fRO size,
             Texture backgroundTex)
Creates a new Panel with the given width and height.

Parameters:
size - the new size of this Widget
backgroundTex - the background texture

Panel

public Panel(float width,
             float height,
             Texture backgroundTex)
Creates a new Panel with the given width and height.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
backgroundTex - the background texture
Method Detail

getTransparency

public float getTransparency()

Specified by:
getTransparency in interface Widget
Returns:
the whole Widget's Transparency.

setSize

public boolean setSize(float width,
                       float height,
                       boolean forced)

Overrides:
setSize in class WidgetContainerBase

update

public void update()
Updates the Widget's internals.
Called by the Widget system and can be called from outside.

Specified by:
update in interface Widget
Overrides:
update in class WidgetContainerBase

setBorder

public void setBorder(Border border)
Sets the Border to use for this BorderSettable Widget.

Specified by:
setBorder in interface BorderSettable
Parameters:
border - the new Border (null for no border)

setBorder

public void setBorder(Border.Description borderDesc)
Creates a new Border from the given Border.Desctiption and invokes setBorder(Border).

Specified by:
setBorder in interface BorderSettable
Parameters:
borderDesc - the Border.Description to create the new Border from (null for no border)
See Also:
BorderSettable.setBorder(Border)

getBorder

public Border getBorder()

Specified by:
getBorder in interface BorderSettable
Returns:
the Border used for this BorderSettable Widget

setBackground

public void setBackground(org.openmali.vecmath2.Colorf color)
Sets the background color of the Widget.

Specified by:
setBackground in interface BackgroundSettable
Parameters:
color - the color to use

setBackground

public void setBackground(Texture texture)
Sets the background texture of the Widget.

Specified by:
setBackground in interface BackgroundSettable
Parameters:
texture - the texture resource to use

setBackground

public void setBackground(java.lang.String texture)
Sets the background Texture of the Widget.

Specified by:
setBackground in interface BackgroundSettable
Parameters:
texture - the texture resource to use

getBackground

public Texture getBackground()

Specified by:
getBackground in interface BackgroundSettable
Returns:
the background Texture of the WidgetContainer.

getBackgroundColor

public org.openmali.vecmath2.Colorf getBackgroundColor()

Specified by:
getBackgroundColor in interface BackgroundSettable
Returns:
the background color of the Widget.

setBackgroundTileSize

public void setBackgroundTileSize(float tileWidth,
                                  float tileHeight)
Sets the background tile size.
Use any negative value for no tiling.

Specified by:
setBackgroundTileSize in interface BackgroundSettable
Parameters:
tileWidth - the tile width (or negative for no tiling of width)
tileHeight - the tile height (or negative for no tiling of height)

setBackgroundTileSize

public void setBackgroundTileSize(org.openmali.types.twodee.Sized2fRO tileSize)
Sets the background tile size.
Use any negative value for no tiling.

Specified by:
setBackgroundTileSize in interface BackgroundSettable
Parameters:
tileSize - the tile size (or null for no tiling)

getBackgroundTileSize

public org.openmali.types.twodee.Sized2fRO getBackgroundTileSize()

Specified by:
getBackgroundTileSize in interface BackgroundSettable
Returns:
the background tile size (or null for no tiling)

getBackgroundTileWidth

public float getBackgroundTileWidth()

Specified by:
getBackgroundTileWidth in interface BackgroundSettable
Returns:
the background tile width (or negative for no tiling)

getBackgroundTileHeight

public float getBackgroundTileHeight()

Specified by:
getBackgroundTileHeight in interface BackgroundSettable
Returns:
the background tile width (or negative for no tiling)

setForeground

public void setForeground(java.lang.String texture)
Sets the foreground texture of the WidgetContainer. It MUST always have an alpha channel!

Specified by:
setForeground in interface WidgetContainer
Parameters:
texture - the texture resource to use

setForeground

public void setForeground(Texture texture)
Sets the foreground texture of the WidgetContainer. It MUST always have an alpha channel!

Specified by:
setForeground in interface WidgetContainer
Parameters:
texture - the texture resource to use

getForeground

public Texture getForeground()

Specified by:
getForeground in interface WidgetContainer
Returns:
the foreground Texture of the WidgetContainer.

init

protected void init()
This method is called when the WidgetContainer is set.

Specified by:
init in class WidgetBase