Author: [EMAIL PROTECTED]
Date: Wed Dec  3 15:49:52 2008
New Revision: 4243

Modified:
    trunk/dev/oophm/src/com/google/gwt/dev/ModulePanel.java

Log:
Remove JDK 1.6 dependency from OOPHM shell.

Patch by: jat
Review by: scottb (TBR)


Modified: trunk/dev/oophm/src/com/google/gwt/dev/ModulePanel.java
==============================================================================
--- trunk/dev/oophm/src/com/google/gwt/dev/ModulePanel.java     (original)
+++ trunk/dev/oophm/src/com/google/gwt/dev/ModulePanel.java     Wed Dec  3  
15:49:52 2008
@@ -26,7 +26,6 @@
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;

-import javax.swing.BorderFactory;
  import javax.swing.ImageIcon;
  import javax.swing.JButton;
  import javax.swing.JLabel;
@@ -47,9 +46,6 @@
      public ClosedTabComponent() {
        super(new FlowLayout(FlowLayout.LEFT, 0, 0));
        setOpaque(false);
-      JLabel label = new JLabel("Disconnected");
-      add(label);
-      label.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
        JButton button = new JButton(closeIcon);
        button.setBorderPainted(false);
        button.setPreferredSize(new Dimension(closeIcon.getIconWidth(),
@@ -78,11 +74,13 @@

    private final JTabbedPane tabs;

+  private JPanel topPanel;
+
    public ModulePanel(Type maxLevel, String moduleName, String userAgent,
        String remoteSocket, final JTabbedPane tabs) {
      super(new BorderLayout());
      this.tabs = tabs;
-    JPanel topPanel = new JPanel();
+    topPanel = new JPanel();
      topPanel.add(new JLabel(moduleName));
      JButton compileButton = new JButton("Compile (not yet implemented)");
      compileButton.setEnabled(false);
@@ -120,10 +118,12 @@
    }

    public void disconnect() {
+    topPanel.add(new ClosedTabComponent());
      synchronized (tabs) {
        int index = tabs.indexOfComponent(this);
        if (index > -1) {
-        tabs.setTabComponentAt(index, new ClosedTabComponent());
+        tabs.setTitleAt(index, "Disconnected");
+        tabs.setIconAt(index, null);
        }
      }
      loggerPanel.disconnected();

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to