当前位置: 首页>>代码示例>>Java>>正文


Java TableCellEditor.stopCellEditing方法代码示例

本文整理汇总了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);
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:27,代码来源:ComponentTypeDialog.java

示例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;
    }
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:19,代码来源:VariableTable.java

示例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();
	}
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:27,代码来源:StationsPanel.java

示例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();
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:10,代码来源:XMBeanAttributes.java

示例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();
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:XMBeanAttributes.java

示例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();
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:14,代码来源:ClassesPanel.java

示例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();
	}
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:15,代码来源:AllBlockingRegionsPanel.java

示例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();
	}
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:15,代码来源:BlockingStationPanel.java

示例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();
	}
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:12,代码来源:BlockingRegionParameterPanel.java

示例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();
	}
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:13,代码来源:StationsPanel.java

示例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();
	}
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:12,代码来源:FiringSectionPanel.java

示例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();
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:13,代码来源:SimulationPanel.java

示例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();
	}
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:15,代码来源:InGateWaySectionPanel.java

示例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();
	}
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:15,代码来源:RoutingSectionPanel.java

示例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);
        }
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:48,代码来源:BasicPanelVisual.java


注:本文中的javax.swing.table.TableCellEditor.stopCellEditing方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。