|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sciapp.table.span.SpanDrawer
public class SpanDrawer
SpanDrawer is used to enable cell spanning for a JTable.
| Field Summary | |
|---|---|
protected boolean |
fixedRowHeight
flag that indicates whether the drawer will assume that the table has a fixed row height |
protected SpanModel |
spanModel
the span model. |
protected boolean |
updateSelections
boolean flag to indicate that the drawer should update the cell selections evenly after a cell selection. |
| Constructor Summary | |
|---|---|
SpanDrawer()
Constructs a default SpanDrawer. |
|
SpanDrawer(JTable table)
Constructs a default SpanDrawer. |
|
SpanDrawer(JTable table,
SpanModel spanModel)
Constructs a default SpanDrawer. |
|
| Method Summary | |
|---|---|
Rectangle |
getCellRect(int row,
int column,
boolean includeSpacing)
Returns a rectangle for the cell that lies at the intersection of row and column, as it has been modified with the use of the span model. |
boolean |
getFixedRowHeight()
Determines whether the drawer will assume that the table has a fixed row height. |
SpanModel |
getSpanModel()
Returns the span model that this SpanDrawer queries to lookup the merged cells. |
JTable |
getTable()
Returns the associated table. |
boolean |
getUpdateSelections()
Determines whether the drawer will update the cell selection evenly after a cell selection. |
boolean |
getUseSpan()
Determines the spanning behaviour of the span model. |
boolean |
isCellMerged(int row,
int column)
Determines whether the cell at row, column is merged with another cell. |
boolean |
isCellNormal(int row,
int column)
Determines whether the cell at row, column is neither merged nor spanned (as it normally is when no spanning at all is used). |
boolean |
isCellSpanned(int row,
int column)
Determines whether the cell at row, column spans to another cell. |
Component |
prepare(Component spannedComponent,
int row,
int column)
Prepares the component at (row, column) to be used by the span model. |
void |
setFixedRowHeight(boolean fixedRowHeight)
Tells the drawer whether the table has a fixed row height. |
void |
setSpanModel(SpanModel newSpanModel)
Sets the span model that this SpanDrawer queries to lookup the merged cells. |
void |
setTable(JTable newTable)
Assigns the associated table. |
void |
setUpdateSelections(boolean updateSelections)
Tells the drawer to update the cell selection evenly after a cell selection. |
void |
setUseSpan(boolean useSpan)
Sets the spanning behaviour of the span model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean updateSelections
protected boolean fixedRowHeight
protected SpanModel spanModel
| Constructor Detail |
|---|
public SpanDrawer()
public SpanDrawer(JTable table)
public SpanDrawer(JTable table,
SpanModel spanModel)
| Method Detail |
|---|
public Rectangle getCellRect(int row,
int column,
boolean includeSpacing)
row - the row index of the cellcolumn - the column index of the cellincludeSpacing - if false, return the true cell boundspublic boolean getFixedRowHeight()
public SpanModel getSpanModel()
public JTable getTable()
public boolean getUpdateSelections()
public boolean getUseSpan()
public boolean isCellMerged(int row,
int column)
row - the row index of the cellcolumn - the column index of the cell
public boolean isCellNormal(int row,
int column)
row - the row index of the cellcolumn - the column index of the cell
public boolean isCellSpanned(int row,
int column)
row - the row index of the cellcolumn - the column index of the cell
public Component prepare(Component spannedComponent,
int row,
int column)
spannedComponent - the component that we wish to span or mergerow - the row index of the cellcolumn - the column index of the cell
public void setFixedRowHeight(boolean fixedRowHeight)
fixedRowHeight - true if the table has a fixed row height, false otherwisepublic void setSpanModel(SpanModel newSpanModel)
newSpanModel - the span model to assignpublic void setTable(JTable newTable)
newTable - the JTable object to associate with this span drawer.public void setUpdateSelections(boolean updateSelections)
updateSelections - flagpublic void setUseSpan(boolean useSpan)
useSpan - true if spanning is used, false otherwise.
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||