org.argouml.ui
Class DetailsPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.argouml.ui.DetailsPane
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener, TargetListener

public class DetailsPane
extends javax.swing.JPanel
implements javax.swing.event.ChangeListener, java.awt.event.MouseListener, 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/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DetailsPane(java.lang.String compassPoint, Orientation theOrientation)
          Gets all of the tabPanels from the ConfigLoader, then adds them to the JTabbedPane.
 
Method Summary
 void addTab(AbstractArgoJPanel p, boolean atEnd)
          Deprecated. by Bob Tarling in 0.29.3 use addTab(JPanel, boolean)
 void addTab(javax.swing.JPanel p, boolean atEnd)
           
 void addToPropTab(java.lang.Class c, PropPanel p)
          Helper method to add a Property panel for a given class.
 int getIndexOfNamedTab(java.lang.String tabName)
          Get the index of the tab with the given name.
 java.awt.Dimension getMinimumSize()
           
 AbstractArgoJPanel getTab(java.lang.Class<? extends AbstractArgoJPanel> tabClass)
          Returns the tab instance of the specified class.
 int getTabCount()
          Get the number of tabs.
 TabProps getTabProps()
          returns the Property panel in the Details Pane.
 java.lang.Object getTarget()
          Returns the current model target.
 void mouseClicked(java.awt.event.MouseEvent me)
           
 void mouseEntered(java.awt.event.MouseEvent me)
           
 void mouseExited(java.awt.event.MouseEvent me)
           
 void mousePressed(java.awt.event.MouseEvent me)
           
 void mouseReleased(java.awt.event.MouseEvent me)
           
 void myDoubleClick(int tab)
          Spawns a new tab.
 void mySingleClick(int tab)
          no action currently executed here.
 void removeTab(javax.swing.JPanel p)
           
 boolean selectTabNamed(java.lang.String tabName)
          Selects a tab by given name.
 void setOrientation(Orientation newOrientation)
           
 boolean setToDoItem(java.lang.Object item)
          Deprecated. for 0.25.5 by tfmorris. Send an event that TabToDoTargets listen to.
 void stateChanged(javax.swing.event.ChangeEvent e)
          Reacts to a change in the selected tab by calling refresh() for TabToDoTarget's & setTarget on a TabModelTarget or TabFigTarget instance.
 void targetAdded(TargetEvent e)
          Fired when a target is added to the list of targets.
 void targetRemoved(TargetEvent e)
          Fired when a target is removed from the list of targets
 void targetSet(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, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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(java.lang.String compassPoint,
                   Orientation theOrientation)
Gets all of the tabPanels from the ConfigLoader, then adds them to the JTabbedPane.

Sets the target to null.

Registers listeners.

Parameters:
compassPoint - the position for which to build the pane
theOrientation - is the orientation.
Method Detail

addTab

@Deprecated
public void addTab(AbstractArgoJPanel p,
                              boolean atEnd)
Deprecated. by Bob Tarling in 0.29.3 use addTab(JPanel, boolean)

Parameters:
p - the panel to be added
atEnd - true = add the panel at the end, false = at the beginning

addTab

public void addTab(javax.swing.JPanel p,
                   boolean atEnd)
Parameters:
p - the panel to be added
atEnd - true = add the panel at the end, false = at the beginning

removeTab

public void removeTab(javax.swing.JPanel p)
Parameters:
p - the panel to be removed

setToDoItem

@Deprecated
public boolean setToDoItem(java.lang.Object item)
Deprecated. for 0.25.5 by tfmorris. Send an event that TabToDoTargets listen to.

Selects the to do tab, and sets the target of that tab.

Parameters:
item - the selected todo item
Returns:
true if todo tab is really selected.

getTarget

public java.lang.Object getTarget()
Returns the current model target.

Returns:
the current model target

getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class javax.swing.JComponent

getIndexOfNamedTab

public int getIndexOfNamedTab(java.lang.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

getTabCount

public int getTabCount()
Get the number of tabs.

Returns:
the number of tab pages

selectTabNamed

public boolean selectTabNamed(java.lang.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(java.lang.Class c,
                         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 TabProps getTabProps()
returns the Property panel in the Details Pane.

Returns:
the property panel

getTab

public AbstractArgoJPanel getTab(java.lang.Class<? extends AbstractArgoJPanel> 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(javax.swing.event.ChangeEvent e)
Reacts to a change in the selected tab by calling refresh() for TabToDoTarget's & setTarget on a TabModelTarget or TabFigTarget instance.

Called when the user selects a new tab, by clicking or otherwise.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener

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(java.awt.event.MouseEvent me)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent me)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent me)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent me)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

setOrientation

public void setOrientation(Orientation newOrientation)

targetAdded

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

Specified by:
targetAdded in interface TargetListener
Parameters:
e - The targetevent, name will be TARGET_ADDED

targetRemoved

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

Specified by:
targetRemoved in interface TargetListener
Parameters:
e - The targetevent, name will be TARGET_REMOVED

targetSet

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

Specified by:
targetSet in interface TargetListener
Parameters:
e - The targetevent, name will be TARGET_SET


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook