|
|||||||||||
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.uml.ui.UMLRadioButtonPanel
A panel that shows a group of radiobuttons. An action can be added to the panel which will be executed when one of the radiobuttons is pressed. Via the name of the button (settext), the action can find out which button is pressed.
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 ButtonGroup |
buttonGroup
The group of buttons |
private Object |
panelTarget
The target object of which some attribute is shown via this panel. |
private String |
propertySetName
The name of the MEvent that is fired when the target object has changed the attribute that is shown here. |
Fields inherited from class javax.swing.JPanel |
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, 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 | |
UMLRadioButtonPanel(boolean isDoubleBuffered,
String title,
Map labeltextsActioncommands,
String thePropertySetName,
Action setAction,
boolean horizontal)
Constructs a new UMLRadioButtonPanel. |
|
UMLRadioButtonPanel(String title,
Map labeltextsActioncommands,
String thePropertySetName,
Action setAction,
boolean horizontal)
Constructs a new UMLRadioButtonPanel. |
Method Summary | |
abstract void |
buildModel()
Builds the model. |
String |
getPropertySetName()
Returns the propertySetName. |
Object |
getTarget()
Returns the target. |
void |
listRoleItemSet(ru.novosoft.uml.MElementEvent e)
|
void |
propertySet(ru.novosoft.uml.MElementEvent e)
|
void |
recovered(ru.novosoft.uml.MElementEvent e)
|
void |
removed(ru.novosoft.uml.MElementEvent e)
|
void |
roleAdded(ru.novosoft.uml.MElementEvent e)
|
void |
roleRemoved(ru.novosoft.uml.MElementEvent e)
|
private void |
setButtons(Map labeltextsActioncommands,
Action setAction)
Initially constructs the buttons. |
void |
setPropertySetName(String name)
Sets the propertySetName. |
void |
setSelected(String actionCommand)
Selects the radiobutton with the given actionCommand |
void |
setTarget(Object target)
Sets the target and removes/adds this as a listener to the 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 javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private Object panelTarget
private String propertySetName
private ButtonGroup buttonGroup
Constructor Detail |
public UMLRadioButtonPanel(boolean isDoubleBuffered, String title, Map labeltextsActioncommands, String thePropertySetName, Action setAction, boolean horizontal)
isDoubleBuffered
- @see JPaneltitle
- The title of the titledborder around the buttons. If the
title is null, there is no border shown.labeltextsActioncommands
- A map of keys containing the texts for
the buttons and values containing the actioncommand that permits the
setAction to logically recognize the button.thePropertySetName
- the name of the MEvent that is fired when the
property that it shows changes value.setAction
- the action that should be registred with the buttons and
that's executed when one of the buttons is pressed.horizontal
- when true the buttons should be layed out horizontaly.public UMLRadioButtonPanel(String title, Map labeltextsActioncommands, String thePropertySetName, Action setAction, boolean horizontal)
title
- The title of the titledborder around the buttons.labeltextsActioncommands
- A map of keys containing the texts for
the buttons and values containing the actioncommand that permits the
setAction to logically recognize the button.thePropertySetName
- the name of the MEvent that is fired when the
property that is showns changes value.setAction
- the action that should be registred with the buttons and
that's executed when one of the buttons is pressedhorizontal
- when true the buttons should be layed out horizontaly.Method Detail |
private void setButtons(Map labeltextsActioncommands, Action setAction)
labeltextsActioncommands
- A map of keys containing the
texts for the buttons and values containing the actioncommand
that permits the setAction to logically recognize the button.setAction
- the action that should be registred with the
buttons and that's executed when one of the buttons is pressedpublic void listRoleItemSet(ru.novosoft.uml.MElementEvent e)
listRoleItemSet
in interface ru.novosoft.uml.MElementListener
MElementListener.listRoleItemSet(ru.novosoft.uml.MElementEvent)
public void propertySet(ru.novosoft.uml.MElementEvent e)
propertySet
in interface ru.novosoft.uml.MElementListener
MElementListener.propertySet(ru.novosoft.uml.MElementEvent)
public void recovered(ru.novosoft.uml.MElementEvent e)
recovered
in interface ru.novosoft.uml.MElementListener
MElementListener.recovered(ru.novosoft.uml.MElementEvent)
public void removed(ru.novosoft.uml.MElementEvent e)
removed
in interface ru.novosoft.uml.MElementListener
MElementListener.removed(ru.novosoft.uml.MElementEvent)
public void roleAdded(ru.novosoft.uml.MElementEvent e)
roleAdded
in interface ru.novosoft.uml.MElementListener
MElementListener.roleAdded(ru.novosoft.uml.MElementEvent)
public void roleRemoved(ru.novosoft.uml.MElementEvent e)
roleRemoved
in interface ru.novosoft.uml.MElementListener
MElementListener.roleRemoved(ru.novosoft.uml.MElementEvent)
public Object getTarget()
public void setTarget(Object target)
target
- The target to setpublic String getPropertySetName()
public void setPropertySetName(String name)
name
- The propertySetName to setpublic abstract void buildModel()
public void setSelected(String actionCommand)
actionCommand
- The actionCommand of the button that should be
selected.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)
|
|||||||||||
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 |