ilog.views.maps.graphic
Class IlvMapMarker

java.lang.Object
  extended by ilog.views.IlvGraphic
      extended by ilog.views.graphic.IlvMarker
          extended by ilog.views.maps.graphic.IlvMapMarker
All Implemented Interfaces:
IlvPersistentObject, IlvMapGraphic, Transferable, Serializable
Direct Known Subclasses:
IlvMapAnnotationToolBar.MapMarker

public class IlvMapMarker
extends IlvMarker
implements IlvMapGraphic

IlvMapMarker is an IlvMarker that reads its attributes from an IlvPointStyle object.

Since:
JViews 7.5
See Also:
Serialized Form

Field Summary
static int IlvMarkerCharacter
          The Character marker type.
static int IlvMarkerImage
          The Image marker type.
 
Fields inherited from class ilog.views.graphic.IlvMarker
IlvMarkerCircle, IlvMarkerCross, IlvMarkerDiamond, IlvMarkerFilledCircle, IlvMarkerFilledDiamond, IlvMarkerFilledSquare, IlvMarkerFilledTriangle, IlvMarkerPlus, IlvMarkerSquare, IlvMarkerTriangle
 
Constructor Summary
IlvMapMarker()
          Constructs an IlvMapMarker instance.
IlvMapMarker(IlvInputStream stream)
          Reads an IlvMapMarker object from an IlvInputStream.
IlvMapMarker(IlvMapMarker source)
          Creates an IlvMapMarker instance by copying an existing one.
IlvMapMarker(IlvPoint p)
          Constructs a IlvMapMarker at point p.
IlvMapMarker(IlvPoint p, int type)
          Constructs an IlvMapMarker instance from an IlvPoint instance and a type.
IlvMapMarker(IlvPoint p, int type, int size)
          Constructs an IlvMapMarker from an IlvPoint instance, a type, and a size.
 
Method Summary
 IlvGraphic copy()
          Copies the objects.
 IlvGraphic copy(IlvCoordinateTransformation transform)
          Copies the element and applies the specified transformation to its coordinates.
 void draw(Graphics dst, IlvTransformer t)
          Draws the object.
 Color getForegound()
          Retrieves the foreground from the style.
 Color getForeground()
          Retrieves the foreground from the style.
 int getSize()
          Retrieves the size from the style.
 IlvMapStyle getStyle()
          Retrieves the IlvMapStyle object attached to this graphic.
 int getType()
          Retrieves the type from the style.
 IlvMapGeometry makeGeometry()
          Returns an IlvMapPoint geometry.
 void setForeground(Color color)
          Sets the foreground in the IlvPointStyle object.
 void setSize(int size)
          Sets the size in the IlvPointStyle object.
 void setStyle(IlvMapStyle style)
          Implements the IlvMapGraphic interface.
 void setType(int type)
          Sets the type in the IlvPointStyle object.
 void write(IlvOutputStream stream)
          Writes this IlvMapGraphicPath object to the IlvOutputStream passed as parameter
 
Methods inherited from class ilog.views.graphic.IlvMarker
applyTransform, boundingBox, DrawMarker, getPoint, makeSelection, setPoint, zoomable
 
Methods inherited from class ilog.views.IlvGraphic
addActionListener, addNamedPropertyListener, boundingBox, contains, getAndAssociateObjectInteractor, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getIntersectionWithOutline, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, hasProperty, inside, intersects, isDataFlavorSupported, isEditable, isInApplyToObject, isMovable, isPersistent, isSelectable, isVisible, move, move, moveResize, notifyObjectInteractorToManager, processActionEvent, reDraw, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setBackground, setEditable, setFillOn, setGraphicBag, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipText, setVisible, toString, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IlvMarkerCharacter

public static final int IlvMarkerCharacter
The Character marker type.

Since:
JViews 7.5
See Also:
Constant Field Values

IlvMarkerImage

public static final int IlvMarkerImage
The Image marker type.

Since:
JViews 8.0
See Also:
Constant Field Values
Constructor Detail

IlvMapMarker

public IlvMapMarker()
Constructs an IlvMapMarker instance.


IlvMapMarker

public IlvMapMarker(IlvPoint p)
Constructs a IlvMapMarker at point p.

Parameters:
p - The marker center point.

IlvMapMarker

public IlvMapMarker(IlvMapMarker source)
Creates an IlvMapMarker instance by copying an existing one.

Parameters:
source - The source marker.

IlvMapMarker

public IlvMapMarker(IlvPoint p,
                    int type)
Constructs an IlvMapMarker instance from an IlvPoint instance and a type.

Parameters:
p - The point to place the marker.
type - The type of the shape of the marker.

IlvMapMarker

public IlvMapMarker(IlvPoint p,
                    int type,
                    int size)
