本文整理了Java中org.embl.ebi.escience.scufl.Processor.getPorts()
方法的一些代码示例,展示了Processor.getPorts()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Processor.getPorts()
方法的具体详情如下:
包路径:org.embl.ebi.escience.scufl.Processor
类名称:Processor
方法名:getPorts
暂无
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
private void addNode(Collection collection, Object node)
{
collection.add(node);
if (node instanceof Processor)
{
Port[] ports = ((Processor) node).getPorts();
for (int index = 0; index < ports.length; index++)
{
collection.add(ports[index]);
}
}
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
public int getIndexOfChild(Object parent, Object child)
{
if (parent instanceof Processor)
{
Port[] ports = ((Processor) parent).getPorts();
for (int index = 0; index < ports.length; index++)
{
if (ports[index].equals(child))
{
return index;
}
}
}
else if (parent instanceof Port)
{
// Check port is actually on the workflow edge?
return 0;
}
return -1;
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
public boolean isLeaf(Object node)
{
if (node instanceof Processor)
{
return ((Processor) node).getPorts().length != 0;
}
else if (node instanceof Port && isPortOnWorkflowEdge(node))
{
return true;
}
return true;
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
public Object getChild(Object parent, int index)
{
if (parent instanceof Processor)
{
Processor processor = (Processor) parent;
Port[] ports = processor.getPorts();
if (index < ports.length)
{
return ports[index];
}
return getDummyPort(processor);
}
else if (parent instanceof Port)
{
// TODO Check port is actually on the workflow edge?
return getDummyPort(parent);
}
else if (parent instanceof List)
{
return ((List) parent).get(index);
}
return null;
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
if (processor.getPorts().length != 0)
newRoots.addAll(Arrays.asList(processor.getPorts()));
if (processor.getPorts().length != 0)
newRoots.addAll(Arrays.asList(processor.getPorts()));
代码示例来源:origin: uk.org.mygrid.taverna.scufl.scufl-ui-components/template-editor
Port[] allPorts = theProcessor.getPorts();
final JComboBox subjects = new JComboBox(allPorts);
subjects.setRenderer(renderer);
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
public int getChildCount(Object parent)
{
if (parent instanceof Processor)
{
int ports = ((Processor) parent).getPorts().length;
if (getAttributes(parent) != null && getAttributes(parent).get(DUMMY_PORT) != null)
{
ports += 1;
}
return ports;
}
else if (parent instanceof Port && isPortOnWorkflowEdge(parent))
{
return 0;
}
else if (parent instanceof List)
{
return ((List) parent).size();
}
return 0;
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
private void addRemovedObject(Object removedObject)
{
if (!model.isPort(removedObject) && removedObject instanceof Port
&& ((Port) removedObject).getProcessor().getPorts().length == 0)
{
if (!(removedObject instanceof Port)) {
removedObject = model.getParent(removedObject);
}
}
addNode(removed, removedObject);
Object parent = model.getParent(removedObject);
if (parent != null && !(parent instanceof InternalSinkPortHolder || parent instanceof InternalSourcePortHolder))
{
changed.add(parent);
}
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui
public Object valueForCellChanged(Object cell, Object newValue)
{
if (cell instanceof Processor)
{
Processor processor = (Processor) cell;
processor.setName(newValue.toString());
return processor.getName();
}
if (cell instanceof Port) {
Port port = (Port) cell;
if (isPortOnWorkflowEdge(port)) {
for (Port p : port.getProcessor().getPorts()) { //prevent renaming if a port already has that name
if (p.getName().equals(newValue.toString())) {
return port.getName();
}
}
port.setName(newValue.toString());
return port.getName();
}
}
return null;
}
}
代码示例来源:origin: uk.org.mygrid.taverna.scufl.scufl-ui-components/scufl-interactive-diagram
} else {
Processor processor = (Processor) scuflObject;
Port[] ports = processor.getPorts();
if (ports.length > 0) {
JMenu linkMenu = new JMenu(
内容来源于网络,如有侵权,请联系作者删除!