com.scudata.ide.vdb.panel.PanelSequence Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esproc Show documentation
Show all versions of esproc Show documentation
SPL(Structured Process Language) A programming language specially for structured data computing.
package com.scudata.ide.vdb.panel;
import java.awt.BorderLayout;
import com.scudata.dm.BaseRecord;
import com.scudata.dm.Sequence;
import com.scudata.ide.common.EditListener;
import com.scudata.ide.spl.base.PanelValue;
import com.scudata.ide.vdb.control.VDBTreeNode;
public class PanelSequence extends PanelEditor implements EditListener {
private static final long serialVersionUID = 1L;
PanelValue pSequence = new PanelValue();
Sequence data = null;
public PanelSequence(EditListener listener) {
super(listener);
setLayout(new BorderLayout());
add(pSequence, BorderLayout.CENTER);
init();
}
void init() {
pSequence.setEditListener(this);
}
void setSequence(Sequence seq) {
beforeInit();
data = seq;
pSequence.tableValue.setValue(seq, true);
afterInit();
}
Sequence getSequence() {
return data;
}
public void setNode(VDBTreeNode node) {
this.node = node;
Sequence seq = (Sequence) node.getData();
setSequence(seq);
}
public VDBTreeNode getNode() {
Sequence seq = getSequence();
node.saveData(seq);
return node;
}
public void editChanged(Object newVal) {
int row = pSequence.tableValue.getSelectedRow();
int col = pSequence.tableValue.getSelectedColumn();
BaseRecord record = (BaseRecord) data.get(row + 1);
record.set(col - 1, newVal);
getNode();
listener.editChanged(newVal);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy