ilog.views.accelerator
Class IlvZoomOutAccelerator

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

public class IlvZoomOutAccelerator
extends IlvAccelerator

IlvZoomOutAccelerator is used to allow the user to zoom out of the manager.

Example

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

  // Install the scroll down accelerator
  manager.addAccelerator(new IlvZoomOutAccelerator(KeyEvent.KEY_PRESSED,
                                                        KeyEvent.VK_MINUS, 
                                                        KeyEvent.CTRL_MASK));
 

About Interactors and Accelerators

IlvZoomOutAccelerator 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
IlvZoomOutAccelerator(int type, int key, int modifiers)
          Creates the accelerator.
 
Method Summary
 double getZoomFactor()
          Returns the zoom factor.
protected  boolean handleEvent(IlvManagerView v)
          Processes the event.
 void setZoomFactor(double zoomFactor)
          Changes the zoom factor.
 
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

IlvZoomOutAccelerator

public IlvZoomOutAccelerator(int type,
                             int key,
                             int modifiers)
Creates the accelerator.

Method Detail

getZoomFactor

public double getZoomFactor()
Returns the zoom factor. The default value is 0.5.


setZoomFactor

public void setZoomFactor(double zoomFactor)
Changes the zoom factor.

Parameters:
zoomFactor - the new zoom factor.

handleEvent

protected boolean handleEvent(IlvManagerView v)
Processes the event.

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


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