|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JInternalFrame org.gswing.gui.GuiComponent org.gswing.gui.ModalInternalFrame org.gswing.components.common.gui.ListDisplay
public class ListDisplay
Modal dialog box containing a list of strings, a message and an OK and cancel button. Once the OK button (or the return key) has been selected the current selection is assigned. The selected can be accessed with getSelection(). If there is no selected field or if cancel is selected getSelection() will return null.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JInternalFrame |
---|
JInternalFrame.AccessibleJInternalFrame, JInternalFrame.JDesktopIcon |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected JPanel |
buttonPanel
Panel containing the displaye buttons |
Fields inherited from class javax.swing.JInternalFrame |
---|
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY |
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 javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ListDisplay(IFramework framework,
String title,
String message,
ListModel model)
Constructor for single selections in the list. |
|
ListDisplay(IFramework framework,
String title,
String message,
ListModel model,
int selectionMode)
Constructor. |
|
ListDisplay(IFramework framework,
String title,
String message,
Object[] model)
Constructor for single selections in the list. |
|
ListDisplay(IFramework framework,
String title,
String message,
Vector model)
Constructor for single selections in the list. |
|
ListDisplay(IFramework framework,
String title,
String message,
Vector model,
int selectionMode)
Constructor for multiple selections in the list. |
Method Summary | |
---|---|
Object |
getSelectedValue()
Gets the selected value. |
Object[] |
getSelectedValues()
Gets the selected values. |
protected void |
init(String message,
Object[] model,
int selectionMode)
Initialise the dialogue. |
protected void |
init(String message,
Object model,
int selectionMode)
Initialise the dialogue. |
Methods inherited from class org.gswing.gui.ModalInternalFrame |
---|
internalFrameClosing, setVisible |
Methods inherited from class org.gswing.gui.GuiComponent |
---|
actionPerformed, getDesktopManager, getFocusedComponent, getFramework, initialise, initialise, setDefaultButton, setFocusedComponent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected JPanel buttonPanel
Constructor Detail |
---|
public ListDisplay(IFramework framework, String title, String message, ListModel model)
framework
- The main framework object.title
- The title of the dialogue.message
- The message in the dialogue.model
- The list of strings.public ListDisplay(IFramework framework, String title, String message, Vector model)
framework
- The main framework object.title
- The title of the dialogue.message
- The message in the dialogue.model
- The list of strings.public ListDisplay(IFramework framework, String title, String message, Vector model, int selectionMode)
framework
- The main framework object.title
- The title of the dialogue.message
- The message in the dialogue.model
- The list of strings.selectionMode
- ListSelectionModel.MULTIPLE_INTERVAL_SELECTION,
ListSelectionModel.SINGLE_INTERVAL_SELECTION or
ListSelectionModel.SINGLE_SELECTION
public ListDisplay(IFramework framework, String title, String message, Object[] model)
framework
- The main framework object.title
- The title of the dialogue.message
- The message in the dialogue.model
- The list of strings.public ListDisplay(IFramework framework, String title, String message, ListModel model, int selectionMode)
framework
- The main framework object.title
- The title of the dialogue.message
- The message in the dialogue.model
- The list of strings.selectionMode
- ListSelectionModel.MULTIPLE_INTERVAL_SELECTION,
ListSelectionModel.SINGLE_INTERVAL_SELECTION or
ListSelectionModel.SINGLE_SELECTION
Method Detail |
---|
protected void init(String message, Object model, int selectionMode)
message
- The dialogue message.model
- The tree model.selectionMode
- Determine whether single-item or multiple-item
selections are allowed. @see JList.setSelectionMode()#.protected void init(String message, Object[] model, int selectionMode)
message
- The dialogue message.model
- The tree model as an array.selectionMode
- Determine whether single-item or multiple-item
selections are allowed. @see JList.setSelectionMode().public Object getSelectedValue()
public Object[] getSelectedValues()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |