|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public static final java.lang.String VALIDATED
public static final java.lang.String VISIBLE
public static final java.lang.String STARTVISIBLE
public static final java.lang.String ENDVISIBLE
public static final java.lang.String INTERACTIVE
public static final java.lang.String EXPANDED
public static final java.lang.String FIXED
public static final java.lang.String HIGHLIGHT
public static final java.lang.String HOVER
public static final java.lang.String X
public static final java.lang.String Y
public static final java.lang.String STARTX
public static final java.lang.String STARTY
public static final java.lang.String ENDX
public static final java.lang.String ENDY
public static final java.lang.String BOUNDS
public static final java.lang.String STROKECOLOR
public static final java.lang.String STARTSTROKECOLOR
public static final java.lang.String ENDSTROKECOLOR
public static final java.lang.String FILLCOLOR
public static final java.lang.String STARTFILLCOLOR
public static final java.lang.String ENDFILLCOLOR
public static final java.lang.String TEXTCOLOR
public static final java.lang.String STARTTEXTCOLOR
public static final java.lang.String ENDTEXTCOLOR
public static final java.lang.String SIZE
public static final java.lang.String STARTSIZE
public static final java.lang.String ENDSIZE
public static final java.lang.String SHAPE
public static final java.lang.String STROKE
public static final java.lang.String FONT
public static final java.lang.String STARTFONT
public static final java.lang.String ENDFONT
public static final java.lang.String DOI
public static final Schema SCHEMA
public static final int IDX_VALIDATED
public static final java.lang.String LABEL
public static final java.lang.String VALUE
public static final java.lang.String POLYGON
public static final java.lang.String STARTPOLYGON
public static final java.lang.String ENDPOLYGON
public static final java.lang.String X2
public static final java.lang.String Y2
public static final java.lang.String STARTX2
public static final java.lang.String STARTY2
public static final java.lang.String ENDX2
public static final java.lang.String ENDY2
Method Detail |
public Visualization getVisualization()
public java.lang.String getGroup()
public boolean isInGroup(java.lang.String group)
group
- the group to check for membership.
public TupleSet getSourceData()
public Tuple getSourceTuple()
public void render(java.awt.Graphics2D g)
g
- the graphics context to render into.public Renderer getRenderer()
public java.awt.geom.Rectangle2D validateBounds()
public boolean isValidated()
VALIDATED
public void setValidated(boolean value)
value
- the value of the validated flag to set.VALIDATED
public boolean isVisible()
VISIBLE
public void setVisible(boolean value)
value
- true to make the item visible, false otherwise.VISIBLE
public boolean isStartVisible()
STARTVISIBLE
public void setStartVisible(boolean value)
value
- true to set the start visible flag, false otherwiseSTARTVISIBLE
public boolean isEndVisible()
ENDVISIBLE
public void setEndVisible(boolean value)
value
- true to set the end visible flag, false otherwiseENDVISIBLE
public boolean isInteractive()
INTERACTIVE
public void setInteractive(boolean value)
value
- true for interactive, false for non-interactiveINTERACTIVE
public boolean isExpanded()
EXPANDED
public void setExpanded(boolean value)
value
- true to set as expanded, false as collapsed.EXPANDED
public boolean isFixed()
FIXED
public void setFixed(boolean value)
value
- true to fix the item, false otherwiseFIXED
public boolean isHighlighted()
HIGHLIGHT
public void setHighlighted(boolean value)
ColorAction
might assign colors
based on the flag).
value
- true to highlight the item, false for no highlighting.HIGHLIGHT
public boolean isHover()
HOVER
public void setHover(boolean value)
value
- true to set the hover flag, false otherwiseHOVER
public double getX()
X
public void setX(double x)
x
- the new current x-coordinateX
public double getY()
Y
public void setY(double y)
y
- the new current y-coordinateY
public double getStartX()
STARTX
public void setStartX(double x)
x
- the new starting x-coordinateSTARTX
public double getStartY()
STARTY
public void setStartY(double y)
y
- the new starting y-coordinateSTARTY
public double getEndX()
ENDX
public void setEndX(double x)
x
- the new ending x-coordinateENDX
public double getEndY()
ENDY
public void setEndY(double y)
y
- the new ending y-coordinateENDY
public java.awt.geom.Rectangle2D getBounds()
BOUNDS
public 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
public int getStrokeColor()
ColorLib
,
STROKECOLOR
public void setStrokeColor(int color)
color
- the current stroke color, represented as an integerColorLib
,
STROKECOLOR
public int getStartStrokeColor()
ColorLib
,
STARTSTROKECOLOR
public void setStartStrokeColor(int color)
color
- the starting stroke color, represented as an integerColorLib
,
STARTSTROKECOLOR
public int getEndStrokeColor()
ColorLib
,
ENDSTROKECOLOR
public void setEndStrokeColor(int color)
color
- the ending stroke color, represented as an integerColorLib
,
ENDSTROKECOLOR
public int getFillColor()
ColorLib
,
FILLCOLOR
public void setFillColor(int color)
color
- the current fill color, represented as an integerColorLib
,
FILLCOLOR
public int getStartFillColor()
ColorLib
,
STARTFILLCOLOR
public void setStartFillColor(int color)
color
- the starting fill color, represented as an integerColorLib
,
STARTFILLCOLOR
public int getEndFillColor()
ColorLib
,
ENDFILLCOLOR
public void setEndFillColor(int color)
color
- the ending fill color, represented as an integerColorLib
,
ENDFILLCOLOR
public int getTextColor()
ColorLib
,
TEXTCOLOR
public void setTextColor(int color)
color
- the current text color, represented as an integerColorLib
,
TEXTCOLOR
public int getStartTextColor()
ColorLib
,
STARTTEXTCOLOR
public void setStartTextColor(int color)
color
- the starting text color, represented as an integerColorLib
,
STARTTEXTCOLOR
public int getEndTextColor()
ColorLib
,
ENDTEXTCOLOR
public void setEndTextColor(int color)
color
- the ending text color, represented as an integerColorLib
,
ENDTEXTCOLOR
public double getSize()
SIZE
public void setSize(double size)
size
- the current size valueSIZE
public double getStartSize()
STARTSIZE
public void setStartSize(double size)
size
- the starting size valueSTARTSIZE
public double getEndSize()
ENDSIZE
public void setEndSize(double size)
size
- the ending size valueENDSIZE
public int getShape()
Constants
class. This value only has an
effect if a Renderer that supports different shapes is used
(e.g., ShapeRenderer
.
SHAPE
public 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
public java.awt.BasicStroke getStroke()
public void setStroke(java.awt.BasicStroke stroke)
stroke
- the stroke to use to draw lines and shape outlinespublic java.awt.Font getFont()
FONT
public void setFont(java.awt.Font font)
font
- the current font valueFONT
public java.awt.Font getStartFont()
STARTFONT
public void setStartFont(java.awt.Font font)
font
- the starting font valueSTARTFONT
public java.awt.Font getEndFont()
ENDFONT
public void setEndFont(java.awt.Font font)
font
- the ending font valueENDFONT
public double getDOI()
DOI
public 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 |