GeoAPI 1.0
Build 2004-05-18

org.opengis.go.display.primitive
Interface GraphicCurveSegment

All Superinterfaces:
Graphic

public interface GraphicCurveSegment
extends Graphic

Defines common abstractions for implementations of 1-dimensional lines made up of one or more line segments and of 2-dimensional lines made up of a closed set of three or more line segments. The isClosed() method provides the distinction.

Version:
$Revision: 1.6 $, $Date: 2004/03/10 20:36:45 $
Author:
OpenGIS® consortium

Method Summary
 void addPoint(DirectPosition coord)
          Appends the given position to the graphic linestring's array of positions.
 void deletePoint(int index)
          Removes the postion at the specified index from the array of positions.
 CurveSegment getCurveSegment()
          Returns the geometry based on ISO 19107 geometric forms.
 PathType getPathType()
          Retrieves the methods that is used in computing the "in-between" pixels between vertices when this object is rendered on the screen.
 DirectPosition getPoint(int index)
          Returns the position at the specified index in the array of positions.
 PointArray getPointArray()
          Returns this GraphicCurveSegment's set of positions as a PointArray.
 DirectPosition[] getPoints()
          Returns the positions that make up the line segments.
 void insertPoint(int index, DirectPosition coord)
          Inserts the given position at the specified index in the array of positions.
 boolean isAllowingNewVertices()
          Indicates whether clicking on an edge of this graphic linestring should insert a new vertex at that location when the object is in edit mode.
 boolean isClosed()
          Returns the boolean flag indicating whether the graphic linestring is closed (representing a polygon) or open (a graphic linestring).
 void setAllowingNewVertices(boolean newValue)
          Sets the boolean that indicates whether clicking on an edge of this graphic linestring should insert a new vertex at that location.
 void setClosed(boolean closed)
          Sets the graphic linestring open (false) or closed (true).
 void setCurveSegment(CurveSegment curveSegment)
          Sets the geometry based on ISO 19107 geometric forms.
 void setPathType(PathType pathType)
          Sets the method that is used in computing the "in-between" pixels between vertices when this object is rendered on the screen.
 void setPoint(int index, DirectPosition coord)
          Replaces the position at the specified index in the array of positions with the new, specified position.
 void setPointArray(PointArray pointArray)
          Sets this GraphicCurveSegment's set of positions to the given PointArray.
 void setPoints(DirectPosition[] coords)
          Sets the positions that make up the line segments.
 
Methods inherited from interface Graphic
addGraphicListener, cloneGraphic, dispose, fireGraphicEvent, getClientProperty, getGraphicStyle, getName, getParent, isPassingEventsToParent, isShowingAnchorHandles, isShowingEditHandles, putClientProperty, refresh, removeGraphicListener, setName, setParent, setPassingEventsToParent, setShowingAnchorHandles, setShowingEditHandles
 

Method Detail

setCurveSegment

void setCurveSegment(CurveSegment curveSegment)
Sets the geometry based on ISO 19107 geometric forms.

Parameters:
curveSegment - a geometry CurveSegment.

getCurveSegment

CurveSegment getCurveSegment()
Returns the geometry based on ISO 19107 geometric forms.

Returns:
the geometry CurveSegment.

getPointArray

PointArray getPointArray()
Returns this GraphicCurveSegment's set of positions as a PointArray. The returned PointArray may or may not be identical to a PointArray passed in to the setPointArray method. It will definitely not be the same PointArray if any positions have been added, inserted, or deleted. Value is acquired from the underlying LineString geometry for this Graphic.

Returns:
the set of positions as a PointArray.

setPointArray

void setPointArray(PointArray pointArray)
Sets this GraphicCurveSegment's set of positions to the given PointArray. Any changes made to the given PointArray after calling this method may adversly affect this GraphicCurveSegment. Value is set on the underlying LineString geometry for this Graphic.

Parameters:
pointArray - The new set of positions.

getPoints

DirectPosition[] getPoints()
Returns the positions that make up the line segments. Value is acquired from the underlying LineString geometry for this Graphic.

Returns:
the array positions.

setPoints

void setPoints(DirectPosition[] coords)
Sets the positions that make up the line segments. Value is set on the underlying LineString geometry for this Graphic.

Parameters:
coords - the array positions.

addPoint

void addPoint(DirectPosition coord)
Appends the given position to the graphic linestring's array of positions. If the graphic linestring isClosed(), then the new position is added to the end of the array, before the duplicated start position. Value is set on the underlying LineString geometry for this Graphic.

Parameters:
coord - the postion to add.

deletePoint

void deletePoint(int index)
Removes the postion at the specified index from the array of positions. Value is deleted on the underlying LineString geometry for this Graphic.

Parameters:
index - the index of the position to remove.

getPoint

DirectPosition getPoint(int index)
Returns the position at the specified index in the array of positions. Value is acquired from the underlying LineString geometry for this Graphic.

Parameters:
index - the index of the position to return.
Returns:
the position at the given index.

insertPoint

void insertPoint(int index,
                 DirectPosition coord)
Inserts the given position at the specified index in the array of positions. Value is inserted on the underlying LineString geometry for this Graphic.

Parameters:
index - the index to insert the new position at.
coord - the position to insert.

setPoint

void setPoint(int index,
              DirectPosition coord)
Replaces the position at the specified index in the array of positions with the new, specified position. Value is set on the underlying LineString geometry for this Graphic.

Parameters:
index - the index of the position to replace.
coord - the position to store at the specified index.

isClosed

boolean isClosed()
Returns the boolean flag indicating whether the graphic linestring is closed (representing a polygon) or open (a graphic linestring).

Returns:
whether or not the graphic linestring is closed.

setClosed

void setClosed(boolean closed)
Sets the graphic linestring open (false) or closed (true). If the graphic linestring is closed, then the start position will be duplicated and added to the end of the array of positions.

Parameters:
closed - the flag indicating closed (true) or open (false).

isAllowingNewVertices

boolean isAllowingNewVertices()
Indicates whether clicking on an edge of this graphic linestring should insert a new vertex at that location when the object is in edit mode.


setAllowingNewVertices

void setAllowingNewVertices(boolean newValue)
Sets the boolean that indicates whether clicking on an edge of this graphic linestring should insert a new vertex at that location.


setPathType

void setPathType(PathType pathType)
Sets the method that is used in computing the "in-between" pixels between vertices when this object is rendered on the screen.

Parameters:
pathType - The new path type. This must be one of the static constants in the PathType class or one of its subclasses.

getPathType

PathType getPathType()
Retrieves the methods that is used in computing the "in-between" pixels between vertices when this object is rendered on the screen.


GeoAPI 1.0
Build 2004-05-18

Symbols, terms and definitions
Copyright OpenGIS® Consortium