wt.clients.folderexplorer
Class CreationClassDialog

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended bywt.clients.folderexplorer.CreationClassDialog
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class CreationClassDialog
extends Dialog

A Dialog which displays a list of classes that implement the FolderEntry interface. This dialog supports choosing a single entry from the list of classes.

    CreationClassDialog dialog = new CreationClassDialog( my_frame, true );
    dialog.show();
    if( !dialog.isCanceled() ) {
 	   createNewObject( dialog.getSelectedClass() );
 	}
  


Supported API: true

Extendable: false

See Also:
Dialog, FolderEntry, Serialized Form

Nested Class Summary
(package private)  class CreationClassDialog.InitializeClassesThread
           
(package private)  class CreationClassDialog.InitializeMultiListThread
           
(package private)  class CreationClassDialog.SymAction
           
(package private)  class CreationClassDialog.SymItem
           
(package private)  class CreationClassDialog.SymKey
           
(package private)  class CreationClassDialog.SymWindow
           
 
Nested classes inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog
 
Nested classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
private  boolean actionsDisabled
           
(package private)  Panel buttonPanel
           
(package private)  Button cancelButton
           
private static com.objectspace.jgl.HashMap classesHashMap
           
(package private)  Label classTypeLabel
           
(package private)  TextField classTypeValue
           
private  ThreadGroup contextGroup
           
private  Object disableActions
           
(package private)  boolean fComponentsAdjusted
           
(package private)  symantec.itools.awt.shape.HorizontalLine horizontalLine1
           
private  IconCache iconCache
           
private  boolean initComplete
           
private  Exception initException
           
private  Object initLock
           
private  boolean initSuccessful
           
private  boolean isCanceled
           
private  boolean isShowing
           
(package private)  WTMultiList multiList1
           
(package private)  Button okButton
           
private  Applet parentApplet
           
private static ResourceBundle resources
           
private static String RESOURCES
           
private  Class selectedClass
           
private  Object showDialog
           
private static int TYPE
           
 
Fields inherited from class java.awt.Dialog
 
Fields inherited from class java.awt.Window
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CreationClassDialog(Frame parent, boolean modal)
          Constructor for CreationClassDialog.
CreationClassDialog(Frame parent, String title, boolean modal)
          Constructor for CreationClassDialog.
 
Method Summary
 void addNotify()
           
(package private)  void cancelButton_Action(ActionEvent event)
           
(package private)  void cancelButton_KeyPress(KeyEvent event)
           
(package private)  void Dialog1_WindowClosing(WindowEvent event)
           
private  void enableActions(boolean enable)
           
private  WTContext getContext()
           
private  String getDisplayName(String full_classname)
           
 Applet getParentApplet()
          Deprecated. the Applet is no longer used for setting context; the WTContext class is now used for setting context

Supported API: false
 Class getSelectedClass()
          Method getSelectedClass returns the Class the user of this dialog has selected.
private  void initCreateableClasses()
           
private  void initIconCache()
           
private  void initMultiList()
           
private  void initResources()
          Deprecated. This method is no longer necessary; support for localized resources is handled by the WTMessage class

Supported API: false
 boolean isCanceled()
          Method isCanceled returns a boolean indicating whether or not this dialog was canceled.
private  boolean isValidClass(String class_name)
          Helper method to determine if a given fully-qualified classname corresponds to a valid Java class.
private  void localize()
           
(package private)  void multiList1_actionPerformed(ActionEvent event)
           
(package private)  void multiList1_itemStateChanged(ItemEvent event)
           
(package private)  void okButton_Action(ActionEvent event)
           
(package private)  void okButton_KeyPress(KeyEvent event)
           
private  void populateMultiList()
           
protected  void processCancelCommand()
           
protected  void processOkCommand()
           
 void setParentApplet(Applet parent_applet)
          Deprecated. the Applet is no longer used for setting context; the WTContext class is now used for setting context

Supported API: false
 void show()
           
private  void showMessageDialog(String message, boolean modal)
           
private  void updateColors(Color color)
           
private  void updateSelectedClass()
           
 
Methods inherited from class java.awt.Dialog
dispose, getAccessibleContext, getTitle, hide, isModal, isResizable, isUndecorated, paramString, setModal, setResizable, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fComponentsAdjusted

boolean fComponentsAdjusted

multiList1

WTMultiList multiList1

classTypeLabel

Label classTypeLabel

classTypeValue

TextField classTypeValue

horizontalLine1

symantec.itools.awt.shape.HorizontalLine horizontalLine1

buttonPanel

Panel buttonPanel

okButton

Button okButton

cancelButton

Button cancelButton

TYPE

private static int TYPE

classesHashMap

private static com.objectspace.jgl.HashMap classesHashMap

parentApplet

private Applet parentApplet

iconCache

private IconCache iconCache

isCanceled

private boolean isCanceled

contextGroup

private ThreadGroup contextGroup

selectedClass

private Class selectedClass

initLock

private Object initLock

initComplete

private boolean initComplete

initSuccessful

private boolean initSuccessful

initException

private Exception initException

actionsDisabled

private boolean actionsDisabled

disableActions

private Object disableActions

isShowing

private boolean isShowing

showDialog

private Object showDialog

resources

private static ResourceBundle resources

RESOURCES

private static String RESOURCES
Constructor Detail

CreationClassDialog

public CreationClassDialog(Frame parent,
                           boolean modal)
Constructor for CreationClassDialog.

Parameters:
parent - the owner of this dialog
modal - if true, actions on the parent frame are blocked

Supported API: true

CreationClassDialog

public CreationClassDialog(Frame parent,
                           String title,
                           boolean modal)
Constructor for CreationClassDialog.

Parameters:
parent - the owner of this dialog
title - title of this dialog
modal - if true, actions on the parent frame are blocked

Supported API: true
Method Detail

addNotify

public void addNotify()

initResources

private void initResources()
Deprecated. This method is no longer necessary; support for localized resources is handled by the WTMessage class

Supported API: false

Initialize the ResourceBundles used for localizing labels and error messages.


localize

private void localize()

initMultiList

private void initMultiList()

show

public void show()

Dialog1_WindowClosing

void Dialog1_WindowClosing(WindowEvent event)

initCreateableClasses

private void initCreateableClasses()
                            throws WTException
Throws:
WTException

initIconCache

private void initIconCache()

getDisplayName

private String getDisplayName(String full_classname)

getSelectedClass

public Class getSelectedClass()
Method getSelectedClass returns the Class the user of this dialog has selected. The returned class will implement the FolderEntry interface.

Returns:
the Class selected by the user
See Also:
Class,

Supported API: true

setParentApplet

public void setParentApplet(Applet parent_applet)
Deprecated. the Applet is no longer used for setting context; the WTContext class is now used for setting context

Supported API: false

Method setParentApplet sets the Applet that provides context for this dialog. The parent Applet is is used in finding the appropriate WTContext for this dialog.

Parameters:
parent_applet - the Applet providing context for this dialog
See Also:
getParentApplet(), Applet, WTContext

getParentApplet

public Applet getParentApplet()
Deprecated. the Applet is no longer used for setting context; the WTContext class is now used for setting context

Supported API: false

Method getParentApplet returns the Applet which provides context for this dialog. The parent Applet is is used in finding the appropriate WTContext for this dialog.

Returns:
the Applet providing context for this dialog
See Also:
setParentApplet(java.applet.Applet), Applet, WTContext

processCancelCommand

protected void processCancelCommand()

processOkCommand

protected void processOkCommand()

cancelButton_Action

void cancelButton_Action(ActionEvent event)

okButton_Action

void okButton_Action(ActionEvent event)

multiList1_itemStateChanged

void multiList1_itemStateChanged(ItemEvent event)

updateSelectedClass

private void updateSelectedClass()

getContext

private WTContext getContext()

populateMultiList

private void populateMultiList()

multiList1_actionPerformed

void multiList1_actionPerformed(ActionEvent event)

enableActions

private void enableActions(boolean enable)

okButton_KeyPress

void okButton_KeyPress(KeyEvent event)

cancelButton_KeyPress

void cancelButton_KeyPress(KeyEvent event)

isCanceled

public boolean isCanceled()
Method isCanceled returns a boolean indicating whether or not this dialog was canceled.

Returns:
if true, this dialog was canceled

Supported API: true

updateColors

private void updateColors(Color color)

showMessageDialog

private void showMessageDialog(String message,
                               boolean modal)

isValidClass

private boolean isValidClass(String class_name)
Helper method to determine if a given fully-qualified classname corresponds to a valid Java class.

Parameters:
class_name - the fully-qualified classname of the class
Returns:
true if the given String corresponds to a valid class