Revision: 3742
Author: [email protected]
Date: Thu Jul 15 15:05:37 2010
Log: Disabled items in the enterprise menu and added a "Get Enterprise..." item.
http://code.google.com/p/power-architect/source/detail?r=3742

Modified:
 /trunk/src/main/java/ca/sqlpower/architect/swingui/ArchitectFrame.java

=======================================
--- /trunk/src/main/java/ca/sqlpower/architect/swingui/ArchitectFrame.java Wed Jul 14 14:56:34 2010 +++ /trunk/src/main/java/ca/sqlpower/architect/swingui/ArchitectFrame.java Thu Jul 15 15:05:37 2010
@@ -162,6 +162,7 @@
 import ca.sqlpower.swingui.enterprise.client.SPServerInfoManagerPanel;
 import ca.sqlpower.swingui.event.SessionLifecycleEvent;
 import ca.sqlpower.swingui.event.SessionLifecycleListener;
+import ca.sqlpower.util.BrowserUtil;
 import ca.sqlpower.util.UserPrompterFactory;

 import com.google.common.collect.BiMap;
@@ -281,8 +282,18 @@
         }
     };

- private Action openServerManagerAction = new AbstractAction("Configure Server Connections...") { + private final Action enterpriseLinkAction = new AbstractAction("Get Enterprise...") {
         public void actionPerformed(ActionEvent e) {
+            try {
+            BrowserUtil.launch("http://www.sqlpower.ca/page/architect-e";);
+            } catch (IOException ex) {
+ ASUtils.showExceptionDialog(currentSession, "Unable to open link: http://www.sqlpower.ca/page/architect-e";, ex);
+            }
+        }
+    };
+
+ private final Action openServerManagerAction = new AbstractAction("Configure Server Connections...") {
+        public void actionPerformed(ActionEvent e) {

final JDialog d = SPSUtils.makeOwnedDialog(ArchitectFrame.this, "Server Connections");

@@ -473,6 +484,8 @@

     private AbstractAction cycleTabAction;

+    private JMenuItem enterpriseLinkButton;
+
     /**
* Sets up a new ArchitectFrame, which represents a window containing one or * more {...@link ArchitectSwingSession}s. It will not become visible until
@@ -985,8 +998,11 @@

         // Enterprise stuff ...
         enterpriseMenu = new JMenu("Enterprise");
+        enterpriseLinkButton = enterpriseMenu.add(enterpriseLinkAction);
         enterpriseMenu.add(openServerManagerAction);
+        openServerManagerAction.setEnabled(false);
         enterpriseMenu.add(openProjectManagerAction);
+        openProjectManagerAction.setEnabled(false);
openRevisionListAction.setEnabled(currentSession.isEnterpriseSession());
         enterpriseMenu.add(openRevisionListAction);

@@ -1480,6 +1496,22 @@
         return profileAction;
     }

+    public JMenuItem getEnterpriseLinkButton() {
+        return enterpriseLinkButton;
+    }
+
+    public Action getOpenServerManagerAction() {
+        return openServerManagerAction;
+    }
+
+ public void setOpenProjectManagerAction(Action openProjectManagerAction) {
+        this.openProjectManagerAction = openProjectManagerAction;
+    }
+
+    public Action getOpenProjectManagerAction() {
+        return openProjectManagerAction;
+    }
+
     public AlignTableAction getAlignTableHorizontalAction() {
         return alignTableHorizontalAction;
     }

Reply via email to