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

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--com.ibm.dse.tools.workbench.gui.RepositoryExplorer

public class RepositoryExplorer
extends javax.swing.JFrame
implements DWChangeNotifier, javax.swing.event.ListSelectionListener, javax.swing.event.TreeSelectionListener, java.awt.event.ActionListener, ActionVariables, IconNames, DWChangeListener

This class is an explorer for the contents saved in a repository

See Also:
Serialized Form

Inner Class Summary
protected  class RepositoryExplorer.PopupMenuListener
           
 
Inner classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Field Summary
static java.lang.String ADD_TO_WORKSPACE
           
static java.lang.String FRAME_TITLE_LABEL_TEXT
           
protected  java.util.Vector listenerList
           
static java.lang.String OPEN_TO_EDITIONS
           
static java.lang.String SECTION
           
protected  TableRow[] selectedRows
           
static java.lang.String TITLE
           
protected  java.util.Hashtable versionExplorerList
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, 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 com.ibm.dse.tools.workbench.gui.ActionVariables
CMD_ADD_TO_WORKSPACE, CMD_CHANGE_REPOSITORY, CMD_CHANGE_WORKSPACE, CMD_CLONE, CMD_CONNECT_REPOSITORY, CMD_COPY, CMD_CREATE_OPEN_EDITION, CMD_CUT, CMD_DELETE, CMD_DISCONNECT_REPOSITORY, CMD_EXIT, CMD_IMPORT_FILE, CMD_LAUNCH_SPECIFIC_WIZARD, CMD_MORPH_INTO, CMD_MOVE, CMD_OPEN_DOMAINS_EXPLORER, CMD_OPEN_FILE, CMD_OPEN_REPOSITORY_EXPLORER, CMD_OPEN_SETTINGS_WIZARD, CMD_OPEN_TO_EDITIONS, CMD_PASTE, CMD_REFRESH_WORKSPACE, CMD_RELOAD_ENVIRONMENT, CMD_SELECT_ALL, CMD_SHOW_CONSOLE, CMD_SHOW_VERSION, CMD_UNDO, CMD_VERSION
 
Fields inherited from interface com.ibm.dse.tools.workbench.gui.IconNames
ATTRIBUTE, ATTRIBUTE_BIG, C_SETTINGS, C_SETTINGS_BIG, CLIENT, CLIENT_SERVER, CONSOLE, CONTEXT, DATA, DEVELOPMENT_WORKBENCH, DOMAIN, DOMAIN_BIG, ENTITY, ENTITY_BIG, ERROR, FILE, FOLDER_CLOSED, FOLDER_OPENED, FORMAT, GROUP, GROUP_BIG, GROUP_CLOSED, GROUP_OPENED, INSTANCE, INSTANCE_BIG, INSTANCE_CLOSED, INSTANCE_OPENED, LIST_VIEW, NONE, OPEN, OPERATION, PROCESS, PROPERTY, PROPERTY_BIG, REPOSITORY, REPOSITORY_BIG, SERVER, SETTINGS, STANDALONE, TREE_VIEW, USER, USERS_BIG, VERSION, VERSION_BIG, VERSION_WINDOW, VIEW, WARNING, WIZARD, WORKSPACE, WORKSPACE_BIG, WORKSPACE_EXPLORER
 
Constructor Summary
RepositoryExplorer()
          This constructor created a repository explorer instance
RepositoryExplorer(Repository aRepository, Workspace aWorkspace)
          This constructor creates a repository explorer instance
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          This method dispatch the action event.
 void addChangeListener(DWChangeListener listener)
          To add a listener to the listeners list
 void dispose()
          This method closes the repository explorer
protected  void disposeVersionExplorers()
          Disposes all the version explorers that have registered to this repository explorer
protected  void doOpenToEditions(TableRow[] rows)
          Performs the open to editions task on a row, invoking the appropiate versions explorer
protected  void doShowPopupMenu(java.awt.event.MouseEvent event)
          Shows the PopUp Menu with the appropiate menu items
protected  void fireStateChanged(Repository repositoryChanged)
          To tell to the listener that a event has occurred.
 Repository getRepository()
          Returns the repository explorer by the repository explorer instance
 Workspace getWorkspace()
          Returns the workspace owned by the user invoking the repository explorer
 void removeChangeListener(DWChangeListener listener)
          To remove a listener of the list of listeners
 void setReadyMode()
          This method sets the cursor to the default.
 void setRepository(Repository aRepository)
          Sets the repository to explore
 void setWaitingMode()
          This method sets the cursor to the wait cursor.
 void setWorkspace(Workspace aWorkspace)
          Sets the workspace owned by the user invoking the explorer
 void stateChanged(DWChangeEvent event)
          This method is executed when the user changes some table row signifivative for the browser.
 void synchronize()
          This method synchronizes the repository explorer contents
