📄 assigndetailtable.java
字号:
/**
*
*/
package flow.graph.gui.graph.cell.ui.table;
import javax.swing.DefaultCellEditor;
import javax.swing.JComboBox;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import org.jgraph.JGraph;
import org.jgraph.graph.DefaultGraphCell;
import flow.graph.gui.graph.FlowGraphConstants;
import flow.graph.gui.graph.cell.bpel.Assign;
import flow.graph.gui.graph.cell.bpel.Copy;
import flow.graph.gui.graph.cell.bpel.From;
import flow.graph.gui.graph.cell.bpel.Message;
import flow.graph.gui.graph.cell.bpel.Messages;
import flow.graph.gui.graph.cell.bpel.Part;
import flow.graph.gui.graph.cell.bpel.To;
/**
* @author Administrator
*
*/
public class AssignDetailTable extends JTable{
private DefaultGraphCell cell;
private JGraph graph;
private AssignDetailTableModel tableModel;
public final static int DEFAULT_ROW_COUNT = 10;
public AssignDetailTable(DefaultGraphCell cell, JGraph graph){
super(new AssignDetailTableModel());
tableModel = (AssignDetailTableModel)getModel();
//getColumnModel().getColumn(1).setCellEditor(new DefaultCellEditor(new JComboBox(Message.DataType)));
this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
this.cell = cell;
this.graph = graph;
Assign assign = (Assign)FlowGraphConstants.getBpelAssign(cell.getAttributes());
if(assign != null){
for(int i=0;i<assign.getCopys().size();i++){
Copy copy = (Copy)(assign.getCopys().get(i));
//tableModel.addRow(message.getName(), message.getType());
From from = copy.getFrom();
To to = copy.getTo();
tableModel.addRow(to.getMessage(), to.getProperty(), from.getFlag(), from.getMessage(), from.getProperty(), from.getExpression());
}
}
//initTable();
}
public void initTable(){
if(getRowCount() < DEFAULT_ROW_COUNT){
for(int i=getRowCount();i<DEFAULT_ROW_COUNT;i++){
tableModel.addRow("", "", false, "", "", "");
}
}
tableModel.fireTableDataChanged();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -