|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graphics.device.AbstractDevice
Class AbstractDevice is the base class for all current
Device implementations and handles Format
objects in the same way for all derived classes.
This abstract class declares protected fields to hold
these various Format objects. It implements all relevant
getter() and setter() methods for this purpose.
| Field Summary | |
protected FontFormat |
fontFormat
instance variable for the FontFormat used by the
Device |
protected java.lang.Object[] |
fontFormatData
instance variable for the FontFormat rendering data used
by the Device |
protected PaintFormat |
paintFormat
instance variable for the PaintFormat used by the
Device |
protected java.lang.Object[] |
paintFormatData
instance variable for the PaintFormat rendering data used
by the Device |
protected StrokeFormat |
strokeFormat
instance variable for the StrokeFormat used by the
Device |
protected java.lang.Object[] |
strokeFormatData
instance variable for the StrokeFormat rendering data used
by the Device |
protected boolean |
visibleFont
instance variable that indicated whether the current fontformat / fontformat rendering data is visible or not |
protected boolean |
visiblePaint
instance variable that indicated whether the current paintformat / paintformat rendering data is visible or not |
protected boolean |
visibleStroke
instance variable that indicates whether the current strokeformat / strokeformat rendering data is visible or not |
| Fields inherited from interface com.tensegrity.graphics.device.Device |
DRAW_FILL, DRAW_OUTLINE |
| Constructor Summary | |
AbstractDevice()
Constructor for AbstractDevice. |
|
| Method Summary | |
FontFormat |
getFontFormat()
Returns the FontFormat currently used for text drawing
operations. |
PaintFormat |
getPaintFormat()
Returns the current PaintFormat the Device uses
to fill areas. |
StrokeFormat |
getStrokeFormat()
Returns the current StrokeFormat the Device
uses for drawing lines. |
void |
setFontFormat(FontFormat fontFormat)
Sets the FontFormat that will be used for all
subsequent text drawing operations. |
void |
setFontFormatData(java.lang.Object[] fontFormatData)
Because all formats get pooled, illustrators and users need an easy way to change them. |
void |
setPaintFormat(PaintFormat paintFormat)
Sets the PaintFormat the Device should use
for filling areas. |
void |
setPaintFormatData(java.lang.Object[] paintFormatData)
Sets the PaintFormat rendering data the Device
should use for filling areas.
|
void |
setStrokeFormat(StrokeFormat strokeFormat)
Sets the StrokeFormat the Device should use for
drawing lines or borders around rectangles and polygons. |
void |
setStrokeFormatData(java.lang.Object[] strokeFormatData)
Sets the StrokeFormat rendering data the Device
should use for drawing lines or borders around rectangles and polygons.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.tensegrity.graphics.device.Device |
clearClip, clearRect, clipRect, dispose, drawArc, drawLine, drawOval, drawPolygon, drawPolyline, drawRect, drawRoundRect, drawString, getClipBounds, getClipBounds, getTransform, hitClip, initiate, isAntialiasing, isInhibitLT2RBFlip, isInhibitYFlip, isPrinting, setAntialiasing, setClip, setClipBounds, setInhibitLT2RBFlip, setInhibitYFlip, setIsPrinting, setPaintMode, setTransform, setXORMode, translate |
| Field Detail |
protected StrokeFormat strokeFormat
StrokeFormat used by the
Device
protected java.lang.Object[] strokeFormatData
StrokeFormat rendering data used
by the Device
protected boolean visibleStroke
protected PaintFormat paintFormat
PaintFormat used by the
Device
protected java.lang.Object[] paintFormatData
PaintFormat rendering data used
by the Device
protected boolean visiblePaint
protected FontFormat fontFormat
FontFormat used by the
Device
protected java.lang.Object[] fontFormatData
FontFormat rendering data used
by the Device
protected boolean visibleFont
| Constructor Detail |
public AbstractDevice()
| Method Detail |
public StrokeFormat getStrokeFormat()
DeviceStrokeFormat the Device
uses for drawing lines.
getStrokeFormat in interface DeviceStrokeFormat or nullpublic void setStrokeFormat(StrokeFormat strokeFormat)
DeviceStrokeFormat the Device should use for
drawing lines or borders around rectangles and polygons. When invoking
this method the StrokeFormat is used instead of the color
value the Device currently uses. If the Device
should use the current color value, this method has to be called with a
null parameter.
setStrokeFormat in interface DevicestrokeFormat - the StrokeFormat to use when drawing
lines or borders, or nullpublic void setStrokeFormatData(java.lang.Object[] strokeFormatData)
DeviceStrokeFormat rendering data the Device
should use for drawing lines or borders around rectangles and polygons.
When invoking this method the StrokeFormat is used instead of
the color value the Device currently uses. If the
Device should use the current color value, this method has
to be called with a null parameter.
The given array has to consist of three Integer objects.
The meaning of the value is defined by its position in the array. The
following list specifies the valid index positions:
setStrokeFormatData in interface DevicestrokeFormatData - the StrokeFormat rendering data to
use when drawing lines or borders, or nullDevice.setStrokeFormatData(java.lang.Object[])public PaintFormat getPaintFormat()
DevicePaintFormat the Device uses
to fill areas.
getPaintFormat in interface DevicePaintFormat or nullDevice.getPaintFormat()public void setPaintFormat(PaintFormat paintFormat)
DevicePaintFormat the Device should use
for filling areas. If the current color should be used, this method
has to be called with a null parameter.
setPaintFormat in interface DevicepaintFormat - the PaintFormat to use when filling
areas, or nullpublic void setPaintFormatData(java.lang.Object[] paintFormatData)
DevicePaintFormat rendering data the Device
should use for filling areas.
When invoking this method the PaintFormat is used instead of the
color value the Device> currently uses. If the
Device should use the current color value, this method has
to be called with a null parameter.
Overall eight values of the given array are estimated.
REVIEWJAVADOC: Device.java : what do you mean by "estimated"???
The meaning of each value is defined by its position in the array. The following
table specifies the valid index positions and object types:
| Index | Type |
|---|---|
RenderingData.VALUEINDEX_PAINT_STYLE |
Integer |
RenderingData.VALUEINDEX_PAINT_COLORBACK |
Integer |
RenderingData.VALUEINDEX_PAINT_COLORFORE |
Integer |
RenderingData.VALUEINDEX_PAINT_GRADIENTTYPE |
Integer |
RenderingData.VALUEINDEX_PAINT_PATTERNTYPE |
Integer |
RenderingData.VALUEINDEX_PAINT_TEXTURE |
Texture |
RenderingData.VALUEINDEX_PAINT_TRANSPARENCY |
Integer |
RenderingData.VALUEINDEX_PAINT_TRANSPARENT |
Boolean |
setPaintFormatData in interface DevicepaintFormatData - the PaintFormat rendering data to
use when filling areas, or nullpublic FontFormat getFontFormat()
DeviceFontFormat currently used for text drawing
operations.
getFontFormat in interface DeviceFontFormatpublic void setFontFormat(FontFormat fontFormat)
DeviceFontFormat that will be used for all
subsequent text drawing operations. When the default color and font
of the Device should be used, the method has to be called
with a null parameter.
setFontFormat in interface DevicefontFormat - the FontFormat to use when drawing text,
or nullpublic void setFontFormatData(java.lang.Object[] fontFormatData)
DeviceFontFormat rendering data that will be used for all
subsequent text drawing operations. When the Device
should use the current color value and the default font of the
device, however, this method has to be called with a null parameter.
At this time, four values of the given array are estimated.
REVIEWJAVADOC: There is that word "estimated" again!!!
The meaning
of each value is defined by its position in the array. The following
list specifies the valid index positions and object types:
| Index | Type |
|---|---|
RenderingData.VALUEINDEX_FONT_SIZE |
Integer |
RenderingData.VALUEINDEX_FONT_WEIGHT |
Integer |
RenderingData.VALUEINDEX_FONT_FAMILY |
String |
RenderingData.VALUEINDEX_FONT_ITALIC |
Boolean |
setFontFormatData in interface DevicefontFormatData - the FontFormat rendering data to use
when drawing text, or null
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||