org.xith3d.ui.hud.widgets
Class Frame

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.RectangularContentPaneWrapper
              extended by org.xith3d.ui.hud.base.Window
                  extended by org.xith3d.ui.hud.widgets.Frame
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, BorderSettable, ContentPaneWrapper, Widget
Direct Known Subclasses:
Dialog

public class Frame
extends Window
implements BorderSettable

This class represents a simple Window above the HUD.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.xith3d.ui.hud.base.Window
Window.CloseOperation
 
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
Frame(ContentPaneWrapper contentPaneWrapper)
          Creates a new undecorated Frame.
Frame(ContentPaneWrapper contentPaneWrapper, java.lang.String title)
          Creates a new Frame.
Frame(ContentPaneWrapper contentPaneWrapper, java.lang.String headerBackground, java.lang.String title)
          Creates a new Frame.
Frame(ContentPaneWrapper contentPaneWrapper, Texture headerBackground, java.lang.String title)
          Creates a new Frame.
Frame(ContentPaneWrapper contentPaneWrapper, WindowHeaderWidget.Description headerDesc, java.lang.String title)
          Creates a new Frame.
Frame(ContentPaneWrapper contentPaneWrapper, WindowHeaderWidget headerWidget)
          Creates a new Frame.
Frame(float width, float height)
          Creates a new Frame with the given width and height.
Frame(float width, float height, java.lang.String title)
          Creates a new Frame with the given width and height.
Frame(float width, float height, java.lang.String headerBackground, java.lang.String title)
          Creates a new Frame with the given width and height.
Frame(float width, float height, Texture headerBackground, java.lang.String title)
          Creates a new Frame with the given width and height.
Frame(float width, float height, WindowHeaderWidget headerWidget)
          Creates a new Frame.
Frame(org.openmali.types.twodee.Sized2fRO size)
          Creates a new undecorated Frame with the given size.
Frame(org.openmali.types.twodee.Sized2fRO size, java.lang.String title)
          Creates a new Frame with the given size.
Frame(org.openmali.types.twodee.Sized2fRO size, java.lang.String headerBackground, java.lang.String title)
          Creates a new Frame with the given size.
Frame(org.openmali.types.twodee.Sized2fRO size, Texture headerBackground, java.lang.String title)
          Creates a new Frame with the given size.
Frame(org.openmali.types.twodee.Sized2fRO size, WindowHeaderWidget headerWidget)
          Creates a new Frame.
Frame(WidgetContainer contentPane)
          Creates a new undecorated Frame.
Frame(WidgetContainer contentPane, java.lang.String title)
          Creates a new Frame.
Frame(WidgetContainer contentPane, java.lang.String headerBackground, java.lang.String title)
          Creates a new Frame.
Frame(WidgetContainer contentPane, Texture headerBackground, java.lang.String title)
          Creates a new Frame.
Frame(WidgetContainer contentPane, WindowHeaderWidget.Description headerDesc, java.lang.String title)
          Creates a new Frame.
Frame(WidgetContainer contentPane, WindowHeaderWidget headerWidget)
          Creates a new Frame.
 
Method Summary
protected  WindowHeaderWidget createHeaderWidget(WindowHeaderWidget.Description headerDesc, java.lang.String title)
          Creates the header Widget for this decorated Window.
 Border getBorder()
          
protected static WindowHeaderWidget.Description getHeaderDescWithTexture(java.lang.String backgroundTexture)
           
protected static WindowHeaderWidget.Description getHeaderDescWithTexture(Texture backgroundTexture)
           
 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.
 
Methods inherited from class org.xith3d.ui.hud.base.Window
addFrameListener, addWindowListener, checkDragStartCondition, detach, getContentPane, getContentPaneWrapper, getDefaultCloseOperation, getHeaderWidget, getInnerHeight, getInnerWidth, getResX, getResY, getTransparency, init, isCloseButtonVisible, isDecorated, isPaneDraggingEnabled, onCloseButtonClicked, onDetached, onFocusLost, onKeyPressed, onKeyReleased, onKeyTyped, onMouseButtonPressed, onMouseButtonReleased, onMouseLeft, onMouseMoved, onMouseUnbound, onMouseWheelMoved, removeFrameListener, removeWindowListener, setCloseButtonVisible, setContainer, setDefaultCloseOperation, setLocation, setPaneDraggingEnabled, setSize, setVisible
 
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 org.xith3d.ui.hud.base.WidgetBase
addContainerListener, addFocusListener, addInputListener, addLocationListener, addSizeListener, addVisibilityListener, 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, onControllerAxisChanged, onControllerButtonPressed, onControllerButtonReleased, onFocusGained, onInputStateChanged, onMouseEntered, onMouseStopped, onRemovedFromContainer, pickWidgetAssembler, removeContainerListener, removeFocusListener, removeInputListener, removeLocationListener, removeSizeListener, removeVisibilityListener, requestFocus, setAssembly, setCachedToolTipWidget, setClickable, setContextMenu, setCursor, setDraggable, setFocussable, setHeight, setLocation, setLocation, setName, setPickable, setSize, setSize, setSize, setToolTip, setTransparency, setUserObject, setWidth, setZIndex, toString, update, updateTranslation
 
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, 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, onFocusGained, onInputStateChanged, onMouseEntered, onMouseStopped, removeContainerListener, removeFocusListener, removeInputListener, removeLocationListener, removeSizeListener, removeVisibilityListener, requestFocus, setAssembly, setCachedToolTipWidget, setClickable, setContextMenu, setCursor, setDraggable, setFocussable, setLocation, setLocation, setName, setPickable, setSize, setSize, setSize, setToolTip, setTransparency, setUserObject, setZIndex, update
 
Methods inherited from interface org.openmali.types.twodee.Sized2f
setHeight, setWidth
 

Constructor Detail

Frame

public Frame(WidgetContainer contentPane,
             WindowHeaderWidget.Description headerDesc,
             java.lang.String title)
Creates a new Frame.

Parameters:
contentPane - the Widget that visually defines the Window.
headerDesc - the description of this Frame's header (or null for an undecorated Frame)
title - this Frame's title

Frame

public Frame(WidgetContainer contentPane,
             WindowHeaderWidget headerWidget)
Creates a new Frame.

Parameters:
contentPane - the Widget that visually defines the Window.
headerWidget - a Widget, that defines this Window's header (or null for an undecorated Window)

Frame

public Frame(WidgetContainer contentPane,
             Texture headerBackground,
             java.lang.String title)
Creates a new Frame.

Parameters:
contentPane - the Widget that visually defines the Window.
headerBackground - the background Texture for the header bar's background
title - this Frame's title (or null for an undecorated Frame)

Frame

public Frame(WidgetContainer contentPane,
             java.lang.String headerBackground,
             java.lang.String title)
Creates a new Frame.

Parameters:
contentPane - the Widget that visually defines the Window.
headerBackground - the background Texture for the header bar's background
title - this Frame's title (or null for an undecorated Frame)

Frame

public Frame(WidgetContainer contentPane,
             java.lang.String title)
Creates a new Frame.

Parameters:
contentPane - the Widget that visually defines the Window.
title - this Frame's title (or null for an undecorated Frame)

Frame

public Frame(WidgetContainer contentPane)
Creates a new undecorated Frame.

Parameters:
contentPane - the Widget that visually defines the Window.

Frame

public Frame(ContentPaneWrapper contentPaneWrapper,
             WindowHeaderWidget.Description headerDesc,
             java.lang.String title)
Creates a new Frame.

Parameters:
contentPaneWrapper - the Widget that visually defines the Window.
headerDesc - the description of this Frame's header (or null for an undecorated Frame)
title - this Frame's title (unappreciated, if titleDesc is null)

Frame

public Frame(ContentPaneWrapper contentPaneWrapper,
             WindowHeaderWidget headerWidget)
Creates a new Frame.

Parameters:
contentPaneWrapper - the Widget that visually defines the Window.
headerWidget - a Widget, that defines this Window's header (or null for an undecorated Window)

Frame

public Frame(ContentPaneWrapper contentPaneWrapper,
             Texture headerBackground,
             java.lang.String title)
Creates a new Frame.

Parameters:
contentPaneWrapper - the Widget that visually defines the Window.
headerBackground - the background Texture for the title bar's background
title - this Frame's title (or null for an undecorated Frame)

Frame

public Frame(ContentPaneWrapper contentPaneWrapper,
             java.lang.String headerBackground,
             java.lang.String title)
Creates a new Frame.

Parameters:
contentPaneWrapper - the Widget that visually defines the Window.
headerBackground - the background Texture for the title bar's background
title - this Frame's title (or null for an undecorated Frame)

Frame

public Frame(ContentPaneWrapper contentPaneWrapper,
             java.lang.String title)
Creates a new Frame.

Parameters:
contentPaneWrapper - the Widget that visually defines the Window.
title - this Frame's title (or null for an undecorated Frame)

Frame

public Frame(ContentPaneWrapper contentPaneWrapper)
Creates a new undecorated Frame.

Parameters:
contentPaneWrapper - the Widget that visually defines the Window.

Frame

public Frame(org.openmali.types.twodee.Sized2fRO size,
             Texture headerBackground,
             java.lang.String title)
Creates a new Frame with the given size. A Panel will be created as the content pane.

Parameters:
size - the size of the Frame
headerBackground - the background Texture for the header bar's background
title - this Frame's title (or null for an undecorated Frame)

Frame

public Frame(org.openmali.types.twodee.Sized2fRO size,
             java.lang.String headerBackground,
             java.lang.String title)
Creates a new Frame with the given size. A Panel will be created as the content pane.

Parameters:
size - the size of the Frame
headerBackground - the background Texture for the header bar's background
title - this Frame's title (or null for an undecorated Frame)

Frame

public Frame(org.openmali.types.twodee.Sized2fRO size,
             java.lang.String title)
Creates a new Frame with the given size. A Panel will be created as the content pane.

Parameters:
size - the size of the Frame
title - this Frame's title (or null for an undecorated Frame)

Frame

public Frame(org.openmali.types.twodee.Sized2fRO size,
             WindowHeaderWidget headerWidget)
Creates a new Frame.

Parameters:
size - the size of the Frame
headerWidget - a Widget, that defines this Window's header (or null for an undecorated Window)

Frame

public Frame(org.openmali.types.twodee.Sized2fRO size)
Creates a new undecorated Frame with the given size. A Panel will be created as the content pane.

Parameters:
size - the size of the Frame

Frame

public Frame(float width,
             float height,
             Texture headerBackground,
             java.lang.String title)
Creates a new Frame with the given width and height. A Panel will be created as the content pane.

Parameters:
width - the width of the Frame
height - the height of the Frame
headerBackground - the background Texture for the header bar's background
title - this Frame's title (or null for an undecorated Frame)

Frame

public Frame(float width,
             float height,
             java.lang.String headerBackground,
             java.lang.String title)
Creates a new Frame with the given width and height. A Panel will be created as the content pane.

Parameters:
width - the width of the Frame
height - the height of the Frame
headerBackground - the background Texture for the header bar's background
title - this Frame's title (or null for an undecorated Frame)

Frame

public Frame(float width,
             float height,
             java.lang.String title)
Creates a new Frame with the given width and height. A Panel will be created as the content pane.

Parameters:
width - the width of the Frame
height - the height of the Frame
title - this Frame's title (or null for an undecorated Frame)

Frame

public Frame(float width,
             float height,
             WindowHeaderWidget headerWidget)
Creates a new Frame.

Parameters:
width - the width of the Frame
height - the height of the Frame
headerWidget - a Widget, that defines this Window's header (or null for an undecorated Window)

Frame

public Frame(float width,
             float height)
Creates a new Frame with the given width and height. A Panel will be created as the content pane.

Parameters:
width - the width of the Frame
height - the height of the Frame
Method Detail

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

createHeaderWidget

protected WindowHeaderWidget createHeaderWidget(WindowHeaderWidget.Description headerDesc,
                                                java.lang.String title)
Creates the header Widget for this decorated Window. It is only called, if the Window is decorated. It MUST NOT return null. It MUST NOT add it to the WidgetAssembler.

Specified by:
createHeaderWidget in class Window
Parameters:
headerDesc - the description for the header Widget
title - the Window's title
Returns:
the create WindowHeaderWidget instance

getHeaderDescWithTexture

protected static WindowHeaderWidget.Description getHeaderDescWithTexture(Texture backgroundTexture)

getHeaderDescWithTexture

protected static WindowHeaderWidget.Description getHeaderDescWithTexture(java.lang.String backgroundTexture)