View Javadoc

1   /*
2    * $Id: TransitionReadEdgeEditor.java 1153 2008-07-03 09:47:47Z kwfgrid.bassheide $
3    *
4    * Copyright (c) 2008, Fraunhofer FIRST
5    * Fraunhofer Institute for Computer Architecture and Software Technology
6    * See http://www.first.fraunhofer.de and http://www.gridworkflow.org/gwes for more details.
7    */
8   package net.kwfgrid.gwui.gui;
9   
10  import org.glassbox.executor.Executor;
11  import net.kwfgrid.gworkflowdl.protocol.structure.ProtocolWorkflow;
12  import net.kwfgrid.gworkflowdl.protocol.structure.ProtocolTransition;
13  import net.kwfgrid.gworkflowdl.protocol.structure.ProtocolEdge;
14  import net.kwfgrid.gworkflowdl.structure.Edge;
15  import net.kwfgrid.gworkflowdl.structure.Transition;
16  
17  public class TransitionReadEdgeEditor extends AbstractTransitionEdgeEditor {
18      public TransitionReadEdgeEditor(Executor executor, ProtocolWorkflow workflow, ProtocolTransition transition) {
19  	super(executor, workflow, transition);
20      }
21  
22      protected String getTitle() {
23  	return "Read Edges";
24      }
25  
26      protected Edge getEdge(int index) {
27  	return getEdges()[index];
28      }
29  
30      protected Edge[] getEdges() {
31  	Edge[] edges = ((Transition)getElement()).getReadEdges();
32  	return edges==null?new Edge[0]:edges;
33      }
34  
35      protected String getElementName() {
36  	return ProtocolEdge.NAME_READPLACE;
37      }
38  }