org.xith3d.ui.hud.base
Class BackgroundSettableWidget

java.lang.Object
  extended by org.xith3d.ui.hud.base.Widget
      extended by org.xith3d.ui.hud.base.BackgroundSettableWidget
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
Direct Known Subclasses:
AbstractList, HUDConsole, Label, ProgressBar, Scrollbar, WidgetContainer

public abstract class BackgroundSettableWidget
extends Widget

This class implements a base for rectangular Widgets, which are BackgroundSettable


Nested Class Summary
protected static class BackgroundSettableWidget.BackgroundSettableDescriptionBase
           
 
Nested classes/interfaces inherited from class org.xith3d.ui.hud.base.Widget
Widget.DescriptionBase
 
Field Summary
 
Fields inherited from class org.xith3d.ui.hud.base.Widget
transformHeight_Pixels2HUD, transformWidth_Pixels2HUD
 
Constructor Summary
protected BackgroundSettableWidget(boolean isHeavyWeight, boolean hasWidgetAssembler, org.openmali.vecmath2.Colorf backgroundColor, Texture2D backgroundTexture, TileMode tileMode)
          Creates a new BackgroundSettableWidget.
protected BackgroundSettableWidget(boolean isHeavyWeight, boolean hasWidgetAssembler, float width, float height, org.openmali.vecmath2.Colorf backgroundColor, Texture2D backgroundTexture, TileMode tileMode)
          Creates a new BackgroundSettableWidget with the given width and height.
 
Method Summary
protected  void drawBackground(Texture2DCanvas texCanvas, int offsetX, int offsetY, int width, int height)
          Draws the Widget's background.
 org.openmali.vecmath2.Colorf getBackgroundColor()
           
 Texture2D getBackgroundTexture()
           
 TileMode getBackgroundTileMode()
           
 void setBackground(org.openmali.vecmath2.Colorf color, java.lang.String texture)
          Sets background color and texture at once.
 void setBackground(org.openmali.vecmath2.Colorf color, java.lang.String texture, TileMode tileMode)
          Sets background color and texture at once.
 void setBackground(org.openmali.vecmath2.Colorf color, Texture2D texture, TileMode tileMode)
          Sets background color and texture at once.
 void setBackgroundColor(org.openmali.vecmath2.Colorf color)
          Sets the background color of the Widget.
 void setBackgroundTexture(java.lang.String texture)
          Sets the background Texture of the Widget.
 void setBackgroundTexture(java.lang.String texture, TileMode tileMode)
          Sets the background Texture of the Widget.
 void setBackgroundTexture(Texture2D texture)
          Sets the background texture of the Widget.
 void setBackgroundTexture(Texture2D texture, TileMode tileMode)
          Sets the background texture of the Widget.
 void setBackgroundTileMode(TileMode mode)
          Sets the background tile mode (null for no tiling)
 void setNoBackground()
          Sets background color and texture to nothing at once.
 
Methods inherited from class org.xith3d.ui.hud.base.Widget
addContainerListener, addControllerListener, addFocusListener, addInputListener, addKeyboardListener, addLocationListener, addMouseListener, addSizeListener, addVisibilityListener, bindToGlobalMouseMovement, blocksFocusMoveDeviceComponent, calculateTransformHeight_Pixels2HUD, calculateTransformWidth_Pixels2HUD, compareAbsZIndex, createShape, detach, drawAndUpdateWidget, drawBorder, drawWidget, drawWidgetAfterWidgetAssembler, drawWidgetContents, getAbsoluteLocationOnHUD_, getAspect, getAssembly, getBorder, getContainer, getContentAspect, getContentHeight, getContentHeightPX, getContentLeftPX, getContentOffset, getContentTopPX, getContentWidth, getContentWidthPX, getContextMenu, getCursor, getEqualHeight_, getEqualWidth_, getForcedRedrawFrequency, getHeight, getHeightPX, getHUD, getLeft, getLevel, getLocation, getLocation, getLocationHUD2Pixels_, getLocationHUD2SG_, getLocationPixels2HUD_, getLocationSG2HUD_, getMaxRedrawFrequency, getMinHeight, getMinWidth, getName, getParentWindow, getPickHeight, getPickWidth, getRelLocationHUD2Pixels_, getRootHostWidget, getShape, getSize, getSizeHUD2Pixels_, getSizeHUD2SG_, getSizeOfPixels_, getSizePixels2HUD_, getSizeSG2HUD_, getToolTip, getTop, getTransparency, getUserObject, getWidgetAssembler, getWidth, getWidthPX, getZIndex, hasDropShadow, hasFocus, hasFocus, hasToolTip, init, initSize, isAHostedWidgetDirty, isClickable, isDraggable, isFocussable, isHeavyWeight, isHovered, isInitialized, isInitializing, isPickable, isThisWidgetDirty, isVisible, notifyOnDragStopped, onAttachedToContainer, onAttachedToHUD, onControllerAxisChanged, onControllerButtonPressed, onControllerButtonReleased, onDetachedFromContainer, onDetachedFromHUD, onFocusGained, onFocusLost, onInputStateChanged, onKeyPressed, onKeyReleased, onKeyTyped, onLocationChanged, onMouseButtonPressed, onMouseButtonReleased, onMouseEntered, onMouseExited, onMouseMoved, onMouseStopped, onMouseWheelMoved, onSizeChanged, onVisibilityChanged, pick, pickConditionsMatch, removeContainerListener, removeControllerListener, removeFocusListener, removeInputListener, removeKeyboardListener, removeLocationListener, removeMouseListener, removeSizeListener, removeVisibilityListener, requestFocus, resetWidgetDirty, setBorder, setBorder, setClickable, setContentClipRect, setContextMenu, setCursor, setDraggable, setFocussable, setForcedRedrawFrequency, setHasDropShadow, setHeight, setHostedWidgetDirty, setHostTextureDirty, setHostTextureDirty, setHostWidget, setLocation, setLocation, setLocation, setMaxRedrawFrequency, setName, setPickable, setSize, setSize, setSize, setSize, setTextureDirty, setTextureDirty, setToolTip, setTransparency, setTransparency, setUserObject, setVisible, setWidgetDirty, setWidth, setZIndex, startDragging, toString, update, updateAbsZIndex, updateSizeFactors, updateTranslation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BackgroundSettableWidget

protected BackgroundSettableWidget(boolean isHeavyWeight,
                                   boolean hasWidgetAssembler,
                                   org.openmali.vecmath2.Colorf backgroundColor,
                                   Texture2D backgroundTexture,
                                   TileMode tileMode)
Creates a new BackgroundSettableWidget.

Parameters:
isHeavyWeight -
hasWidgetAssembler -
backgroundColor -
backgroundTexture -
tileMode -

BackgroundSettableWidget

protected BackgroundSettableWidget(boolean isHeavyWeight,
                                   boolean hasWidgetAssembler,
                                   float width,
                                   float height,
                                   org.openmali.vecmath2.Colorf backgroundColor,
                                   Texture2D backgroundTexture,
                                   TileMode tileMode)
Creates a new BackgroundSettableWidget with the given width and height.

Parameters:
isHeavyWeight -
hasWidgetAssembler -
width - the new width of this Widget
height - the new height of this Widget
backgroundColor -
backgroundTexture -
tileMode -
Method Detail

setBackgroundColor

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

Parameters:
color - the color to use

getBackgroundColor

public final org.openmali.vecmath2.Colorf getBackgroundColor()
Returns:
the background color of the Widget.

setBackgroundTexture

public void setBackgroundTexture(Texture2D texture)
Sets the background texture of the Widget.

Parameters:
texture - the texture resource to use

setBackgroundTexture

public void setBackgroundTexture(Texture2D texture,
                                 TileMode tileMode)
Sets the background texture of the Widget.

Parameters:
texture - the texture resource to use
tileMode -

setBackgroundTexture

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

Parameters:
texture - the texture resource to use

setBackgroundTexture

public final void setBackgroundTexture(java.lang.String texture,
                                       TileMode tileMode)
Sets the background Texture of the Widget.

Parameters:
texture - the texture resource to use

setBackground

public final void setBackground(org.openmali.vecmath2.Colorf color,
                                java.lang.String texture,
                                TileMode tileMode)
Sets background color and texture at once.

Parameters:
color -
texture -
tileMode -

setBackground

public final void setBackground(org.openmali.vecmath2.Colorf color,
                                Texture2D texture,
                                TileMode tileMode)
Sets background color and texture at once.

Parameters:
color -
texture -
tileMode -

setBackground

public final void setBackground(org.openmali.vecmath2.Colorf color,
                                java.lang.String texture)
Sets background color and texture at once.

Parameters:
color -
texture -

setNoBackground

public final void setNoBackground()
Sets background color and texture to nothing at once.


getBackgroundTexture

public final Texture2D getBackgroundTexture()
Returns:
the background Texture of the Widget.

setBackgroundTileMode

public void setBackgroundTileMode(TileMode mode)
Sets the background tile mode (null for no tiling)

Parameters:
mode -

getBackgroundTileMode

public final TileMode getBackgroundTileMode()
Returns:
the background tile mode (null for no tiling).

drawBackground

protected void drawBackground(Texture2DCanvas texCanvas,
                              int offsetX,
                              int offsetY,
                              int width,
                              int height)
Draws the Widget's background.

Overrides:
drawBackground in class Widget