|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvNamedProperty
ilog.views.maps.IlvAreasOfInterestProperty
public class IlvAreasOfInterestProperty
IlvAreasOfInterestProperty defines a named property used to
store the areas of interest in an IlvManager instance that
contain cartographic data.
The following code example shows how to use IlvAreasOfInterestProperty:
// Create a area for all that is visible in the view.
IlvAreaOfInterest world=IlvJAreaOfInterestPanel.createLocationFromView(view,64,false);
world.setName("World");
// Create an area for the bounds of Europe.
IlvRect rectangle=
new IlvRect((float)Math.toRadians(-15),(float)Math.toRadians(35),
(float)Math.toRadians(45),(float)Math.toRadians(25));
IlvAreaOfInterest europe=new IlvAreaOfInterest("Europe",rectangle,0,null);
// Update the preview image.
IlvJAreaOfInterestPanel.refreshPreview(view,europe,64);
// Retrieve or create the areas of interest known to the manager.
IlvAreaOfInterestVector areas=IlvAreasOfInterestProperty.GetAreasOfInterest(view.getManager());
// Add the areas to be managed by Beans and/or serialized.
areas.addElement(world);
areas.addElement(europe);
// Zoom to Europe.
europe.zoomTo(view);
| Field Summary | |
|---|---|
static String |
NAME
The name of the property. |
| Constructor Summary | |
|---|---|
IlvAreasOfInterestProperty(IlvAreaOfInterestVector ap)
Creates a new IlvAreasOfInterestProperty object with the
specified areas of interest. |
|
IlvAreasOfInterestProperty(IlvAreasOfInterestProperty source)
Creates a new IlvAreasOfInterestProperty object by copying
an existing one. |
|
IlvAreasOfInterestProperty(IlvInputStream stream)
Creates a new IlvAreasOfInterestProperty object from an
IlvInputStream. |
|
| Method Summary | |
|---|---|
IlvNamedProperty |
copy()
Copies the property. |
IlvAreaOfInterestVector |
getAreasOfInterest()
Returns the areas of interest for this property. |
static IlvAreaOfInterestVector |
GetAreasOfInterest(IlvManager manager)
Returns the areas of interest of a given manager. |
boolean |
isPersistent()
Tests if this property can be saved. |
void |
write(IlvOutputStream stream)
Writes this property to an IlvOutputStream. |
| Methods inherited from class ilog.views.IlvNamedProperty |
|---|
getName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NAME
| Constructor Detail |
|---|
public IlvAreasOfInterestProperty(IlvAreaOfInterestVector ap)
IlvAreasOfInterestProperty object with the
specified areas of interest.
ap - The areas of interest.public IlvAreasOfInterestProperty(IlvAreasOfInterestProperty source)
IlvAreasOfInterestProperty object by copying
an existing one.
source - The source property to be copied.
public IlvAreasOfInterestProperty(IlvInputStream stream)
throws IlvReadFileException
IlvAreasOfInterestProperty object from an
IlvInputStream.
stream - The input stream.
IlvReadFileException - if an error occurs while reading.| Method Detail |
|---|
public void write(IlvOutputStream stream)
throws IOException
IlvOutputStream.
write in interface IlvPersistentObjectwrite in class IlvNamedPropertystream - The output stream.
IOException - if an I/O exception occurs.public IlvNamedProperty copy()
copy in class IlvNamedPropertyIlvAreasOfInterestProperty instance.public boolean isPersistent()
isPersistent in class IlvNamedPropertytrue.public IlvAreaOfInterestVector getAreasOfInterest()
public static IlvAreaOfInterestVector GetAreasOfInterest(IlvManager manager)
This method tries to find the areas of interest of the manager in the following way:
IlvAreasOfInterestProperty instance is attached
to the manager, the areas of interest in the property are returned.IlvAreaOfInterestVector is created, stored in the
properties of manager and returned.
manager - The manager whose areas of interest you want to retrieve.
manager.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||