Package quadbase.util
Class PolyLine
java.lang.Object
quadbase.util.PolyLine
This class contains methods for modifying the properties of a chart poly-line. A poly-line is a
set of connected line segments.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Enumerationelements()Returns the list of all coordinates that define the poly-line.final ColorgetColor()Returns the color of the poly-line.final intReturns the line style of the poly-line.final VectorReturns a Vector containing all the Point_3D / Point_2D objects that define the poly-line.final intReturns the thickness of the poly-line.final booleanReturns whether the arrow at end point of poly-line is visible.final booleanReturns whether the arrow at start point of poly-line is visible.final booleanReturns whether the poly-line is filled.static PolyLineCreated for internal use onlyfinal voidset(Enumeration e, Color c) Defines the coordinates for the poly-line.final voidset(Enumeration e, Color color, int thickness, int style, boolean fillArea, boolean startArrow, boolean endArrow) Defines the coordinates for the poly-line.final voidsetArrowAtEndPointVisible(boolean state) Sets whether the arrow at end point of poly-line is visible.final voidsetArrowAtStartPointVisible(boolean state) Sets whether the arrow at start point of poly-line is visible.final voidSets the color of the poly-line.final voidsetFillArea(boolean state) Sets whether the poly-line is filled.final voidsetLineStyle(int s) Sets the line style of the poly-line.final voidsetThickness(int t) Sets the thickness of the poly-line.final voidwrite(DataOutput out) Created for internal use only
-
Constructor Details
-
PolyLine
public PolyLine() -
PolyLine
Copy Constructor.- Parameters:
p- The input PolyLine object.
-
-
Method Details
-
getColor
Returns the color of the poly-line.- Returns:
- The Color object.
-
setColor
Sets the color of the poly-line.- Parameters:
c- The Color object.
-
isFillArea
public final boolean isFillArea()Returns whether the poly-line is filled.- Returns:
- The state.
-
setFillArea
public final void setFillArea(boolean state) Sets whether the poly-line is filled.- Parameters:
state- The new state.
-
getThickness
public final int getThickness()Returns the thickness of the poly-line.- Returns:
- The thickness.
-
setThickness
public final void setThickness(int t) Sets the thickness of the poly-line.- Parameters:
t- The thickness.
-
getLineStyle
public final int getLineStyle()Returns the line style of the poly-line.- Returns:
- The line style.
-
setLineStyle
public final void setLineStyle(int s) Sets the line style of the poly-line.- Parameters:
s- The line style.
-
isArrowAtStartPointVisible
public final boolean isArrowAtStartPointVisible()Returns whether the arrow at start point of poly-line is visible.- Returns:
- The state.
-
setArrowAtStartPointVisible
public final void setArrowAtStartPointVisible(boolean state) Sets whether the arrow at start point of poly-line is visible.- Parameters:
state- The new state.
-
isArrowAtEndPointVisible
public final boolean isArrowAtEndPointVisible()Returns whether the arrow at end point of poly-line is visible.- Returns:
- The state.
-
setArrowAtEndPointVisible
public final void setArrowAtEndPointVisible(boolean state) Sets whether the arrow at end point of poly-line is visible.- Parameters:
state- The new state.
-
elements
Returns the list of all coordinates that define the poly-line. Each object in the list is of type quadbase.util.Point_3D / Point_2D.- Returns:
- The Enumeration object containing the coordinates of the poly-line.
- See Also:
-
set
Defines the coordinates for the poly-line.- Parameters:
e- The list of Point_3D objects that define the poly-line. / The list of Point_2D objects which relative to the canvas (0.0 to 1.0, Lower-left corner is 0.0).c- The color of the poly-line.- See Also:
-
set
public final void set(Enumeration e, Color color, int thickness, int style, boolean fillArea, boolean startArrow, boolean endArrow) Defines the coordinates for the poly-line.- Parameters:
e- The list of Point_3D objects that define the poly-line. / The list of Point_2D objects which relative to the canvas (0.0 to 1.0, Lower-left corner is 0.0).color- The color of the poly-line.thickness- The thickness of the poly-line.style- The line style of the poly-line.fillArea- The state of fill area.startArrow- The state of start arrow.endArrow- The state of end arrow.- See Also:
-
getPoints
Returns a Vector containing all the Point_3D / Point_2D objects that define the poly-line.- Returns:
- The coordinates of the poly-line in a Vector.
-
write
Created for internal use only- Throws:
IOException
-
read
Created for internal use only- Throws:
IOException
-