|
|||||||||||
| 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.UMLAddDialog
UMLAddDialog allows the user to do a multiple select from a list of choices in a separate dialog. The dialog has two possible uses:
| 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 |
| 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.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 | |
UMLAddDialog(Vector theChoices,
Vector preselected,
String theTitle,
boolean multiselectAllowed,
boolean exclusive)
Constructs a UMLAddDialog with a UMLListCellRenderer. |
|
UMLAddDialog(Vector theChoices,
Vector preselected,
String theTitle,
ListCellRenderer renderer,
boolean multiselectAllowed,
boolean exclusive)
Constructs a UMLAddDialog with a given UMLListCellRenderer. |
|
| Method Summary | |
void |
actionPerformed(ActionEvent e)
|
void |
addSelection()
Adds the selected elements in the choices list to the selected list. |
void |
cancel()
Called when the cancel button is pressed. |
protected DefaultListModel |
constructListModel(Vector vec)
Utility method to construct a DefaultListModel from a Vector |
Vector |
getChoices()
Returns the choices a user can make. |
Vector |
getSelected()
Returns the by the user selected elements. |
Vector |
getSelectedChoices()
Returns the selected elements in the selected list |
void |
ok()
Called when the okbutton is pressed. |
void |
removeSelection()
Removes the selected elements in the selected list and adds them to the choices list. |
int |
showDialog(Component parent)
Shows the dialog. |
void |
update()
Updates the add and remove button (sets enabled/disabled). |
| 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 |
| Constructor Detail |
public UMLAddDialog(Vector theChoices,
Vector preselected,
String theTitle,
boolean multiselectAllowed,
boolean exclusive)
theChoices - A vector with the choices a user has.preselected - A vector with already preselected choicestheTitle - The title of the dialogmultiselectAllowed - True if the user may select multiple choicesexclusive - True if choices in the selected list may not appear in the
choices list. If true preselected choices are removed from the
choices list.
public UMLAddDialog(Vector theChoices,
Vector preselected,
String theTitle,
ListCellRenderer renderer,
boolean multiselectAllowed,
boolean exclusive)
theChoices - A vector with the choices a user has.preselected - A vector with already preselected choicestheTitle - The title of the dialogrenderer - The cellrenderer of the choices list and the selected listmultiselectAllowed - True if the user may select multiple choicesexclusive - True if choices in the selected list may not appear in the
choices list. If true preselected choices are removed from the
choices list.| Method Detail |
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerActionListener.actionPerformed(ActionEvent)public void update()
protected DefaultListModel constructListModel(Vector vec)
vec - the given list
public int showDialog(Component parent)
parent - The parent frame of this dialog.
public Vector getChoices()
public Vector getSelectedChoices()
public Vector getSelected()
public void addSelection()
public void removeSelection()
public void ok()
public void cancel()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |