org.xith3d.ui.hud.widgets
Class Image

java.lang.Object
  extended by org.xith3d.ui.hud.base.Widget
      extended by org.xith3d.ui.hud.widgets.Image
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

public class Image
extends Widget

A widget representing an image.


Nested Class Summary
 
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
Image(boolean isHeavyWeight, float width, float height, org.openmali.vecmath2.Colorf color)
          Creates a new Image with the given width and height.
Image(boolean isHeavyWeight, float width, float height, org.openmali.vecmath2.Colorf color, Texture2D texture, TileMode tileMode)
          Creates a new Image with the given width and height.
Image(boolean isHeavyWeight, float width, float height, java.lang.String texture)
          Creates a new Image with the given width and height.
Image(boolean isHeavyWeight, float width, float height, Texture2D texture)
          Creates a new Image with the given width and height.
Image(boolean isHeavyWeight, float width, float height, Texture2D texture, TileMode tileMode)
          Creates a new Image with the given width and height.
Image(float width, float height, org.openmali.vecmath2.Colorf color)
          Creates a new lightweight Image with the given width and height.
Image(float width, float height, org.openmali.vecmath2.Colorf color, Texture2D texture)
          Creates a new lightweight Image with the given width and height.
Image(float width, float height, java.lang.String texture)
          Creates a new lightweight Image with the given width and height.
Image(float width, float height, Texture2D texture)
          Creates a new lightweight Image with the given width and height.
Image(float width, float height, Texture2D texture, TileMode tileMode)
          Creates a new lightweight Image with the given width and height.
 
Method Summary
protected  void drawWidget(Texture2DCanvas texCanvas, int offsetX, int offsetY, int width, int height, boolean drawsSelf)
           
 org.openmali.vecmath2.Colorf getColor()
          
 Texture2D getTexture()
          
 TileMode getTileMode()
          
protected  void init()
          This method is called when the WidgetContainer is set.
 void setColor(org.openmali.vecmath2.Colorf color)
          
 void setTexture(java.lang.String texture)
          
 void setTexture(Texture2D texture)
          
 void setTileMode(TileMode mode)
          
 void setTransparency(float transparency, boolean childrenToo)
          Sets the whole Widget's transparency.
 java.lang.String toString()
          
 
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, drawBackground, drawBorder, 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, 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, setUserObject, setVisible, setWidgetDirty, setWidth, setZIndex, startDragging, update, updateAbsZIndex, updateSizeFactors, updateTranslation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Image

public Image(boolean isHeavyWeight,
             float width,
             float height,
             org.openmali.vecmath2.Colorf color,
             Texture2D texture,
             TileMode tileMode)
Creates a new Image with the given width and height.

Parameters:
isHeavyWeight -
width - the new width of this Widget
height - the new height of this Widget
color - the color to use for the Image
texture - the Texture to use for this Image

Image

public Image(boolean isHeavyWeight,
             float width,
             float height,
             org.openmali.vecmath2.Colorf color)
Creates a new Image with the given width and height.

Parameters:
isHeavyWeight -
width - the new width of this Widget
height - the new height of this Widget
color - the color to use for the Image

Image

public Image(boolean isHeavyWeight,
             float width,
             float height,
             Texture2D texture,
             TileMode tileMode)
Creates a new Image with the given width and height.

Parameters:
isHeavyWeight -
width - the new width of this Widget
height - the new height of this Widget
texture - the Texture to use for this Image
tileMode -

Image

public Image(boolean isHeavyWeight,
             float width,
             float height,
             Texture2D texture)
Creates a new Image with the given width and height.

Parameters:
isHeavyWeight -
width - the new width of this Widget
height - the new height of this Widget
texture - the Texture to use for this Image

Image

public Image(boolean isHeavyWeight,
             float width,
             float height,
             java.lang.String texture)
Creates a new Image with the given width and height.

Parameters:
isHeavyWeight -
width - the new width of this Widget
height - the new height of this Widget
texture - the Texture resource to use for this Image

Image

public Image(float width,
             float height,
             org.openmali.vecmath2.Colorf color,
             Texture2D texture)
Creates a new lightweight Image with the given width and height.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
color - the color to use for the Image
texture - the Texture to use for this Image

Image

public Image(float width,
             float height,
             org.openmali.vecmath2.Colorf color)
Creates a new lightweight Image with the given width and height.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
color - the color to use for the Image

Image

public Image(float width,
             float height,
             Texture2D texture,
             TileMode tileMode)
Creates a new lightweight Image with the given width and height.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
texture - the Texture to use for this Image
tileMode -

Image

public Image(float width,
             float height,
             Texture2D texture)
Creates a new lightweight Image with the given width and height.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
texture - the Texture to use for this Image

Image

public Image(float width,
             float height,
             java.lang.String texture)
Creates a new lightweight Image with the given width and height.

Parameters:
width - the new width of this Widget
height - the new height of this Widget
texture - the Texture resource to use for this Image
Method Detail

setTransparency

public void setTransparency(float transparency,
                            boolean childrenToo)
Sets the whole Widget's transparency.

Overrides:
setTransparency in class Widget

setTexture

public void setTexture(Texture2D texture)


setTexture

public final void setTexture(java.lang.String texture)


getTexture

public final Texture2D getTexture()


setTileMode

public void setTileMode(TileMode mode)


getTileMode

public final TileMode getTileMode()


setColor

public void setColor(org.openmali.vecmath2.Colorf color)


getColor

public final org.openmali.vecmath2.Colorf getColor()


toString

public java.lang.String toString()

Overrides:
toString in class Widget

drawWidget

protected void drawWidget(Texture2DCanvas texCanvas,
                          int offsetX,
                          int offsetY,
                          int width,
                          int height,
                          boolean drawsSelf)
Specified by:
drawWidget in class Widget

init

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

Specified by:
init in class Widget