|
|||||||||
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.crosshair.CrossHairTool
public class CrossHairTool
An instance of this class may be added as a Tool
to a PageView
. It provides a
crosshair mode, which means mouse motions will be followed by a crosshair rendered above the
documents display.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.levigo.jadice.swing.tool.Tool |
---|
Tool.ActivationRequest |
Field Summary | |
---|---|
static int |
FROZEN_STATE_DISABLED
Deprecated. since 5.1.0.7. It is strongly recommended to use the FrozenMode.DISABLED
instead. This constant will be removed with one of the next major releases. |
static int |
FROZEN_STATE_ENABLED
Deprecated. since 5.1.0.7. This state will lead to undefined frozen states. Therefore it is strongly recommended not to use anymore. This constant will be removed with with one of the next major releases. |
static int |
FROZEN_STATE_RESET_ON_DOCCHANGE
Deprecated. since 5.1.0.7. It is strongly recommended to use the FrozenMode.ENABLED_DOCCHANGE_RESET instead. This constant will be removed
with with one of the next major releases. |
static int |
FROZEN_STATE_RESET_ON_PAGECHANGE
Deprecated. since 5.1.0.7. It is strongly recommended to use the FrozenMode.ENABLED_PAGECHANGE_RESET instead. This constant will be removed
with with one of the next major releases. |
Fields inherited from class com.levigo.jadice.swing.tool.Tool |
---|
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY |
Constructor Summary | |
---|---|
CrossHairTool()
Constructor |
Method Summary | |
---|---|
Color |
getColor()
Returns the line color |
FrozenMode |
getFrozenMode()
Returns the current frozen mode behaviour. |
int |
getFrozenStateMode()
Deprecated. since 5.1.0.7. It is strongly recommended to use getFrozenMode() instead.
Do not use this method any longer, it will be removed with one of the next major
releases. |
int |
getLineWidth()
Returns the line width |
protected int |
getRenderPriority()
Return the render priority for this tool. |
int |
getToggleFrozenModifier()
|
int |
getToggleFrozenMouseButton()
|
protected void |
handleMouseClicked(MouseEditEvent e,
boolean isActive)
Invoked when the mouse button has been clicked (pressed and released) on a component. |
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 |
isFrozen()
Gets the frozen state. |
protected void |
render(RenderParameters parameters,
boolean isActive)
Renders the Tool's UI onto the given Graphics2D context using the given
RenderControls . |
void |
setColor(Color color)
Changes the line color |
void |
setFrozen(boolean frozen)
Sets / unsets the frozen state where the pane will remain in focus of the last point before being set to frozen. |
void |
setFrozenMode(FrozenMode frozenMode)
Changes the frozen mode behaviour. |
void |
setFrozenStateMode(int frozenStateMode)
Deprecated. since 5.1.0.7. It is strongly recommended to use setFrozenMode(FrozenMode)
instead. Do not use this method any longer, it will be removed with one of the next
major releases. |
void |
setLineWidth(int lineWidth)
Changes the line width |
protected void |
setManager(ToolManager manager)
Receives the ToolManager instance, which the Tool implementation has been
registered for. |
void |
setToggleFrozenModifier(int toggleFrozenModifier)
|
void |
setToggleFrozenMouseButton(int toggleFrozenMouseButton)
|
Methods inherited from class com.levigo.jadice.swing.tool.Tool |
---|
contribute, getActivationFeedback, getActivationRequest, getActivationRequestForKeyPressed, getActivationRequestForMouseDragged, getActivationRequestForMousePressed, getCursor, getDispatchPriority, getManager, handleEditEvent, handleKeyPressed, handleKeyReleased, handleKeyTyped, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseWheelMoved, propagatePropertyChange, setActive, setCursor, setEnabled, setStatusFeedback |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final int FROZEN_STATE_DISABLED
FrozenMode.DISABLED
instead. This constant will be removed with one of the next major releases.
@Deprecated public static final int FROZEN_STATE_ENABLED
FrozenMode.ENABLED_DOCCHANGE_RESET
.
@Deprecated public static final int FROZEN_STATE_RESET_ON_DOCCHANGE
FrozenMode.ENABLED_DOCCHANGE_RESET
instead. This constant will be removed
with with one of the next major releases.
@Deprecated public static final int FROZEN_STATE_RESET_ON_PAGECHANGE
FrozenMode.ENABLED_PAGECHANGE_RESET
instead. This constant will be removed
with with one of the next major releases.
Constructor Detail |
---|
public CrossHairTool()
Method Detail |
---|
protected int getRenderPriority()
Tool
Tool.MIN_PRIORITY
...Tool.MAX_PRIORITY
.
The default priority is equal to Tool.DEFAULT_PRIORITY
.
getRenderPriority
in class Tool
protected void render(RenderParameters parameters, boolean isActive)
Tool
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.
render
in class Tool
parameters
- the view component which is currently being renderedisActive
- whether the called tool is currently activepublic Color getColor()
public void setColor(Color color)
color
- public int getLineWidth()
public void setLineWidth(int lineWidth)
lineWidth
- public boolean isFrozen()
true
if the pane is in frozen state; false
otherwisepublic void setFrozen(boolean frozen)
frozen
- the frozen flag to be setgetFrozenStateMode()
protected void handleMouseClicked(MouseEditEvent e, boolean isActive)
Tool
handleMouseClicked
in class Tool
isActive
- whether this tool is currently activeprotected void handleMouseMoved(MouseEditEvent e, boolean isActive)
Tool
handleMouseMoved
in class Tool
isActive
- whether this tool is currently activeprotected void handleMousePressed(MouseEditEvent e, boolean isActive)
Tool
handleMousePressed
in class Tool
isActive
- whether this tool is currently activeprotected void handleMouseReleased(MouseEditEvent e, boolean isActive)
Tool
handleMouseReleased
in class Tool
isActive
- whether this tool is currently activeprotected void setManager(ToolManager manager)
Tool
ToolManager
instance, which the Tool
implementation has been
registered for. If the Tool
is deregistered
this
method will be called with null.
setManager
in class Tool
public FrozenMode getFrozenMode()
FrozenMode
public void setFrozenMode(FrozenMode frozenMode)
frozenMode
- the new mode to change to
IllegalArgumentException
- the given frozen mode to change to must not be
null
.@Deprecated public int getFrozenStateMode()
getFrozenMode()
instead.
Do not use this method any longer, it will be removed with one of the next major
releases.
@Deprecated public void setFrozenStateMode(int frozenStateMode)
setFrozenMode(FrozenMode)
instead. Do not use this method any longer, it will be removed with one of the next
major releases.
IllegalArgumentException
- if the given parameter is not one of the frozen state
constantsFROZEN_STATE_DISABLED
,
FROZEN_STATE_ENABLED
,
FROZEN_STATE_RESET_ON_DOCCHANGE
,
FROZEN_STATE_RESET_ON_PAGECHANGE
public void setToggleFrozenMouseButton(int toggleFrozenMouseButton)
public int getToggleFrozenMouseButton()
public void setToggleFrozenModifier(int toggleFrozenModifier)
public int getToggleFrozenModifier()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2017 levigo holding gmbh. All rights reserved. |