uci.uml.ui
Class NavigatorPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--uci.uml.ui.NavigatorPane

public class NavigatorPane
extends JPanel
implements ItemListener, TreeSelectionListener

The upper-left pane of the main Argo/UML window. This shows the contents of the current project in one of several ways that are determined by NavPerspectives.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Field Summary
static int _clicksInNavPane
           
protected  JComboBox _combo
           
protected  NavPerspective _curPerspective
           
protected  int _historyIndex
           
protected  Vector _navHistory
           
static int _navPerspectivesChanged
           
protected  Vector _perspectives
           
protected  Object _root
           
protected  ToolBar _toolbar
           
protected  DisplayTextTree _tree
           
static int MAX_HISTORY
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
NavigatorPane()
           
 
Method Summary
 void addToHistory(Object sel)
           
 boolean canNavBack()
           
 boolean canNavForw()
           
 void clearHistory()
           
 void forceUpdate()
           
 NavPerspective getCurPerspective()
           
 Dimension getMinimumSize()
           
 Vector getPerspectives()
           
 Dimension getPreferredSize()
           
 Object getRoot()
           
 Object getSelectedObject()
           
 void itemStateChanged(ItemEvent e)
          called when the user selects a perspective from the perspective combo.
 void myDoubleClick(int row, TreePath path)
          called when the user clicks twice on an item in the tree.
 void mySingleClick(int row, TreePath path)
          called when the user clicks once on an item in the tree.
 void navBack()
           
 void navDown()
           
 void navForw()
           
 void navUp()
           
 void setCurPerspective(NavPerspective per)
           
 void setPerspectives(Vector pers)
           
 void setRoot(Object r)
           
 void setSelection(Object level1, Object level2)
          This is pretty limited, it is really only useful for selecting the default diagram when the user does New.
protected  void updateTree()
           
 void valueChanged(TreeSelectionEvent e)
          called when the user selects an item in the tree, by clicking or otherwise.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_HISTORY

public static int MAX_HISTORY

_perspectives

protected Vector _perspectives

_toolbar

protected ToolBar _toolbar

_combo

protected JComboBox _combo

_root

protected Object _root

_navHistory

protected Vector _navHistory

_historyIndex

protected int _historyIndex

_curPerspective

protected NavPerspective _curPerspective

_tree

protected DisplayTextTree _tree

_clicksInNavPane

public static int _clicksInNavPane

_navPerspectivesChanged

public static int _navPerspectivesChanged
Constructor Detail

NavigatorPane

public NavigatorPane()
Method Detail

setRoot

public void setRoot(Object r)

getRoot

public Object getRoot()

getPerspectives

public Vector getPerspectives()

setPerspectives

public void setPerspectives(Vector pers)

getCurPerspective

public NavPerspective getCurPerspective()

setCurPerspective

public void setCurPerspective(NavPerspective per)

getSelectedObject

public Object getSelectedObject()

forceUpdate

public void forceUpdate()

setSelection

public void setSelection(Object level1,
                         Object level2)
This is pretty limited, it is really only useful for selecting the default diagram when the user does New. A general function to select a given object would have to find the shortest path to it.

getPreferredSize

public Dimension getPreferredSize()
Overrides:
getPreferredSize in class JComponent

getMinimumSize

public Dimension getMinimumSize()
Overrides:
getMinimumSize in class JComponent

itemStateChanged

public void itemStateChanged(ItemEvent e)
called when the user selects a perspective from the perspective combo.
Specified by:
itemStateChanged in interface ItemListener

valueChanged

public void valueChanged(TreeSelectionEvent e)
called when the user selects an item in the tree, by clicking or otherwise.
Specified by:
valueChanged in interface TreeSelectionListener

mySingleClick

public void mySingleClick(int row,
                          TreePath path)
called when the user clicks once on an item in the tree.

myDoubleClick

public void myDoubleClick(int row,
                          TreePath path)
called when the user clicks twice on an item in the tree.

navDown

public void navDown()

navUp

public void navUp()

clearHistory

public void clearHistory()

addToHistory

public void addToHistory(Object sel)

canNavBack

public boolean canNavBack()

navBack

public void navBack()

canNavForw

public boolean canNavForw()

navForw

public void navForw()

updateTree

protected void updateTree()