public class PersistenceDialog
extends org.eclipse.jface.dialogs.Dialog
It is possible to listen for state change events on the view configurations.
Rather than adding listeners to this dialog yourself, you should register the
listeners to the DisplayColumnChooserCommandHandler
, as it will handle
propagating the listeners to newly created instances of this dialog.
DisplayPersistenceDialogCommand
,
DisplayPersistenceDialogCommandHandler
Modifier and Type | Field and Description |
---|---|
static String |
ACTIVE_VIEW_CONFIGURATION_KEY
Key under which the name of the active view configuration is stored within the properties.
|
static int |
DELETE_ID
Constant ID for the delete button of this dialog.
|
static int |
LOAD_ID
Constant ID for the load button of this dialog.
|
static int |
SAVE_ID
Constant ID for the save button of this dialog.
|
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
Constructor and Description |
---|
PersistenceDialog(org.eclipse.swt.widgets.Shell parentShell,
NatTable natTable,
Properties properties)
Create a new dialog for handling NatTable state.
|
Modifier and Type | Method and Description |
---|---|
void |
addAllStateChangeListener(List<IStateChangedListener> listeners)
Adds the given
IStateChangedListener s to the local list of listeners. |
void |
addStateChangeListener(IStateChangedListener listener)
Add the given
IStateChangedListener to the local list of listeners. |
protected void |
buttonPressed(int buttonId) |
protected void |
configureShell(org.eclipse.swt.widgets.Shell newShell) |
protected void |
createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent) |
protected org.eclipse.swt.widgets.Control |
createDialogArea(org.eclipse.swt.widgets.Composite parent) |
void |
fireStateChange(StateChangeEvent event)
Inform all registered listeners about the state change.
|
String |
getActiveViewConfigurationName() |
protected org.eclipse.swt.graphics.Point |
getInitialSize() |
Properties |
getProperties() |
void |
removeAllStateChangeListener(List<IStateChangedListener> listeners)
Removes the given
IStateChangedListener s from the local list of listeners. |
void |
removeStateChangeListener(IStateChangedListener listener)
Removes the given
IStateChangedListener from the local list of listeners. |
void |
setActiveViewConfigurationName(String name)
Sets the name of the current active view configuration.
|
void |
setProperties(Properties properties) |
applyDialogFont, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
public static final String ACTIVE_VIEW_CONFIGURATION_KEY
public static final int SAVE_ID
public static final int LOAD_ID
public static final int DELETE_ID
public PersistenceDialog(org.eclipse.swt.widgets.Shell parentShell, NatTable natTable, Properties properties)
parentShell
- the parent shell, or null
to create a top-level shellnatTable
- The NatTable instance to apply the save/load operations.properties
- The Properties instance that should be used for saving and loading.protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
createDialogArea
in class org.eclipse.jface.dialogs.Dialog
protected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
createButtonsForButtonBar
in class org.eclipse.jface.dialogs.Dialog
protected void buttonPressed(int buttonId)
buttonPressed
in class org.eclipse.jface.dialogs.Dialog
protected void configureShell(org.eclipse.swt.widgets.Shell newShell)
configureShell
in class org.eclipse.jface.window.Window
protected org.eclipse.swt.graphics.Point getInitialSize()
getInitialSize
in class org.eclipse.jface.dialogs.Dialog
public Properties getProperties()
public void setProperties(Properties properties)
properties
- The Properties instance that should be used for saving and loading.public String getActiveViewConfigurationName()
public void setActiveViewConfigurationName(String name)
name
- The name of the current active view configurationpublic void addStateChangeListener(IStateChangedListener listener)
IStateChangedListener
to the local list of listeners.listener
- The listener to add.public void addAllStateChangeListener(List<IStateChangedListener> listeners)
IStateChangedListener
s to the local list of listeners.listeners
- The listeners to add.public void removeStateChangeListener(IStateChangedListener listener)
IStateChangedListener
from the local list of listeners.listener
- The listener to remove.public void removeAllStateChangeListener(List<IStateChangedListener> listeners)
IStateChangedListener
s from the local list of listeners.listeners
- The listeners to remove.public void fireStateChange(StateChangeEvent event)
event
- The StateChangeEvent
object.Copyright © 2013. All Rights Reserved.