|
|||||||||||
| 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.AbstractArgoJPanel
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 JToolBar |
buttonPanel
|
private EventListenerList |
listenerList
|
private static Logger |
LOG
Logger. |
private Object |
modelElement
|
private Font |
smallFont
|
private Object |
target
|
private JLabel |
titleLabel
|
| Fields inherited from class org.argouml.ui.AbstractArgoJPanel |
|
| 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 |
addAction(Action action)
Add a button to the toolbar of a property panel using the action to control the behavior of the action. |
protected void |
addAction(Action action,
String tooltip)
Add a button to the toolbar of a property panel using the action to control the behavior of the action. |
protected void |
addButton(Component button)
Deprecated. use addAction instead. Remove 0.20.0 |
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. |
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 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()
|
Object |
getTarget()
get the current target |
protected JLabel |
getTitleLabel()
|
boolean |
isRemovableElement()
Check whether this element can be deleted. |
protected static ImageIcon |
lookupIcon(String name)
Look up an icon. |
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 |
removeElement()
Remove this element. |
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.AbstractArgoJPanel |
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 static final Logger LOG
private Object target
private Object modelElement
private EventListenerList listenerList
private JToolBar buttonPanel
private JLabel titleLabel
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 AbstractArgoJPanelOrientable.setOrientation(org.tigris.swidgets.Orientation)protected void addButton(Component button)
button - the button to be added to the button panelprotected void addAction(Action action)
action - the action which will be used in the toolbar button.
protected void addAction(Action action,
String tooltip)
action - the action which will be used in the toolbar button.tooltip - the tooltip to set, or null to skip setting of a new tooltip.
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
protected final void addSeperator()
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 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)protected Object getDisplayNamespace()
public Profile getProfile()
getProfile in interface UMLUserInterfaceContainerUMLUserInterfaceContainer.getProfile()public final Object getModelElement()
getModelElement in interface UMLUserInterfaceContainerUMLUserInterfaceContainer.getModelElement()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 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 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-2005 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |