Class FreezeSelectionCommand
java.lang.Object
org.eclipse.nebula.widgets.nattable.freeze.command.FreezeSelectionCommand
- All Implemented Interfaces:
ILayerCommand,IFreezeCommand
Will inform the handler to use the selection layer for its freeze
coordinates.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a simple FreezeSelectionCommand that doesn't toggle or override a current frozen state.FreezeSelectionCommand(boolean toggle) Creates a FreezeSelectionCommand that doesn't override a current frozen state.FreezeSelectionCommand(boolean toggle, boolean overrideFreeze) Creates a FreezeSelectionCommand.FreezeSelectionCommand(boolean toggle, boolean overrideFreeze, boolean include) Creates a FreezeSelectionCommand. -
Method Summary
Modifier and TypeMethodDescriptionSame semantics asObject.clone()Used to make a copies of the command if has to passed to different layer stacks.booleanconvertToTargetLayer(ILayer targetLayer) Convert the row/column coordinates the command might be carrying from the source layer to the destination (target) layer.booleanbooleanIndicates whether this command should override a current frozen state or if it should be skipped if a frozen state is already applied.booleanisToggle()Indicates whether this command should toggle the frozen state between frozen and unfrozen, or if it should always result in a frozen state.
-
Constructor Details
-
FreezeSelectionCommand
public FreezeSelectionCommand()Creates a simple FreezeSelectionCommand that doesn't toggle or override a current frozen state. -
FreezeSelectionCommand
public FreezeSelectionCommand(boolean toggle) Creates a FreezeSelectionCommand that doesn't override a current frozen state. If it should toggle the current frozen state can be specified by parameter.- Parameters:
toggle- whether this command should toggle the frozen state between frozen and unfrozen, or if it should always result in a frozen state.
-
FreezeSelectionCommand
public FreezeSelectionCommand(boolean toggle, boolean overrideFreeze) Creates a FreezeSelectionCommand. If it should toggle or override the current frozen state can be specified by parameter.- Parameters:
toggle- whether this command should toggle the frozen state between frozen and unfrozen, or if it should always result in a frozen state.overrideFreeze- whether this command should override a current frozen state or if it should be skipped if a frozen state is already applied.
-
FreezeSelectionCommand
public FreezeSelectionCommand(boolean toggle, boolean overrideFreeze, boolean include) Creates a FreezeSelectionCommand. If it should toggle or override the current frozen state can be specified by parameter.- Parameters:
toggle- whether this command should toggle the frozen state between frozen and unfrozen, or if it should always result in a frozen state.overrideFreeze- whether this command should override a current frozen state or if it should be skipped if a frozen state is already applied.include- whether the selected cell should be included in the freeze region or not. Include means the freeze borders will be to the right and bottom, while exclude means the freeze borders are to the left and top. Default isfalse.- Since:
- 1.6
-
-
Method Details
-
isToggle
public boolean isToggle()Description copied from interface:IFreezeCommandIndicates whether this command should toggle the frozen state between frozen and unfrozen, or if it should always result in a frozen state.- Specified by:
isTogglein interfaceIFreezeCommand- Returns:
trueif a frozen state should be unfrozen when it is tried to freeze again
-
isOverrideFreeze
public boolean isOverrideFreeze()Description copied from interface:IFreezeCommandIndicates whether this command should override a current frozen state or if it should be skipped if a frozen state is already applied.- Specified by:
isOverrideFreezein interfaceIFreezeCommand- Returns:
trueif a current freeze state should be overriden,falseif a requested freeze should be skipped on a already frozen state.
-
isInclude
public boolean isInclude()- Returns:
- Whether the selected cell should be included to the frozen region
or not. Included means the freeze borders will be to the right
and bottom, exclude means the freeze borders are to the top and
left. Default is
false. - Since:
- 1.6
-
convertToTargetLayer
Description copied from interface:ILayerCommandConvert the row/column coordinates the command might be carrying from the source layer to the destination (target) layer. If it is not possible to convert the command to the target layer, then this method will return false and the state of this command object will remain unchanged. Note: Commands should not be processed if they fail conversion.- Specified by:
convertToTargetLayerin interfaceILayerCommand- Parameters:
targetLayer- the target layer- Returns:
- true if the command is valid after conversion, false if the command is no longer valid.
-
cloneCommand
Description copied from interface:ILayerCommandSame semantics asObject.clone()Used to make a copies of the command if has to passed to different layer stacks.- Specified by:
cloneCommandin interfaceILayerCommand- Returns:
- a cloned instance of the command
- See Also:
-