JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table
Class JCSeries

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--com.klg.jclass.table.JCSeries
All Implemented Interfaces:
Cloneable, Collection, List, Moveable, RandomAccess, Serializable, SeriesModel
Direct Known Subclasses:
ComponentHandler

public class JCSeries
extends Vector
implements SeriesModel, Serializable

SeriesModel defines the interface required by classes that can store row/column based properties (for example: editors, renderers, styles).

See Also:
Serialized Form

Field Summary
protected  int last_index
          The index of the last found cell.
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
JCSeries()
          Creates an empty series with no default.
JCSeries(Object value)
          Create a new series with the specified default.
 
Method Summary
 Collection getCellRanges(Object value)
          Returns a Vector of JCCellRanges that contain the given object.
 Object getDefault()
          Gets the default member value.
 List getSeriesValues()
          Returns an iterator for an ordered set of series values.
 Collection getUniqueValues()
          Returns a Vector of unique objects used in JCTable.
 Object getValue(int row, int column)
          Returns the value at the specified cell, or within the cell's row or column.
 void moveColumns(int start_column, int num_columns, int destination)
          Adjusts the series after moving columns.
 void moveRows(int start_row, int num_rows, int destination)
          Adjusts the series after moving rows.
 void remapColumns(int[] new_positions)
          Reorders columns after the column mapping changes.
 void remapRows(int[] new_positions)
          Reorders rows after the row mapping changes.
protected  void remove(int row, int column)
          Removes the item if the cell was found.
 void setDefault(Object value)
          Creates or sets the default member to the specified value.
 boolean setValue(int start_row, int start_column, int end_row, int end_column, Object value)
          Sets a range of cells to the value.
 boolean setValue(int row, int column, Object value)
          Sets the specified cell to the value.
 boolean setValue(com.klg.jclass.table.JCCellRange cr, Object value)
          Sets the cell range to the value.
 void shiftColumn(int start_column, int num_columns, int direction)
          Adjusts the series after adding or deleting columns.
 void shiftRow(int start_row, int num_rows, int direction)
          Adjusts the series after adding or deleting rows.
 void swapColumns(int column1, int column2)
          Adjusts the series based on two columns swapping position.
 void swapRows(int row1, int row2)
          Adjusts the series based on two rows swapping position.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Field Detail

last_index

protected int last_index
The index of the last found cell.

Constructor Detail

JCSeries

public JCSeries()
Creates an empty series with no default.


JCSeries

public JCSeries(Object value)
Create a new series with the specified default.

Parameters:
value -
Method Detail

getDefault

public Object getDefault()
Gets the default member value. The default value is always equivalent to the (ALL, ALL) cell position.

Specified by:
getDefault in interface SeriesModel
Returns:

setDefault

public void setDefault(Object value)
Creates or sets the default member to the specified value. The default value is always equivalent to the (ALL, ALL) cell position.

Specified by:
setDefault in interface SeriesModel
Parameters:
value -

getUniqueValues

public Collection getUniqueValues()
Returns a Vector of unique objects used in JCTable.

Specified by:
getUniqueValues in interface SeriesModel
Returns:
Vecotor of unique objects used in JCTable

getCellRanges

public Collection getCellRanges(Object value)
Returns a Vector of JCCellRanges that contain the given object.

Specified by:
getCellRanges in interface SeriesModel
Parameters:
value -
Returns:
Vector of JCCellRanges

getSeriesValues

public List getSeriesValues()
Returns an iterator for an ordered set of series values.

Specified by:
getSeriesValues in interface SeriesModel
Returns:
iterator for an ordered set of series values

getValue

public Object getValue(int row,
                       int column)
Returns the value at the specified cell, or within the cell's row or column.

Specified by:
getValue in interface SeriesModel
Parameters:
column -
row -
Returns:
null if the series is empty

setValue

public boolean setValue(int row,
                        int column,
                        Object value)
Sets the specified cell to the value.

Specified by:
setValue in interface SeriesModel
Parameters:
column -
row -
value -
Returns:
true if the series was changed after adding the value

setValue

public boolean setValue(int start_row,
                        int start_column,
                        int end_row,
                        int end_column,
                        Object value)
Sets a range of cells to the value.

Specified by:
setValue in interface SeriesModel
Parameters:
end_column -
end_row -
start_column -
start_row -
value -
Returns:
true if the series was changed after adding the value

setValue

public boolean setValue(com.klg.jclass.table.JCCellRange cr,
                        Object value)
Sets the cell range to the value.

Specified by:
setValue in interface SeriesModel
Parameters:
cr -
value -
Returns:
true if the series was changed after adding the value

remove

protected void remove(int row,
                      int column)
Removes the item if the cell was found.

Parameters:
column -
row -

moveColumns

public void moveColumns(int start_column,
                        int num_columns,
                        int destination)
Adjusts the series after moving columns.

Specified by:
moveColumns in interface Moveable
Parameters:
destination -
num_columns -
start_column -

moveRows

public void moveRows(int start_row,
                     int num_rows,
                     int destination)
Adjusts the series after moving rows.

Specified by:
moveRows in interface Moveable
Parameters:
destination -
num_rows -
start_row -

remapColumns

public void remapColumns(int[] new_positions)
Reorders columns after the column mapping changes.

Specified by:
remapColumns in interface Moveable
Parameters:
new_positions -

remapRows

public void remapRows(int[] new_positions)
Reorders rows after the row mapping changes.

Specified by:
remapRows in interface Moveable
Parameters:
new_positions -

shiftColumn

public void shiftColumn(int start_column,
                        int num_columns,
                        int direction)
Adjusts the series after adding or deleting columns.

Specified by:
shiftColumn in interface Moveable
Parameters:
start_column - the start position
num_columns - the number of columns
direction - use +1 for insert and -1 for delete

shiftRow

public void shiftRow(int start_row,
                     int num_rows,
                     int direction)
Adjusts the series after adding or deleting rows.

Specified by:
shiftRow in interface Moveable
Parameters:
start_row - the start position
num_rows - the number of rows
direction - use +1 for insert and -1 for delete

swapColumns

public void swapColumns(int column1,
                        int column2)
Adjusts the series based on two columns swapping position.

Specified by:
swapColumns in interface Moveable
Parameters:
column1 -
column2 -

swapRows

public void swapRows(int row1,
                     int row2)
Adjusts the series based on two rows swapping position.

Specified by:
swapRows in interface Moveable
Parameters:
row1 -
row2 -

Copyright © 2004 Quest Software Inc..
All rights reserved.