Class ConfigureScalingCommand
java.lang.Object
org.eclipse.nebula.widgets.nattable.command.AbstractContextFreeCommand
org.eclipse.nebula.widgets.nattable.layer.command.ConfigureScalingCommand
- All Implemented Interfaces:
ILayerCommand
This command is used to configure scaling behavior. It transports
IDpiConverter for horizontal and vertical dpi based scaling down the
layer stack. This way every layer that directly performs pixel based size
calculations is able to consume the converter.
IMPORTANT
This command is not intended to be consumed at any layer. It is necessary
that it is transported down the whole layer stack of all layer regions so
every layer has the chance to consume the IDpiConverter.
The registering of IDpiConverter for automatic scaling is done via
this command to avoid dependencies between SizeConfig,
DataLayer and the IDpiConverter. This is necessary because
every UI toolkit has its own mechanism to provide the current DPI values.
DPI factors could be different for x and y but the Windows API always
delivers the same values for x and y. To avoid later refactorings because
this behavior changes, this command transports an IDpiConverter for
horizontal and vertical DPI conversion.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigureScalingCommand(IDpiConverter dpiConverter) ConfigureScalingCommand(IDpiConverter horizontalDpiConverter, IDpiConverter verticalDpiConverter) -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractContextFreeCommand
cloneCommand, convertToTargetLayer
-
Constructor Details
-
ConfigureScalingCommand
- Parameters:
dpiConverter- TheIDpiConverterthat should be registered for horizontal and vertical DPI conversion.- Since:
- 2.0
-
ConfigureScalingCommand
public ConfigureScalingCommand(IDpiConverter horizontalDpiConverter, IDpiConverter verticalDpiConverter) - Parameters:
horizontalDpiConverter- TheIDpiConverterthat should be registered for horizontal DPI conversion.verticalDpiConverter- TheIDpiConverterthat should be registered for vertical DPI conversion.
-
-
Method Details
-
getHorizontalDpiConverter
- Returns:
- The
IDpiConverterthat should be registered for horizontal DPI conversion.
-
getVerticalDpiConverter
- Returns:
- The
IDpiConverterthat should be registered for vertical DPI conversion.
-