Class GradationActionCommand
java.lang.Object
com.levigo.jadice.web.client.util.command.InjectedCommand
com.levigo.jadice.web.client.commands.AbstractContextCommand
com.levigo.jadice.web.client.commands.AbstractPageViewCommand
com.levigo.jadice.web.client.commands.AbstractMouseCommand
com.levigo.jadice.web.client.commands.AbstractDocumentCommand
com.levigo.jadice.web.client.commands.GradationCurveCommand
com.levigo.jadice.web.client.commands.GradationActionCommand
- All Implemented Interfaces:
Command
This command could be used to apply a predefined gradation action to change the appearance of a
document. The concrete action to be executed can be defined via the 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.
Description | Command Parameter Name | Possible Parameter Values |
---|---|---|
gradation action description | action | one of the following: NEUTRAL , INVERT ,
DARKEN or LIGHTEN |
Scope to apply to curve (inherited from AbstractDocumentCommand ) |
scope | PAGE, DOCUMENT (default = DOCUMENT) |
-
Nested Class Summary
Nested classes/interfaces inherited from class com.levigo.jadice.web.client.commands.AbstractDocumentCommand
AbstractDocumentCommand.Scope
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Checks if this command can be executed.protected void
execute()
This method is called in order to execute the command.protected GradationCurve
Creates a gradation curve instance defined by command parameter points.void
void
Methods inherited from class com.levigo.jadice.web.client.commands.GradationCurveCommand
getCurrentGradationCurve, getCurve
Methods inherited from class com.levigo.jadice.web.client.commands.AbstractDocumentCommand
getDocument, getID, getRenderControls, getScope, setScope
Methods inherited from class com.levigo.jadice.web.client.commands.AbstractMouseCommand
clearInjections, isDoubleClicked, setMouseEvent
Methods inherited from class com.levigo.jadice.web.client.commands.AbstractPageViewCommand
getPageView, setPageView
Methods inherited from class com.levigo.jadice.web.client.commands.AbstractContextCommand
getContext, propagateContextChange, setContext
Methods inherited from class com.levigo.jadice.web.client.util.command.InjectedCommand
canExecute, execute, getKey, isSelected, isSelected, setKey
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.levigo.jadice.web.client.util.command.Command
isAvailable, isAvailable
-
Constructor Details
-
GradationActionCommand
public GradationActionCommand() -
GradationActionCommand
-
-
Method Details
-
canExecute
protected boolean canExecute()Description copied from class:AbstractDocumentCommand
Checks if this command can be executed.- Overrides:
canExecute
in classGradationCurveCommand
- Returns:
- true, if
InjectedCommand.execute(java.util.Collection<java.lang.Object>)
can be called, false else
-
execute
protected void execute()Description copied from class:InjectedCommand
This method is called in order to execute the command. It is only called, after the arguments have been validated and injected and only ifInjectedCommand.canExecute()
has returnedtrue
.- Overrides:
execute
in classGradationCurveCommand
-
getGradationCurve
Description copied from class:GradationCurveCommand
Creates a gradation curve instance defined by command parameter points. If the points are not defined or set to any value which cannot be translated into gradation points, a neutral gradation will be returned.- Overrides:
getGradationCurve
in classGradationCurveCommand
- Returns:
- GradationCurve defined by command parameters
-
getAction
-
setAction
-
setCurve
- Overrides:
setCurve
in classGradationCurveCommand
-