Constructs an IlvMapMarker from an IlvPoint instance, a type, and a size.

Parameters:
p - The point to place the marker.
type - The type of the marker shape.
size - The size of the marker.

IlvMapMarker

public IlvMapMarker(IlvInputStream stream)
             throws IlvReadFileException
Reads an IlvMapMarker object from an IlvInputStream.

Parameters:
stream - The stream to read from.
Throws:
IlvReadFileException - if there is a problem reading from stream.
Method Detail

write

public void write(IlvOutputStream stream)
           throws IOException
Writes this IlvMapGraphicPath object to the IlvOutputStream passed as parameter

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvMarker
Parameters:
stream - The stream to write to.
Throws:
IOException - if there is a problem writing to stream.

getForegound

public Color getForegound()
Retrieves the foreground from the style.

Returns:
The foreground as set in the IlvPointStyle object.

setForeground

public void setForeground(Color color)
Sets the foreground in the IlvPointStyle object.

Overrides:
setForeground in class IlvMarker
Parameters:
color - The foreground to be set in the IlvPointStyle object.
See Also:
IlvGraphic.draw(Graphics, IlvTransformer), IlvGraphic.setBackground(Color), IlvGraphic.setFillOn(boolean), IlvGraphic.setStrokeOn(boolean), IlvGraphic

getSize

public int getSize()
Retrieves the size from the style.

Overrides:
getSize in class IlvMarker
Returns:
The size as set in the IlvPointStyle object.
See Also:
IlvMarker.setSize(int)

setSize

public void setSize(int size)
Sets the size in the IlvPointStyle object.

Overrides:
setSize in class IlvMarker
Parameters:
size - The size to be set in the IlvPointStyle object.
See Also:
IlvMarker.getSize()

getType

public int getType()
Retrieves the type from the style.

Overrides:
getType in class IlvMarker
Returns:
The type as set in the IlvPointStyle object.
See Also:
IlvMarker.setType(int)

setType

public void setType(int type)
Sets the type in the IlvPointStyle object.

Overrides:
setType in class IlvMarker
Parameters:
type - The type to be set in the IlvGraphicPathStyle object.
See Also:
IlvMarker.getType(), IlvMarker.IlvMarkerSquare, IlvMarker.IlvMarkerDiamond, IlvMarker.IlvMarkerCircle, IlvMarker.IlvMarkerCross, IlvMarker.IlvMarkerPlus, IlvMarker.IlvMarkerFilledSquare, IlvMarker.IlvMarkerFilledCircle, IlvMarker.IlvMarkerFilledDiamond, IlvMarker.IlvMarkerTriangle, IlvMarker.IlvMarkerFilledTriangle

setStyle

public void setStyle(IlvMapStyle style)
Implements the IlvMapGraphic interface.

Specified by:
setStyle in interface IlvMapGraphic
Parameters:
style - The IlvMapStyle to set. Must be an IlvPointStyle instance.

getStyle

public IlvMapStyle getStyle()
Retrieves the IlvMapStyle object attached to this graphic. If no style has been set, a new IlvPointStyle instance is created.

Specified by:
getStyle in interface IlvMapGraphic
Returns:
The IlvMapStyle object attached to this graphic. This must be an IlvPointStyle instance.

copy

public IlvGraphic copy()
Copies the objects.

Overrides:
copy in class IlvMarker
Returns:
A new IlvMapMarker instance.
See Also:
IlvGraphic

copy

public IlvGraphic copy(IlvCoordinateTransformation transform)
                throws IlvCoordinateTransformationException
Copies the element and applies the specified transformation to its coordinates.

Specified by:
copy in interface IlvMapGraphic
Parameters:
transform - Transformation to apply.
Returns:
A new copied object.
Throws:
IlvCoordinateTransformationException
See Also:
IlvMapGraphic.copy(ilog.views.maps.srs.coordtrans.IlvCoordinateTransformation)

getForeground

public Color getForeground()
Retrieves the foreground from the style.

Overrides:
getForeground in class IlvMarker
Returns:
The foreground.

draw

public void draw(Graphics dst,
                 IlvTransformer t)
Draws the object.

Overrides:
draw in class IlvMarker
Parameters:
dst - The destination Graphics.
t - The transformation used to draw the object.
See Also:
IlvGraphic.boundingBox(ilog.views.IlvTransformer), IlvGraphic.zoomable(), IlvGraphic

makeGeometry

public IlvMapGeometry makeGeometry()
Returns an IlvMapPoint geometry.

Specified by:
makeGeometry in interface IlvMapGraphic
Returns:
An IlvMapPoint geometry.
Since:
JViews 8.0
See Also:
IlvMapGraphic.makeGeometry()


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