com.levigo.jadice.swing.lens
Class HoverLensTool

java.lang.Object
  extended by com.levigo.jadice.swing.tool.Tool
      extended by com.levigo.jadice.swing.lens.HoverLensTool
All Implemented Interfaces:
ModifierActivated, MenuContributor

public class HoverLensTool
extends Tool
implements ModifierActivated

A hover lens tool for the PageView component.

Provides a lens hovering over the document bound to mouse location and movement..


Nested Class Summary
static class HoverLensTool.HoverShape
          Shape of the hover lens
 
Nested classes/interfaces inherited from class com.levigo.jadice.swing.tool.Tool
Tool.ActivationRequest
 
Field Summary
protected  Point2D fullScaleLensPosition
          the position of the lens center in document scale
 
Fields inherited from class com.levigo.jadice.swing.tool.Tool
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
 
Constructor Summary
HoverLensTool()
           
 
Method Summary
protected  Tool.ActivationRequest getActivationFeedback(MouseEditEvent e)
          Provide feedback for the user about what would happen, if the mouse were pressed at the current location.
 int getActivationModifiers()
          Returns the mask of modifier keys (Shift, Control, Alt etc.) and mouse buttons (left, right etc.) to be used to change the frozen state.
protected  Tool.ActivationRequest getActivationRequest(EditEvent e)
          Return the auto-activation request for this this tool in response to the given event.
 Insets getAutoscrollInsets()
           
 int getDecrementalScaleModifier()
           
 int getDecrementalScaleMouseButton()
           
 int getDecrementalSizeKeyCode()
           
 int getDecrementalSizeModifier()
           
 float getDefaultScale()
           
 float getDefaultScaleStep()
           
 FrozenStateMode getFrozenStateMode()
          Return the frozen state mode, which describes how instances of hover lens handles the frozen mode.
 HoverLensTool.HoverShape getHoverShape()
           
 Dimension getHoverSize()
           
 int getIncrementalScaleModifier()
           
 int getIncrementalScaleMouseButton()
           
 int getIncrementalSizeKeyCode()
           
 int getIncrementalSizeModifier()
           
 int getInitialAutoscrollDelay()
           
 float getMinimumScale()
           
protected  int getRenderPriority()
          Return the render priority for this tool.
 int getRepeatAutoscrollDelay()
           
 float getScale()
          Gets the scale.
 MessageFormat getTextFormat()
           
protected  void handleEditEvent(boolean isActive, EditEvent e)
          Handle the given EditEvent.
protected  void handleKeyPressed(KeyEditEvent e, boolean isActive)
          Invoked when a key has been pressed.
protected  void handleMouseClicked(MouseEditEvent e, boolean isActive)
          Invoked when the mouse button has been clicked (pressed and released) on a component.
protected  void handleMouseDragged(MouseEditEvent e, boolean isActive)
          Invoked when a mouse button is pressed on a component and then dragged.
protected  void handleMouseEntered(MouseEditEvent e, boolean isActive)
          Invoked when the mouse cursor enters the unobscured part of component's geometry.
protected  void handleMouseExited(MouseEditEvent e, boolean isActive)
          Invoked when the mouse cursor exits the unobscured part of component's geometry.
protected  void handleMouseMoved(MouseEditEvent e, boolean isActive)
          Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.
protected  void handleMousePressed(MouseEditEvent e, boolean isActive)
          Invoked when a mouse button has been pressed on a component.
protected  void handleMouseReleased(MouseEditEvent e, boolean isActive)
          Invoked when a mouse button has been released on a component.
 boolean isAutoScrollModeOn()
          Returns whether hover lens may cause an autoscroll on the viewer if the mouse moved outside the visible area.
 boolean isChangeFrozenStateInLensArea()
           
 boolean isFrozen()
          Gets the frozen state of the lens.
 boolean isRestrictToPageBounds()
           
 boolean isUseAbsoluteMagnification()
           
 boolean isUseClickScaling()
           
protected  void render(RenderParameters parameters, boolean isActive)
          Renders the Tool's UI onto the given Graphics2D context using the given RenderControls.
 void resetScale()
          Resets the scale to the value defined by defaultScale.
 void setActivationModifiers(int activationModifiers)
          Set the mask of modifier keys and mouse buttons to be used to change the frozen state.
 void setAutoscrollInsets(Insets autoscrollInsets)
           
 void setAutoScrollModeOn(boolean doAutoScroll)
          Sets a flag, whether hover lens may cause an autoscroll on the viewer if the mouse moved outside the visible area.
 void setChangeFrozenStateInLensArea(boolean changeFrozenStateInLensArea)
          Set if the frozen state should be changed only if the mouse position points to the lens interior.
 void setDecrementalScaleModifier(int decrementalScaleModifier)
          Set the mouse modifier(s) for decrementing the scale factor.
