ilog.views.maps
Class IlvAreaOfInterest

java.lang.Object
  extended by ilog.views.maps.IlvAreaOfInterest
All Implemented Interfaces:
IlvPersistentObject

public class IlvAreaOfInterest
extends Object
implements IlvPersistentObject

An IlvAreaOfInterest instance stores a rotation angle and rectangle associated with a name and an optional preview image.

Use this class to retrieve user selected areas on a map.

Since:
JViews 7.5

Constructor Summary
IlvAreaOfInterest(IlvAreaOfInterest src)
          Creates a new IlvAreaOfInterest object from a source area of interest.
IlvAreaOfInterest(IlvInputStream stream)
          Creates a new IlvAreaOfInterest instance from a stream.
IlvAreaOfInterest(String name, IlvRect rectangle, double angle, Image image)
          Creates a new area of interest.
 
Method Summary
 IlvAreaOfInterest copy()
          Returns a new copy of this area of interest.
 Image getImage()
          Returns the preview image associated with this area of interest.
 String getName()
          Returns the name of this area of interest.
 IlvRect getRectangle()
          Returns the rectangle defining this area of interest.
 void setImage(Image image)
          Sets the preview image associated with this area of interest.
 void setName(String name)
          Sets the name for this area of interest.
 String toString()
          The String representation of this area of interest.
 void write(IlvOutputStream stream)
          Writes this object to an output stream.
 void zoomTo(IlvManagerView view)
          Zooms and rotates to an area of the view enclosed by this area of interest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvAreaOfInterest

public IlvAreaOfInterest(String name,
                         IlvRect rectangle,
                         double angle,
                         Image image)
Creates a new area of interest.

Parameters:
name - The name for the new area.
rectangle - The rectangle defining the area of interest with latitude and longitude values in radians.
angle - The rotation angle of the view.
image - A preview image of the new area of interest. Set to null if no image is available.

IlvAreaOfInterest

public IlvAreaOfInterest(IlvInputStream stream)
                  throws IlvReadFileException
Creates a new IlvAreaOfInterest instance from a stream.

Parameters:
stream - The input stream to read from.
Throws:
IlvReadFileException - if an error occurs while the stream is being read from.

IlvAreaOfInterest

public IlvAreaOfInterest(IlvAreaOfInterest src)
Creates a new IlvAreaOfInterest object from a source area of interest.

Parameters:
src - The area of interest to be copied.
Method Detail

getName

public String getName()
Returns the name of this area of interest.

Returns:
The name of this area of interest.

setName

public void setName(String name)
Sets the name for this area of interest.

Parameters:
name - The new name to set.

getImage

public Image getImage()
Returns the preview image associated with this area of interest.

Returns:
The preview image associated with this area of interest.

setImage

public void setImage(Image image)
Sets the preview image associated with this area of interest.

Parameters:
image - The preview image associated with this area of interest.

getRectangle

public IlvRect getRectangle()
Returns the rectangle defining this area of interest.

Returns:
The rectangle defining the area of interest with latitude and longitude values in radians.
Since:
JViews 7.5

toString

public String toString()
The String representation of this area of interest.

Overrides:
toString in class Object
Returns:
The String representation of this area in the GUI.

zoomTo

public void zoomTo(IlvManagerView view)
Zooms and rotates to an area of the view enclosed by this area of interest.

Parameters:
view - The view to be zoomed in.

write

public void write(IlvOutputStream stream)
           throws IOException
Writes this object to an output stream.

Specified by:
write in interface IlvPersistentObject
Parameters:
stream - The output stream to write this object to.
Throws:
IOException - thrown when an exception occurs during the write operation for this object.
See Also:
IlvPersistentObject.write(ilog.views.io.IlvOutputStream)

copy

public IlvAreaOfInterest copy()
Returns a new copy of this area of interest.

Returns:
A copy of this IlvAreaOfInterest.


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