本文整理汇总了Java中javax.swing.table.TableCellEditor.stopCellEditing方法的典型用法代码示例。如果您正苦于以下问题:Java TableCellEditor.stopCellEditing方法的具体用法?Java TableCellEditor.stopCellEditing怎么用?Java TableCellEditor.stopCellEditing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.table.TableCellEditor
的用法示例。
在下文中一共展示了TableCellEditor.stopCellEditing方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renameDomainInComponents
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
/**
* Rename domain in components.
*
* @param oldDomainName the old domain name
* @param newDomainName the new domain name
*/
public void renameDomainInComponents(String oldDomainName, String newDomainName) {
DefaultTableModel dtmComponents = this.getTableModel4ComponentTypes();
int column = getColumnHeaderIndexComponents(COL_Domain);
// --- Get the component type definitions from table ----
JTable jtComponents = this.getJTable4ComponentTypes();
// --- Confirm, apply changes in table ------------------
TableCellEditor tceComponents = jtComponents.getCellEditor();
if (tceComponents!=null) {
tceComponents.stopCellEditing();
}
for(int row=0; row<dtmComponents.getRowCount(); row++){
String currValue = (String) dtmComponents.getValueAt(row, column);
if (currValue.equals(oldDomainName)) {
dtmComponents.setValueAt(newDomainName, row, column);
}
}
this.setTableCellEditor4DomainsInComponents(null);
}
示例2: editingStopped
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
public void editingStopped(ChangeEvent e) {
synchronized(mutex) {
if (recursion) return;
recursion = true;
}
try {
// Take in the new value
TableCellEditor editor = getCellEditor();
if (editor != null) {
editor.stopCellEditing();
Object value = editor.getCellEditorValue();
setValueAt(value, editingRow, editingColumn);
removeEditor();
}
} finally {
recursion = false;
}
}
示例3: lostFocus
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
/**
* Called when an other panel is selected. This method will set a default station as reference
* station of any closed class without it.
*/
@Override
public void lostFocus() {
Vector classes = classData.getClassKeys();
// Perform check only if valids stations are created to be reference station
if (data.getStationKeysNoSourceSink().size() > 0) {
for (int i = 0; i < classes.size(); i++) {
Object classKey = classes.get(i);
// If this is a closed class and it has no reference source or a deleted one
if (classData.getClassType(classKey) == CLASS_TYPE_CLOSED
&& (classData.getClassRefStation(classKey) == null || !data.getStationKeys().contains(classData.getClassRefStation(classKey)))) {
// Sets the first station as reference station
classData.setClassRefStation(classKey, data.getStationKeysNoSourceSink().get(0));
}
}
}
// Aborts editing of table
TableCellEditor editor = stationTable.getCellEditor();
if (editor != null) {
editor.stopCellEditing();
}
}
示例4: stopCellEditing
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
public void stopCellEditing() {
if (LOGGER.isLoggable(Level.FINER)) {
LOGGER.finer("Stop Editing Row: "+getEditingRow());
}
final TableCellEditor tableCellEditor = getCellEditor();
if (tableCellEditor != null) {
tableCellEditor.stopCellEditing();
}
}
示例5: stopCellEditing
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
public void stopCellEditing() {
if (LOGGER.isLoggable(Level.TRACE)) {
LOGGER.log(Level.TRACE, "Stop Editing Row: "+getEditingRow());
}
final TableCellEditor tableCellEditor = getCellEditor();
if (tableCellEditor != null) {
tableCellEditor.stopCellEditing();
}
}
示例6: lostFocus
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
/**
* called by the Wizard before when switching to another panel
*/
@Override
public void lostFocus() {
// Aborts editing of table
TableCellEditor editor = classTable.getCellEditor();
if (editor != null) {
editor.stopCellEditing();
}
// Preloads jobs
((SimulationDefinition) data).manageJobs();
}
示例7: lostFocus
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
/**
* called by the Wizard before when switching to another panel
*/
@Override
public void lostFocus() {
// Aborts editing of table
TableCellEditor editor = regions.getCellEditor();
if (editor != null) {
editor.stopCellEditing();
}
if (blockingPanel != null) {
blockingPanel.lostFocus();
}
}
示例8: lostFocus
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
/**
* called by the Wizard before when switching to another panel
*/
@Override
public void lostFocus() {
if (parameterPanel != null) {
parameterPanel.lostFocus();
}
// Aborts editing of table
TableCellEditor editor = stationTable.getCellEditor();
if (editor != null) {
editor.stopCellEditing();
}
}
示例9: lostFocus
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
/**
* called by the Wizard before when switching to another panel
*/
@Override
public void lostFocus() {
// Aborts editing of table
TableCellEditor editor = table.getCellEditor();
if (editor != null) {
editor.stopCellEditing();
}
}
示例10: lostFocus
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
/**
* Called when an other panel is selected. This method will set a default station as reference
* station of any closed class without it.
*/
@Override
public void lostFocus() {
// Aborts editing of table
TableCellEditor editor = stationTable.getCellEditor();
if (editor != null) {
editor.stopCellEditing();
}
}
示例11: stopAllCellEditing
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
private void stopAllCellEditing() {
TableCellEditor editor = null;
editor = firingTable.getCellEditor();
if (editor != null) {
editor.stopCellEditing();
}
editor = modeTable.getCellEditor();
if (editor != null && editor != modeTable.getCellEditor(0, 1)) {
editor.stopCellEditing();
}
}
示例12: lostFocus
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
/**
* called by the Wizard before when switching to another panel
*/
@Override
public void lostFocus() {
// Aborts editing of table
TableCellEditor editor = preloadTable.getCellEditor();
if (editor != null) {
editor.stopCellEditing();
}
simd.manageJobs();
}
示例13: lostFocus
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
/**
* called by the Wizard before when switching to another panel
*/
@Override
public void lostFocus() {
// Aborts editing of table
TableCellEditor editor = forkStrategies.getCellEditor();
if (editor != null) {
editor.stopCellEditing();
}
if (forkProbEditor != null) {
forkProbEditor.stopEditing();
}
}
示例14: lostFocus
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
/**
* called by the Wizard before when switching to another panel
*/
@Override
public void lostFocus() {
// Aborts editing of table
TableCellEditor editor = routingStrategies.getCellEditor();
if (editor != null) {
editor.stopCellEditing();
}
if (routingProbEditor != null) {
routingProbEditor.stopEditing();
}
}
示例15: store
import javax.swing.table.TableCellEditor; //导入方法依赖的package包/类
void store(WizardDescriptor d) {
synchronized (HANDLE_LOCK) {
if (handle != null) {
handle.finish();
handle = null;
}
}
String name = projectNameTextField.getText().trim();
String folder = createdFolderTextField.getText().trim();
final File parentFolder = new File(folder);
d.putProperty(CommonProjectActions.PROJECT_PARENT_FOLDER, parentFolder);
if (d instanceof TemplateWizard) {
parentFolder.mkdirs();
((TemplateWizard) d).setTargetFolder(DataFolder.findFolder(FileUtil.toFileObject(parentFolder)));
}
d.putProperty("name", name); //NOI18N
if (d instanceof TemplateWizard) {
((TemplateWizard) d).setTargetName(name);
}
d.putProperty("artifactId", txtArtifactId.getText().trim()); //NOI18N
d.putProperty("groupId", txtGroupId.getText().trim()); //NOI18N
MavenSettings.getDefault().setLastArchetypeGroupId(txtGroupId.getText().trim());
d.putProperty("version", txtVersion.getText().trim()); //NOI18N
MavenSettings.getDefault().setLastArchetypeVersion(txtVersion.getText().trim());
d.putProperty("package", txtPackage.getText().trim()); //NOI18N
if (tblAdditionalProps.isVisible()) {
if (tblAdditionalProps.isEditing()) {
TableCellEditor edito = tblAdditionalProps.getCellEditor();
if (edito != null) {
edito.stopCellEditing();
}
}
TableModel mdl = tblAdditionalProps.getModel();
HashMap<String, String> map = new HashMap<String, String>();
for (int i = 0; i < mdl.getRowCount(); i++) {
map.put((String)mdl.getValueAt(i, 0), (String)mdl.getValueAt(i, 1));
}
d.putProperty(ArchetypeWizardUtils.ADDITIONAL_PROPS, map);
}
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
panel.getValidationGroup().remove(vg);
}
});
}