|
|||||||||||
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.TabProps
This is the tab on the details panel (DetailsPane) that holds the property panel. On change of target, the property panel in TabProps is changed.
With the introduction of the TargetManager, this class holds its original power of controlling its target. The property panels (subclasses of PropPanel) for which this class is the container are being registered as TargetListeners in the setTarget method of this class. They are not registered with TargetManager but with this class to prevent race-conditions while firing TargetEvents from TargetManager.
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
The list with targetlisteners, these are the property panels managed by TabProps. |
private static Logger |
LOG
|
private String |
panelClassBaseName
|
private Hashtable |
panels
|
private boolean |
shouldBeEnabled
|
private Object |
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 | |
TabProps()
The constructor. |
|
TabProps(String tabName,
String panelClassBase)
The constructor. |
Method Summary | |
void |
addPanel(Class c,
PropPanel p)
Adds a property panel to the internal list. |
private void |
addTargetListener(TargetListener listener)
Adds a listener. |
void |
finalize()
|
TabModelTarget |
findPanelFor(Class targetClass)
|
private void |
fireTargetAdded(TargetEvent targetEvent)
|
private void |
fireTargetRemoved(TargetEvent targetEvent)
|
private void |
fireTargetSet(TargetEvent targetEvent)
|
protected String |
getClassBaseName()
|
Object |
getTarget()
Deprecated. As of ArgoUml version 0.13.5, the visibility of this method will change in the future, replaced by TargetManager.getInstance().getTarget() . |
protected void |
initPanels()
Preload property panels that are commonly used within the first few seconds after the tool is launched. |
void |
moduleDisabled(ArgoModuleEvent event)
Invoked when a module has been disabled. |
void |
moduleEnabled(ArgoModuleEvent event)
Invoked when a module has been enabled. |
void |
moduleLoaded(ArgoModuleEvent event)
Invoked when a module has been loaded. |
void |
moduleUnloaded(ArgoModuleEvent event)
Invoked when a module has been unloaded. |
Class |
panelClassFor(Class targetClass)
Locate the panel for the given class. |
void |
refresh()
Refreshes the tab IN TOTAL |
private void |
removeTargetListener(TargetListener listener)
Removes a target listener. |
void |
setOrientation(org.tigris.swidgets.Orientation orientation)
Set the orientation of the property panel. |
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 t)
Determines if the property panel should be enabled. |
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, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final Logger LOG
private boolean shouldBeEnabled
private JPanel blankPanel
private Hashtable panels
private JPanel lastPanel
private String panelClassBaseName
private Object target
private EventListenerList listenerList
Constructor Detail |
public TabProps()
public TabProps(String tabName, String panelClassBase)
tabName
- the name of the tabpanelClassBase
- the panel class baseMethod Detail |
public void finalize()
Object.finalize()
public void setOrientation(org.tigris.swidgets.Orientation orientation)
setOrientation
in interface org.tigris.swidgets.Orientable
setOrientation
in class TabSpawnable
orientation
- the new orientation for this property panelorg.argouml.swingext.Orientable#setOrientation(org.argouml.swingext.Orientation)
protected void initPanels()
public void addPanel(Class c, PropPanel p)
c
- the metaclass whose details show be displayed
in the property panel pp
- an instance of the property panel for the metaclass mpublic void setTarget(Object t)
TargetManager
.
setTarget
in interface TabTarget
t
- the target to setTabTarget.setTarget(java.lang.Object)
public void refresh()
TabTarget
refresh
in interface TabTarget
TabTarget.refresh()
public TabModelTarget findPanelFor(Class targetClass)
targetClass
- the target class
public Class panelClassFor(Class targetClass)
targetClass
- the given class
protected String getClassBaseName()
public Object getTarget()
TargetManager.getInstance().getTarget()
.
getTarget
in interface TabTarget
TabTarget.getTarget()
public boolean shouldBeEnabled(Object t)
shouldBeEnabled
in interface TabTarget
t
- the given target
TabTarget.shouldBeEnabled(Object)
public void moduleLoaded(ArgoModuleEvent event)
ArgoModuleEventListener
moduleLoaded
in interface ArgoModuleEventListener
event
- the eventArgoModuleEventListener.moduleLoaded(org.argouml.application.events.ArgoModuleEvent)
public void moduleUnloaded(ArgoModuleEvent event)
ArgoModuleEventListener
moduleUnloaded
in interface ArgoModuleEventListener
event
- the eventArgoModuleEventListener.moduleUnloaded(org.argouml.application.events.ArgoModuleEvent)
public void moduleEnabled(ArgoModuleEvent event)
ArgoModuleEventListener
moduleEnabled
in interface ArgoModuleEventListener
event
- the eventArgoModuleEventListener.moduleEnabled(org.argouml.application.events.ArgoModuleEvent)
public void moduleDisabled(ArgoModuleEvent event)
ArgoModuleEventListener
moduleDisabled
in interface ArgoModuleEventListener
event
- the eventArgoModuleEventListener.moduleDisabled(org.argouml.application.events.ArgoModuleEvent)
public void targetAdded(TargetEvent e)
TargetListener
targetAdded
in interface TargetListener
e
- The targetevent, name will be TARGET_ADDEDTargetListener.targetAdded(org.argouml.ui.targetmanager.TargetEvent)
public void targetRemoved(TargetEvent e)
TargetListener
targetRemoved
in interface TargetListener
e
- The targetevent, name will be TARGET_REMOVEDTargetListener.targetRemoved(org.argouml.ui.targetmanager.TargetEvent)
public void targetSet(TargetEvent e)
TargetListener
targetSet
in interface TargetListener
e
- The targetevent, name will be TARGET_SETTargetListener.targetSet(org.argouml.ui.targetmanager.TargetEvent)
private void addTargetListener(TargetListener listener)
listener
- the listener to addprivate void removeTargetListener(TargetListener listener)
listener
- the listener to removeprivate void fireTargetSet(TargetEvent targetEvent)
private void fireTargetAdded(TargetEvent targetEvent)
private void fireTargetRemoved(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 |