Allowed values: Several modifiers can be combined with binary OR (|).
 void setDecrementalScaleModifier(String decrementalScaleModifier)
          Set the mouse modifier(s) for decrementing the scale factor.
Allowed values: ctrl_mask alt_mask shift_mask Several modifiers can be combined with the pipe character (|).
 void setDecrementalScaleMouseButton(int decrementalScaleMouseButton)
          Set the mouse button for decrementing the scale factor.
Allowed values:
 void setDecrementalScaleMouseButton(String decrementalScaleMouseButton)
          Set the mouse button for decrementing the scale factor.
Allowed values: button1_mask button2_mask button3_mask
 void setDecrementalSizeKeyCode(int decrementalSizeKeyCode)
          Set the key code for decrementing the scale factor.
Allowed values: See the constants KeyEvent.VK_*
 void setDecrementalSizeModifier(int decrementalSizeModifier)
          Set the key modifier(s) for decrementing the scale factor.
Allowed values: Several modifiers can be combined with binary OR (|).
 void setDecrementalSizeModifier(String decrementalSizeModifier)
          Set the key modifier(s) for decrementing the scale factor.
Allowed values: ctrl_mask alt_mask shift_mask Several modifiers can be combined with the pipe character (|).
 void setDefaultScale(float defaultScale)
           
 void setDefaultScaleStep(float defaultScaleStep)
          Set the default step to increase / decrease the scale value
protected  void setEnabled(boolean enabled)
          Receive notification from the tool manager about the tool's enabled state.
 void setFrozen(boolean frozen)
          Sets / unsets the frozen state where the lens will remain in focus of the last point before being set to frozen.
 void setFrozenStateMode(FrozenStateMode frozenStateMode)
          Set the frozen state mode, which describes how instances of hover lens handles the frozen mode.
 void setHoverShape(HoverLensTool.HoverShape hoverShape)
          Sets the shape of the hoverlens.
 void setHoverSize(Dimension hoverSize)
          Sets the size of the hover lens.
 void setIncrementalScaleModifier(int incrementalScaleModifier)
          Set the mouse modifier(s) for incrementing the scale factor.
Allowed values: Several modifiers can be combined with binary OR (|).
 void setIncrementalScaleModifier(String incrementalScaleModifier)
          Set the mouse modifier(s) for incrementing the scale factor.
Allowed values: ctrl_mask alt_mask shift_mask Several modifiers can be combined with the pipe character (|).
 void setIncrementalScaleMouseButton(int incrementalScaleMouseButton)
          Set the mouse button for incrementing the scale factor.
Allowed values:
 void setIncrementalScaleMouseButton(String incrementalScaleMouseButton)
          Set the mouse button for incrementing the scale factor.
Allowed values: button1_mask button2_mask button3_mask
 void setIncrementalSizeKeyCode(int incrementalSizeKeyCode)
          Set the key code for incrementing the scale factor.
Allowed values: See the constants KeyEvent.VK_*
 void setIncrementalSizeModifier(int incrementalSizeModifier)
          Set the key modifier(s) for incrementing the scale factor.
Allowed values: Several modifiers can be combined with binary OR (|).
 void setIncrementalSizeModifier(String incrementalSizeModifier)
          Set the key modifier(s) for incrementing the scale factor.
Allowed values: ctrl_mask alt_mask shift_mask Several modifiers can be combined with the pipe character (|).
 void setInitialAutoscrollDelay(int initialAutoscrollDelay)
           
protected  void setManager(ToolManager manager)
          Receives the ToolManager instance, which the Tool implementation has been registered for.
 void setMinimumScale(float minimumScale)
          Set the minimum value for scaling the page.
 void setRepeatAutoscrollDelay(int repeatAutoscrollDelay)
           
 void setRestrictToPageBounds(boolean restrictToPageBounds)
          Set the behavior when the mouse cursor leaves the bounds of the current page.
 void setScale(float scale)
          Sets the scale.
 void setTextFormat(MessageFormat textFormat)
          Set the text format to indicate scale factor and the optional frozen state.
 void setUseClickScaling(boolean useClickScaling)
          Whether the lens's scale should be modifiable using mouse clicks.
 
