planetj.gui
Class CMDialogJ

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
                          |
                          +--javax.swing.JDialog
                                |
                                +--planetj.gui.CMDialogJ
All Implemented Interfaces:
Accessible, CMTopLevelComponent, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants
Direct Known Subclasses:
AS400SignOnDialog, CMExceptionDialogJ, CMProgressDialog

public class CMDialogJ
extends JDialog
implements CMTopLevelComponent

This subclass of JDialog provides I18N, debug messaging support, exception handling, and cursor state handling.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CMDialogJ()
          CMDialogJ constructor comment.
CMDialogJ(CMFrameJ owner)
          CMDialogJ constructor comment.
CMDialogJ(CMFrameJ owner, boolean modal)
          CMDialogJ constructor comment.
CMDialogJ(CMFrameJ owner, String title)
          CMDialogJ constructor comment.
CMDialogJ(CMFrameJ owner, String title, boolean modal)
          CMDialogJ constructor comment.
CMDialogJ(Dialog owner)
          Creation date: (9/25/2001 2:49:53 PM)
CMDialogJ(Dialog owner, boolean modal)
          Creation date: (9/25/2001 3:16:30 PM)
CMDialogJ(Dialog owner, String title, boolean modal)
          Creation date: (9/25/2001 3:19:08 PM)
CMDialogJ(Frame owner)
          CMDialogJ constructor comment.
CMDialogJ(Frame owner, boolean modal)
          CMDialogJ constructor comment.
CMDialogJ(Frame owner, String title)
          CMDialogJ constructor comment.
CMDialogJ(Frame owner, String title, boolean modal)
          CMDialogJ constructor comment.
 
Method Summary
 void debugMessage(Exception e)
          debugMessage method is a convenience method that delegates the message back to the MessageManager
 void debugMessage(String string)
          debugMessage method is a convenience method that delegates the message back to the MessageManager
 void debugMessage(String message, Exception e)
          debugMessage method is a convenience method that delegates the message back to the MessageManager
 void dispose()
          Overrides to ensure always on top is set to false when closed
 Dictionary getClientProperties()
           
 int getTimeInMills()
          Insert the method's description here.
 String getTranslation()
          Gets the translated String.
 String getTranslationId()
          Gets the key of the translated String.
 void hide()
          overrides to ensure always on top is false
 boolean isAlwaysOnTop()
          Insert the method's description here.
static void main(String[] args)
          main entrypoint - starts the part when it is run as an application
static CMDialogJ newCMDialogJ(CMTopLevelComponent pTLC, boolean pModal)
          Creates a new CMDialogJ with a CMTopLevelComponent as a parent.
 void putClientProperty(Object key, Object value)
          Add an arbitrary key/value "client property" to this component.
 void setAlwaysOnTop(boolean newAlwaysOnTop)
          Insert the method's description here.
 void setTimeInMills(int newTimeInMills)
          Insert the method's description here.
 void setTitle(String key)
          Overrides the superclass to set the key for the translated String.
 void setTranslation(String newTranslation)
          Sets the String without translating it.
 void setVisible(boolean vis)
          overrides to ensure always on top is false
 void show()
          Center the dialog in the bounds of the parent Frame or screen so this dialog will be centered withing its parent or on the screen.
 void showBusyCursor()
          Set the cursor to busy
 void showDefaultCursor()
          Reset the cursor to the default
 void showException(CMException exception)
          shows an exception dialog
 void showException(Throwable exception)
          shows an Exception dialog
 
Methods inherited from class javax.swing.JDialog
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, update
 
Methods inherited from class java.awt.Dialog
addNotify, getTitle, isModal, isResizable, isUndecorated, setModal, setResizable, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CMDialogJ

public CMDialogJ()
CMDialogJ constructor comment.


CMDialogJ

public CMDialogJ(Dialog owner)
Creation date: (9/25/2001 2:49:53 PM)

Parameters:
owner - java.awt.Dialog

CMDialogJ

public CMDialogJ(Dialog owner,
                 String title,
                 boolean modal)
Creation date: (9/25/2001 3:19:08 PM)

Parameters:
owner - java.awt.Dialog
title - java.lang.String
modal - boolean

CMDialogJ

public CMDialogJ(Dialog owner,
                 boolean modal)
Creation date: (9/25/2001 3:16:30 PM)

Parameters:
owner - java.awt.Dialog
modal - boolean

CMDialogJ

public CMDialogJ(Frame owner)
CMDialogJ constructor comment.

Parameters:
owner - java.awt.Frame

CMDialogJ

public CMDialogJ(Frame owner,
                 String title)
CMDialogJ constructor comment.

Parameters:
owner - java.awt.Frame
title - java.lang.String

CMDialogJ

public CMDialogJ(Frame owner,
                 String title,
                 boolean modal)
CMDialogJ constructor comment.

Parameters:
owner - java.awt.Frame
title - java.lang.String
modal - boolean

CMDialogJ

public CMDialogJ(Frame owner,
                 boolean modal)
CMDialogJ constructor comment.

Parameters:
owner - java.awt.Frame
modal - boolean

CMDialogJ

public CMDialogJ(CMFrameJ owner)
CMDialogJ constructor comment.

Parameters:
owner - CMFrameJ

CMDialogJ

public CMDialogJ(CMFrameJ owner,
                 String title)
CMDialogJ constructor comment.

Parameters:
owner - CMFrameJ
title - java.lang.String

CMDialogJ

public CMDialogJ(CMFrameJ owner,
                 String title,
                 boolean modal)
CMDialogJ constructor comment.

Parameters:
owner - CMFrameJ
title - java.lang.String
modal - boolean

CMDialogJ

public CMDialogJ(CMFrameJ owner,
                 boolean modal)
CMDialogJ constructor comment.

Parameters:
owner - CMFrameJ
modal - boolean
Method Detail

debugMessage

public void debugMessage(Exception e)
debugMessage method is a convenience method that delegates the message back to the MessageManager


debugMessage

public void debugMessage(String string)
debugMessage method is a convenience method that delegates the message back to the MessageManager


debugMessage

public void debugMessage(String message,
                         Exception e)
debugMessage method is a convenience method that delegates the message back to the MessageManager


dispose

public void dispose()
Overrides to ensure always on top is set to false when closed

Overrides:
dispose in class Dialog

getClientProperties

public Dictionary getClientProperties()
Returns:
a small Hashtable
See Also:
putClientProperty(java.lang.Object, java.lang.Object), #getClientProperty

getTimeInMills

public int getTimeInMills()
Insert the method's description here. Creation date: (8/3/00 3:04:45 PM)

Returns:
int

getTranslation

public String getTranslation()
Gets the translated String.


getTranslationId

public String getTranslationId()
Gets the key of the translated String.


hide

public void hide()
overrides to ensure always on top is false

Overrides:
hide in class Dialog

isAlwaysOnTop

public boolean isAlwaysOnTop()
Insert the method's description here. Creation date: (8/3/00 3:01:56 PM)

Returns:
boolean

main

public static void main(String[] args)
main entrypoint - starts the part when it is run as an application

Parameters:
args - java.lang.String[]

newCMDialogJ

public static CMDialogJ newCMDialogJ(CMTopLevelComponent pTLC,
                                     boolean pModal)
Creates a new CMDialogJ with a CMTopLevelComponent as a parent. This method should be in a constructor, but it cannot be coded that way


putClientProperty

public final void putClientProperty(Object key,
                                    Object value)
Add an arbitrary key/value "client property" to this component.

The get/putClientProperty methods provide access to a small per-instance hashtable. Callers can use get/putClientProperty to annotate components that were created by another module, e.g. a layout manager might store per child constraints this way. For example:

 componentA.putClientProperty("to the left of", componentB);
 

If value is null this method will remove the property. Changes to client properties are reported with PropertyChange events. The name of the property (for the sake of PropertyChange events) is key.toString().

The clientProperty dictionary is not intended to support large scale extensions to JComponent nor should be it considered an alternative to subclassing when designing a new component.

See Also:
#getClientProperty, Window.addPropertyChangeListener(java.beans.PropertyChangeListener)

setAlwaysOnTop

public void setAlwaysOnTop(boolean newAlwaysOnTop)
Insert the method's description here. Creation date: (8/3/00 3:01:56 PM)

Parameters:
newAlwaysOnTop - boolean

setTimeInMills

public void setTimeInMills(int newTimeInMills)
Insert the method's description here. Creation date: (8/3/00 3:04:45 PM)

Parameters:
newTimeInMills - int

setTitle

public void setTitle(String key)
Overrides the superclass to set the key for the translated String.

Overrides:
setTitle in class Dialog

setTranslation

public void setTranslation(String newTranslation)
Sets the String without translating it.


setVisible

public void setVisible(boolean vis)
overrides to ensure always on top is false

Overrides:
setVisible in class Component

show

public void show()
Center the dialog in the bounds of the parent Frame or screen so this dialog will be centered withing its parent or on the screen.

Overrides:
show in class Dialog

showBusyCursor

public void showBusyCursor()
Set the cursor to busy


showDefaultCursor

public void showDefaultCursor()
Reset the cursor to the default


showException

public void showException(Throwable exception)
shows an Exception dialog


showException

public void showException(CMException exception)
shows an exception dialog