com.ibm.dse.tools.workbench.gui
Class InstanceUI

java.lang.Object
  |
  +--com.ibm.dse.tools.workbench.gui.InstanceUI

public class InstanceUI
extends java.lang.Object
implements UIDelegate, javax.swing.ListCellRenderer, javax.swing.tree.TreeCellRenderer, CommonParameters

This class provides an user interface for Groups.


Field Summary
protected  InstanceCellRenderer cellRenderer
           
protected  InstanceChildrenBrowser childrenBrowser
           
protected static java.lang.String INSTANCE_MENU_EXTENSIONS
           
protected static java.lang.String OPTION_DELETE_TEXT
           
protected static java.lang.String OPTION_DETAILS_TEXT
           
protected static java.lang.String OPTION_EXTERNALIZE_TEXT
           
protected static java.lang.String OPTION_GENERATE_AC_FILES_TEXT
           
protected static java.lang.String OPTION_MOVE_DOWN_TEXT
           
protected static java.lang.String OPTION_MOVE_UP_TEXT
           
protected static java.lang.String OPTION_NEW_TEXT
           
protected static java.lang.String OPTION_VALIDATE_TEXT
           
protected static java.lang.String SECTION
           
protected  com.ibm.dse.tools.workbench.wizards.AbstractWizard wizard
           
 
Fields inherited from interface com.ibm.dse.tools.workbench.gui.UIDelegate
MENU_EXTENSIONS_SECTION
 
Fields inherited from interface com.ibm.dse.tools.workbench.gui.CommonParameters
CHANGE_LISTENER, CONTAINER_GROUPS, CURRENT_GROUP, PARENT_ROW, REPOSITORY, ROW_SELECTION_COUNT, SELECTED_PARENT_ROWS, SELECTED_ROWS, WIZARD_PARAM, WORKSPACE
 
Constructor Summary
InstanceUI()
          This constructor creates an InstanceUI object.
 
Method Summary
 void addChangeListener(DWChangeListener listener)
          This method adds a DWChangeListener listener to the listener list.
protected  void fireStateChanged(TableRow tableRowChanged)
          To tell to the listener that a event has occurred.
protected  void fireStateChanged(TableRow[] tableRowsChanged)
          To tell to the listener that a event has occurred.
protected  void fireStateChanged(TableRow[] tableRowsChanged, int action)
          To tell to the listener that a event has occurred.
protected  void fireStateChanged(TableRow tableRowChanged, int action)
          To tell to the listener that a event has occurred.
 InstanceUIActionListener getActionListener()
          This method gets action listener
 javax.swing.JComponent getEditor(javax.swing.JComponent component)
          This method returns the editor component for the class and for a type of component.
 java.awt.Component getListCellRendererComponent(javax.swing.JList list, java.lang.Object value, int index, boolean isSelected, boolean cellHasFocus)
          This method returns the renderer component for a JList.
 java.util.Vector getListeners()
          This method returns the registered listeners for an InstanceUI object
