ilog.views.maps.interactor
Class IlvManagerViewRotateInteractor

java.lang.Object
  extended by ilog.views.IlvManagerViewInteractor
      extended by ilog.views.maps.interactor.IlvManagerViewRotateInteractor
All Implemented Interfaces:
Serializable

public class IlvManagerViewRotateInteractor
extends IlvManagerViewInteractor

A rotate interactor to edit the rotation of an IlvManagerView.

Since:
JViews 7.5
See Also:
Serialized Form

Field Summary
static int DYNAMIC_CONTINUOUS_MODE
          Specifies that the interactor will act in continuous dynamic mode.
static int DYNAMIC_MODE
          Specifies that the interactor will act in dynamic mode.
static int STATIC_AUTOCENTER_MODE
          Specifies that the interactor will act in continuous auto center static mode.
static int STATIC_MODE
          Specifies that the interactor will act in continuous static mode.
 
Constructor Summary
IlvManagerViewRotateInteractor()
          Creates a IlvManagerViewRotateInteractor
 
Method Summary
protected  void attach(IlvManagerView v)
          Called when the interactor is attached to the manager view.
protected  void detach()
          Called when the interactor is detached from the view.
protected  void drawGhost(Graphics g)
          Draws the ghost.
 IlvPublicCompass getCompass()
          Retrieves the compass drawn by the interactor.
 int getMode()
          Retreives the interactor mode.
 int getResetButton()
          Retrieves the mouse button that resets the rotation of the view.
 int getResetCode()
          Returns the keycode that resets the rotation.
 int getRotateButton()
          Retrieves the mouse button used to rotate the view.
 int getRotateClockCode()
          Returns the keycode that rotates the view clockwise.
 int getRotateCounterClockCode()
          Returns the keycode that rotates the view counterclockwise.
 void repaint()
          Repaint the interactor when in IlvManagerViewRotateInteractor.STATIC_AUTOCENTER_MODE or in IlvManagerViewRotateInteractor.STATIC_MODE mode.
 void setCompass(IlvPublicCompass compass)
          Sets the compass providing feedback for the rotation.
 void setMode(int m)
          Sets the interactor mode.
 void setResetButton(int resetButton)
          Sets the mouse button that resets the rotation of the view.
 void setResetCode(int code)
          Sets the keycode that resets the rotation.
 void setRotateButton(int rotateButton)
          Sets the mouse button used to rotate the view.
 void setRotateClockCode(int code)
          Sets the keycode that rotates the view clockwise.
 void setRotateCounterClockCode(int code)
          Sets the keycode that rotates the view counterclockwise.
 
Methods inherited from class ilog.views.IlvManagerViewInteractor
addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, allowEnsureVisible, allowEnsureVisible, disableEvents, drawGhost, enableEvents, ensureVisible, ensureVisible, getManager, getManagerView, getTransformer, handleExpose, isXORGhost, processEvent, processFocusEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, setXORGhost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DYNAMIC_MODE

public static final int DYNAMIC_MODE
Specifies that the interactor will act in dynamic mode. In this mode, the user moves a needle to specify the rotation angle, The rotation is applied on the view when the user releases the mouse.

See Also:
Constant Field Values

DYNAMIC_CONTINUOUS_MODE

public static final int DYNAMIC_CONTINUOUS_MODE
Specifies that the interactor will act in continuous dynamic mode. In this mode, the user moves a needle to specify the rotation angle, The rotation is applied on the view each time the needle is moved.

See Also:
Constant Field Values

STATIC_MODE

public static final int STATIC_MODE
Specifies that the interactor will act in continuous static mode. In this mode, the user places the interactor on the view and the rotation angle is controlled by keys.

See Also:
Constant Field Values

STATIC_AUTOCENTER_MODE

public static final int STATIC_AUTOCENTER_MODE
Specifies that the interactor will act in continuous auto center static mode. In this mode, the interactor is placed at the center of the view and the rotation angle is controlled by keys.

See Also:
Constant Field Values
Constructor Detail

IlvManagerViewRotateInteractor

public IlvManagerViewRotateInteractor()
Creates a IlvManagerViewRotateInteractor

Method Detail

setCompass

public void setCompass(IlvPublicCompass compass)
Sets the compass providing feedback for the rotation.

Parameters:
compass -

getCompass

public IlvPublicCompass getCompass()
Retrieves the compass drawn by the interactor.

Returns:
The compass drawn by the interactor.

getRotateButton

public int getRotateButton()
Retrieves the mouse button used to rotate the view.

Returns:
The mouse button used to rotate the view.

setRotateButton

public void setRotateButton(int rotateButton)
Sets the mouse button used to rotate the view.

Parameters:
rotateButton - the mouse button used to rotate the view.

getResetButton

public int getResetButton()
Retrieves the mouse button that resets the rotation of the view.

Returns:
The mouse button that resets the rotation of the view.

setResetButton

public void setResetButton(int resetButton)
Sets the mouse button that resets the rotation of the view.

Parameters:
resetButton - The mouse button that resets the rotation of the view.

getRotateCounterClockCode

public int getRotateCounterClockCode()
Returns the keycode that rotates the view counterclockwise. Default value is KeyEvent.KP_LEFT

Returns:
The keycode that rotates the view counterclockwise.

setRotateCounterClockCode

public void setRotateCounterClockCode(int code)
Sets the keycode that rotates the view counterclockwise.

Parameters:
code - The keycode that rotates the view counterclockwise.

getRotateClockCode

public int getRotateClockCode()
Returns the keycode that rotates the view clockwise. Default value is KeyEvent.KP_RIGHT

Returns:
The keycode that rotates the view clockwise.

setRotateClockCode

public void setRotateClockCode(int code)
Sets the keycode that rotates the view clockwise.

Parameters:
code - The keycode that rotates the view clockwise.

getResetCode

public int getResetCode()
Returns the keycode that resets the rotation. Default value is KeyEvent.VK_ESCAPE

Returns:
The keycode that resets the rotation.

setResetCode

public void setResetCode(int code)
Sets the keycode that resets the rotation.

Parameters:
code - The keycode that resets the rotation.

setMode

public void setMode(int m)
Sets the interactor mode. Possible values are IlvManagerViewRotateInteractor.DYNAMIC_MODE, IlvManagerViewRotateInteractor.DYNAMIC_CONTINUOUS_MODE, IlvManagerViewRotateInteractor.STATIC_MODE and IlvManagerViewRotateInteractor.STATIC_AUTOCENTER_MODE.

Parameters:
m - The interactor mode.

getMode

public int getMode()
Retreives the interactor mode.

Returns:
The current interactor mode.

drawGhost

protected void drawGhost(Graphics g)
Draws the ghost. The default implementation does nothing. The method can be overridden to do temporary drawing when the interactor is working.

Overrides:
drawGhost in class IlvManagerViewInteractor
Parameters:
g - The graphics.
See Also:
IlvManagerViewInteractor.drawGhost(java.awt.Graphics)

attach

protected void attach(IlvManagerView v)
Called when the interactor is attached to the manager view.

Overrides:
attach in class IlvManagerViewInteractor
Parameters:
v - The manager view.
See Also:
IlvManagerViewInteractor.attach(ilog.views.IlvManagerView)

detach

protected void detach()
Called when the interactor is detached from the view.

Overrides:
detach in class IlvManagerViewInteractor
See Also:
IlvManagerViewInteractor.detach()

repaint

public void repaint()
Repaint the interactor when in IlvManagerViewRotateInteractor.STATIC_AUTOCENTER_MODE or in IlvManagerViewRotateInteractor.STATIC_MODE mode.



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.