|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.levigo.jadice.swing.tool.Tool com.levigo.jadice.swing.pageview.MouseWheelZoomTool
public class MouseWheelZoomTool
A Tool
used to enable zooming using the mouse wheel. Zooming is performed upon all mouse
wheel events during which the modifier state matches the one set with
setActivationModifiers(int)
(this defaults to the CONTROL key).
The zoom increments can be controlled using setScrollDivisor(int)
and bounded using
setMinZoomFactor(float)
/setMaxZoomFactor(float)
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.levigo.jadice.swing.tool.Tool |
---|
Tool.ActivationRequest |
Field Summary |
---|
Fields inherited from class com.levigo.jadice.swing.tool.Tool |
---|
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY |
Constructor Summary | |
---|---|
MouseWheelZoomTool()
|
Method Summary | |
---|---|
int |
getActivationModifiers()
Get the mask of modifier keys (Shift, Control, Alt etc.) and mouse buttons (left, right etc.) to be used to activate this tool. |
protected int |
getDispatchPriority()
Return the dispatch priority for this tool. |
float |
getMaxZoomFactor()
|
float |
getMinZoomFactor()
|
int |
getScrollDivisor()
Get the scroll divisor. |
protected void |
handleMouseWheelMoved(MouseWheelEditEvent e,
boolean isActive)
Invoked when the mouse wheel is rotated. |
void |
setActivationModifiers(int activationModifiers)
Set the mask of modifier keys (Shift, Control, Alt etc.) and mouse buttons (left, right etc.) to be used to activate this tool. |
void |
setMaxZoomFactor(float maxZoomFactor)
|
void |
setMinZoomFactor(float minZoomFactor)
|
void |
setScrollDivisor(int scrollDivisor)
Set the scroll divisor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MouseWheelZoomTool()
Method Detail |
---|
protected void handleMouseWheelMoved(MouseWheelEditEvent e, boolean isActive)
Tool
handleMouseWheelMoved
in class Tool
isActive
- whether this tool is currently activeMouseWheelEvent
protected int getDispatchPriority()
Tool
Tool.MIN_PRIORITY
...Tool.MAX_PRIORITY
.
The default priority is equal to Tool.MAX_PRIORITY
minus the render priority.
getDispatchPriority
in class Tool
public int getScrollDivisor()
public void setScrollDivisor(int scrollDivisor)
scrollDivisor
- the scrollDivisor to setpublic float getMinZoomFactor()
public void setMinZoomFactor(float minZoomFactor)
public float getMaxZoomFactor()
public void setMaxZoomFactor(float maxZoomFactor)
public void setActivationModifiers(int activationModifiers)
InputEvent.getModifiersEx()
, i.e. it must use the InputEvent
constants
containing _DOWN_
in their name.
Default: use CONTROL key
setActivationModifiers
in interface ModifierActivated
ModifierActivated.setActivationModifiers(int)
public int getActivationModifiers()
getActivationModifiers
in interface ModifierActivated
ModifierActivated.setActivationModifiers(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |