|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
jimm.datavision.Element
jimm.datavision.Line
public class Line
A line is a visual report element. Lines are used in field Borders and independently.
Note that currently, line thickness is ignored in the Java GUI (but not in layout engines such as the LaTeXLE).
| Field Summary | |
|---|---|
protected java.awt.Color |
color
|
protected static java.awt.Color |
DEFAULT_COLOR
|
protected Point[] |
points
|
protected double |
thickness
|
| Fields inherited from class jimm.datavision.Element |
|---|
report, section, visible |
| Constructor Summary | |
|---|---|
Line(Report report,
Section section,
double thickness,
java.awt.Color color,
boolean visible)
Constructor. |
|
Line(Report report,
Section section,
double thickness,
java.awt.Color color,
boolean visible,
Point p0,
Point p1)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addEndPoint(double x,
double y)
Adds an end point to the line. |
java.awt.Color |
getColor()
Returns the line's color. |
Point |
getPoint(int index)
Returns one of the two end points of the line. |
double |
getThickness()
Returns the line thickness. |
double |
length()
Returns the length of the line. |
void |
setColor(java.awt.Color c)
Sets the line's color. |
void |
setPoint(Point newPoint,
int index)
Sets one of the two end points. |
void |
setThickness(double newThickness)
Sets the line thickness. |
java.lang.String |
toString()
Returns a string representation of this line. |
void |
writeXML(XMLWriter out)
Writes this line as an XML tag. |
| Methods inherited from class jimm.datavision.Element |
|---|
getReport, getSection, isVisible, setSection, setVisible, update |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final java.awt.Color DEFAULT_COLOR
protected double thickness
protected Point[] points
protected java.awt.Color color
| Constructor Detail |
|---|
public Line(Report report,
Section section,
double thickness,
java.awt.Color color,
boolean visible)
report - the report containing this linesection - the section containing this linethickness - the line thicknesscolor - may be nullvisible - show/hide flag
public Line(Report report,
Section section,
double thickness,
java.awt.Color color,
boolean visible,
Point p0,
Point p1)
report - the report containing this linesection - the section containing this linethickness - the line thicknesscolor - may be nullvisible - show/hide flagp0 - one end point of the linep1 - the other end point of the line| Method Detail |
|---|
public void addEndPoint(double x,
double y)
x - the x coordinatey - the y coordinatepublic double getThickness()
public void setThickness(double newThickness)
newThickness - the new line thicknesspublic Point getPoint(int index)
index - either 0 or 1
public void setPoint(Point newPoint,
int index)
newPoint - a pointindex - either 0 or 1public double length()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.awt.Color getColor()
null.
public void setColor(java.awt.Color c)
null, then the
color is set to DEFAULT_COLOR.
c - new line color; if null, color is set to
DEFAULT_COLORpublic void writeXML(XMLWriter out)
writeXML in interface WriteablewriteXML in class Elementout - a writer that knows how to write XML
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||