Class GradationCurveCommand

All Implemented Interfaces:
Command
Direct Known Subclasses:
GradationActionCommand

public class GradationCurveCommand extends AbstractDocumentCommand
This command could be used to apply a predefined gradation to change the appearance of a document displayed in the viewer. The gradation points of the curve can be defined via command properties file.

Hint:
To work properly this command needs a PageView instance in the Context object.

The following named command parameters exists and can be used to configure the command behavior.

parameter summary
Description Command Parameter Name Possible Parameter Values
gradation curve description curve a customized curve specification (how to define a customized curve is described below)
Scope to apply to curve (inherited from AbstractDocumentCommand) scope PAGE, DOCUMENT (default = DOCUMENT)

The definition of a customized gradation curve should be given as the following example describes.

As an example take a look at a simple gradation given by four points:
- point.0.x=0, point.0.y=0
- point.1.x=53, point.1.y=101
- point.2.x=131, point.2.y=61
- point.4.x=255, point.4.y=255

This one could be defined by listing each point one after the other delimited by commas in the command properties:
SimpleGradation =com.levigo.jadice.addon.gradation.ApplyGradationCommand
SimpleGradation.param.curve=0,0,53,101,131,61,255,255

If the points are not set or set to values, which can not translated into points, a neutral gradation is assumed, excepted by NEUTRAL curve, which as mentioned above do not need any point definition.