📄 endstateimpl.java
字号:
package org.jgpd.io.jbpm.definition.impl;
import java.util.Vector;
import javax.swing.JTable;
import javax.swing.table.*;
import javax.swing.*;
import org.jgpd.UI.PropPanelConfig;
import org.jgpd.UI.tableModels.JGpdTableModel;
import org.jgpd.io.jbpm.definition.EndState;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
public class EndStateImpl extends StateImpl implements EndState {
public static final String nodeType = new String("end-state");
public EndStateImpl() {}
public EndStateImpl(Node node)
{
String nodeValue = null;
// Get attributes
NamedNodeMap attrMap = node.getAttributes();
Node nameNode = attrMap.getNamedItem("name");
String name = nameNode.getNodeValue();
setName("");
}
public PropPanelConfig propPanelModel(JTable[] table, JGpdTableModel[] tableModel)
{
PropPanelConfig panelConfig = new PropPanelConfig();
panelConfig.numTabsUsed = 1;
panelConfig.tabStrings.add("类型属性");
// Properties tab
tableModel[0].setRowCount(0);
tableModel[0].setColumnIdentifiers(new Object[]{"类型",
"值"});
// No entries allowed, set any default entry string
tableModel[0].setDefaultCellEntries(new Object[]{"", ""});
tableModel[0].setAddDeletingAllowed(false);
tableModel[0].setColumnEditable(new boolean[]{false,true});
tableModel[0].setMaxNumDynamicRows(0);
tableModel[0].insertRow( 0, new Object[] {
"Result",
"None"});
tableModel[0].setNumStaticRows(1);
JComboBox comboBox1 = new JComboBox();
comboBox1.addItem("Service");
comboBox1.addItem("Receive");
comboBox1.addItem("Send");
comboBox1.addItem("User");
comboBox1.addItem("Script");
comboBox1.addItem("Abstract");
comboBox1.addItem("Manual");
comboBox1.addItem("None");
TableColumn editColumn0 = table[0].getColumnModel().getColumn(1);
editColumn0.setCellEditor(new DefaultCellEditor(comboBox1));
return panelConfig;
}
public void applyProperties(DefaultTableModel[] tableModel)
{
Vector dataVector = tableModel[0].getDataVector();
//setName(((Vector)dataVector.get(0)).get(1).toString());
}
public void validate()
{
super.validate();
}
public String getDisplayedNodeType()
{
return nodeType;
}
public String writeXML(String indent)
{
// String xml = indent + "<end-state name=\"";
// xml += getName() + "\"/>\n";
// return xml;
return "";
}
protected void validateLeavingTransitions()
{
// overwriting the test of the node that requires that a node has to have
// at least one leaving transition
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -