org.xith3d.ui.hud.widgets
Class Dialog

java.lang.Object
  extended by org.xith3d.ui.hud.base.Widget
      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
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 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
Dialog(float width, float height)
          Creates a new Dialog.
Dialog(float width, float height, java.lang.String title)
          Creates a new Dialog.
Dialog(WidgetContainer contentPane)
          Creates a new Dialog.
Dialog(WidgetContainer contentPane, 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
 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 onDetachedFromHUD(HUD hud)
          This event is fired, when this Widget is removed from the HUD live Widget hierarchy.
 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
createContentPane, createDefaultContentPane, createHeaderWidget
 
Methods inherited from class org.xith3d.ui.hud.base.Window
addWindowListener, checkDragStartCondition, detach, drawAndUpdateWidget, drawBorder, drawWidget, getContentHeightPX, getContentPane, getContentWidthPX, getDefaultCloseOperation, getHeaderHeight, getHeaderWidget, getResX, getResY, getTitle, init, isCloseButtonVisible, isDecorated, isPaneDraggingEnabled, onCloseButtonClicked, onFocusLost, onKeyPressed, onKeyReleased, onKeyTyped, onMouseButtonPressed, onMouseButtonReleased, onMouseExited, onMouseMoved, onMouseWheelMoved, onSizeChanged, onVisibilityChanged, pick, removeWindowListener, setCloseButtonVisible, setContentSize, setDefaultCloseOperation, setHostTextureDirty, setPaneDraggingEnabled, setTextureDirty, setTitle, startDragging, 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, drawBackground, drawWidgetAfterWidgetAssembler, drawWidgetContents, getAbsoluteLocationOnHUD_, getAspect, getAssembly, getBorder, getContainer, getContentAspect, getContentHeight, getContentLeftPX, getContentOffset, getContentTopPX, getContentWidth, 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, onFocusGained, onInputStateChanged, onLocationChanged, onMouseEntered, onMouseStopped, 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, setHostWidget, setLocation, setLocation, setLocation, setMaxRedrawFrequency, setName, setPickable, setSize, setSize, setSize, setSize, setTextureDirty, setToolTip, setTransparency, setTransparency, setUserObject, setVisible, setWidgetDirty, setWidth, setZIndex, update, updateAbsZIndex, updateSizeFactors, updateTranslation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 Window)

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

Dialog

public Dialog(WidgetContainer contentPane)
Creates a new Dialog.

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

Dialog

public Dialog(float width,
              float height,
              java.lang.String title)
Creates a new Dialog.

Parameters:
width - the width of the Window
height - the height of the Window
title - this Dialog's title

Dialog

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

Parameters:
width - the width of the Window
height - the height of the Window
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 final 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.


onDetachedFromHUD

public void onDetachedFromHUD(HUD hud)
Description copied from class: Window
This event is fired, when this Widget is removed from the HUD live Widget hierarchy.

Overrides:
onDetachedFromHUD in class Window
Parameters:
hud - the HUD, the Widget is removed from