protected  void unregisterVersionExplorer(javax.swing.JFrame explorer)
          Unregisters the version explorer
 void valueChanged(javax.swing.event.ListSelectionEvent e)
          This method refreshes the panels in the explorer when a diferent element in a List is selected
 void valueChanged(javax.swing.event.TreeSelectionEvent e)
          This method refreshes the panels in the explorer when a diferent element in a Tree is selected
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, remove, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle
 
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, removeWindowListener, setCursor, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFont, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, 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, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SECTION

public static final java.lang.String SECTION

TITLE

public static final java.lang.String TITLE

FRAME_TITLE_LABEL_TEXT

public static final java.lang.String FRAME_TITLE_LABEL_TEXT

OPEN_TO_EDITIONS

public static final java.lang.String OPEN_TO_EDITIONS

ADD_TO_WORKSPACE

public static final java.lang.String ADD_TO_WORKSPACE

selectedRows

protected TableRow[] selectedRows

listenerList

protected java.util.Vector listenerList

versionExplorerList

protected java.util.Hashtable versionExplorerList
Constructor Detail

RepositoryExplorer

public RepositoryExplorer()
This constructor created a repository explorer instance

RepositoryExplorer

public RepositoryExplorer(Repository aRepository,
                          Workspace aWorkspace)
This constructor creates a repository explorer instance
Parameters:
aRepository - com.ibm.dse.tools.workbench.base.Repository the repository to explore
aWorkSpace - com.ibm.dse.tools.workbench.base.WorkSpace the workspace of the user invoking the repository explorer
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
This method dispatch the action event.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - java.awt.event.ActionEvent

addChangeListener

public void addChangeListener(DWChangeListener listener)
To add a listener to the listeners list
Specified by:
addChangeListener in interface DWChangeNotifier
Parameters:
listener - DWChangeListener the listener

dispose

public void dispose()
This method closes the repository explorer
Overrides:
dispose in class java.awt.Window

disposeVersionExplorers

protected void disposeVersionExplorers()
Disposes all the version explorers that have registered to this repository explorer

doOpenToEditions

protected void doOpenToEditions(TableRow[] rows)
Performs the open to editions task on a row, invoking the appropiate versions explorer
Parameters:
rows - com.ibm.dse.tools.workbench.base.TableRow[]

doShowPopupMenu

protected void doShowPopupMenu(java.awt.event.MouseEvent event)
Shows the PopUp Menu with the appropiate menu items
Parameters:
event - java.awt.event.MouseEvent

fireStateChanged

protected void fireStateChanged(Repository repositoryChanged)
To tell to the listener that a event has occurred. This event is thrown when the repository has changed
Parameters:
repositoryChanged - com.ibm.dse.tools.workbench.base.Repository The repository that has changed.

getRepository

public Repository getRepository()
Returns the repository explorer by the repository explorer instance
Returns:
com.ibm.dse.tools.workbench.base.Repository

getWorkspace

public Workspace getWorkspace()
Returns the workspace owned by the user invoking the repository explorer
Returns:
com.ibm.dse.tools.workbench.base.WorkSpace

removeChangeListener

public void removeChangeListener(DWChangeListener listener)
To remove a listener of the list of listeners
Specified by:
removeChangeListener in interface DWChangeNotifier
Parameters:
listener - com.ibm.dse.tools.workbench.gui.DWChangeListener the listnener that has to be removed

setReadyMode

public void setReadyMode()
This method sets the cursor to the default.

setRepository

public void setRepository(Repository aRepository)
Sets the repository to explore
Parameters:
aRepository - com.ibm.dse.tools.workbench.base.Repository

setWaitingMode

public void setWaitingMode()
This method sets the cursor to the wait cursor.

setWorkspace

public final void setWorkspace(Workspace aWorkspace)
Sets the workspace owned by the user invoking the explorer

This workspace is needed to perform the add to workspace task over the repository rows

Parameters:
aWorkSpace - com.ibm.dse.tools.workbench.base.WorkSpace

stateChanged

public void stateChanged(DWChangeEvent event)
This method is executed when the user changes some table row signifivative for the browser.
Specified by:
stateChanged in interface DWChangeListener
Parameters:
event - com.ibm.dse.tools.workbench.gui.DWChangeEvent

synchronize

public void synchronize()
This method synchronizes the repository explorer contents

unregisterVersionExplorer

protected void unregisterVersionExplorer(javax.swing.JFrame explorer)
Unregisters the version explorer
Parameters:
explorer - javax.swing.JFrame

valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent e)
This method refreshes the panels in the explorer when a diferent element in a List is selected
Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener
Parameters:
e - javax.swing.event.ListSelectionEvent

valueChanged

public void valueChanged(javax.swing.event.TreeSelectionEvent e)
This method refreshes the panels in the explorer when a diferent element in a Tree is selected
Specified by:
valueChanged in interface javax.swing.event.TreeSelectionListener
Parameters:
e - javax.swing.event.TreeSelectionEvent