Anonymous avatar Anonymous committed b2c73ef

Initial import from SourceForge

Comments (0)

Files changed (1)

src/designer/com/opensymphony/workflow/designer/editor/DetailPanel.java

+package com.opensymphony.workflow.designer.editor;
+
+import javax.swing.*;
+
+import com.opensymphony.workflow.designer.WorkflowCell;
+import com.opensymphony.workflow.designer.WorkflowEdge;
+
+/**
+ * @author Hani Suleiman (hani@formicary.net)
+ * Date: May 20, 2003
+ * Time: 10:27:26 AM
+ */
+public abstract class DetailPanel extends JPanel
+{
+  private WorkflowCell cell;
+  private WorkflowEdge edge;
+
+  private boolean componentsInited = false;
+
+  public WorkflowCell getCell()
+  {
+    return cell;
+  }
+
+  public WorkflowEdge getEdge()
+  {
+    return edge;
+  }
+
+  protected void viewClosed()
+  {    
+  }
+
+  public final void closeView()
+  {
+    viewClosed();
+  }
+
+  public final void setCell(WorkflowCell cell)
+  {
+    if(!componentsInited) initComponents();
+    this.cell = cell;
+    setName(cell.getClass().getName());
+    updateView();
+  }
+
+  protected abstract void initComponents();
+
+  protected abstract void updateView();
+
+  public String getTitle()
+  {
+    return "Details";
+  }
+
+  public void setEdge(WorkflowEdge edge)
+  {
+    if(!componentsInited) initComponents();
+    this.edge = edge;
+    setName(edge.getClass().getName());
+    updateView();
+  }
+}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.