ilog.cpl.graph
Class IlpDefaultPositionConverter

java.lang.Object
  extended by ilog.cpl.graph.IlpDefaultPositionConverter
All Implemented Interfaces:
IlpPositionConverter
Direct Known Subclasses:
IlpDefaultPositionConverter, IlpGeographicPositionConverter

public class IlpDefaultPositionConverter
extends Object
implements IlpPositionConverter

This class implements conversions between model and view ideas of position/shape. The model supports the Java2D types Point2D and Shape, whereas the view supports the classes IlpPoint, IlpRect, IlpPolyline, and IlpPolygon.

Since:
JTGO 4.0

Constructor Summary
IlpDefaultPositionConverter()
          Creates a new instance which implements conversions between model and view ideas of position/shape.
 
Method Summary
 IlpPosition getModelPosition(IlpPosition viewLocation)
          Converts a position/shape in the view to a user-defined position/shape.
 IlpPosition getViewLocation(IlpPosition modelPosition)
          Converts a user-defined position/shape to a position/shape for the view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpDefaultPositionConverter

public IlpDefaultPositionConverter()
Creates a new instance which implements conversions between model and view ideas of position/shape.

The model supports the Java2D types Point2D and Shape, whereas the view supports the classes IlpPoint, IlpRect, IlpPolyline and IlpPolygon.

Since:
JTGO 4.0
Method Detail

getViewLocation

public IlpPosition getViewLocation(IlpPosition modelPosition)
Converts a user-defined position/shape to a position/shape for the view.

Specified by:
getViewLocation in interface IlpPositionConverter
Returns:
An instance of IlpPoint, IlpRect, IlpPolyline, or IlpPolygon

getModelPosition

public IlpPosition getModelPosition(IlpPosition viewLocation)
Converts a position/shape in the view to a user-defined position/shape.

Specified by:
getModelPosition in interface IlpPositionConverter
Parameters:
viewLocation - An instance of IlpPoint, IlpRect, IlpPolyline, or IlpPolygon.


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