|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectli.netcat.chart.util.AbstractPart
li.netcat.chart.util.BorderPart
Represents a border that looks for example like this:
The gray background, the solid line and the insets
between legend part and line are defined by this BorderPart
.
In contrast to Swing, the look of the border is defined by a Pen
.
Field Summary |
Fields inherited from class li.netcat.chart.util.AbstractPart |
BACKGROUND, FOREGROUND, PERSPECTIVE |
Constructor Summary | |
BorderPart(Part part)
Constructs a new BorderPart around the given Part using the pen Pen.getDefaultCapSquare() ,
no background and default insets. |
|
BorderPart(Part part,
Pen pen)
Constructs a new BorderPart around the given Part using the given pen. |
Method Summary | |
java.awt.Paint |
getBackgroundPaint()
Returns the background paint. |
int |
getBottom()
Returns the bottom inset. |
Layout |
getLayout(java.awt.Graphics g)
Returns an instance of a layout that is able to report the bounds of this part and is able to paint this part. |
int |
getLeft()
Returns the left inset. |
Part |
getPart()
Returns the wrapped Part . |
Pen |
getPen()
Returns the pen that is used to paint the border and the background. |
int |
getRight()
Returns the right inset. |
int |
getTop()
Returns the top inset. |
void |
setBackgroundPaint(java.awt.Paint paint)
Sets the background paint. |
void |
setChart(Chart chart)
Sets the container of this part. |
void |
setInsets(int top,
int left,
int bottom,
int right)
Sets the insets to this border part. |
void |
setPart(Part part)
Sets the wrapped Part . |
void |
setPen(Pen pen)
Sets the pen that is used to paint the borderand the background. |
Methods inherited from class li.netcat.chart.util.AbstractPart |
getChart, getPerspective, invalidate, setPerspective |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BorderPart(Part part)
BorderPart
around the given Part
using the pen Pen.getDefaultCapSquare()
,
no background and default insets.
part
- The wrapped part, not null
.public BorderPart(Part part, Pen pen)
BorderPart
around the given Part
using the given pen. The fill and draw
colors are defined by the pen.
part
- The wrapped part, not null
.pen
- The pen that specifies the border and the background paint, not null
.Method Detail |
public Part getPart()
Part
.
Part
, it's never null
.public void setPart(Part part)
Part
.
part
- The wrapped part, not null
.public java.awt.Paint getBackgroundPaint()
null
.
null
if no background is specified.public void setBackgroundPaint(java.awt.Paint paint)
public Pen getPen()
null
.public void setPen(Pen pen)
pen
- The pen that paints the border, not null
.public int getTop()
public int getLeft()
public int getBottom()
public int getRight()
public void setInsets(int top, int left, int bottom, int right)
top
- The top inset.left
- The left inset.bottom
- The bottom inset.right
- The right inset.public void setChart(Chart chart)
Part
Part
is added to a chart by calling
chart.setContent(part);
. Implementers of parts must keep this reference
and invoke for example chart.invalidate()
when a property in this part changes.
setChart
in interface Part
setChart
in class AbstractPart
public Layout getLayout(java.awt.Graphics g)
Part
g
- The relevant graphics object.
null
.
|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |