|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.argouml.ui.TabSpawnable
org.argouml.uml.ui.TabStyle
Provides support for changing the appearance of a diagram element. For each class of a diagram element, the TabStyle class attempts to find an according class of StylePanel which contains the attributes to be modified in terms of style.
The constructor of TabStyle takes an array argument which contains possible
base names for these style panels, or by default StylePanel and SP,
alternating between these two prefixes and the namespace of the Fig class or
org.argouml.ui
. With this configuration, the stylepanel for
e.g. org.argouml.uml.diagram.static.structure.ui.FigClass
,
will be looked at in the following places:
initPanels()
According the decision taken in issue 502, this tab is renamed "Presentation" for the user. And the Presentation tab shall contain presentation options, and no semantic UML properties (which belong inthe "Properties" panel). In contrast, the diagram pop-up menu for a model element may access both presentation options as well as semantic UML properties.
Note also that the semantic properties of a UML model element exist in one copy only but the presentation options exist in one copy per diagram that the model element is showing in. E.g. a class could have attributes hidden in one diagram and showing in another. So, for the user it would be very logical to seperate these 2 kinds of settings on different tabs.
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 | |
private JPanel |
blankPanel
|
private JPanel |
lastPanel
|
private EventListenerList |
listenerList
|
private static Logger |
LOG
|
private Hashtable |
panels
|
private boolean |
shouldBeEnabled
|
private StylePanel |
stylePanel
The stylepanel shown by the tab style. |
private String[] |
stylePanelNames
|
private org.tigris.gef.presentation.Fig |
target
|
Fields inherited from class org.argouml.ui.TabSpawnable |
|
Fields inherited from class javax.swing.JPanel |
|
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.Container |
|
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 | |
TabStyle()
construct a default stylepanel with basenames StylePanel
and SP , resulting in the lookup order described above. |
|
TabStyle(String tabName,
String[] spn)
The constructor. |
Method Summary | |
void |
addPanel(Class c,
StylePanel s)
Adds a style panel to the internal list. |
private void |
addTargetListener(TargetListener listener)
Adds a listener. |
void |
delayedVetoableChange(PropertyChangeEvent pce)
|
StylePanel |
findPanelFor(Class targetClass)
Find the stylepanel for a given target class. |
private void |
fireTargetAdded(TargetEvent targetEvent)
|
private void |
fireTargetRemoved(TargetEvent targetEvent)
|
private void |
fireTargetSet(TargetEvent targetEvent)
|
protected String[] |
getStylePanelNames()
|
Object |
getTarget()
Return the current target for this stylepanel. |
protected void |
initPanels()
Initialize the hashtable of pre lookup panels. |
Class |
panelClassFor(Class targetClass)
Get the class for the required stylepanel. |
void |
propertyChange(PropertyChangeEvent pce)
|
void |
refresh()
Refreshes the tab IN TOTAL |
private void |
removeTargetListener(TargetListener listener)
Removes a target listener. |
void |
setTarget(Object t)
Deprecated. As of ArgoUml version 0.13.5, the visibility of this method will change in the future, replaced by TargetManager . |
boolean |
shouldBeEnabled(Object targetItem)
Returns true if the tab should be enabled with the given target |
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 org.argouml.ui.TabSpawnable |
clone, getOrientation, getTitle, setOrientation, setTitle, spawn |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final Logger LOG
private org.tigris.gef.presentation.Fig target
private boolean shouldBeEnabled
private JPanel blankPanel
private Hashtable panels
private JPanel lastPanel
private StylePanel stylePanel
private String[] stylePanelNames
private EventListenerList listenerList
Constructor Detail |
public TabStyle(String tabName, String[] spn)
tabName
- the name of the tabspn
- style panel namespublic TabStyle()
StylePanel
and SP
, resulting in the lookup order described above.
Method Detail |
protected void initPanels()
public void addPanel(Class c, StylePanel s)
c
- the metaclass whose details show be displayed in the property
panel ps
- an instance of the style panel for the metaclass mpublic void setTarget(Object t)
TargetManager
.
setTarget
in interface TabTarget
t
- is the new targetpublic void refresh()
TabTarget
refresh
in interface TabTarget
TabTarget.refresh()
public StylePanel findPanelFor(Class targetClass)
targetClass
- the target class
null
on errorpublic Class panelClassFor(Class targetClass)
targetClass
- the class of the current seelcted target.
protected String[] getStylePanelNames()
public Object getTarget()
getTarget
in interface TabTarget
TabTarget.getTarget()
public boolean shouldBeEnabled(Object targetItem)
TabTarget
shouldBeEnabled
in interface TabTarget
targetItem
- the given target
TabTarget.shouldBeEnabled(java.lang.Object)
public void propertyChange(PropertyChangeEvent pce)
propertyChange
in interface PropertyChangeListener
TargetListener.targetAdded(org.argouml.ui.targetmanager.TargetEvent)
public void delayedVetoableChange(PropertyChangeEvent pce)
delayedVetoableChange
in interface DelayedVChangeListener
pce
- the eventDelayedVChangeListener.delayedVetoableChange(java.beans.PropertyChangeEvent)
public void targetAdded(TargetEvent e)
TargetListener
targetAdded
in interface TargetListener
e
- The targetevent, name will be TARGET_ADDEDTargetListener.targetAdded(TargetEvent)
public void targetRemoved(TargetEvent e)
TargetListener
targetRemoved
in interface TargetListener
e
- The targetevent, name will be TARGET_REMOVEDTargetListener.targetRemoved(TargetEvent)
public void targetSet(TargetEvent e)
TargetListener
targetSet
in interface TargetListener
e
- The targetevent, name will be TARGET_SETTargetListener.targetSet(TargetEvent)
private void addTargetListener(TargetListener listener)
listener
- the listener to addprivate void removeTargetListener(TargetListener listener)
listener
- the listener to removeprivate void fireTargetSet(TargetEvent targetEvent)
targetEvent
- private void fireTargetAdded(TargetEvent targetEvent)
targetEvent
- private void fireTargetRemoved(TargetEvent targetEvent)
targetEvent
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |