public class ToggleDesaturateCommand extends AbstractDocumentCommand
Desaturation replaces color information of images with shades of gray. Bilevel and grayscale images remain untouched. Other render elements like text, lines or shapes wont be changed either.
Hint:
To work properly this command needs a PageView
instance in the
Context
object.
Optional as command parameter at index 0 a decision flag can be set, if the desaturated display
mode should be applied on the whole document or just on the currently displayed page of the
viewer instance in the context object. Valid parameter values are document
or
page
. If this parameter is not set or set to any other value, document execution is
assumed.
AbstractDocumentCommand.Scope
document
Constructor and Description |
---|
ToggleDesaturateCommand() |
Modifier and Type | Method and Description |
---|---|
protected void |
execute()
This method is called in order to execute the command.
|
boolean |
isSelected()
Returns the selected state of this command.
|
canExecute, getRenderControls, getScope, setScope
getPageView, setPageView
getContext, propagateContextChange, setContext
canExecute, execute, getKey, isAvailable, isSelected, setKey
protected void execute()
InjectedCommand
InjectedCommand.canExecute()
has returned
true
.execute
in class InjectedCommand
public boolean isSelected()
InjectedCommand
isSelected
in class InjectedCommand
Copyright © 2024 levigo holding gmbh. All rights reserved.