|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.grid.RowHeights
public class RowHeights
RowHeights
is wrapper around a SizeSequence
object. It can fire RowHeightChangeEvent
when row height changes.
Field Summary | |
---|---|
protected int |
_rowCount
|
protected SizeSequence |
_sizeSequence
|
protected EventListenerList |
listenerList
|
Constructor Summary | |
---|---|
RowHeights()
Creates a new RowHeights object that contains no rows . |
|
RowHeights(int numRows)
Creates a new RowHeights object that contains the specified number of rows, all initialized to have
size 0. |
|
RowHeights(int[] heights)
Creates a new RowHeights object that contains the specified heights. |
|
RowHeights(int numRows,
int value)
Creates a new RowHeights object that contains the specified number of rows, all initialized to have
size value . |
Method Summary | |
---|---|
void |
addRowHeightChangeListener(RowHeightChangeListener l)
Adds a listener to the list that's notified each time a change to the row model occurs. |
void |
fireRowHeightChanged(RowHeightChangeEvent e)
Forwards the given notification event to all RowModelListeners that registered themselves as
listeners for this row model. |
int |
getRowHeight(int index)
Returns the row height of the specified row. |
RowHeightChangeListener[] |
getRowHeightChangeListeners()
Returns an array of all the row model listeners registered on this model. |
int[] |
getRowHeights()
Returns the row height of all rows. |
int |
getRowIndex(int position)
Returns the index of the row that corresponds to the specified position. |
int |
getRowPosition(int index)
Returns the start y position for the specified row. |
void |
insertRows(int start,
int length,
int value)
Adds a contiguous group of row heights to this RowHeights . |
void |
removeRowHeightChangeListener(RowHeightChangeListener l)
Removes a listener from the list that's notified each time a change to the row model occurs. |
void |
removeRows(int start,
int length)
Removes a contiguous group of entries from this RowHeights . |
void |
setRowHeight(int index,
int height)
Sets the height of the specified row. |
void |
setRowHeights(int[] rowHeights)
Resets this RowHeights object, using the data in the rowHeights argument. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EventListenerList listenerList
protected SizeSequence _sizeSequence
protected int _rowCount
Constructor Detail |
---|
public RowHeights()
RowHeights
object that contains no rows . To add rows, you can use
insertRows
or setHeights
.
insertRows(int, int, int)
,
setRowHeights(int[])
public RowHeights(int numRows)
RowHeights
object that contains the specified number of rows, all initialized to have
size 0.
numRows
- the number of row heights to track
NegativeArraySizeException
- if numRows < 0
public RowHeights(int numRows, int value)
RowHeights
object that contains the specified number of rows, all initialized to have
size value
.
numRows
- the number of rows to trackvalue
- the initial value of each sizepublic RowHeights(int[] heights)
RowHeights
object that contains the specified heights.
heights
- the array of heights to be contained in the SizeSequence
Method Detail |
---|
public void setRowHeights(int[] rowHeights)
RowHeights
object, using the data in the rowHeights
argument. This method
re-initializes this object so that it contains as many rows as the rowHeights
array. Each row height
is initialized to the value of the corresponding item in rowHeights
.
rowHeights
- the array of rowHeights to be contained in this RowHeights
public int[] getRowHeights()
public int getRowPosition(int index)
Note that if index
is greater than
length
the value returned may be meaningless.
index
- the index of the row whose y position is desired
public int getRowIndex(int position)
getRowIndex(0)
is 0, since the first row always starts at position 0.
position
- the position of the row
public int getRowHeight(int index)
index
is out of the range (0 <= index <
getRowHeights().length)
the behavior is unspecified.
index
- the index corresponding to the row
public void setRowHeight(int index, int height)
index
does not fall in the range:
(0 <= index < getRowHeights().length)
the behavior is unspecified.
index
- the index corresponding to the rowheight
- the height of the rowpublic void insertRows(int start, int length, int value)
RowHeights
. Note that the values of
start
and length
must satisfy the following conditions: (0 <= start <
getRowHeights().length) AND (length >= 0)
. If these conditions are not met, the behavior is unspecified
and an exception may be thrown.
start
- the index to be assigned to the first row in the grouplength
- the number of rows in the groupvalue
- the size to be assigned to each new row
ArrayIndexOutOfBoundsException
- if the parameters are outside of the range: (0 <= start <
(getRowHeights().length)) AND (length >= 0)
public void removeRows(int start, int length)
RowHeights
. Note that the values of
start
and length
must satisfy the following conditions: (0 <= start <
getRowHeights().length) AND (length >= 0)
. If these conditions are not met, the behavior is unspecified
and an exception may be thrown.
start
- the index of the first row to be removedlength
- the number of rows to be removedpublic void addRowHeightChangeListener(RowHeightChangeListener l)
l
- the RowHeightChangeListenerpublic void removeRowHeightChangeListener(RowHeightChangeListener l)
l
- the RowHeightChangeListenerpublic RowHeightChangeListener[] getRowHeightChangeListeners()
RowHeightChangeListener
s or an empty array if no row model listeners are
currently registeredaddRowHeightChangeListener(com.jidesoft.grid.RowHeightChangeListener)
,
removeRowHeightChangeListener(com.jidesoft.grid.RowHeightChangeListener)
public void fireRowHeightChanged(RowHeightChangeEvent e)
RowModelListeners
that registered themselves as
listeners for this row model.
e
- the event to be forwardedaddRowHeightChangeListener(com.jidesoft.grid.RowHeightChangeListener)
,
RowHeightChangeEvent
,
EventListenerList
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |