Class FreezePositionCommand
java.lang.Object
org.eclipse.nebula.widgets.nattable.command.AbstractPositionCommand
org.eclipse.nebula.widgets.nattable.freeze.command.FreezePositionCommand
- All Implemented Interfaces:
ILayerCommand
,IFreezeCommand
Command to freeze at the specified position.
-
Constructor Summary
ModifierConstructorDescriptionprotected
Constructor used for cloning the command.FreezePositionCommand
(ILayer layer, int columnPosition, int rowPosition) Creates a FreezePositionCommand for the given column and row positions related to the given layer, that doesn't toggle or override a current frozen state.FreezePositionCommand
(ILayer layer, int columnPosition, int rowPosition, boolean toggle) Creates a FreezePositionCommand for the given column and row positions related to the given layer, that doesn't override a current frozen state..FreezePositionCommand
(ILayer layer, int columnPosition, int rowPosition, boolean toggle, boolean overrideFreeze) Creates a FreezePositionCommand for the given column and row positions related to the given layer.FreezePositionCommand
(ILayer layer, int columnPosition, int rowPosition, boolean toggle, boolean overrideFreeze, boolean include) Creates a FreezePositionCommand for the given column and row positions related to the given layer. -
Method Summary
Modifier and TypeMethodDescriptionSame semantics asObject.clone()
Used to make a copies of the command if has to passed to different layer stacks.boolean
boolean
Indicates whether this command should override a current frozen state or if it should be skipped if a frozen state is already applied.boolean
isToggle()
Indicates whether this command should toggle the frozen state between frozen and unfrozen, or if it should always result in a frozen state.Methods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractPositionCommand
convertToTargetLayer, getColumnPosition, getLayer, getRowPosition, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.nebula.widgets.nattable.command.ILayerCommand
convertToTargetLayer
-
Constructor Details
-
FreezePositionCommand
Creates a FreezePositionCommand for the given column and row positions related to the given layer, that doesn't toggle or override a current frozen state.- Parameters:
layer
- The layer to which the position coordinates match.columnPosition
- The column position that will be the right most column in the frozen part.rowPosition
- The row position that will be the bottom row in the frozen part.
-
FreezePositionCommand
Creates a FreezePositionCommand for the given column and row positions related to the given layer, that doesn't override a current frozen state.. If it should toggle the current frozen state can be specified by parameter.- Parameters:
layer
- The layer to which the position coordinates match.columnPosition
- The column position that will be the right most column in the frozen part.rowPosition
- The row position that will be the bottom row in the frozen part.toggle
- whether this command should toggle the frozen state between frozen and unfrozen, or if it should always result in a frozen state.
-
FreezePositionCommand
public FreezePositionCommand(ILayer layer, int columnPosition, int rowPosition, boolean toggle, boolean overrideFreeze) Creates a FreezePositionCommand for the given column and row positions related to the given layer. If it should toggle or override the current frozen state can be specified by parameter.- Parameters:
layer
- The layer to which the position coordinates match.columnPosition
- The column position that will be the right most column in the frozen part.rowPosition
- The row position that will be the bottom row in the frozen part.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.
-
FreezePositionCommand
public FreezePositionCommand(ILayer layer, int columnPosition, int rowPosition, boolean toggle, boolean overrideFreeze, boolean include) Creates a FreezePositionCommand for the given column and row positions related to the given layer. If it should toggle or override the current frozen state can be specified by parameter.- Parameters:
layer
- The layer to which the position coordinates match.columnPosition
- The column position that will be the right most column in the frozen part.rowPosition
- The row position that will be the bottom row in the frozen part.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
-
FreezePositionCommand
Constructor used for cloning the command.- Parameters:
command
- The command which is the base for the new cloned instance.
-
-
Method Details
-
isToggle
public boolean isToggle()Description copied from interface:IFreezeCommand
Indicates whether this command should toggle the frozen state between frozen and unfrozen, or if it should always result in a frozen state.- Specified by:
isToggle
in interfaceIFreezeCommand
- Returns:
true
if a frozen state should be unfrozen when it is tried to freeze again
-
isOverrideFreeze
public boolean isOverrideFreeze()Description copied from interface:IFreezeCommand
Indicates whether this command should override a current frozen state or if it should be skipped if a frozen state is already applied.- Specified by:
isOverrideFreeze
in interfaceIFreezeCommand
- Returns:
true
if a current freeze state should be overriden,false
if 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
-
cloneCommand
Description copied from interface:ILayerCommand
Same semantics asObject.clone()
Used to make a copies of the command if has to passed to different layer stacks.- Specified by:
cloneCommand
in interfaceILayerCommand
- Returns:
- a cloned instance of the command
- See Also:
-