|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfovis.utils.ChangeManager
infovis.column.AbstractColumn
infovis.column.BasicColumn
infovis.column.LiteralColumn
infovis.column.BooleanColumn
public class BooleanColumn
Column of booleans.
Implements columns of boolean values, backed on a BitSet.
A BooleanColumn also implements the ListSelectionModel so it
can be used to control a selection in Swing.
Creation: BooleanColumn c = new BooleanColumn("yesorno");
| Field Summary |
|---|
| Fields inherited from class infovis.column.AbstractColumn |
|---|
MODIFIED_ALL, MODIFIED_NONE |
| Fields inherited from interface javax.swing.ListSelectionModel |
|---|
MULTIPLE_INTERVAL_SELECTION, SINGLE_INTERVAL_SELECTION, SINGLE_SELECTION |
| Fields inherited from interface infovis.metadata.Constants |
|---|
CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRITION, FORMAT, IDENTIFIER, LANGUAGE, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPE |
| Constructor Summary | |
|---|---|
BooleanColumn(String name)
Creates a new FloatColumn object. |
|
BooleanColumn(String name,
int reserve)
Creates a new FloatColumn object. |
|
| Method Summary | |
|---|---|
void |
add(boolean element)
Adds a new element in the column. |
void |
addListSelectionListener(ListSelectionListener x)
|
void |
addSelectionInterval(int index0,
int index1)
|
int |
capacity()
Returns the current capacity of this column. |
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. |
void |
clearSelection()
|
int |
compare(int row1,
int row2)
|
void |
ensureCapacity(int minCapacity)
Increases the capacity of this column, if necessary, to ensure that it can hold at least the number of values specified by the minimum capacity argument. |
void |
fill(boolean v)
Fills the column with the specified value. |
static BooleanColumn |
findColumn(Table t,
String name)
Returns a column as a FloatColumn from a table, creating
it if needed. |
String |
format(boolean v)
Returns the string representation of a value according to the current format. |
String |
format(double value)
Returns the specified value formatted according to this column's format. |
boolean |
get(int index)
Returns the element at the specified position in this column. |
int |
getAnchorSelectionIndex()
|
static BooleanColumn |
getColumn(Table t,
int index)
Returns a column as a FloatColumn from a
Table. |
static BooleanColumn |
getColumn(Table t,
String name)
Returns a column as a BooleanColumn from a
Table. |
double |
getDoubleAt(int row)
Returns the value as a double |
int |
getLeadSelectionIndex()
|
boolean |
getMax()
Returns the maximum value. |
int |
getMaxSelectionIndex()
|
boolean |
getMin()
Returns the minimum value. |
int |
getMinSelectionIndex()
|
int |
getSelectedCount()
Returns the number of selected items. |
int |
getSelectionMode()
|
String |
getValueAt(int i)
Returns the String representation of the element at the specified position in this column or null if
the element is undefined. |
Class |
getValueClass()
Returns the class of the elements. |
boolean |
getValueIsAdjusting()
|
BitSet |
getValueReference()
Returns the backing BitSet of this column (USE WITH CARE). |
void |
insertIndexInterval(int index,
int length,
boolean before)
|
boolean |
isFiltered(int row)
|
boolean |
isSelectedIndex(int index)
|
boolean |
isSelectionEmpty()
|
boolean |
parse(String v)
Parse a string and return the value for the column. |
void |
removeIndexInterval(int index0,
int index1)
|
void |
removeListSelectionListener(ListSelectionListener x)
|
void |
removeSelectionInterval(int index0,
int index1)
|
void |
set(int index,
boolean element)
Replaces the element at the specified position in this column with the specified element. |
void |
setAnchorSelectionIndex(int index)
|
void |
setDoubleAt(int row,
double v)
Sets the value as a double |
void |
setExtend(IntArrayList list,
boolean element)
Sets a list of indexes with a specified value. |
void |
setExtend(int index,
boolean element)
Replaces the element at the specified position in this column with the specified element, growing the column if necessary. |
void |
setLeadSelectionIndex(int index)
|
void |
setSelectionInterval(int index0,
int index1)
|
void |
setSelectionMode(int selectionMode)
|
void |
setSize(int newSize)
Sets the sizeColumn of this column. |
void |
setValueAt(int i,
String v)
Replaces the element at the specified position in this column with the element specified in its String representation or sets if undefined if the element is null
It will be read and translated using the Format. |
void |
setValueIsAdjusting(boolean valueIsAdjusting)
|
int |
size()
Returns the number of elements in this column. |
| Methods inherited from class infovis.column.LiteralColumn |
|---|
compareValues, getDoubleMax, getDoubleMin, getFloatAt, getIntAt, getLongAt, getNumberColumn, hasUndefinedValue, isValueUndefined, round, setFloatAt, setIntAt, setLongAt, setValueUndefined, trimUndefined |
| 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 |
|---|
addChangeListener, addValue, addValueOrNull, disableNotify, enableNotify, getFormat, getMaxIndex, getMinIndex, getName, isEmpty, isInternal, iterator, removeChangeListener, setFormat, setName, setValueOrNullAt |
| Methods inherited from interface infovis.Metadata |
|---|
getClientProperty, getMetadata |
| Methods inherited from interface cern.colt.function.IntComparator |
|---|
equals |
| Constructor Detail |
|---|
public BooleanColumn(String name)
name - the column name.
public BooleanColumn(String name,
int reserve)
name - the column name.reserve - the initial capacity.| 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 Columnclear in class LiteralColumnCall clear after clearing the subclass contents since this method fires
the notifications.public boolean get(int index)
index - index of element to return.
public void set(int index,
boolean element)
index - index of element to replace.element - element to be stored at the specified position.public boolean getMin()
public boolean getMax()
public void setExtend(int index,
boolean element)
index - index of element to replace.element - element to be stored at the specified position.
public void setExtend(IntArrayList list,
boolean element)
list - the indexes listelement - the boolean valuepublic final void add(boolean element)
element - the element.public void fill(boolean v)
v - the valuepublic boolean isFiltered(int row)
isFiltered in interface RowFilter
public boolean parse(String v)
throws ParseException
v - the string representation of the value
ParseException - if the value cannot be parsedpublic String format(boolean v)
v - the value
public String getValueAt(int i)
Columnnull if
the element is undefined. The representation is
generated by the current format.
getValueAt in interface Columni - index of element representation to return.
null if the element is undefined.Column.getValueAt(int)
public void setValueAt(int i,
String v)
throws ParseException
Columnnull
It will be read and translated using the Format. A null value
sets the value to undefined. The column is extended if
needed.
setValueAt in interface Columni - index of element to replace.v - element to be stored at the specified position.
ParseException - if the specified string cannot be parsed.Column.setValueAt(int, String)
public static BooleanColumn getColumn(Table t,
int index)
FloatColumn from a
Table.
t - the Tableindex - index in the Table
FloatColumn or null if no such column exists or
the column is not a FloatColumn.
public static BooleanColumn getColumn(Table t,
String name)
BooleanColumn from a
Table.
t - the Tablename - the column name.
BooleanColumn or null if no such column exists
or the column is not a BooleanColumn.
public static BooleanColumn findColumn(Table t,
String name)
FloatColumn from a table, creating
it if needed.
t - the Tablename - the column name.
FloatColumn from a table,public Class getValueClass()
BasicColumn
getValueClass in interface ColumngetValueClass in class BasicColumnColumn.getValueClass()
public int compare(int row1,
int row2)
BasicColumn
compare in interface IntComparatorcompare in class LiteralColumnIntComparator.compare(int,int)public void addListSelectionListener(ListSelectionListener x)
addListSelectionListener in interface ListSelectionModelListSelectionModel.addListSelectionListener(ListSelectionListener)
public void addSelectionInterval(int index0,
int index1)
addSelectionInterval in interface ListSelectionModelListSelectionModel.addSelectionInterval(int, int)public void clearSelection()
clearSelection in interface ListSelectionModelListSelectionModel.clearSelection()public int getAnchorSelectionIndex()
getAnchorSelectionIndex in interface ListSelectionModelListSelectionModel.getAnchorSelectionIndex()public int getLeadSelectionIndex()
getLeadSelectionIndex in interface ListSelectionModelListSelectionModel.getLeadSelectionIndex()public int getMaxSelectionIndex()
getMaxSelectionIndex in interface ListSelectionModelListSelectionModel.getMaxSelectionIndex()public int getMinSelectionIndex()
getMinSelectionIndex in interface ListSelectionModelListSelectionModel.getMinSelectionIndex()public int getSelectionMode()
getSelectionMode in interface ListSelectionModelListSelectionModel.getSelectionMode()public boolean getValueIsAdjusting()
getValueIsAdjusting in interface ListSelectionModelListSelectionModel.getValueIsAdjusting()
public void insertIndexInterval(int index,
int length,
boolean before)
insertIndexInterval in interface ListSelectionModelListSelectionModel.insertIndexInterval(int, int,
boolean)public boolean isSelectedIndex(int index)
isSelectedIndex in interface ListSelectionModelListSelectionModel.isSelectedIndex(int)public boolean isSelectionEmpty()
isSelectionEmpty in interface ListSelectionModelListSelectionModel.isSelectionEmpty()public int getSelectedCount()
public void removeIndexInterval(int index0,
int index1)
removeIndexInterval in interface ListSelectionModelListSelectionModel.removeIndexInterval(int, int)public void removeListSelectionListener(ListSelectionListener x)
removeListSelectionListener in interface ListSelectionModelListSelectionModel.removeListSelectionListener(ListSelectionListener)
public void removeSelectionInterval(int index0,
int index1)
removeSelectionInterval in interface ListSelectionModelListSelectionModel.removeSelectionInterval(int, int)public void setAnchorSelectionIndex(int index)
setAnchorSelectionIndex in interface ListSelectionModelListSelectionModel.setAnchorSelectionIndex(int)public void setLeadSelectionIndex(int index)
setLeadSelectionIndex in interface ListSelectionModelListSelectionModel.setLeadSelectionIndex(int)
public void setSelectionInterval(int index0,
int index1)
setSelectionInterval in interface ListSelectionModelListSelectionModel.setSelectionInterval(int, int)public void setSelectionMode(int selectionMode)
setSelectionMode in interface ListSelectionModelListSelectionModel.setSelectionMode(int)public void setValueIsAdjusting(boolean valueIsAdjusting)
setValueIsAdjusting in interface ListSelectionModelListSelectionModel.setValueIsAdjusting(boolean)public double getDoubleAt(int row)
getDoubleAt in interface NumberColumngetDoubleAt in class LiteralColumnrow - the row
public void setDoubleAt(int row,
double v)
setDoubleAt in interface NumberColumnsetDoubleAt in class LiteralColumnrow - the rowv - the value as a doublepublic String format(double value)
format in interface NumberColumnvalue - the value to format
public int capacity()
capacity in interface Columnpublic void ensureCapacity(int minCapacity)
ensureCapacity in interface ColumnminCapacity - the desired minimum capacity.public int size()
size in interface Columnpublic void setSize(int newSize)
0 items
are added to the end of the column. If the new sizeColumn is
less than the current sizeColumn, all components at index
newSize and greater are discarded.
setSize in interface ColumnsetSize in class LiteralColumnnewSize - the new sizeColumn of this column.public BitSet getValueReference()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||