ilog.views.accelerator
Class IlvRotateAccelerator

java.lang.Object
  extended by ilog.views.IlvAccelerator
      extended by ilog.views.accelerator.IlvRotateAccelerator
All Implemented Interfaces:
Serializable

public class IlvRotateAccelerator
extends IlvAccelerator

IlvRotateAccelerator is used to rotate 90 degree anticlockwise around the center of a view each time the accelerator is called.

Example

The following code example shows how to use IlvRotateAccelerator in a simple Java application:

  // Install the rotate accelerator
  manager.addAccelerator(new IlvRotateAccelerator(KeyEvent.KEY_PRESSED, 
            KeyEvent.VK_R, 0));
 

About Interactors and Accelerators

IlvRotateAccelerator is a custom accelerator, that is, a subclass of IlvAccelerator. An accelerator is a class that listens to a specific key event in the manager. All input events are handled by means of interactors or accelerators. For information about how to treat events in a manager, see Handling Events. The following code examples show how to handle user events:

See Also:
Serialized Form

Constructor Summary
IlvRotateAccelerator(int type, int key, int modifiers)
          Creates and initializes the accelerator.
 
Method Summary
protected  boolean handleEvent(IlvManagerView view)
          Processes the event.
 
Methods inherited from class ilog.views.IlvAccelerator
CtrlChar, getEventType, getKeyCode, getModifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvRotateAccelerator

public IlvRotateAccelerator(int type,
                            int key,
                            int modifiers)
Creates and initializes the accelerator.

Method Detail

handleEvent

protected boolean handleEvent(IlvManagerView view)
Processes the event.

Specified by:
handleEvent in class IlvAccelerator
Parameters:
view - The manager view.


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