Class DisplayPersistenceDialogCommandHandler
java.lang.Object
org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler<DisplayPersistenceDialogCommand>
org.eclipse.nebula.widgets.nattable.persistence.command.DisplayPersistenceDialogCommandHandler
- All Implemented Interfaces:
ILayerCommandHandler<DisplayPersistenceDialogCommand>
public class DisplayPersistenceDialogCommandHandler
extends AbstractLayerCommandHandler<DisplayPersistenceDialogCommand>
Command handler implementation for handling
DisplayPersistenceDialogCommand
s. It is used to open the
corresponding dialog for save/load operations regarding the NatTable state.
Will also serve as some kind of storage for the Properties
instance
holding the states.-
Constructor Summary
ConstructorsConstructorDescriptionCreate a newDisplayPersistenceDialogCommandHandler
.DisplayPersistenceDialogCommandHandler
(Properties properties) Create a newDisplayPersistenceDialogCommandHandler
using the specifiedProperties
instance.DisplayPersistenceDialogCommandHandler
(Properties properties, NatTable natTable) Create a newDisplayPersistenceDialogCommandHandler
using the specifiedProperties
instance.Create a newDisplayPersistenceDialogCommandHandler
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStateChangeListener
(IStateChangedListener listener) Add the givenIStateChangedListener
to the local list of listeners.protected boolean
doCommand
(DisplayPersistenceDialogCommand command) void
Removes the givenIStateChangedListener
from the local list of listeners.void
setProperties
(Properties properties) Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler
doCommand
-
Constructor Details
-
DisplayPersistenceDialogCommandHandler
public DisplayPersistenceDialogCommandHandler()Create a newDisplayPersistenceDialogCommandHandler
. Using this constructor theProperties
instance used for save and load operations will be created. It can be accessed viagetProperties()
for further usage. -
DisplayPersistenceDialogCommandHandler
Create a newDisplayPersistenceDialogCommandHandler
. Using this constructor theProperties
instance used for save and load operations will be created. It can be accessed viagetProperties()
for further usage. The current state of the given NatTable instance will be used to store a default configuration.IMPORTANT:
To store a default configuration in the view configuration management based on a given NatTable instance, you need to create and register theDisplayPersistenceDialogCommandHandler
AFTER callingNatTable.configure()
. Otherwise some state information might be missing and it could cause some unexpected behavior, like broken sorting for example.- Parameters:
natTable
- The NatTable instance for which this handler is registered. If it is notnull
, the current state of that NatTable will be stored as default configuration. This default configuration can't be modified anymore in the opened dialog.
-
DisplayPersistenceDialogCommandHandler
Create a newDisplayPersistenceDialogCommandHandler
using the specifiedProperties
instance.- Parameters:
properties
- TheProperties
instance that should be used for saving and loading.
-
DisplayPersistenceDialogCommandHandler
Create a newDisplayPersistenceDialogCommandHandler
using the specifiedProperties
instance. The current state of the given NatTable instance will be used to store a default configuration.IMPORTANT:
To store a default configuration in the view configuration management based on a given NatTable instance, you need to create and register theDisplayPersistenceDialogCommandHandler
AFTER callingNatTable.configure()
. Otherwise some state information might be missing and it could cause some unexpected behavior, like broken sorting for example.- Parameters:
properties
- TheProperties
instance that should be used for saving and loading.natTable
- The NatTable instance for which this handler is registered. If it is notnull
, the current state of that NatTable will be stored as default configuration. This default configuration can't be modified anymore in the opened dialog.
-
-
Method Details
-
doCommand
- Specified by:
doCommand
in classAbstractLayerCommandHandler<DisplayPersistenceDialogCommand>
-
getProperties
- Returns:
- The Properties instance that is used for saving and loading.
-
setProperties
- Parameters:
properties
- The Properties instance that should be used for saving and loading.
-
addStateChangeListener
Add the givenIStateChangedListener
to the local list of listeners. TheIStateChangedListener
will be registered on everyPersistenceDialog
that is opened via this command handler.- Parameters:
listener
- The listener to add.
-
removeStateChangeListener
Removes the givenIStateChangedListener
from the local list of listeners.- Parameters:
listener
- The listener to remove.
-
getCommandClass
-