Package docking.widgets.dialogs
Class TableSelectionDialog<T>
- java.lang.Object
-
- docking.DialogComponentProvider
-
- docking.widgets.dialogs.TableSelectionDialog<T>
-
- Type Parameters:
T
- The type of row object in the table.
- All Implemented Interfaces:
ActionContextProvider
,StatusListener
,TaskListener
public class TableSelectionDialog<T> extends DialogComponentProvider
Dialog for displaying table data in a dialog for the purpose of the user selecting one or more items from the table.
-
-
Field Summary
-
Fields inherited from class docking.DialogComponentProvider
applyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel
-
-
Constructor Summary
Constructors Constructor Description TableSelectionDialog(java.lang.String title, RowObjectTableModel<T> model, boolean allowMultipleSelection)
Create a new Dialog for displaying and choosing table row items
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
cancelCallback()
The callback method for when the "Cancel" button is pressed.protected void
dialogShown()
Override this method if you want to do something when the dialog is made visiblejava.util.List<T>
getSelectionItems()
Returns the list of selected items or null if the dialog was cancelled.protected void
okCallback()
The callback method for when the "OK" button is pressed.protected void
processMouseClicked(java.awt.event.MouseEvent e)
protected void
updateOkEnabled()
-
Methods inherited from class docking.DialogComponentProvider
addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, close, dialogClosed, dismissCallback, dispose, doInitialize, escapeCallback, executeProgressTask, getActionContext, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getHelpLocatdion, getId, getIntialLocation, getLocationOnScreen, getParent, getPreferredSize, getRemberSize, getRememberLocation, getStatusColor, getStatusLabel, getStatusText, getTaskMonitorComponent, getTaskScheduler, getTitle, getUseSharedLocation, hideTaskMonitorComponent, isApplyEnabled, isCancelEnabled, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, notifyContextChanged, removeAction, removeButton, removeWorkPanel, repack, setApplyEnabled, setApplyToolTip, setBackground, setCancelButtonText, setCancelEnabled, setCancelToolTip, setCursor, setDefaultButton, setDefaultSize, setDialogSize, setDismissToolTip, setFocusComponent, setGlassPane, setHelpLocation, setInitialLocation, setMinimumSize, setMinimumSize, setOkButtonText, setOkEnabled, setOkToolTip, setPreferredSize, setRememberLocation, setRememberSize, setResizable, setStatusJustification, setStatusText, setStatusText, setStatusText, setTitle, setTransient, setUseSharedLocation, showProgressBar, showTaskMonitorComponent, stopProgressTimer, taskCancelled, taskCompleted, toFront, toString, waitForCurrentTask
-
-
-
-
Constructor Detail
-
TableSelectionDialog
public TableSelectionDialog(java.lang.String title, RowObjectTableModel<T> model, boolean allowMultipleSelection)
Create a new Dialog for displaying and choosing table row items- Parameters:
title
- The title for the dialogmodel
- aRowObjectTableModel
that has the tRable dataallowMultipleSelection
- if true, the dialog allows the user to select more than one row; otherwise, only single selection is allowed
-
-
Method Detail
-
getSelectionItems
public java.util.List<T> getSelectionItems()
Returns the list of selected items or null if the dialog was cancelled.- Returns:
- the list of selected items or null if the dialog was cancelled.
-
processMouseClicked
protected void processMouseClicked(java.awt.event.MouseEvent e)
-
okCallback
protected void okCallback()
Description copied from class:DialogComponentProvider
The callback method for when the "OK" button is pressed.- Overrides:
okCallback
in classDialogComponentProvider
-
cancelCallback
protected void cancelCallback()
Description copied from class:DialogComponentProvider
The callback method for when the "Cancel" button is pressed. The default behavior is to call setVisible(false) and dispose() on the dialog.- Overrides:
cancelCallback
in classDialogComponentProvider
-
dialogShown
protected void dialogShown()
Description copied from class:DialogComponentProvider
Override this method if you want to do something when the dialog is made visible- Overrides:
dialogShown
in classDialogComponentProvider
-
updateOkEnabled
protected void updateOkEnabled()
-
-