ilog.views.accelerator
Class IlvFitToSizeAccelerator

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

public class IlvFitToSizeAccelerator
extends IlvAccelerator

IlvFitToSizeAccelerator is used to modify the transformer of a manager view so that all objects are visible.

Example

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

  // Install the select interactor on the view.
  // This is used to select graphic objects with the mouse that can then be 
  // deleted using the custom delete interactor.
  IlvSelectInteractor inter = new IlvSelectInteractor();
  inter.setOpaqueMove(true);
  mgrview.setInteractor(inter);
  
  // Install the fit to size accelerator
  manager.addAccelerator(new IlvFitToSizeAccelerator(KeyEvent.KEY_PRESSED, 
               KeyEvent.VK_F, KeyEvent.CTRL_MASK ));
 

About Interactors and Accelerators

IlvFitToSizeAccelerator 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:

Version:
1.0 12/30/96
See Also:
Serialized Form

Constructor Summary
IlvFitToSizeAccelerator(int type, int key, int modifiers)
          Initializes a new IlvFitToSizeAccelerator.
 
Method Summary
protected  boolean handleEvent(IlvManagerView v)
          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

IlvFitToSizeAccelerator

public IlvFitToSizeAccelerator(int type,
                               int key,
                               int modifiers)
Initializes a new IlvFitToSizeAccelerator.

Method Detail

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.