本文整理了Java中javax.swing.table.TableModel.addTableModelListener()
方法的一些代码示例,展示了TableModel.addTableModelListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableModel.addTableModelListener()
方法的具体详情如下:
包路径:javax.swing.table.TableModel
类名称:TableModel
方法名:addTableModelListener
暂无
代码示例来源:origin: groovy/groovy-core
public void setModel(TableModel model) {
this.model = model;
model.addTableModelListener(this);
}
代码示例来源:origin: groovy/groovy-core
public void propertyChange(PropertyChangeEvent event) {
update();
((TableModel) event.getOldValue()).removeTableModelListener(this);
((TableModel) event.getNewValue()).addTableModelListener(this);
}
}
代码示例来源:origin: libgdx/libgdx
table.getModel().addTableModelListener(this);
table.addMouseListener(new MouseAdapter() {
public void mouseClicked (MouseEvent e) {
代码示例来源:origin: groovy/groovy-core
protected void syntheticBind() {
boundTable = (JTable) ((PropertyBinding)sourceBinding).getBean();
boundTable.addPropertyChangeListener("model", this);
boundTable.getModel().addTableModelListener(this);
}
代码示例来源:origin: stackoverflow.com
this.addItemListener(new ItemHandler());
header.addMouseListener(new MouseHandler());
tableModel.addTableModelListener(new ModelHandler());
代码示例来源:origin: magefree/mage
table.getModel().addTableModelListener(new TableModelListener() {
@Override
public void tableChanged(TableModelEvent e) {
代码示例来源:origin: ron190/jsql-injection
/**
* Implement the PropertyChangeListener
*/
@Override
public void propertyChange(PropertyChangeEvent e) {
// When the TableModel changes we need to update the listeners
// and column widths
if ("model".equals(e.getPropertyName())) {
TableModel model = (TableModel)e.getOldValue();
model.removeTableModelListener( this );
model = (TableModel)e.getNewValue();
model.addTableModelListener( this );
this.adjustColumns();
}
}
代码示例来源:origin: ron190/jsql-injection
/**
* Indicate whether changes to the model should cause the width to be
* dynamically recalculated.
*/
public void setDynamicAdjustment(boolean isDynamicAdjustment) {
// May need to add or remove the TableModelListener when changed
if (this.isDynamicAdjustment != isDynamicAdjustment) {
if (isDynamicAdjustment) {
this.tableAdjust.addPropertyChangeListener( this );
this.tableAdjust.getModel().addTableModelListener( this );
} else {
this.tableAdjust.removePropertyChangeListener( this );
this.tableAdjust.getModel().removeTableModelListener( this );
}
}
this.isDynamicAdjustment = isDynamicAdjustment;
}
代码示例来源:origin: winder/Universal-G-Code-Sender
private JTable initCustomRemoverTable(JTable table) {
final String[] columnNames = {
Localization.getString("settings.processors.enabled"),
Localization.getString("PatternRemover")
};
final Class[] columnTypes = {
Boolean.class,
String.class
};
DefaultTableModel model = new DefaultTableModel(null, columnNames) {
@Override
public Class<?> getColumnClass(int idx) {
return columnTypes[idx];
}
};
table.setModel(model);
table.getTableHeader().setReorderingAllowed(false);
table.getModel().addTableModelListener((TableModelEvent e) -> change());
return table;
}
}
代码示例来源:origin: vulnersCom/burp-vulners-scanner
this.tblRules.getModel().addTableModelListener(ruleTableListener);
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
public MethodSignatureTypeSettingsForm(Project project) {
this.project = project;
this.tableView = new TableView<>();
this.modelList = new ListTableModel<>(
new CallToColumn(),
new MethodColumn(),
new IndexColumn(),
new ProviderColumn()
);
this.attachItems();
this.tableView.setModelAndUpdateColumns(this.modelList);
this.tableView.getModel().addTableModelListener(e -> MethodSignatureTypeSettingsForm.this.changed = true);
buttonHelp.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
super.mouseClicked(e);
IdeHelper.openUrl(Symfony2ProjectComponent.HELP_URL + "extension/signature_type.html");
}
});
enableCustomSignatureTypesCheckBox.setSelected(getSettings().objectSignatureTypeProvider);
enableCustomSignatureTypesCheckBox.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
super.mouseClicked(e);
MethodSignatureTypeSettingsForm.this.changed = true;
}
});
}
代码示例来源:origin: mucommander/mucommander
public void addDialogListener(final PreferencesDialog dialog) {
getModel().addTableModelListener(dialogListener = new TableModelListener() {
public void tableChanged(TableModelEvent e) {
dialog.componentChanged(PrefTable.this);
}
});
}
代码示例来源:origin: kaikramer/keystore-explorer
@Override
public void propertyChange(PropertyChangeEvent e) {
// When the TableModel changes we need to update the listeners
// and column widths
if ("model".equals(e.getPropertyName())) {
TableModel model = (TableModel) e.getOldValue();
model.removeTableModelListener(this);
model = (TableModel) e.getNewValue();
model.addTableModelListener(this);
adjustColumns();
}
}
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
public MethodParameterReferenceSettingsForm(Project project) {
this.project = project;
this.tableView = new TableView<>();
this.modelList = new ListTableModel<>(
new CallToColumn(),
new MethodColumn(),
new IndexColumn(),
new ProviderColumn(),
new ContributorColumn(),
new ContributorDataColumn()
);
this.attachItems();
this.tableView.setModelAndUpdateColumns(this.modelList);
this.tableView.getModel().addTableModelListener(e -> MethodParameterReferenceSettingsForm.this.changed = true);
buttonHelp.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
super.mouseClicked(e);
IdeHelper.openUrl(Symfony2ProjectComponent.HELP_URL + "extension/method_parameter.html");
}
});
}
代码示例来源:origin: com.jidesoft/jide-oss
@Override
public void installListeners() {
super.installListeners();
if (_component instanceof JTable) {
((JTable) _component).getModel().addTableModelListener(this);
_component.addPropertyChangeListener("model", this);
}
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
@Override
public Component getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int r, int c) {
TableModel tableModel = outline.getModel();
tableModel.addTableModelListener(this);
return super.getTableCellEditorComponent(table, value, isSelected, r, c);
}
代码示例来源:origin: freeplane/freeplane
/**
* @param node_text_column
*/
public FlatNodeTableFilterModel(final TableModel tableModel, final int[] node_text_column) {
super();
mTableModel = tableModel;
mNodeTextColumns = node_text_column;
tableModel.addTableModelListener(new TableModelHandler());
resetFilter();
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
private void installListeners() {
table.addPropertyChangeListener(getPropertyChangeListener());
table.getModel().addTableModelListener(getTableModelListener());
// whatever else turns out to be needed
}
代码示例来源:origin: freeplane/freeplane
public void setTableModel(final TableModel tableModel) {
if (this.tableModel != null) {
this.tableModel.removeTableModelListener(tableModelListener);
}
this.tableModel = tableModel;
if (this.tableModel != null) {
this.tableModel.addTableModelListener(tableModelListener);
}
clearSortingState();
fireTableStructureChanged();
}
代码示例来源:origin: org.swinglabs.swingx/swingx-core
/**
* @param oldValue
*/
protected void updateModel(TableModel oldValue) {
if (oldValue != null) {
oldValue.removeTableModelListener(getTableModelListener());
}
table.getModel().addTableModelListener(getTableModelListener());
updatePreferredRowHeights();
}
内容来源于网络,如有侵权,请联系作者删除!