Author: koen.aers(a)jboss.com
Date: 2008-07-29 10:30:04 -0400 (Tue, 29 Jul 2008)
New Revision: 9398
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/ProcessWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StartStateWrapper.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/SuperStateWrapper.java
Log:
DefaultNodeWrapper and DefaultFlowWrapper
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/ProcessWrapper.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/ProcessWrapper.java 2008-07-29
14:28:37 UTC (rev 9397)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/ProcessWrapper.java 2008-07-29
14:30:04 UTC (rev 9398)
@@ -1,12 +1,11 @@
package org.jboss.tools.flow.jpdl4.graph.wrapper;
-import org.jboss.tools.flow.common.core.Node;
-import org.jboss.tools.flow.editor.core.AbstractRootWrapper;
+import org.jboss.tools.flow.editor.core.DefaultFlowWrapper;
import org.jboss.tools.flow.editor.core.NodeWrapper;
import org.jboss.tools.flow.jpdl4.core.Process;
import org.jboss.tools.flow.jpdl4.core.StartState;
-public class ProcessWrapper extends AbstractRootWrapper {
+public class ProcessWrapper extends DefaultFlowWrapper {
public ProcessWrapper() {
setElement(new Process());
@@ -16,42 +15,6 @@
return (Process) getElement();
}
- public String getName() {
- return getProcess().getName();
- }
-
- public void setName(String name) {
- getProcess().setName(name);
- }
-
- public Integer getRouterLayout() {
- Integer routerLayout = (Integer)
getProcess().getMetaData("routerLayout");
- if (routerLayout == null) {
- return ROUTER_LAYOUT_MANUAL;
- }
- return routerLayout;
- }
-
- public void internalSetRouterLayout(Integer routerLayout) {
- getProcess().setMetaData("routerLayout", routerLayout);
- }
-
- protected void internalAddElement(NodeWrapper element) {
- Node node = (Node)element.getElement();
- long id = 0;
- for (Node n: getProcess().getNodes()) {
- if (n.getId() > id) {
- id = n.getId();
- }
- }
- node.setId(++id);
- getProcess().addNode(node);
- }
-
- protected void internalRemoveElement(NodeWrapper element) {
- getProcess().removeNode((Node)element.getElement());
- }
-
public boolean acceptsElement(NodeWrapper element) {
if (element.getElement() instanceof StartState) {
return getProcess().getStartState() == null;
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StartStateWrapper.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StartStateWrapper.java 2008-07-29
14:28:37 UTC (rev 9397)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/StartStateWrapper.java 2008-07-29
14:30:04 UTC (rev 9398)
@@ -7,8 +7,6 @@
public class StartStateWrapper extends DefaultNodeWrapper {
- private static final long serialVersionUID = 1L;
-
public StartStateWrapper() {
setElement(new StartState());
setName("Start");
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/SuperStateWrapper.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/SuperStateWrapper.java 2008-07-29
14:28:37 UTC (rev 9397)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.graph/src/org/jboss/tools/flow/jpdl4/graph/wrapper/SuperStateWrapper.java 2008-07-29
14:30:04 UTC (rev 9398)
@@ -5,7 +5,6 @@
import org.jboss.tools.flow.common.core.Node;
import org.jboss.tools.flow.editor.core.AbstractContainerWrapper;
import org.jboss.tools.flow.editor.core.ContainerWrapper;
-import org.jboss.tools.flow.editor.core.DefaultNodeWrapper;
import org.jboss.tools.flow.editor.core.NodeWrapper;
import org.jboss.tools.flow.jpdl4.core.Process;
import org.jboss.tools.flow.jpdl4.core.StartState;