|
|||||||||||
| 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.PropPanel
This abstract class provides the basic layout and event dispatching support for all Property Panels.
The property panel is LabelledLayout layed out
as a number (specified in the constructor) of equally sized panels
that split the available space. Each panel has a column of
"captions" and matching column of "fields" which are laid out
indepently from the other panels.
The Properties panels for UML Model Elements are structured in an inheritance hierarchy that matches the UML 1.3 metamodel.
| 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 ResourceBundle |
bundle
|
private JToolBar |
buttonPanel
|
private JPanel |
captionPanel
|
private JPanel |
center
The metaclass/property pairs for the third party listener (if we have set one up. |
private int |
lastRow
|
private EventListenerList |
listenerList
|
private Object |
modelElement
|
private Vector |
panels
|
private static Profile |
profile
|
private Font |
smallFont
|
private Object |
target
|
private JLabel |
titleLabel
|
| 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 | |
PropPanel(String title,
ImageIcon icon,
org.tigris.swidgets.Orientation orientation)
Construct new PropPanel using LabelledLayout. |
|
PropPanel(String title,
org.tigris.swidgets.Orientation orientation)
Constructs a new Proppanel without an icon. |
|
| Method Summary | |
protected void |
addButton(Component button)
|
JLabel |
addField(String label,
Component component)
Add a component with the specified label. |
JLabel |
addFieldAfter(String label,
Component component,
Component afterComponent)
Add a component with the specified label positioned after another component. |
JLabel |
addFieldBefore(String label,
Component component,
Component beforeComponent)
Add a component with the specified label positioned before another component. |
void |
addLinkField(String label,
JComponent component)
Deprecated. replaced by according widgets as of version 0.17.1 |
protected void |
addSeperator()
Add a seperator. |
private void |
fireTargetAdded(TargetEvent targetEvent)
|
private void |
fireTargetRemoved(TargetEvent targetEvent)
|
private void |
fireTargetSet(TargetEvent targetEvent)
|
String |
formatCollection(Iterator iter)
Formats a collection of model elements. |
String |
formatElement(Object element)
Formats the specified model element. |
String |
formatNamespace(Object namespace)
Formats the model element as a namespace. |
protected JToolBar |
getButtonPanel()
Deprecated. As of V0.17.1. Reason: Nobody has any business poking around in my Panels. Use addButton(Component) instead. |
protected Object |
getDisplayNamespace()
This method can be overriden in derived Panels where the appropriate namespace for display may not be the same as the namespace of the target. |
Object |
getModelElement()
|
Profile |
getProfile()
|
private ResourceBundle |
getResourceBundle()
TODO: Do we need this? |
Object |
getTarget()
get the current target |
protected JLabel |
getTitleLabel()
|
boolean |
isRemovableElement()
Check whether this element can be deleted. |
void |
listRoleItemSet(ru.novosoft.uml.MElementEvent mee)
|
String |
localize(String key)
Returns a localized string corresponding to the key. |
protected static ImageIcon |
lookupIcon(String name)
Look up an icon. |
void |
propertySet(ru.novosoft.uml.MElementEvent mee)
|
void |
recovered(ru.novosoft.uml.MElementEvent mee)
|
void |
refresh()
Refreshes the tab IN TOTAL |
private EventListenerList |
registrateTargetListeners(Container container)
Builds a eventlistenerlist of all targetlisteners that are part of this container and its children. |
void |
removed(ru.novosoft.uml.MElementEvent mee)
|
void |
removeElement()
Remove this element. |
void |
roleAdded(ru.novosoft.uml.MElementEvent mee)
|
void |
roleRemoved(ru.novosoft.uml.MElementEvent mee)
|
void |
setNameEventListening(Object[] metaclasses)
Deprecated. by Jaap 3 Nov 2002 (ArgoUml version unknown - earlier than 0.13.5), replaced by UmlModelEventPump.addModelEventListener(
Object , Object).
since components should register themselves. |
void |
setOrientation(org.tigris.swidgets.Orientation orientation)
Set the orientation of the panel. |
void |
setTarget(Object t)
Deprecated. As Of Argouml version 0.13.5, This will change visibility from release 0.16 |
protected void |
setTitleLabel(JLabel theTitleLabel)
|
boolean |
shouldBeEnabled(Object t)
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, 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 Object target
private Object modelElement
private static Profile profile
private ResourceBundle bundle
private Vector panels
private int lastRow
private EventListenerList listenerList
private JPanel center
private JToolBar buttonPanel
private JLabel titleLabel
private JPanel captionPanel
private Font smallFont
| Constructor Detail |
public PropPanel(String title,
ImageIcon icon,
org.tigris.swidgets.Orientation orientation)
icon - The icon to display for the paneltitle - The title of the panelorientation - the orientation
public PropPanel(String title,
org.tigris.swidgets.Orientation orientation)
title - the titleorientation - the orientation| Method Detail |
public void setOrientation(org.tigris.swidgets.Orientation orientation)
setOrientation in interface org.tigris.swidgets.OrientablesetOrientation in class TabSpawnableOrientable.setOrientation(org.tigris.swidgets.Orientation)protected void addButton(Component button)
button - the button to be added to the button panel
public JLabel addField(String label,
Component component)
label - the label for the componentcomponent - the component
public JLabel addFieldAfter(String label,
Component component,
Component afterComponent)
label - the label for the componentcomponent - the componentafterComponent - the component before
public JLabel addFieldBefore(String label,
Component component,
Component beforeComponent)
label - the label for the componentcomponent - the componentbeforeComponent - the component
public final void addLinkField(String label,
JComponent component)
This method is never used.
label - the required string labelcomponent - Component to be addedpublic final String localize(String key)
UMLUserInterfaceContainer
localize in interface UMLUserInterfaceContainerkey - key for resource bundle, typically english literal
UMLUserInterfaceContainer.localize(java.lang.String)protected final void addSeperator()
private ResourceBundle getResourceBundle()
public Profile getProfile()
getProfile in interface UMLUserInterfaceContainerUMLUserInterfaceContainer.getProfile()public void setTarget(Object t)
This involves resetting the third party listeners.
setTarget in interface TabTargett - The object to be set as a target.private EventListenerList registrateTargetListeners(Container container)
container - the container to search for targetlisteners
public final Object getTarget()
TabTarget
getTarget in interface TabTargetTabTarget.getTarget()public final Object getModelElement()
getModelElement in interface UMLUserInterfaceContainerUMLUserInterfaceContainer.getModelElement()public void refresh()
TabTarget
refresh in interface TabTargetTabTarget.refresh()public boolean shouldBeEnabled(Object t)
TabTarget
shouldBeEnabled in interface TabTargett - the given target
TabTarget.shouldBeEnabled(java.lang.Object)public void propertySet(ru.novosoft.uml.MElementEvent mee)
propertySet in interface ru.novosoft.uml.MElementListenerMElementListener.propertySet(ru.novosoft.uml.MElementEvent)public void listRoleItemSet(ru.novosoft.uml.MElementEvent mee)
listRoleItemSet in interface ru.novosoft.uml.MElementListenerMElementListener.listRoleItemSet(ru.novosoft.uml.MElementEvent)public void recovered(ru.novosoft.uml.MElementEvent mee)
recovered in interface ru.novosoft.uml.MElementListenerMElementListener.recovered(ru.novosoft.uml.MElementEvent)public void removed(ru.novosoft.uml.MElementEvent mee)
removed in interface ru.novosoft.uml.MElementListenerMElementListener.removed(ru.novosoft.uml.MElementEvent)public void roleAdded(ru.novosoft.uml.MElementEvent mee)
roleAdded in interface ru.novosoft.uml.MElementListenerMElementListener.roleAdded(ru.novosoft.uml.MElementEvent)public void roleRemoved(ru.novosoft.uml.MElementEvent mee)
roleRemoved in interface ru.novosoft.uml.MElementListenerMElementListener.roleRemoved(ru.novosoft.uml.MElementEvent)protected Object getDisplayNamespace()
public String formatElement(Object element)
UMLUserInterfaceContainer
formatElement in interface UMLUserInterfaceContainerelement - the given element
UMLUserInterfaceContainer.formatElement(java.lang.Object)public String formatNamespace(Object namespace)
UMLUserInterfaceContainer
formatNamespace in interface UMLUserInterfaceContainernamespace - the namespace
UMLUserInterfaceContainer.formatNamespace(java.lang.Object)public String formatCollection(Iterator iter)
UMLUserInterfaceContainer
formatCollection in interface UMLUserInterfaceContaineriter - an iterator into the collection of modelelements
UMLUserInterfaceContainer.formatCollection(java.util.Iterator)public void setNameEventListening(Object[] metaclasses)
UmlModelEventPump.addModelEventListener(
Object , Object).
since components should register themselves.
Note. Despite the name, the old implementation tried to listen for ownedElement and baseClass events as well as name events. We incorporate all these.
Note Reworked the implementation to use the new UmlModelEventPump mechanism. In the future proppanels should register directly with UmlModelEventPump IF they are really interested in the events themselves. If components on the proppanels are interested, these components should register themselves.
metaclasses - The metaclass array we wish to listen to.public void removeElement()
public boolean isRemovableElement()
public void targetAdded(TargetEvent e)
TargetListener
targetAdded in interface TargetListenere - The targetevent, name will be TARGET_ADDEDTargetListener.targetAdded(TargetEvent)public void targetRemoved(TargetEvent e)
TargetListener
targetRemoved in interface TargetListenere - The targetevent, name will be TARGET_REMOVEDTargetListener.targetRemoved(TargetEvent)public void targetSet(TargetEvent e)
TargetListener
targetSet in interface TargetListenere - The targetevent, name will be TARGET_SETTargetListener.targetSet(TargetEvent)private void fireTargetSet(TargetEvent targetEvent)
private void fireTargetAdded(TargetEvent targetEvent)
private void fireTargetRemoved(TargetEvent targetEvent)
protected void setTitleLabel(JLabel theTitleLabel)
theTitleLabel - the title of the panel shown at the topprotected JLabel getTitleLabel()
protected JToolBar getButtonPanel()
addButton(Component) instead.
protected static ImageIcon lookupIcon(String name)
name - the resource name.
|
|||||||||||
| 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 |