protected  MenuOption[] getMenuOptionsExtension()
          This method returns the extended menu options (user configurable) for an Instance
 java.awt.Component[] getOptionList(TableRow row, java.util.Hashtable params)
          This method returns the specific options for a class.
 javax.swing.Renderer getRenderer(javax.swing.JComponent component)
          This method returns the renderer component for this element and for a type of component.
 java.awt.Component getTreeCellRendererComponent(javax.swing.JTree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
          This method returns the renderer component for a JTree.
 void launchWizard(TableRow tableRow, java.util.Hashtable params)
          This method launches the appropiate wizard to edit the instance.
 void launchWizard(com.ibm.dse.tools.workbench.wizards.Wizard wizard, java.util.Hashtable params)
          This method launches the appropiate wizard to edit the instance.
 void refreshRenderers()
          This method update and refresh all the renderers.
 void removeChangeListener(DWChangeListener listener)
          This method removes a DWChangeListener listener from the listener list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SECTION

protected static final java.lang.String SECTION

OPTION_NEW_TEXT

protected static final java.lang.String OPTION_NEW_TEXT

OPTION_DETAILS_TEXT

protected static final java.lang.String OPTION_DETAILS_TEXT

OPTION_DELETE_TEXT

protected static final java.lang.String OPTION_DELETE_TEXT

OPTION_EXTERNALIZE_TEXT

protected static final java.lang.String OPTION_EXTERNALIZE_TEXT

OPTION_VALIDATE_TEXT

protected static final java.lang.String OPTION_VALIDATE_TEXT

OPTION_GENERATE_AC_FILES_TEXT

protected static final java.lang.String OPTION_GENERATE_AC_FILES_TEXT

OPTION_MOVE_UP_TEXT

protected static final java.lang.String OPTION_MOVE_UP_TEXT

OPTION_MOVE_DOWN_TEXT

protected static final java.lang.String OPTION_MOVE_DOWN_TEXT

cellRenderer

protected InstanceCellRenderer cellRenderer

wizard

protected com.ibm.dse.tools.workbench.wizards.AbstractWizard wizard

childrenBrowser

protected InstanceChildrenBrowser childrenBrowser

INSTANCE_MENU_EXTENSIONS

protected static final java.lang.String INSTANCE_MENU_EXTENSIONS
Constructor Detail

InstanceUI

public InstanceUI()
This constructor creates an InstanceUI object.
Method Detail

addChangeListener

public void addChangeListener(DWChangeListener listener)
This method adds a DWChangeListener listener to the listener list.
Parameters:
listener - com.ibm.dse.tools.workbench.gui.DWChangeListener

fireStateChanged

protected void fireStateChanged(TableRow[] tableRowsChanged)
To tell to the listener that a event has occurred. This event is becaouse a few Table Rows have been changed.
Parameters:
tableRowsChanged - com.ibm.dse.tools.workbench.base.TableRow[] The table rows that have been changed.

fireStateChanged

protected void fireStateChanged(TableRow[] tableRowsChanged,
                                int action)
To tell to the listener that a event has occurred. This event is becaouse a few Table Rows have been changed.
Parameters:
tableRowsChanged - com.ibm.dse.tools.workbench.base.TableRow[] The table rows that have been changed.
action - int. The action to do.

fireStateChanged

protected void fireStateChanged(TableRow tableRowChanged)
To tell to the listener that a event has occurred. This event is becouse a Table Row has changed
Parameters:
tableRowChanged - com.ibm.dse.tools.workbench.base.TableRow The table row that has changed.

fireStateChanged

protected void fireStateChanged(TableRow tableRowChanged,
                                int action)
To tell to the listener that a event has occurred. This event is becouse a Table Row has changed
Parameters:
tableRowChanged - com.ibm.dse.tools.workbench.base.TableRow The table row that has changed.
action - int. Action to do.

getActionListener

public InstanceUIActionListener getActionListener()
This method gets action listener
Returns:
com.ibm.dse.tools.workbench.gui.InstanceUIActionListener

getEditor

public javax.swing.JComponent getEditor(javax.swing.JComponent component)
This method returns the editor component for the class and for a type of component.
Specified by:
getEditor in interface UIDelegate
Parameters:
component - com.sun.java.swing.JComponent
Returns:
com.sun.java.swing.JComponent

getListCellRendererComponent

public java.awt.Component getListCellRendererComponent(javax.swing.JList list,
                                                       java.lang.Object value,
                                                       int index,
                                                       boolean isSelected,
                                                       boolean cellHasFocus)
This method returns the renderer component for a JList.
Specified by:
getListCellRendererComponent in interface javax.swing.ListCellRenderer
Parameters:
list - javax.swing.JList
value - java.lang.Object
index - int
isSelected - boolean
cellHasFocus - boolean
Returns:
java.awt.Component

getListeners

public java.util.Vector getListeners()
This method returns the registered listeners for an InstanceUI object
Returns:
java.util.Vector

getMenuOptionsExtension

protected MenuOption[] getMenuOptionsExtension()
This method returns the extended menu options (user configurable) for an Instance
Returns:
com.ibm.dse.tools.workbench.gui.MenuOption[]

getOptionList

public java.awt.Component[] getOptionList(TableRow row,
                                          java.util.Hashtable params)
This method returns the specific options for a class. The menu items will be displayed on a menu.
Specified by:
getOptionList in interface UIDelegate
Parameters:
row - com.ibm.dse.tools.workbench.base.TableRow
params - java.util.Hashtable
Returns:
java.awt.Component[]

getRenderer

public javax.swing.Renderer getRenderer(javax.swing.JComponent component)
This method returns the renderer component for this element and for a type of component.
Specified by:
getRenderer in interface UIDelegate
Parameters:
component - javax.swing.JComponent
Returns:
javax.swing.Renderer

getTreeCellRendererComponent

public java.awt.Component getTreeCellRendererComponent(javax.swing.JTree tree,
                                                       java.lang.Object value,
                                                       boolean selected,
                                                       boolean expanded,
                                                       boolean leaf,
                                                       int row,
                                                       boolean hasFocus)
This method returns the renderer component for a JTree.
Specified by:
getTreeCellRendererComponent in interface javax.swing.tree.TreeCellRenderer
Parameters:
table - javax.swing.JTree
value - java.lang.Object
isSelected - boolean
expanded - boolean
leaf - boolean
row - int
hasFocus - boolean
Returns:
java.awt.Component

launchWizard

public void launchWizard(TableRow tableRow,
                         java.util.Hashtable params)
This method launches the appropiate wizard to edit the instance.
Specified by:
launchWizard in interface UIDelegate
Parameters:
tableRow - com.ibm.dse.tools.workbench.base.TableRow
params - java.util.Hashtable

launchWizard

public void launchWizard(com.ibm.dse.tools.workbench.wizards.Wizard wizard,
                         java.util.Hashtable params)
This method launches the appropiate wizard to edit the instance.
Parameters:
wizard - com.ibm.dse.tools.workbench.wizards.Wizard
params - java.util.Hashtable

refreshRenderers

public void refreshRenderers()
This method update and refresh all the renderers.
Specified by:
refreshRenderers in interface UIDelegate

removeChangeListener

public void removeChangeListener(DWChangeListener listener)
This method removes a DWChangeListener listener from the listener list.
Parameters:
listener - com.ibm.dse.tools.workbench.gui.DWChangeListener