planetj.gui
Class CMFrameJ

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--planetj.gui.CMFrameJ
All Implemented Interfaces:
Accessible, CMTopLevelComponent, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants
Direct Known Subclasses:
CMMessageLogFrameJ, RowCollectionViewer

public class CMFrameJ
extends JFrame
implements CMTopLevelComponent

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

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.JFrame
EXIT_ON_CLOSE
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
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, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CMFrameJ()
          Constructor
CMFrameJ(String title)
          CMFrameJ constructor comment.
 
Method Summary
 void addBusyOperation(String addedBusyOperation)
          This will add an operation to the busyOperation vector We will set the cursor to busy when the first element is added to this vector Creation date: (1/28/00 4:09:52 PM)
 void addPropertyChangeListener(PropertyChangeListener listener)
          The addPropertyChangeListener method was generated to support the propertyChange field.
 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
 void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          The firePropertyChange method was generated to support the propertyChange field.
 CMException generateException(String exceptionKey)
          Convenience method which simply creates the replacement text variables as an array
 CMException generateException(String exceptionKey, Object[] replacementVars)
          Generate a new CMException.
 CMException generateException(String exceptionKey, String parm1)
          Convenience method which simply creates the replacement text variables as an array
 CMException generateException(String exceptionKey, String parm1, String parm2)
          Convenience method which simply creates the replacement text variables as an array
 CMException generateException(String exceptionKey, String parm1, String parm2, String parm3)
          Convenience method which simply creates the replacement text variables as an array
 Object getBusinessObject()
          Method generated to support the promotion of the BusinessObject attribute.
 Vector getBusyOperation()
          This will return the busy operation vector Creation date: (1/28/00 4:09:52 PM)
 Object getClientProperty(Object key)
          Returns the value of the property with the specified key.
 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.
 boolean isBusyOperationInProgress()
          If there is a busy operation in progress then return true Creation date: (1/28/00 4:09:52 PM)
static void main(String[] args)
          main entrypoint - starts the part when it is run as an application
 void putClientProperty(Object key, Object value)
          Add an arbitrary key/value "client property" to this component.
 void removeBusyOperation(String removedBusyOperation)
          This will remove an operation from the busyOperation vector Creation date: (1/28/00 4:09:52 PM)
 void removePropertyChangeListener(PropertyChangeListener listener)
          The removePropertyChangeListener method was generated to support the propertyChange field.
 void setAlwaysOnTop(boolean newAlwaysOnTop)
          Insert the method's description here.
 void setBusinessObject(Object arg1)
          Method generated to support the promotion of the BusinessObject attribute.
 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 frame in the bounds of the screen
 void showBusyCursor()
          Set the cursor to busy
 void showDefaultCursor()
          Reset the cursor to the default
 void showException(CMFrameJ frame, CMException exception)
          This method was created by a SmartGuide.
 void showException(CMFrameJ frame, Throwable exception)
          This method was created by a SmartGuide.
 void showException(Throwable exception)
          This method was created by a SmartGuide.
 
Methods inherited from class javax.swing.JFrame
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setUndecorated
 
Methods inherited from class java.awt.Window
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, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

CMFrameJ

public CMFrameJ()
Constructor


CMFrameJ

public CMFrameJ(String title)
CMFrameJ constructor comment.

Parameters:
title - java.lang.String
Method Detail

addBusyOperation

public void addBusyOperation(String addedBusyOperation)
This will add an operation to the busyOperation vector We will set the cursor to busy when the first element is added to this vector Creation date: (1/28/00 4:09:52 PM)


addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
The addPropertyChangeListener method was generated to support the propertyChange field.

Overrides:
addPropertyChangeListener in class Window
Parameters:
listener - java.beans.PropertyChangeListener

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 Window

firePropertyChange

public void firePropertyChange(String propertyName,
                               Object oldValue,
                               Object newValue)
The firePropertyChange method was generated to support the propertyChange field.

Overrides:
firePropertyChange in class Component
Parameters:
propertyName - java.lang.String
oldValue - java.lang.Object
newValue - java.lang.Object

generateException

public CMException generateException(String exceptionKey)
Convenience method which simply creates the replacement text variables as an array


generateException

public CMException generateException(String exceptionKey,
                                     Object[] replacementVars)
Generate a new CMException. This uses the TranslationManager since exceptions and messages need to be translated. The message are retrieved from a properties file called MessageBundle.properties. This also depends on a naming scheme where the "Detailed" text is appended to the exceptionKey to be used in finding the "detailed" message for this exception.


generateException

public CMException generateException(String exceptionKey,
                                     String parm1)
Convenience method which simply creates the replacement text variables as an array


generateException

public CMException generateException(String exceptionKey,
                                     String parm1,
                                     String parm2)
Convenience method which simply creates the replacement text variables as an array


generateException

public CMException generateException(String exceptionKey,
                                     String parm1,
                                     String parm2,
                                     String parm3)
Convenience method which simply creates the replacement text variables as an array


getBusinessObject

public Object getBusinessObject()
Method generated to support the promotion of the BusinessObject attribute.

Returns:
java.lang.Object

getBusyOperation

public Vector getBusyOperation()
This will return the busy operation vector Creation date: (1/28/00 4:09:52 PM)

Returns:
java.util.Vector

getClientProperty

public final Object getClientProperty(Object key)
Returns the value of the property with the specified key. Only properties added with putClientProperty will return a non-null value.

Returns:
the value of this property or null
See Also:
putClientProperty(java.lang.Object, java.lang.Object)

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 Window

isAlwaysOnTop

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

Returns:
boolean

isBusyOperationInProgress

public boolean isBusyOperationInProgress()
If there is a busy operation in progress then return true Creation date: (1/28/00 4:09:52 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[]

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(java.lang.Object), addPropertyChangeListener(java.beans.PropertyChangeListener)

removeBusyOperation

public void removeBusyOperation(String removedBusyOperation)
This will remove an operation from the busyOperation vector Creation date: (1/28/00 4:09:52 PM)


removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
The removePropertyChangeListener method was generated to support the propertyChange field.

Overrides:
removePropertyChangeListener in class Component
Parameters:
listener - 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

setBusinessObject

public void setBusinessObject(Object arg1)
Method generated to support the promotion of the BusinessObject attribute.

Parameters:
arg1 - java.lang.Object

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 Frame

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 frame in the bounds of the screen

Overrides:
show in class Window

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)
This method was created by a SmartGuide.


showException

public void showException(CMFrameJ frame,
                          Throwable exception)
This method was created by a SmartGuide.


showException

public void showException(CMFrameJ frame,
                          CMException exception)
This method was created by a SmartGuide.