本文整理匯總了Java中javax.swing.event.TableModelListener.tableChanged方法的典型用法代碼示例。如果您正苦於以下問題:Java TableModelListener.tableChanged方法的具體用法?Java TableModelListener.tableChanged怎麽用?Java TableModelListener.tableChanged使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.swing.event.TableModelListener
的用法示例。
在下文中一共展示了TableModelListener.tableChanged方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: separateStaticImportsCheckBoxActionPerformed
import javax.swing.event.TableModelListener; //導入方法依賴的package包/類
private void separateStaticImportsCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_separateStaticImportsCheckBoxActionPerformed
TableModel oldModel = importLayoutTable.getModel();
TableModel newModel = (DefaultTableModel)createTableModel(importGroupsOrder, preferences);
importLayoutTable.setModel(newModel);
setImportLayoutTableColumnsWidth();
for (TableModelListener l : ((DefaultTableModel)oldModel).getTableModelListeners()) {
oldModel.removeTableModelListener(l);
newModel.addTableModelListener(l);
l.tableChanged(null);
}
}
示例2: setValueAt
import javax.swing.event.TableModelListener; //導入方法依賴的package包/類
@Override
public void setValueAt(final Object aValue, final int rowIndex,
final int columnIndex) {
if (rowIndex < dynamicArray.size() && columnIndex < 2) {
dynamicArray.get(rowIndex)[columnIndex] = aValue;
}
for (final TableModelListener l : getTableModelListeners()) {
l.tableChanged(new TableModelEvent(this, rowIndex, rowIndex,
columnIndex, TableModelEvent.UPDATE));
}
}
示例3: setValueAt
import javax.swing.event.TableModelListener; //導入方法依賴的package包/類
@Override
public void setValueAt(final Object aValue, final int rowIndex,
final int columnIndex) {
if (rowIndex < data.size() && columnIndex < columnSize) {
data.get(rowIndex)[columnIndex] = aValue;
}
for (final TableModelListener l : this.getTableModelListeners()) {
l.tableChanged(new TableModelEvent(this, rowIndex, rowIndex,
columnIndex, TableModelEvent.UPDATE));
}
}
示例4: fireTableDataChanged
import javax.swing.event.TableModelListener; //導入方法依賴的package包/類
private void fireTableDataChanged(TableModelEvent event) {
for (TableModelListener listener: listeners.toArray(new TableModelListener[0])) {
listener.tableChanged(event);
}
}
示例5: fireTableDataChanged
import javax.swing.event.TableModelListener; //導入方法依賴的package包/類
private void fireTableDataChanged() {
for (TableModelListener tml : listeners) {
tml.tableChanged(new TableModelEvent(this));
}
}
示例6: notifyAllListeners
import javax.swing.event.TableModelListener; //導入方法依賴的package包/類
/**
* powiadomienie wszystkich słuchaczy o zmianie
*/
protected void notifyAllListeners() {
for (TableModelListener dataListener : listeners.getListeners(TableModelListener.class)) {
dataListener.tableChanged(new TableModelEvent(this));
}
}
示例7: fireTableChanged
import javax.swing.event.TableModelListener; //導入方法依賴的package包/類
void fireTableChanged() {
TableModelEvent e = new TableModelEvent(this);
for (TableModelListener l : new ArrayList<TableModelListener>(listeners)) {
l.tableChanged(e);
}
}