public class RotateCommand extends AbstractDocumentCommand
Hint:
To work properly this command needs a PageView
instance in the
Context
object and a valid rotation degree value
defined in the commands properties with the name "rotation". Valid rotation degrees are 0, 90,
180 and 270. An optional parameter "scope" can be specified with either
PAGE
or DOCUMENT
, if the rotation should be applied on the current Page
or the whole
Document
. If this parameter is not set or set to any other value,
DOCUMENT
is assumed.
AbstractDocumentCommand.Scope
document
Constructor and Description |
---|
RotateCommand() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canExecute()
Subclasses may override this method to perform argument validation beyond the validation that
happens automatically during the injection phase.
|
protected void |
execute()
This method is called in order to execute the command.
|
int |
getRotation() |
void |
setRotation(int rotation) |
getRenderControls, getScope, setScope
getPageView, setPageView
getContext, propagateContextChange, setContext
canExecute, execute, getKey, isAvailable, isSelected, isSelected, setKey
protected void execute()
InjectedCommand
InjectedCommand.canExecute()
has returned
true
.execute
in class InjectedCommand
protected boolean canExecute()
InjectedCommand
Argument
annotations and the
arguments have been injected.canExecute
in class AbstractDocumentCommand
true
if the command can/may be executed in the current context,
false
otherwise.public void setRotation(int rotation)
public int getRotation()
Copyright © 2024 levigo holding gmbh. All rights reserved.