org.argouml.ui
Class DetailsPane

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byorg.argouml.ui.DetailsPane
All Implemented Interfaces:
Accessible, ChangeListener, EventListener, ImageObserver, MenuContainer, MouseListener, org.tigris.swidgets.Orientable, org.argouml.application.api.QuadrantPanel, Serializable, org.argouml.ui.targetmanager.TargetListener

public class DetailsPane
extends JPanel
implements ChangeListener, MouseListener, org.argouml.application.api.QuadrantPanel, org.tigris.swidgets.Orientable, org.argouml.ui.targetmanager.TargetListener

The lower-right pane of the main ArgoUML window, which shows the details of a selected model element.

This panel has several tabs that show details of the selected ToDoItem, or the selected model element in the Explorer (NavigatorPane), or the MultiEditorPane.

There are requests to have the cursor automatically be set to the primary field.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
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
 
Fields inherited from class javax.swing.JComponent
accessibleContext, 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
 
Fields inherited from interface org.argouml.application.api.QuadrantPanel
Q_BOTTOM, Q_BOTTOM_LEFT, Q_BOTTOM_RIGHT, Q_LEFT, Q_RIGHT, Q_TOP, Q_TOP_LEFT, Q_TOP_RIGHT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DetailsPane(String pane, org.tigris.swidgets.Orientation orientation)
          Gets all of the tabPanels from the ConfigLoader, then adds them to the JTabbedPane.
 
Method Summary
 void addToPropTab(Class c, org.argouml.uml.ui.PropPanel p)
          Helper method to add a Property panel for a given class.
 int getIndexOfNamedTab(String tabName)
          Get the index of the tab with the given name.
 Dimension getMinimumSize()
           
 JPanel getNamedTab(String tabName)
          Get the JPanel of the tab with the given name.
 int getQuadrant()
          This shall return a corner indentification.
 AbstractArgoJPanel getTab(Class tabClass)
          Returns the tab instance of the specified class.
 int getTabCount()
          Get the number of tabs.
 org.argouml.uml.ui.TabProps getTabProps()
          returns the Property panel in the Details Pane.
 JTabbedPane getTabs()
          Returns the JTabbedPane that contains all details panels.
 Object getTarget()
          Returns the current model target.
 void mouseClicked(MouseEvent me)
          if(the mouse click is not in the bounds of the tabbed panel) then call mySingleClick() or myDoubleClick().
 void mouseEntered(MouseEvent me)
          empty, no action taken.
 void mouseExited(MouseEvent me)
          empty, no action taken.
 void mousePressed(MouseEvent me)
          empty, no action taken.
 void mouseReleased(MouseEvent me)
          empty, no action taken.
 void myDoubleClick(int tab)
          Spawns a new tab.
 void mySingleClick(int tab)
          no action currently executed here.
 boolean selectTabNamed(String tabName)
          Selects a tab by given name.
 void setOrientation(org.tigris.swidgets.Orientation orientation)
          Set the orientation of this details pane.
 boolean setToDoItem(Object item)
          Selects the to do tab, and sets the target of that tab.
 void stateChanged(ChangeEvent e)
          Reacts to a change in the selected tab by calling refresh() for TabToDoTarget's & setTarget on a TabModelTarget or TabFigTarget instance old notes: called when the user selects a new tab, by clicking or otherwise.
 void targetAdded(org.argouml.ui.targetmanager.TargetEvent e)
          Fired when a target is added to the list of targets.
 void targetRemoved(org.argouml.ui.targetmanager.TargetEvent e)
          Fired when a target is removed from the list of targets
 void targetSet(org.argouml.ui.targetmanager.TargetEvent e)
          Fired when a total new set of targets is set
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DetailsPane

public DetailsPane(String pane,
                   org.tigris.swidgets.Orientation orientation)
Gets all of the tabPanels from the ConfigLoader, then adds them to the JTabbedPane.

Sets the target to null.

Registers listeners.

Parameters:
pane - is probably the name of the pane TODO: verify this!
orientation - is the orientation.
Method Detail

getTabs

public JTabbedPane getTabs()
Returns the JTabbedPane that contains all details panels.

Returns:
the JTabbedPane.

setToDoItem

public boolean setToDoItem(Object item)
Selects the to do tab, and sets the target of that tab.

Parameters:
item - the selected todo item
Returns:
true if ? Yes when? TODO: Explain.

getTarget

public Object getTarget()
Returns the current model target.

Returns:
the current model target

getMinimumSize

public Dimension getMinimumSize()
See Also:
Component.getMinimumSize()

getIndexOfNamedTab

public int getIndexOfNamedTab(String tabName)
Get the index of the tab with the given name.

Parameters:
tabName - the name of the required tab
Returns:
index of the tab of the given name

getNamedTab

public JPanel getNamedTab(String tabName)
Get the JPanel of the tab with the given name.

Parameters:
tabName - the name of the required tab
Returns:
the tab of the given name

getTabCount

public int getTabCount()
Get the number of tabs.

Returns:
the number of tab pages

selectTabNamed

public boolean selectTabNamed(String tabName)
Selects a tab by given name.

Parameters:
tabName - the given name
Returns:
true if the named tab has been found

addToPropTab

public void addToPropTab(Class c,
                         org.argouml.uml.ui.PropPanel p)
Helper method to add a Property panel for a given class.

Parameters:
c - the given class
p - the given property panel

getTabProps

public org.argouml.uml.ui.TabProps getTabProps()
returns the Property panel in the Details Pane.

Returns:
the property panel

getTab

public AbstractArgoJPanel getTab(Class tabClass)
Returns the tab instance of the specified class.

Parameters:
tabClass - the given class
Returns:
the tab instance for the given class

stateChanged

public void stateChanged(ChangeEvent e)
Reacts to a change in the selected tab by calling refresh() for TabToDoTarget's & setTarget on a TabModelTarget or TabFigTarget instance old notes: called when the user selects a new tab, by clicking or otherwise.

Specified by:
stateChanged in interface ChangeListener
See Also:
ChangeListener.stateChanged(javax.swing.event.ChangeEvent)

mySingleClick

public void mySingleClick(int tab)
no action currently executed here. called when the user clicks once on a tab.

Parameters:
tab - the index of the clicked tab

myDoubleClick

public void myDoubleClick(int tab)
Spawns a new tab. called when the user clicks twice on a tab.

Parameters:
tab - the index of the clicked tab

mousePressed

public void mousePressed(MouseEvent me)
empty, no action taken.

Specified by:
mousePressed in interface MouseListener
See Also:
MouseListener.mousePressed(java.awt.event.MouseEvent)

mouseReleased

public void mouseReleased(MouseEvent me)
empty, no action taken.

Specified by:
mouseReleased in interface MouseListener
See Also:
MouseListener.mouseReleased(java.awt.event.MouseEvent)

mouseEntered

public void mouseEntered(MouseEvent me)
empty, no action taken.

Specified by:
mouseEntered in interface MouseListener
See Also:
MouseListener.mouseEntered(java.awt.event.MouseEvent)

mouseExited

public void mouseExited(MouseEvent me)
empty, no action taken.

Specified by:
mouseExited in interface MouseListener
See Also:
MouseListener.mouseExited(java.awt.event.MouseEvent)

mouseClicked

public void mouseClicked(MouseEvent me)
if(the mouse click is not in the bounds of the tabbed panel) then call mySingleClick() or myDoubleClick().

Specified by:
mouseClicked in interface MouseListener
See Also:
MouseListener.mouseClicked(java.awt.event.MouseEvent)

getQuadrant

public int getQuadrant()
Description copied from interface: org.argouml.application.api.QuadrantPanel
This shall return a corner indentification.

Specified by:
getQuadrant in interface org.argouml.application.api.QuadrantPanel
Returns:
one of Q_TOP_LEFT, Q_TOP_RIGHT, Q_BOTTOM_LEFT, Q_BOTTOM_RIGHT
See Also:
QuadrantPanel.getQuadrant()

setOrientation

public void setOrientation(org.tigris.swidgets.Orientation orientation)
Set the orientation of this details pane.

Specified by:
setOrientation in interface org.tigris.swidgets.Orientable
Parameters:
orientation - the required orientation

targetAdded

public void targetAdded(org.argouml.ui.targetmanager.TargetEvent e)
Description copied from interface: org.argouml.ui.targetmanager.TargetListener
Fired when a target is added to the list of targets.

Specified by:
targetAdded in interface org.argouml.ui.targetmanager.TargetListener
Parameters:
e - The targetevent, name will be TARGET_ADDED
See Also:
TargetListener.targetAdded(TargetEvent)

targetRemoved

public void targetRemoved(org.argouml.ui.targetmanager.TargetEvent e)
Description copied from interface: org.argouml.ui.targetmanager.TargetListener
Fired when a target is removed from the list of targets

Specified by:
targetRemoved in interface org.argouml.ui.targetmanager.TargetListener
Parameters:
e - The targetevent, name will be TARGET_REMOVED
See Also:
TargetListener.targetRemoved(TargetEvent)

targetSet

public void targetSet(org.argouml.ui.targetmanager.TargetEvent e)
Description copied from interface: org.argouml.ui.targetmanager.TargetListener
Fired when a total new set of targets is set

Specified by:
targetSet in interface org.argouml.ui.targetmanager.TargetListener
Parameters:
e - The targetevent, name will be TARGET_SET
See Also:
TargetListener.targetSet(TargetEvent)


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Cookbook