|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject javax.swing.event.TableModelEvent com.jidesoft.grid.UndoableTableModelEvent
public class UndoableTableModelEvent
A special TableModelEvent that contains the information of UndoableEdit.
Field Summary |
---|
Fields inherited from class javax.swing.event.TableModelEvent |
---|
ALL_COLUMNS, column, DELETE, firstRow, HEADER_ROW, INSERT, lastRow, type, UPDATE |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
UndoableTableModelEvent(TableModel source)
The constructor. |
|
UndoableTableModelEvent(TableModel source,
int row)
The constructor. |
|
UndoableTableModelEvent(TableModel source,
int firstRow,
int lastRow)
The constructor. |
|
UndoableTableModelEvent(TableModel source,
int firstRow,
int lastRow,
int column)
The constructor. |
|
UndoableTableModelEvent(TableModel source,
int firstRow,
int lastRow,
int column,
int type)
The constructor. |
Method Summary | |
---|---|
void |
addEdit(int rowIndex,
int columnIndex,
Object oldCellData,
Object newCellData)
Adds a new cell edit into the UndoableEdit. |
void |
addEdit(int rowIndex,
Vector<Object> oldRowData,
Vector<Object> newRowData)
Adds a new row edit into the UndoableEdit. |
boolean |
addEdit(UndoableEdit anEdit)
|
boolean |
canRedo()
|
boolean |
canUndo()
|
void |
die()
|
static void |
fireTableModelEvent(AbstractTableModel tableModel,
TableModelEvent e)
Helper method to fire an UndoableTableModelEvent. |
com.jidesoft.grid.UndoableTableModelEvent.TableModelEdit[] |
getEdits()
Gets all the TableModelEdit instance in array. |
String |
getPresentationName()
|
String |
getRedoPresentationName()
|
String |
getUndoPresentationName()
|
boolean |
isSignificant()
|
boolean |
isUndoRedo()
Gets the flag indicating if this event is triggered by an undo/redo activity or not. |
void |
redo()
|
boolean |
replaceEdit(UndoableEdit anEdit)
|
void |
setColumn(int column)
Sets the column of this event. |
void |
setFirstRow(int firstRow)
Sets the first row of this event. |
void |
setLastRow(int lastRow)
Sets the last row of this event. |
void |
setType(int type)
Sets the event type of this event. |
void |
setUndoRedo(boolean undoRedo)
Sets the flag indicating if this event is triggered by an undo/redo activity or not. |
void |
undo()
|
Methods inherited from class javax.swing.event.TableModelEvent |
---|
getColumn, getFirstRow, getLastRow, getType |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UndoableTableModelEvent(TableModel source)
source
- the table modelpublic UndoableTableModelEvent(TableModel source, int row)
source
- the table modelrow
- the row indexpublic UndoableTableModelEvent(TableModel source, int firstRow, int lastRow)
source
- the table modelfirstRow
- the first row indexlastRow
- the last row indexpublic UndoableTableModelEvent(TableModel source, int firstRow, int lastRow, int column)
source
- the table modelfirstRow
- the first row indexlastRow
- the last row indexcolumn
- the column indexpublic UndoableTableModelEvent(TableModel source, int firstRow, int lastRow, int column, int type)
source
- the table modelfirstRow
- the first row indexlastRow
- the last row indexcolumn
- the column indextype
- the event typeMethod Detail |
---|
public void addEdit(int rowIndex, Vector<Object> oldRowData, Vector<Object> newRowData)
rowIndex
- the row indexoldRowData
- the old row data. null when it's an insertion activity.newRowData
- the new row data. null when it's a deletion activity.public void addEdit(int rowIndex, int columnIndex, Object oldCellData, Object newCellData)
rowIndex
- the row indexcolumnIndex
- the column indexoldCellData
- the old cell datanewCellData
- the new cell datapublic void die()
die
in interface UndoableEdit
public void undo() throws CannotUndoException
undo
in interface UndoableEdit
CannotUndoException
public boolean canUndo()
canUndo
in interface UndoableEdit
public void redo() throws CannotRedoException
redo
in interface UndoableEdit
CannotRedoException
public boolean canRedo()
canRedo
in interface UndoableEdit
public boolean addEdit(UndoableEdit anEdit)
addEdit
in interface UndoableEdit
public boolean replaceEdit(UndoableEdit anEdit)
replaceEdit
in interface UndoableEdit
public boolean isSignificant()
isSignificant
in interface UndoableEdit
public String getPresentationName()
getPresentationName
in interface UndoableEdit
public String getUndoPresentationName()
getUndoPresentationName
in interface UndoableEdit
public String getRedoPresentationName()
getRedoPresentationName
in interface UndoableEdit
public void setUndoRedo(boolean undoRedo)
undoRedo
- the flagpublic boolean isUndoRedo()
public com.jidesoft.grid.UndoableTableModelEvent.TableModelEdit[] getEdits()
public void setType(int type)
type
- tye type.public void setFirstRow(int firstRow)
firstRow
- the first rowpublic void setLastRow(int lastRow)
lastRow
- the last rowpublic void setColumn(int column)
column
- the columnpublic static void fireTableModelEvent(AbstractTableModel tableModel, TableModelEvent e)
tableModel
- the table modele
- the event to fire
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |