public class IlvAreasOfInterestProperty extends IlvNamedProperty
IlvAreasOfInterestProperty defines a named property used to
store the areas of interest in an IlvManager instance that
contain cartographic data.
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(Math.toRadians(-15),Math.toRadians(35),
Math.toRadians(45),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);
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME
The name of the property.
|
| Constructor and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
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. |
getNamepublic static final String NAME
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.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)
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.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.