Methods inherited from class com.levigo.jadice.swing.tool.Tool
contribute, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForMousePressed, getCursor, getDispatchPriority, getManager, handleKeyReleased, handleKeyTyped, handleMouseWheelMoved, propagatePropertyChange, setActive, setCursor, setStatusFeedback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fullScaleLensPosition

protected Point2D fullScaleLensPosition
the position of the lens center in document scale

Constructor Detail

HoverLensTool

public HoverLensTool()
Method Detail

getRenderPriority

protected int getRenderPriority()
Description copied from class: Tool
Return the render priority for this tool. Tools with higher dispatch priorities are rendered earlier than tools with lower priorities. The priority should be in the range Tool.MIN_PRIORITY...Tool.MAX_PRIORITY. The default priority is equal to Tool.DEFAULT_PRIORITY.

Overrides:
getRenderPriority in class Tool
Returns:
the dispatch priority

setEnabled

protected void setEnabled(boolean enabled)
Description copied from class: Tool
Receive notification from the tool manager about the tool's enabled state. In general, tools need not and should not try to implement different behaviour depending on the enabled state, as this is already covered by the ToolManager calling the Tool.handleEditEvent(boolean, EditEvent) and Tool.render(RenderParameters, boolean) in the appropriate state only. However, some tools may need to perform extended actions (for example, for resource management purposes) upon a change of the enabled state.

Overrides:
setEnabled in class Tool

setManager

protected void setManager(ToolManager manager)
Description copied from class: Tool
Receives the ToolManager instance, which the Tool implementation has been registered for. If the Tool is deregistered this method will be called with null.

Overrides:
setManager in class Tool

getActivationFeedback

protected Tool.ActivationRequest getActivationFeedback(MouseEditEvent e)
Description copied from class: Tool
Provide feedback for the user about what would happen, if the mouse were pressed at the current location. This method is called while handling MouseEvent.MOUSE_MOVED events. If this method returns null no feedback is provided at all. The activation request returned from this method is the same object that is used during Tool.getActivationRequestForKeyPressed(KeyEditEvent) to signal the auto-activation candidacy. This method should only return an activation request if it will actually candidate for auto-activation later on using Tool.getActivationRequestForMousePressed(MouseEditEvent) or Tool.getActivationRequestForMouseDragged(MouseEditEvent).

Overrides:
getActivationFeedback in class Tool

getActivationRequest

protected Tool.ActivationRequest getActivationRequest(EditEvent e)
Description copied from class: Tool
Return the auto-activation request for this this tool in response to the given event. This method is only called for events of the following type: If the tool returns an Tool.ActivationRequest, it becomes eligible for auto-activation. However, the final decision about which tool will actually be activated is up to the ToolActivationPolicy used be the tool manager.

Overrides:
getActivationRequest in class Tool
Parameters:
e - the event
Returns:
an Tool.ActivationRequest or null if the tool does not seek to be auto-activated at this time.

handleEditEvent

protected void handleEditEvent(boolean isActive,
                               EditEvent e)
Description copied from class: Tool
Handle the given EditEvent. This method dispatches the edit event to the individual handleXYZ()-Methods. However, implementors may want and are allowed to override this method in order to perform standard handling tasks common to all types of events.

Overrides:
handleEditEvent in class Tool
Parameters:
isActive - whether this tool is currently active
e - the event
See Also:
Tool.handleEditEvent(boolean, com.levigo.jadice.swing.tool.EditEvent)

handleKeyPressed

protected void handleKeyPressed(KeyEditEvent e,
                                boolean isActive)
Description copied from class: Tool
Invoked when a key has been pressed. See the class description for KeyEvent for a definition of a key pressed event.

Overrides:
handleKeyPressed in class Tool
isActive - whether this tool is currently active

handleMousePressed

protected void handleMousePressed(MouseEditEvent e,
                                  boolean isActive)
Description copied from class: Tool
Invoked when a mouse button has been pressed on a component.

Overrides:
handleMousePressed in class Tool
isActive - whether this tool is currently active

handleMouseReleased

protected void handleMouseReleased(MouseEditEvent e,
                                   boolean isActive)
Description copied from class: Tool
Invoked when a mouse button has been released on a component.

Overrides:
handleMouseReleased in class Tool
isActive - whether this tool is currently active

handleMouseClicked

protected void handleMouseClicked(MouseEditEvent e,
                                  boolean isActive)
Description copied from class: Tool
Invoked when the mouse button has been clicked (pressed and released) on a component.

Overrides:
handleMouseClicked in class Tool
isActive - whether this tool is currently active

handleMouseDragged

protected void handleMouseDragged(MouseEditEvent e,
                                  boolean isActive)
Description copied from class: Tool
Invoked when a mouse button is pressed on a component and then dragged. MOUSE_DRAGGED events will continue to be delivered to the component where the drag originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).

Due to platform-dependent Drag&Drop implementations, MOUSE_DRAGGED events may not be delivered during a native Drag&Drop operation.

Overrides:
handleMouseDragged in class Tool
isActive - whether this tool is currently active

handleMouseEntered

protected void handleMouseEntered(MouseEditEvent e,
                                  boolean isActive)
Description copied from class: Tool
Invoked when the mouse cursor enters the unobscured part of component's geometry.

Overrides:
handleMouseEntered in class Tool
isActive - whether this tool is currently active

handleMouseExited

protected void handleMouseExited(MouseEditEvent e,
                                 boolean isActive)
Description copied from class: Tool
Invoked when the mouse cursor exits the unobscured part of component's geometry.

Overrides:
handleMouseExited in class Tool
isActive - whether this tool is currently active

handleMouseMoved

protected void handleMouseMoved(MouseEditEvent e,
                                boolean isActive)
Description copied from class: Tool
Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.

Overrides:
handleMouseMoved in class Tool
isActive - whether this tool is currently active

resetScale

public void resetScale()
Resets the scale to the value defined by defaultScale.


getScale

public float getScale()
Gets the scale.

Returns:
Returns a float

setScale

public void setScale(float scale)
Sets the scale.

Parameters:
scale - The scale to be set.

render

protected void render(RenderParameters parameters,
                      boolean isActive)
Description copied from class: Tool
Renders the Tool's UI onto the given Graphics2D context using the given RenderControls.

This render method is called within the context and during the rendering of a single page. The page being rendered is passed to implementors of this method in order to be able to control and influence the page rendering.

Overrides:
render in class Tool
Parameters:
parameters - the view component which is currently being rendered
isActive - whether the called tool is currently active

getHoverSize

public Dimension getHoverSize()
Returns:
the size of the hover lens

setHoverSize

public void setHoverSize(Dimension hoverSize)
Sets the size of the hover lens.

Parameters:
hoverSize - The hoverSize to set
Throws:
IllegalArgumentException - if hoverSize is null, hoverSize#width or hoverSize#height is less or equal zero.

getHoverShape

public HoverLensTool.HoverShape getHoverShape()
Returns:
shape of the hover lens
See Also:
HoverLensTool.HoverShape

setHoverShape

public void setHoverShape(HoverLensTool.HoverShape hoverShape)
Sets the shape of the hoverlens.

Parameters:
hoverShape - The shape to set
See Also:
HoverLensTool.HoverShape

isAutoScrollModeOn

public boolean isAutoScrollModeOn()
Returns whether hover lens may cause an autoscroll on the viewer if the mouse moved outside the visible area.

Returns:
boolean true causes autoscroll, otherwise false

setAutoScrollModeOn

public void setAutoScrollModeOn(boolean doAutoScroll)
Sets a flag, whether hover lens may cause an autoscroll on the viewer if the mouse moved outside the visible area.

Parameters:
doAutoScroll - true causes autoscroll, otherwise false

isFrozen

public boolean isFrozen()
Gets the frozen state of the lens.

Returns:
true if the lens is in frozen state; false otherwise

setFrozen

public void setFrozen(boolean frozen)
Sets / unsets the frozen state where the lens will remain in focus of the last point before being set to frozen.

Parameters:
frozen - the frozen flag to be set

getFrozenStateMode

public FrozenStateMode getFrozenStateMode()
Return the frozen state mode, which describes how instances of hover lens handles the frozen mode.

Returns:
the frozen state mode used by instances of hover lens
See Also:
FrozenStateMode

setFrozenStateMode

public void setFrozenStateMode(FrozenStateMode frozenStateMode)
Set the frozen state mode, which describes how instances of hover lens handles the frozen mode.

Parameters:
frozenStateMode - the frozen state mode used by instances of hover lens
Throws:
IllegalArgumentException - the given frozen mode to change to must not be null.
See Also:
FrozenStateMode

setIncrementalScaleMouseButton

public void setIncrementalScaleMouseButton(String incrementalScaleMouseButton)
Set the mouse button for incrementing the scale factor.
Allowed values:

Parameters:
incrementalScaleMouseButton - The mouse button

setIncrementalScaleMouseButton

public void setIncrementalScaleMouseButton(int incrementalScaleMouseButton)
Set the mouse button for incrementing the scale factor.
Allowed values:

Parameters:
incrementalScaleMouseButton - The mouse button
See Also:
MouseEvent

setIncrementalScaleModifier

public void setIncrementalScaleModifier(String incrementalScaleModifier)
Set the mouse modifier(s) for incrementing the scale factor.
Allowed values: Several modifiers can be combined with the pipe character (|).

Parameters:
incrementalScaleModifier - The modifier

setIncrementalScaleModifier

public void setIncrementalScaleModifier(int incrementalScaleModifier)
Set the mouse modifier(s) for incrementing the scale factor.
Allowed values: Several modifiers can be combined with binary OR (|).

Parameters:
incrementalScaleModifier - The modifier
See Also:
InputEvent

setDecrementalScaleMouseButton

public void setDecrementalScaleMouseButton(String decrementalScaleMouseButton)
Set the mouse button for decrementing the scale factor.
Allowed values:

Parameters:
decrementalScaleMouseButton - The mouse button

setDecrementalScaleMouseButton

public void setDecrementalScaleMouseButton(int decrementalScaleMouseButton)
Set the mouse button for decrementing the scale factor.
Allowed values:

Parameters:
decrementalScaleMouseButton - The mouse button
See Also:
MouseEvent

setDecrementalScaleModifier

public void setDecrementalScaleModifier(String decrementalScaleModifier)
Set the mouse modifier(s) for decrementing the scale factor.
Allowed values: Several modifiers can be combined with the pipe character (|).

Parameters:
decrementalScaleModifier - The modifier

setDecrementalScaleModifier

public void setDecrementalScaleModifier(int decrementalScaleModifier)
Set the mouse modifier(s) for decrementing the scale factor.
Allowed values: Several modifiers can be combined with binary OR (|).

Parameters:
decrementalScaleModifier - The modifier
See Also:
InputEvent

setIncrementalSizeKeyCode

public void setIncrementalSizeKeyCode(int incrementalSizeKeyCode)
Set the key code for incrementing the scale factor.
Allowed values: See the constants KeyEvent.VK_*

Parameters:
incrementalSizeKeyCode - A key code
See Also:
KeyEvent

setIncrementalSizeModifier

public void setIncrementalSizeModifier(String incrementalSizeModifier)
Set the key modifier(s) for incrementing the scale factor.
Allowed values: Several modifiers can be combined with the pipe character (|).

Parameters:
incrementalSizeModifier - The modifier

setIncrementalSizeModifier

public void setIncrementalSizeModifier(int incrementalSizeModifier)
Set the key modifier(s) for incrementing the scale factor.
Allowed values: Several modifiers can be combined with binary OR (|).

Parameters:
incrementalSizeModifier - The modifier
See Also:
InputEvent

setDecrementalSizeKeyCode

public void setDecrementalSizeKeyCode(int decrementalSizeKeyCode)
Set the key code for decrementing the scale factor.
Allowed values: See the constants KeyEvent.VK_*

Parameters:
decrementalSizeKeyCode - A key code
See Also:
KeyEvent

setDecrementalSizeModifier

public void setDecrementalSizeModifier(String decrementalSizeModifier)
Set the key modifier(s) for decrementing the scale factor.
Allowed values: Several modifiers can be combined with the pipe character (|).

Parameters:
decrementalSizeModifier - The modifier

setDecrementalSizeModifier

public void setDecrementalSizeModifier(int decrementalSizeModifier)
Set the key modifier(s) for decrementing the scale factor.
Allowed values: Several modifiers can be combined with binary OR (|).

Parameters:
decrementalSizeModifier - The modifier
See Also:
InputEvent

getActivationModifiers

public int getActivationModifiers()
Returns the mask of modifier keys (Shift, Control, Alt etc.) and mouse buttons (left, right etc.) to be used to change the frozen state.

Specified by:
getActivationModifiers in interface ModifierActivated
Returns:
the modifier and button mask
See Also:
setActivationModifiers(int), setFrozen(boolean), isFrozen()

setActivationModifiers

public void setActivationModifiers(int activationModifiers)
Set the mask of modifier keys and mouse buttons to be used to change the frozen state. The modifier mask must be compatible with InputEvent.getModifiersEx(), i.e. it must use the InputEvent constants containing _DOWN_ in their name. Allowed modifiers and button keys are:
The modifiers can be combined with the pipe character (|). The default value is InputEvent.BUTTON1_DOWN_MASK | InputEvent.CTRL_DOWN_MASK.

Specified by:
setActivationModifiers in interface ModifierActivated
Parameters:
activationModifiers -
Throws:
IllegalArgumentException - if other modifier keys other than those listed above.
See Also:
InputEvent.ALT_DOWN_MASK, InputEvent.CTRL_DOWN_MASK, InputEvent.SHIFT_DOWN_MASK, InputEvent.BUTTON1_DOWN_MASK, InputEvent.BUTTON2_DOWN_MASK, InputEvent.BUTTON3_DOWN_MASK, setFrozen(boolean), isFrozen()

setMinimumScale

public void setMinimumScale(float minimumScale)
Set the minimum value for scaling the page.

Parameters:
minimumScale - minimum scaling value

getMinimumScale

public float getMinimumScale()

getDefaultScaleStep

public float getDefaultScaleStep()

getIncrementalScaleMouseButton

public int getIncrementalScaleMouseButton()

getIncrementalScaleModifier

public int getIncrementalScaleModifier()

getDecrementalScaleMouseButton

public int getDecrementalScaleMouseButton()

getDecrementalScaleModifier

public int getDecrementalScaleModifier()

getIncrementalSizeKeyCode

public int getIncrementalSizeKeyCode()

getIncrementalSizeModifier

public int getIncrementalSizeModifier()

getDecrementalSizeKeyCode

public int getDecrementalSizeKeyCode()

getDecrementalSizeModifier

public int getDecrementalSizeModifier()

isUseAbsoluteMagnification

public boolean isUseAbsoluteMagnification()

setDefaultScaleStep

public void setDefaultScaleStep(float defaultScaleStep)
Set the default step to increase / decrease the scale value

Parameters:
defaultScaleStep - scale value

getTextFormat

public MessageFormat getTextFormat()
Returns:
the text format to indicate scale factor and the optional frozen state.

setTextFormat

public void setTextFormat(MessageFormat textFormat)
Set the text format to indicate scale factor and the optional frozen state.

Parameters:
textFormat - text format of the hover lens' text.
See Also:
MessageFormat

isUseClickScaling

public boolean isUseClickScaling()
Returns:
Whether the lens's scale should be modifiable using mouse clicks.

setUseClickScaling

public void setUseClickScaling(boolean useClickScaling)
Whether the lens's scale should be modifiable using mouse clicks.

Parameters:
useClickScaling - enables or disables click scaling

isChangeFrozenStateInLensArea

public boolean isChangeFrozenStateInLensArea()
Returns:
if the frozen state should be changed only if the mouse position points to the lens interior.

setChangeFrozenStateInLensArea

public void setChangeFrozenStateInLensArea(boolean changeFrozenStateInLensArea)
Set if the frozen state should be changed only if the mouse position points to the lens interior. (default value: false)

Parameters:
changeFrozenStateInLensArea - if set to true, frozen state changes only if the mouse is inside the lens area.
Otherwise the mouse position does not influence the frozen state change.

setRestrictToPageBounds

public void setRestrictToPageBounds(boolean restrictToPageBounds)
Set the behavior when the mouse cursor leaves the bounds of the current page. If set to true the center of the lens is restricted to the page bounds. If set to false the lens always follows the mouse cursor even there is no content to magnify (default behavior).

Parameters:
restrictToPageBounds - if the lens is restricted to the page bounds

isRestrictToPageBounds

public boolean isRestrictToPageBounds()
Returns:
The lens is restricted to the page bounds iff true.

setDefaultScale

public void setDefaultScale(float defaultScale)

getDefaultScale

public float getDefaultScale()

setAutoscrollInsets

public void setAutoscrollInsets(Insets autoscrollInsets)

getAutoscrollInsets

public Insets getAutoscrollInsets()

setInitialAutoscrollDelay

public void setInitialAutoscrollDelay(int initialAutoscrollDelay)

getInitialAutoscrollDelay

public int getInitialAutoscrollDelay()

setRepeatAutoscrollDelay

public void setRepeatAutoscrollDelay(int repeatAutoscrollDelay)

getRepeatAutoscrollDelay

public int getRepeatAutoscrollDelay()


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.