|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectzinger.bsheet.TableModifier
public class TableModifier
Field Summary | |
---|---|
protected javax.swing.JTable |
table
|
Constructor Summary | |
---|---|
TableModifier(javax.swing.JTable table)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ev)
|
void |
copyRegion(int startRow,
int startColumn,
int endRow,
int endColumn,
boolean asObjects)
|
void |
deleteRegion(int startRow,
int startColumn,
int endRow,
int endColumn)
|
boolean |
ensureColumnCount(int count)
|
boolean |
ensureRowCount(int count)
|
void |
flipRegion(int startRow,
int startColumn,
int endRow,
int endColumn)
|
java.awt.datatransfer.Transferable |
getContents(int row,
int column,
boolean asObjects)
Creates a Transferable object representing contents and appearance of a cell. |
java.awt.datatransfer.Transferable |
getContents(int startRow,
int startColumn,
int endRow,
int endColumn,
boolean asObjects)
Creates a Transferable object representing contents and appearance of a cell region. |
protected java.util.Map |
getContentsMap(java.awt.datatransfer.Transferable contents)
|
java.awt.Point[] |
getSelectionCorners()
|
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
|
void |
paste(int startRow,
int startColumn)
|
void |
paste(int row1,
int column1,
int row2,
int column2)
|
void |
setContents(java.awt.datatransfer.Transferable contents,
int startRow,
int startColumn)
Writes the contents of a Transferable object starting at the top left corner specified. |
void |
setContents(java.awt.datatransfer.Transferable contents,
int startRow,
int startColumn,
int endRow,
int endColumn)
Writes the contents of a Transferable object starting at the top left corner specified. |
void |
swapCells(int row1,
int column1,
int row2,
int column2,
boolean asObjects)
Swaps contents of two cells. |
void |
translateValueTo(int sourceRow,
int sourceCol,
int targetRowMin,
int targetColMin,
int targetRowMax,
int targetColMax)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final javax.swing.JTable table
Constructor Detail |
---|
public TableModifier(javax.swing.JTable table)
Method Detail |
---|
public void actionPerformed(java.awt.event.ActionEvent ev)
actionPerformed
in interface java.awt.event.ActionListener
public java.awt.Point[] getSelectionCorners()
public void copyRegion(int startRow, int startColumn, int endRow, int endColumn, boolean asObjects)
public java.awt.datatransfer.Transferable getContents(int startRow, int startColumn, int endRow, int endColumn, boolean asObjects)
Transferable
object representing contents and appearance of a cell region.
startRow
- table row index of top left region cornerstartColumn
- table column index of top left region cornerendRow
- table row index of bottom right region cornerendColumn
- table column index of bottom right region cornerasObjects
- if true
, result contains model value, otherwise formatted text valuesetContents(java.awt.datatransfer.Transferable, int, int)
,
getContents(int, int, boolean)
public java.awt.datatransfer.Transferable getContents(int row, int column, boolean asObjects)
Transferable
object representing contents and appearance of a cell.
Calls getContents(row, column, row, column, asObjects)
.
setContents(java.awt.datatransfer.Transferable, int, int)
,
getContents(int, int, int, int, boolean)
public void deleteRegion(int startRow, int startColumn, int endRow, int endColumn)
public void flipRegion(int startRow, int startColumn, int endRow, int endColumn)
public void swapCells(int row1, int column1, int row2, int column2, boolean asObjects)
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
public void paste(int startRow, int startColumn)
public void paste(int row1, int column1, int row2, int column2)
protected java.util.Map getContentsMap(java.awt.datatransfer.Transferable contents)
public void setContents(java.awt.datatransfer.Transferable contents, int startRow, int startColumn)
Transferable
object starting at the top left corner specified.
contents
- table (model) data to be writtenstartRow
- table row index of top left corner of the regionstartColumn
- table column index of top left corner of the regionsetContents(java.awt.datatransfer.Transferable, int, int, int, int)
,
getContents(int, int, int, int, boolean)
,
getContents(int, int, boolean)
public void setContents(java.awt.datatransfer.Transferable contents, int startRow, int startColumn, int endRow, int endColumn)
Transferable
object starting at the top left corner specified.
Optionally fills the entire specified rectangle if endRow
and endColumn
are greater or equal to startRow
and startColumn
respectively. Filling
is achieved by not going out of bounds of the rectangle and repeating the clipboard contents
until the rectangle is filled.
contents
- table (model) data to be writtenstartRow
- table row index of top left corner of the regionstartColumn
- table column index of top left corner of the regionendRow
- table row index of bottom right corner of the region (values < startRow
signify no filling)endColumn
- table column index of bottom right corner of the region (values < startColumn
signify no filling)getContents(int, int, int, int, boolean)
,
getContents(int, int, boolean)
public boolean ensureColumnCount(int count)
public boolean ensureRowCount(int count)
public void translateValueTo(int sourceRow, int sourceCol, int targetRowMin, int targetColMin, int targetRowMax, int targetColMax)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |