本文整理汇总了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);
}
}