|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.table.JCCellLayout.Chain
The Chain
class encodes a List of row heights or column widths
as a sequence of Runs. A Run is a series of items with the same value.
Field Summary | |
protected int |
defaultValue
|
protected List |
list
|
Constructor Summary | |
JCCellLayout.Chain()
|
Method Summary | |
boolean |
equals(Object o)
|
int |
getIndex(int position)
Returns the index at the given position. |
int |
getSum(int index)
Returns the sum of all index's values, up to the index. |
int |
getValue(int index)
Returns the value at the index. |
int |
hashcode()
|
protected void |
mergeRuns()
Walks through the entire list of runs, and coalesces adjacent pairs of runs with the same value into a single run. |
void |
setValue(int index,
int value)
Sets the value at the index. |
void |
setValue(int startIndex,
int endIndex,
int value)
Sets the value for a range of indexes (inclusive). |
protected void |
splitLeft(ListIterator iterator,
JCCellLayout.Run leftRun,
JCCellLayout.Run currentRun,
int startIndex,
int endIndex,
int value)
Splits a given run into two runs, and adds a run to the right side. |
protected void |
splitLeftAndRight(ListIterator iterator,
JCCellLayout.Run leftRun,
JCCellLayout.Run currentRun,
int startIndex,
int endIndex,
int value)
Splits a given run into three runs, one on either side. |
protected void |
splitRight(ListIterator iterator,
JCCellLayout.Run leftRun,
JCCellLayout.Run currentRun,
int startIndex,
int endIndex,
int value)
Splits a given run into two runs, and adds a run to the right side. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected List list
protected int defaultValue
Constructor Detail |
public JCCellLayout.Chain()
Method Detail |
public int getValue(int index)
index
- The index at whose index the value is required
public int getSum(int index)
index
- The index up to which to sum
public int getIndex(int position)
position
- The position at which to determine the index
public void setValue(int index, int value)
index
- value
- public void setValue(int startIndex, int endIndex, int value)
startIndex
- endIndex
- value
- protected void splitLeftAndRight(ListIterator iterator, JCCellLayout.Run leftRun, JCCellLayout.Run currentRun, int startIndex, int endIndex, int value)
currentRun
- endIndex
- iterator
- leftRun
- startIndex
- value
- protected void splitLeft(ListIterator iterator, JCCellLayout.Run leftRun, JCCellLayout.Run currentRun, int startIndex, int endIndex, int value)
currentRun
- endIndex
- iterator
- leftRun
- startIndex
- value
- protected void splitRight(ListIterator iterator, JCCellLayout.Run leftRun, JCCellLayout.Run currentRun, int startIndex, int endIndex, int value)
currentRun
- endIndex
- iterator
- leftRun
- startIndex
- value
- protected void mergeRuns()
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashcode()
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |