|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infovis.utils.ChangeManager infovis.column.AbstractColumn infovis.column.BasicColumn infovis.column.BasicObjectColumn infovis.column.ShapeColumn
public class ShapeColumn
Columns of shapes and RectPool management.
Field Summary |
---|
Fields inherited from class infovis.column.AbstractColumn |
---|
MODIFIED_ALL, MODIFIED_NONE |
Fields inherited from interface infovis.metadata.Constants |
---|
CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRITION, FORMAT, IDENTIFIER, LANGUAGE, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPE |
Constructor Summary | |
---|---|
ShapeColumn(String name)
Constructor. |
|
ShapeColumn(String name,
int reserve)
Constructor. |
Method Summary | |
---|---|
void |
add(Shape s)
Adds a shape. |
void |
clear()
Removes all of the elements from this column. The Column will be empty after this call returns. WARNING: if there is an associated format that maintains a status, such as a CategoricalFormat , it
is not cleared so results may not be what you expected. The
CategoricalFormat can be cleared explicitely if
needed. |
Object |
definedValue()
Returns the instance of a value defined with the right type for this column. |
static ShapeColumn |
findColumn(Table t,
String name)
Returns the ShapeColumn of the specified name in the table, creating it if needed. |
Rectangle2D.Float |
findRect(int index)
Returns a rectangle at the specified index, allocating it if the index is undefined. |
void |
freeRect(int index)
Frees the shape at that index, returning rectangles to the RectPool. |
Shape |
get(int index)
Returns the shape at the specified index or null. |
Rectangle2D.Float |
getBounds()
Returns the bounds if the shapes contained in this column. |
static ShapeColumn |
getColumn(Table t,
int index)
Returns the ShapeColumn at the specified index in the table. |
static ShapeColumn |
getColumn(Table t,
String name)
Returns the ShapeColumn of the specified name in the table. |
Rectangle2D.Float |
getRect(int index)
Returns a rectangle at the specified index or null. |
void |
set(int index,
Shape s)
Sets the shape at the specified index. |
Methods inherited from class infovis.column.BasicObjectColumn |
---|
add, capacity, compare, compare, compareValues, ensureCapacity, fill, format, getObjectAt, getOrder, getValueAt, getValueClass, getValueReference, hasUndefinedValue, indexOf, isValueUndefined, parse, remove, remove, setExtend, setObjectAt, setOrder, setSize, setValueAt, setValueUndefined, size |
Methods inherited from class infovis.column.BasicColumn |
---|
addValue, addValueOrNull, firstValidRow, getClientProperty, getFormat, getMaxIndex, getMetadata, getMinIndex, getName, isEmpty, isInternal, iterator, lastValidRow, setFormat, setName, setValueOrNullAt, toString |
Methods inherited from class infovis.column.AbstractColumn |
---|
addChangeListener, computeValueMap, computeValueMap, equalObj, equals, getLastModifiedRow |
Methods inherited from class infovis.utils.ChangeManager |
---|
disableNotify, enableNotify, getModCount, removeChangeListener |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface infovis.Column |
---|
disableNotify, enableNotify, removeChangeListener |
Constructor Detail |
---|
public ShapeColumn(String name)
name
- the column name.public ShapeColumn(String name, int reserve)
name
- the column name.reserve
- the reserved size.Method Detail |
---|
public void clear()
CategoricalFormat
, it
is not cleared so results may not be what you expected. The
CategoricalFormat
can be cleared explicitely if
needed.
clear
in interface Column
clear
in class BasicObjectColumn
public Shape get(int index)
index
- the index
public void set(int index, Shape s)
index
- the indexs
- the shape.public void add(Shape s)
s
- the shapepublic Rectangle2D.Float getRect(int index)
Assumes the shapeColumn contains a rect and not another kind of shape at this index, otherwise, a ClassCastException is thrown.
index
- the index
public Rectangle2D.Float findRect(int index)
index
- the index
public void freeRect(int index)
index
- the indexpublic static ShapeColumn getColumn(Table t, int index)
t
- the table.index
- the index
public static ShapeColumn getColumn(Table t, String name)
t
- the table.name
- the name
public static ShapeColumn findColumn(Table t, String name)
t
- the table.name
- the name
public Object definedValue()
definedValue
in class BasicObjectColumn
public Rectangle2D.Float getBounds()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |