org.xith3d.ui.hud.widgets
Class Dialog

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
                      extended by org.xith3d.ui.hud.widgets.Dialog
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:
InputBox, MsgBox

public class Dialog
extends Frame


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
Dialog(ContentPaneWrapper contentPaneWrapper)
          Creates a new undecorated Dialog.
Dialog(ContentPaneWrapper contentPaneWrapper, java.lang.String title)
          Creates a new Dialog.
Dialog(ContentPaneWrapper contentPaneWrapper, java.lang.String titleBackground, java.lang.String title)
          Creates a new Dialog.
Dialog(ContentPaneWrapper contentPaneWrapper, Texture titleBackground, java.lang.String title)
          Creates a new Dialog.
Dialog(ContentPaneWrapper contentPaneWrapper, WindowHeaderWidget.Description headerDesc, java.lang.String title)
          Creates a new Dialog.
Dialog(ContentPaneWrapper contentPaneWrapper, WindowHeaderWidget headerWidget)
          Creates a new Dialog.
Dialog(float width, float height)
          Creates a new undecorated Dialog with the given width and height.
Dialog(float width, float height, java.lang.String title)
          Creates a new Dialog with the given width and height.
Dialog(float width, float height, java.lang.String titleBackground, java.lang.String title)
          Creates a new Dialog with the given width and height.
Dialog(float width, float height, Texture titleBackground, java.lang.String title)
          Creates a new Dialog with the given width and height.
Dialog(float width, float height, WindowHeaderWidget headerWidget)
          Creates a new Dialog.
Dialog(org.openmali.types.twodee.Sized2fRO size)
          Creates a new undecorated Dialog with the given size.
Dialog(org.openmali.types.twodee.Sized2fRO size, java.lang.String title)
          Creates a new Dialog with the given size.
Dialog(org.openmali.types.twodee.Sized2fRO size, java.lang.String titleBackground, java.lang.String title)
          Creates a new Dialog with the given size.
Dialog(org.openmali.types.twodee.Sized2fRO size, Texture titleBackground, java.lang.String title)
          Creates a new Dialog with the given size.
Dialog(org.openmali.types.twodee.Sized2fRO size, WindowHeaderWidget headerWidget)
          Creates a new Dialog.
Dialog(WidgetContainer contentPane)
          Creates a new undecorated Dialog.
Dialog(WidgetContainer contentPane, java.lang.String title)
          Creates a new Dialog.
Dialog(WidgetContainer contentPane, java.lang.String titleBackground, java.lang.String title)
          Creates a new Dialog.
Dialog(WidgetContainer contentPane, Texture titleBackground, java.lang.String title)
          Creates a new Dialog.
Dialog(WidgetContainer contentPane, WindowHeaderWidget.Description headerDesc, java.lang.String title)
          Creates a new Dialog.
Dialog(WidgetContainer contentPane, WindowHeaderWidget headerWidget)
          Creates a new Dialog.
 
Method Summary
 void addDialogListener(DialogListener l)
          Adds a new DialogListener
 void detach(boolean delayed)
          Removes the Widget from its Container.
 java.lang.Object getCloseCommand()
           
protected  void notifyDialogListeners()
          Use this method to notify all registered DialogListeners.
protected  void notifyDialogListeners(java.lang.Object command)
          Use this method to notify all registered DialogListeners with a command String.
 void onDetached()
          This method is called right before the Widget has been detached from its WidgetContainer.
 void removeAllDialogListeners()
          Removes all registered DialogListeners from this Dialog.
 void removeDialogListener(DialogListener l)
          Removes a DialogListener
 void setCloseCommand(java.lang.Object closeCommand)
           
 void waitForClose()
          Waits in a separate Thread until this Dialog is set invisible or removed from its parent.
 
Methods inherited from class org.xith3d.ui.hud.widgets.Frame
createHeaderWidget, getBorder, getHeaderDescWithTexture, getHeaderDescWithTexture, setBorder, setBorder
 
Methods inherited from class org.xith3d.ui.hud.base.Window
addFrameListener, addWindowListener, checkDragStartCondition, getContentPane, getContentPaneWrapper, getDefaultCloseOperation, getHeaderWidget, getInnerHeight, getInnerWidth, getResX, getResY, getTransparency, init, isCloseButtonVisible, isDecorated, isPaneDraggingEnabled, onCloseButtonClicked, 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

Dialog

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

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

Dialog

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

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

Dialog

public Dialog(WidgetContainer contentPane,
              Texture titleBackground,
              java.lang.String title)
Creates a new Dialog.

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

Dialog

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

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

Dialog

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

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

Dialog

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

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

Dialog

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

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

Dialog

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

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

Dialog

public Dialog(ContentPaneWrapper contentPaneWrapper,
              Texture titleBackground,
              java.lang.String title)
Creates a new Dialog.

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

Dialog

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

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

Dialog

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

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

Dialog

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

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

Dialog

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

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

Dialog

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

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

Dialog

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

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

Dialog

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

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

Dialog

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

Parameters:
width - the width of the Dialog
height - the height of the Dialog

Dialog

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

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

Dialog

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

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

Dialog

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

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

Dialog

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

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

Dialog

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

Parameters:
size - the size of the Dialog
Method Detail

setCloseCommand

public void setCloseCommand(java.lang.Object closeCommand)

getCloseCommand

public java.lang.Object getCloseCommand()

addDialogListener

public void addDialogListener(DialogListener l)
Adds a new DialogListener

Parameters:
l - the new DialogListener

removeDialogListener

public void removeDialogListener(DialogListener l)
Removes a DialogListener

Parameters:
l - the DialogListener to remove

removeAllDialogListeners

public void removeAllDialogListeners()
Removes all registered DialogListeners from this Dialog.


notifyDialogListeners

protected void notifyDialogListeners(java.lang.Object command)
Use this method to notify all registered DialogListeners with a command String.

Parameters:
command - the fired command

notifyDialogListeners

protected void notifyDialogListeners()
Use this method to notify all registered DialogListeners.


waitForClose

public void waitForClose()
Waits in a separate Thread until this Dialog is set invisible or removed from its parent.


detach

public void detach(boolean delayed)
Removes the Widget from its Container. The onWindowClosed() and onDialogClosed() events will be fired after it has been removed from its parent.

Specified by:
detach in interface Widget
Overrides:
detach in class Window
Parameters:
delayed - if true, the widget is detached with the next frame, but not instantly.

onDetached

public void onDetached()
Description copied from class: Window
This method is called right before the Widget has been detached from its WidgetContainer.

Specified by:
onDetached in interface Widget
Overrides:
onDetached in class Window