Package org.faceless.graph2
Class StripedPaint
- java.lang.Object
-
- org.faceless.graph2.StripedPaint
-
-
Constructor Summary
Constructors Constructor Description StripedPaint()
Create a new StripedPaint
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setAlternateAxis(int altaxis)
Forback walls
, set the secondary axis against which lines perpendicular to the stripes are drawn.void
setAxis(int newaxis)
Forback walls
, set the primary axis which the stripes are against.void
setBoxed(boolean boxed)
When lines are being painted, set whether those lines should form a "box" around the wall.void
setDash(double[] dash)
Set the dash pattern to use when painting the stripes.void
setFillPaint(Paint[] paint)
Set the colors to stripe the wall.void
setLineAxes(boolean primary, boolean alternate)
When lines are being painted, set which axes they should be painted on.void
setLineColor(Color color)
Set the color of the lines to be drawn between stripes.void
setLineThickness(double thickness)
Set the thickness of lines to be drawnString
toString()
-
-
-
Method Detail
-
setFillPaint
public void setFillPaint(Paint[] paint)
Set the colors to stripe the wall. The first color will bepaint[0]
, thenpaint[1]
and so on, with the pattern repeating if there are more stripes than paints. An empty array or a value ofnull
means the walls will not be painted - only lines in thelinecolor
will be drawn- Parameters:
paint
- the array of Paints to paint the wall with
-
setBoxed
public void setBoxed(boolean boxed)
When lines are being painted, set whether those lines should form a "box" around the wall. This is the default- See Also:
setLineColor(java.awt.Color)
-
setLineColor
public void setLineColor(Color color)
Set the color of the lines to be drawn between stripes.- Parameters:
color
- the color
-
setLineAxes
public void setLineAxes(boolean primary, boolean alternate)
When lines are being painted, set which axes they should be painted on. The default is both axes
-
setDash
public void setDash(double[] dash)
Set the dash pattern to use when painting the stripes. A zero-length or null array means the lines will not be dashed. Note this impliesunboxed
- Parameters:
dash
- the dash array- See Also:
Style.setLineDash(double[])
-
setLineThickness
public void setLineThickness(double thickness)
Set the thickness of lines to be drawn- Parameters:
thickness
- the thickness.- See Also:
Style.setLineThickness(double)
-
setAxis
public void setAxis(int newaxis)
Forback walls
, set the primary axis which the stripes are against.- Parameters:
newaxis
- one ofAxis.TOP
,Axis.RIGHT
,Axis.BOTTOM
orAxis.LEFT
.
-
setAlternateAxis
public void setAlternateAxis(int altaxis)
Forback walls
, set the secondary axis against which lines perpendicular to the stripes are drawn.- Parameters:
altaxis
- one ofAxis.TOP
,Axis.RIGHT
,Axis.BOTTOM
,Axis.LEFT
or -1 to not draw any perpendicular stripes.
-
-