public class ZoomExecutor extends AbstractInstructionExecutor<ZoomInstruction,Collection<Object>> implements CollectionBasedInstructionExecutor
InstructionExecutor
to handle ZoomInstruction
s. It zooms the view to
the desired zoom factor.
Requires an instance of PageView
in the collection of context objects. The
PageView
must be displaying a Page
.
Constructor and Description |
---|
ZoomExecutor() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canExecuteSpecific(ZoomInstruction instruction,
Collection<Object> context)
Template method for implementors.
|
protected void |
executeSpecific(ZoomInstruction instruction,
Collection<Object> context)
Template method for implementors.
|
protected RenderControls |
getRenderControls(PageView pageView)
Returns the render controls which are used by this executor.
|
canExecute, execute, pertainsTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canExecute, execute, pertainsTo
@CallOnEDT protected boolean canExecuteSpecific(ZoomInstruction instruction, Collection<Object> context)
AbstractInstructionExecutor
Instruction
, using the given context object where necessary. The default
implementation does nothing and returns true
.canExecuteSpecific
in class AbstractInstructionExecutor<ZoomInstruction,Collection<Object>>
instruction
- the instruction in question. It is guaranteed to be non-null
.context
- holds additional, implementation-specific informationtrue
if this instance is able to execute the given Instruction
using the given context object where necessary; false
otherwise.@CallOnEDT protected void executeSpecific(ZoomInstruction instruction, Collection<Object> context)
AbstractInstructionExecutor
Instruction
.executeSpecific
in class AbstractInstructionExecutor<ZoomInstruction,Collection<Object>>
instruction
- holds the information which specifies what to perform. This
Instruction
is guaranteed to be non-null
.context
- holds additional, implementation-specific informationprotected RenderControls getRenderControls(PageView pageView)
By default, this method returns the current page controls. This method can be overridden, if it is desired to use the document render controls instead.
pageView
- the pageViewCopyright © 2024 levigo holding gmbh. All rights reserved.