|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VisualItem
Base interface for representing a visual item, a data object with a
visual interactive form. VisualItems are Tuple instances, and so
can support any number of data fields in a backing data table. VisualItems
also support data fields specific to visualization, such as a location,
bounding box, colors, size, and font. The VisualItem interface provides
convenience methods for accessing these common visual properties, but
the underlying mechanism is the same as any Tuple -- data stored in
a tabular format. Just as all Tuple instances are backed by a data Table,
each VisualItem is backed by a VisualTable. Additionally, each VisualItem
is associated with one and only one Visualization
.
VisualItems are only responsible for storing their visual data
properties. The final visual appearance of an item is determined by
a Renderer
, which contains instructions for drawing
the item. The Renderer to use for a given item is decided by the
RendererFactory
associated with the item's
backing Visualization.
Finally, actually setting the visual properties of VisualItems is
commonly done by the many Action
modules available
for processing visual data. This includes spatial layout as well as
color, size, and font assignment.
Field Summary | |
---|---|
static java.lang.String |
BOUNDS
The bounds data field |
static java.lang.String |
DOI
The doi data field |
static java.lang.String |
ENDFILLCOLOR
The end fill color data field |
static java.lang.String |
ENDFONT
The end font data field |
static java.lang.String |
ENDPOLYGON
The end polygon data field. |
static java.lang.String |
ENDSIZE
The end size data field |
static java.lang.String |
ENDSTROKECOLOR
The end stroke color data field |
static java.lang.String |
ENDTEXTCOLOR
The end text color data field |
static java.lang.String |
ENDVISIBLE
The end visible data field |
static java.lang.String |
ENDX
The end x data field |
static java.lang.String |
ENDX2
The end x2 data field. |
static java.lang.String |
ENDY
The end y data field |
static java.lang.String |
ENDY2
The end y2 data field. |
static java.lang.String |
EXPANDED
The expanded data field |
static java.lang.String |
FILLCOLOR
The fill color data field |
static java.lang.String |
FIXED
The fixed data field |
static java.lang.String |
FONT
The font data field |
static java.lang.String |
HIGHLIGHT
The highlight data field |
static java.lang.String |
HOVER
The hover data field |
static int |
IDX_VALIDATED
The column index of the validated data field. |
static java.lang.String |
INTERACTIVE
The interactive data field |
static java.lang.String |
LABEL
The label data field. |
static java.lang.String |
POLYGON
The polygon data field. |
static Schema |
SCHEMA
A permanent, locked copy of the base VisualItem schema |
static java.lang.String |
SHAPE
The shape data field |
static java.lang.String |
SIZE
The size data field |
static java.lang.String |
STARTFILLCOLOR
The start fill color data field |
static java.lang.String |
STARTFONT
The start font data field |
static java.lang.String |
STARTPOLYGON
The start polygon data field. |
static java.lang.String |
STARTSIZE
The start size data field |
static java.lang.String |
STARTSTROKECOLOR
The start stroke color data field |
static java.lang.String |
STARTTEXTCOLOR
The start text color data field |
static java.lang.String |
STARTVISIBLE
The start visible data field |
static java.lang.String |
STARTX
The start x data field |
static java.lang.String |
STARTX2
The start x2 data field. |
static java.lang.String |
STARTY
The start y data field |
static java.lang.String |
STARTY2
The start y2 data field. |
static java.lang.String |
STROKE
The stroke data field |
static java.lang.String |
STROKECOLOR
The stroke color data field |
static java.lang.String |
TEXTCOLOR
The text color data field |
static java.lang.String |
VALIDATED
The validated data field |
static java.lang.String |
VALUE
The value data field. |
static java.lang.String |
VISIBLE
The visible data field |
static java.lang.String |
X
The x data field |
static java.lang.String |
X2
The x2 data field. |
static java.lang.String |
Y
The y data field |
static java.lang.String |
Y2
The y2 data field. |
Method Summary | |
---|---|
java.awt.geom.Rectangle2D |
getBounds()
Get the bounding box for this VisualItem. |
double |
getDOI()
Get the degree-of-interest (DOI) value. |
int |
getEndFillColor()
Get the ending fill color of this item. |
java.awt.Font |
getEndFont()
Get the ending font for the item. |
double |
getEndSize()
Get the ending size value of the item. |
int |
getEndStrokeColor()
Get the ending stroke color of this item. |
int |
getEndTextColor()
Get the ending text color of this item. |
double |
getEndX()
Get the ending x-coordinate of this item. |
double |
getEndY()
Get the ending y-coordinate of this item. |
int |
getFillColor()
Get the current fill color of this item. |
java.awt.Font |
getFont()
Get the current font for the item. |
java.lang.String |
getGroup()
Get the primary data group of which this VisualItem is a member. |
Renderer |
getRenderer()
Get the Renderer instance for drawing this VisualItem. |
int |
getShape()
Get the current shape value of the item. |
double |
getSize()
Get the current size value of the item. |
TupleSet |
getSourceData()
Returns the original backing data set from which this VisualItem is derived. |
Tuple |
getSourceTuple()
Returns the original backing data tuple from which this VisualItem is derived. |
int |
getStartFillColor()
Get the starting fill color of this item. |
java.awt.Font |
getStartFont()
Get the starting font for the item. |
double |
getStartSize()
Get the starting size value of the item. |
int |
getStartStrokeColor()
Get the starting stroke color of this item. |
int |
getStartTextColor()
Get the starting text color of this item. |
double |
getStartX()
Get the starting x-coordinate of this item. |
double |
getStartY()
Get the starting y-coordinate of this item. |
java.awt.BasicStroke |
getStroke()
Get the current stroke used to draw lines and shape outlines. |
int |
getStrokeColor()
Get the current stroke color of this item. |
int |
getTextColor()
Get the current text color of this item. |
Visualization |
getVisualization()
Get the backing Visualization of which this VisualItem is a part. |
double |
getX()
Get the current x-coordinate of this item. |
double |
getY()
Get the current y-coordinate of this item. |
boolean |
isEndVisible()
Indictes if the end visible flag is set to true. |
boolean |
isExpanded()
Indicates this item is expanded. |
boolean |
isFixed()
Indicates if the item is fixed, and so will not have its position changed by any layout or distortion actions. |
boolean |
isHighlighted()
Indicates if the item is highlighted. |
boolean |
isHover()
Indicates if the item currently has the mouse pointer over it. |
boolean |
isInGroup(java.lang.String group)
Indicates if this item is a member of a given group. |
boolean |
isInteractive()
Indicates if this item is interactive, meaning it can potentially respond to mouse and keyboard input events. |
boolean |
isStartVisible()
Indicates if the start visible flag is set to true. |
boolean |
isValidated()
Indicates if this VisualItem is currently validated. |
boolean |
isVisible()
Indicates if this VisualItem is currently set to be visible. |
void |
render(java.awt.Graphics2D g)
Render this item to the given graphics context. |
void |
setBounds(double x,
double y,
double w,
double h)
Set the bounding box for this item. |
void |
setDOI(double doi)
Set the degree-of-interest (DOI) value. |
void |
setEndFillColor(int color)
Set the ending fill color of this item. |
void |
setEndFont(java.awt.Font font)
Set the ending font for the item. |
void |
setEndSize(double size)
Set the ending size value of the item. |
void |
setEndStrokeColor(int color)
Set the ending stroke color of this item. |
void |
setEndTextColor(int color)
Set the ending text color of this item. |
void |
setEndVisible(boolean value)
Set the end visible flag. |
void |
setEndX(double x)
Set the ending x-coordinate of this item. |
void |
setEndY(double y)
Set the ending y-coordinate of this item. |
void |
setExpanded(boolean value)
Set the expanded flag. |
void |
setFillColor(int color)
Set the current fill color of this item. |
void |
setFixed(boolean value)
Sets if the item is fixed in its position. |
void |
setFont(java.awt.Font font)
Set the current font for the item. |
void |
setHighlighted(boolean value)
Set the highlighted status of this item. |
void |
setHover(boolean value)
Set the hover flag. |
void |
setInteractive(boolean value)
Set the interactive status of this VisualItem. |
void |
setShape(int shape)
Set the current shape value of the item. |
void |
setSize(double size)
Set the current size value of the item. |
void |
setStartFillColor(int color)
Set the starting fill color of this item. |
void |
setStartFont(java.awt.Font font)
Set the starting font for the item. |
void |
setStartSize(double size)
Set the starting size value of the item. |
void |
setStartStrokeColor(int color)
Set the starting stroke color of this item. |
void |
setStartTextColor(int color)
Set the starting text color of this item. |
void |
setStartVisible(boolean value)
Set the start visible flag. |
void |
setStartX(double x)
Set the starting x-coordinate of this item. |
void |
setStartY(double y)
Set the starting y-coordinate of this item. |
void |
setStroke(java.awt.BasicStroke stroke)
Set the current stroke used to draw lines and shape outlines. |
void |
setStrokeColor(int color)
Set the current stroke color of this item. |
void |
setTextColor(int color)
Set the current text color of this item. |
void |
setValidated(boolean value)
Set this item's validated flag. |
void |
setVisible(boolean value)
Set this item's visibility. |
void |
setX(double x)
Set the current x-coordinate of this item. |
void |
setY(double y)
Set the current y-coordinate of this item. |
java.awt.geom.Rectangle2D |
validateBounds()
Validate the bounds of this VisualItem. |
Methods inherited from interface prefuse.data.Tuple |
---|
canGet, canGetBoolean, canGetDate, canGetDouble, canGetFloat, canGetInt, canGetLong, canGetString, canSet, canSetBoolean, canSetDate, canSetDouble, canSetFloat, canSetInt, canSetLong, canSetString, get, get, getBoolean, getBoolean, getColumnCount, getColumnIndex, getColumnName, getColumnType, getColumnType, getDate, getDate, getDefault, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getRow, getSchema, getString, getString, getTable, isValid, revertToDefault, set, set, setBoolean, setBoolean, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setString, setString |
Field Detail |
---|
static final java.lang.String VALIDATED
static final java.lang.String VISIBLE
static final java.lang.String STARTVISIBLE
static final java.lang.String ENDVISIBLE
static final java.lang.String INTERACTIVE
static final java.lang.String EXPANDED
static final java.lang.String FIXED
static final java.lang.String HIGHLIGHT
static final java.lang.String HOVER
static final java.lang.String X
static final java.lang.String Y
static final java.lang.String STARTX
static final java.lang.String STARTY
static final java.lang.String ENDX
static final java.lang.String ENDY
static final java.lang.String BOUNDS
static final java.lang.String STROKECOLOR
static final java.lang.String STARTSTROKECOLOR
static final java.lang.String ENDSTROKECOLOR
static final java.lang.String FILLCOLOR
static final java.lang.String STARTFILLCOLOR
static final java.lang.String ENDFILLCOLOR
static final java.lang.String TEXTCOLOR
static final java.lang.String STARTTEXTCOLOR
static final java.lang.String ENDTEXTCOLOR
static final java.lang.String SIZE
static final java.lang.String STARTSIZE
static final java.lang.String ENDSIZE
static final java.lang.String SHAPE
static final java.lang.String STROKE
static final java.lang.String FONT
static final java.lang.String STARTFONT
static final java.lang.String ENDFONT
static final java.lang.String DOI
static final Schema SCHEMA
static final int IDX_VALIDATED
static final java.lang.String LABEL
static final java.lang.String VALUE
static final java.lang.String POLYGON
static final java.lang.String STARTPOLYGON
static final java.lang.String ENDPOLYGON
static final java.lang.String X2
static final java.lang.String Y2
static final java.lang.String STARTX2
static final java.lang.String STARTY2
static final java.lang.String ENDX2
static final java.lang.String ENDY2
Method Detail |
---|
Visualization getVisualization()
java.lang.String getGroup()
boolean isInGroup(java.lang.String group)
group
- the group to check for membership.
TupleSet getSourceData()
Tuple getSourceTuple()
void render(java.awt.Graphics2D g)
g
- the graphics context to render into.Renderer getRenderer()
java.awt.geom.Rectangle2D validateBounds()
boolean isValidated()
VALIDATED
void setValidated(boolean value)
value
- the value of the validated flag to set.VALIDATED
boolean isVisible()
VISIBLE
void setVisible(boolean value)
value
- true to make the item visible, false otherwise.VISIBLE
boolean isStartVisible()
STARTVISIBLE
void setStartVisible(boolean value)
value
- true to set the start visible flag, false otherwiseSTARTVISIBLE
boolean isEndVisible()
ENDVISIBLE
void setEndVisible(boolean value)
value
- true to set the end visible flag, false otherwiseENDVISIBLE
boolean isInteractive()
INTERACTIVE
void setInteractive(boolean value)
value
- true for interactive, false for non-interactiveINTERACTIVE
boolean isExpanded()
EXPANDED
void setExpanded(boolean value)
value
- true to set as expanded, false as collapsed.EXPANDED
boolean isFixed()
FIXED
void setFixed(boolean value)
value
- true to fix the item, false otherwiseFIXED
boolean isHighlighted()
HIGHLIGHT
void setHighlighted(boolean value)
ColorAction
might assign colors
based on the flag).
value
- true to highlight the item, false for no highlighting.HIGHLIGHT
boolean isHover()
HOVER
void setHover(boolean value)
value
- true to set the hover flag, false otherwiseHOVER
double getX()
X
void setX(double x)
x
- the new current x-coordinateX
double getY()
Y
void setY(double y)
y
- the new current y-coordinateY
double getStartX()
STARTX
void setStartX(double x)
x
- the new starting x-coordinateSTARTX
double getStartY()
STARTY
void setStartY(double y)
y
- the new starting y-coordinateSTARTY
double getEndX()
ENDX
void setEndX(double x)
x
- the new ending x-coordinateENDX
double getEndY()
ENDY
void setEndY(double y)
y
- the new ending y-coordinateENDY
java.awt.geom.Rectangle2D getBounds()
BOUNDS
void setBounds(double x, double y, double w, double h)
x
- the minimum x-coordinatey
- the minimum y-coorindatew
- the width of this itemh
- the height of this itemBOUNDS
int getStrokeColor()
ColorLib
,
STROKECOLOR
void setStrokeColor(int color)
color
- the current stroke color, represented as an integerColorLib
,
STROKECOLOR
int getStartStrokeColor()
ColorLib
,
STARTSTROKECOLOR
void setStartStrokeColor(int color)
color
- the starting stroke color, represented as an integerColorLib
,
STARTSTROKECOLOR
int getEndStrokeColor()
ColorLib
,
ENDSTROKECOLOR
void setEndStrokeColor(int color)
color
- the ending stroke color, represented as an integerColorLib
,
ENDSTROKECOLOR
int getFillColor()
ColorLib
,
FILLCOLOR
void setFillColor(int color)
color
- the current fill color, represented as an integerColorLib
,
FILLCOLOR
int getStartFillColor()
ColorLib
,
STARTFILLCOLOR
void setStartFillColor(int color)
color
- the starting fill color, represented as an integerColorLib
,
STARTFILLCOLOR
int getEndFillColor()
ColorLib
,
ENDFILLCOLOR
void setEndFillColor(int color)
color
- the ending fill color, represented as an integerColorLib
,
ENDFILLCOLOR
int getTextColor()
ColorLib
,
TEXTCOLOR
void setTextColor(int color)
color
- the current text color, represented as an integerColorLib
,
TEXTCOLOR
int getStartTextColor()
ColorLib
,
STARTTEXTCOLOR
void setStartTextColor(int color)
color
- the starting text color, represented as an integerColorLib
,
STARTTEXTCOLOR
int getEndTextColor()
ColorLib
,
ENDTEXTCOLOR
void setEndTextColor(int color)
color
- the ending text color, represented as an integerColorLib
,
ENDTEXTCOLOR
double getSize()
SIZE
void setSize(double size)
size
- the current size valueSIZE
double getStartSize()
STARTSIZE
void setStartSize(double size)
size
- the starting size valueSTARTSIZE
double getEndSize()
ENDSIZE
void setEndSize(double size)
size
- the ending size valueENDSIZE
int getShape()
Constants
class. This value only has an
effect if a Renderer that supports different shapes is used
(e.g., ShapeRenderer
.
SHAPE
void setShape(int shape)
Constants
class. This value only has an
effect if a Renderer that supports different shapes is used
(e.g., ShapeRenderer
.
shape
- the shape value to useSHAPE
java.awt.BasicStroke getStroke()
void setStroke(java.awt.BasicStroke stroke)
stroke
- the stroke to use to draw lines and shape outlinesjava.awt.Font getFont()
FONT
void setFont(java.awt.Font font)
font
- the current font valueFONT
java.awt.Font getStartFont()
STARTFONT
void setStartFont(java.awt.Font font)
font
- the starting font valueSTARTFONT
java.awt.Font getEndFont()
ENDFONT
void setEndFont(java.awt.Font font)
font
- the ending font valueENDFONT
double getDOI()
DOI
void setDOI(double doi)
doi
- the DOI value of this itemDOI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |