Graphical bits moved into files to save jar size
authoramwaterhouse <Andrew Waterhouse>
Tue, 15 Nov 2005 11:09:58 +0000 (11:09 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 15 Nov 2005 11:09:58 +0000 (11:09 +0000)
18 files changed:
src/jalview/appletgui/AlignFrame.java
src/jalview/appletgui/AlignmentPanel.java
src/jalview/appletgui/AnnotationLabels.java
src/jalview/appletgui/AnnotationPanel.java
src/jalview/appletgui/CutAndPasteTransfer.java
src/jalview/appletgui/Finder.java
src/jalview/appletgui/FontChooser.java
src/jalview/appletgui/IdCanvas.java
src/jalview/appletgui/PCAPanel.java
src/jalview/appletgui/PairwiseAlignPanel.java
src/jalview/appletgui/RedundancyPanel.java
src/jalview/appletgui/RotatableCanvas.java
src/jalview/appletgui/ScalePanel.java
src/jalview/appletgui/SeqCanvas.java
src/jalview/appletgui/SliderPanel.java
src/jalview/appletgui/TreeCanvas.java
src/jalview/appletgui/TreePanel.java
src/jalview/appletgui/UserDefinedColours.java

index 692c2fd..f101ab5 100755 (executable)
@@ -19,7 +19,6 @@
 \r
 package jalview.appletgui;\r
 \r
-import jalview.jbappletgui.GAlignFrame;\r
 import jalview.schemes.*;\r
 import jalview.datamodel.*;\r
 import jalview.analysis.*;\r
@@ -31,8 +30,8 @@ import java.io.InputStreamReader;
 import java.io.BufferedReader;\r
 import java.net.URL;\r
 \r
-public class AlignFrame\r
-    extends GAlignFrame\r
+\r
+public class AlignFrame extends Frame\r
 {\r
   final AlignmentPanel alignPanel;\r
   public final AlignViewport viewport;\r
@@ -43,6 +42,12 @@ public class AlignFrame
 \r
   public AlignFrame(AlignmentI al, jalview.bin.JalviewLite applet, String title)\r
   {\r
+    try{\r
+      jbInit();\r
+    }catch(Exception ex)\r
+    {\r
+      ex.printStackTrace();\r
+    }\r
     this.applet = applet;\r
     viewport = new AlignViewport(al, applet);\r
     alignPanel = new AlignmentPanel(this, viewport);\r
@@ -1467,4 +1472,603 @@ public class AlignFrame
     }\r
   }\r
 \r
+\r
+  //////////////////////////////////////////////////////////////////////////////////\r
+  //JBuilder Graphics here\r
+\r
+    protected MenuBar alignFrameMenuBar = new MenuBar();\r
+    protected Menu fileMenu = new Menu();\r
+    protected MenuItem closeMenuItem = new MenuItem();\r
+    protected Menu editMenu = new Menu();\r
+    protected Menu viewMenu = new Menu();\r
+    protected Menu colourMenu = new Menu();\r
+    protected Menu calculateMenu = new Menu();\r
+    protected MenuItem selectAllSequenceMenuItem = new MenuItem();\r
+    protected MenuItem deselectAllSequenceMenuItem = new MenuItem();\r
+    protected MenuItem invertSequenceMenuItem = new MenuItem();\r
+    protected MenuItem remove2LeftMenuItem = new MenuItem();\r
+    protected MenuItem remove2RightMenuItem = new MenuItem();\r
+    protected MenuItem removeGappedColumnMenuItem = new MenuItem();\r
+    protected MenuItem removeAllGapsMenuItem = new MenuItem();\r
+    protected CheckboxMenuItem viewBoxesMenuItem = new CheckboxMenuItem();\r
+    protected CheckboxMenuItem viewTextMenuItem = new CheckboxMenuItem();\r
+    protected MenuItem sortPairwiseMenuItem = new MenuItem();\r
+    protected MenuItem sortIDMenuItem = new MenuItem();\r
+    protected MenuItem sortGroupMenuItem = new MenuItem();\r
+    protected MenuItem removeRedundancyMenuItem = new MenuItem();\r
+    protected MenuItem pairwiseAlignmentMenuItem = new MenuItem();\r
+    protected MenuItem PCAMenuItem = new MenuItem();\r
+    protected MenuItem averageDistanceTreeMenuItem = new MenuItem();\r
+    protected MenuItem neighbourTreeMenuItem = new MenuItem();\r
+    BorderLayout borderLayout1 = new BorderLayout();\r
+    public Label statusBar = new Label();\r
+    protected Menu outputTextboxMenu = new Menu();\r
+    protected MenuItem clustalColour = new MenuItem();\r
+    protected MenuItem zappoColour = new MenuItem();\r
+    protected MenuItem taylorColour = new MenuItem();\r
+    protected MenuItem hydrophobicityColour = new MenuItem();\r
+    protected MenuItem helixColour = new MenuItem();\r
+    protected MenuItem strandColour = new MenuItem();\r
+    protected MenuItem turnColour = new MenuItem();\r
+    protected MenuItem buriedColour = new MenuItem();\r
+    protected MenuItem userDefinedColour = new MenuItem();\r
+    protected MenuItem PIDColour = new MenuItem();\r
+    protected MenuItem BLOSUM62Colour = new MenuItem();\r
+    MenuItem njTreeBlosumMenuItem = new MenuItem();\r
+    MenuItem avDistanceTreeBlosumMenuItem = new MenuItem();\r
+    protected CheckboxMenuItem annotationPanelMenuItem = new CheckboxMenuItem();\r
+    protected CheckboxMenuItem colourTextMenuItem = new CheckboxMenuItem();\r
+    MenuItem overviewMenuItem = new MenuItem();\r
+    protected MenuItem undoMenuItem = new MenuItem();\r
+    protected MenuItem redoMenuItem = new MenuItem();\r
+    protected CheckboxMenuItem conservationMenuItem = new CheckboxMenuItem();\r
+    MenuItem noColourmenuItem = new MenuItem();\r
+    protected CheckboxMenuItem wrapMenuItem = new CheckboxMenuItem();\r
+    protected CheckboxMenuItem renderGapsMenuItem = new CheckboxMenuItem();\r
+    MenuItem findMenuItem = new MenuItem();\r
+    Menu searchMenu = new Menu();\r
+    protected CheckboxMenuItem abovePIDThreshold = new CheckboxMenuItem();\r
+    protected MenuItem nucleotideColour = new MenuItem();\r
+    MenuItem deleteGroups = new MenuItem();\r
+    MenuItem delete = new MenuItem();\r
+    MenuItem copy = new MenuItem();\r
+    MenuItem cut = new MenuItem();\r
+    Menu Menu1 = new Menu();\r
+    MenuItem pasteNew = new MenuItem();\r
+    MenuItem pasteThis = new MenuItem();\r
+    protected CheckboxMenuItem applyToAllGroups = new CheckboxMenuItem();\r
+    protected MenuItem font = new MenuItem();\r
+    protected CheckboxMenuItem dbref = new CheckboxMenuItem();\r
+    protected CheckboxMenuItem scaleAbove = new CheckboxMenuItem();\r
+    protected CheckboxMenuItem scaleLeft = new CheckboxMenuItem();\r
+    protected CheckboxMenuItem scaleRight = new CheckboxMenuItem();\r
+    MenuItem modifyPID = new MenuItem();\r
+    MenuItem modifyConservation = new MenuItem();\r
+    protected Menu sortByTreeMenu = new Menu();\r
+    Menu sort = new Menu();\r
+    Menu calculate = new Menu();\r
+    MenuItem inputText = new MenuItem();\r
+    Menu helpMenu = new Menu();\r
+    MenuItem documentation = new MenuItem();\r
+    MenuItem about = new MenuItem();\r
+    protected CheckboxMenuItem seqLimits = new CheckboxMenuItem();\r
+\r
+    private void jbInit() throws Exception {\r
+\r
+      setMenuBar(alignFrameMenuBar);\r
+\r
+      MenuItem item;\r
+\r
+      // dynamically fill save as menu with available formats\r
+      for (int i = 0; i < jalview.io.AppletFormatAdapter.formats.size(); i++)\r
+      {\r
+\r
+        item = new MenuItem( (String) jalview.io.AppletFormatAdapter.formats.\r
+                            elementAt(\r
+                                i));\r
+        item.addActionListener(new java.awt.event.ActionListener()\r
+        {\r
+          public void actionPerformed(ActionEvent e)\r
+          {\r
+            outputText_actionPerformed(e);\r
+          }\r
+        });\r
+\r
+        outputTextboxMenu.add(item);\r
+      }\r
+\r
+\r
+        fileMenu.setLabel("File");\r
+        closeMenuItem.setLabel("Close");\r
+        closeMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    closeMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        editMenu.setLabel("Edit");\r
+        viewMenu.setLabel("View");\r
+        colourMenu.setLabel("Colour");\r
+        calculateMenu.setLabel("Calculate");\r
+        selectAllSequenceMenuItem.setLabel("Select all");\r
+        selectAllSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    selectAllSequenceMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        deselectAllSequenceMenuItem.setLabel("Deselect All");\r
+        deselectAllSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    deselectAllSequenceMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        invertSequenceMenuItem.setLabel("Invert Selection");\r
+        invertSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    invertSequenceMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        remove2LeftMenuItem.setLabel("Remove Left");\r
+        remove2LeftMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    remove2LeftMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        remove2RightMenuItem.setLabel("Remove Right");\r
+        remove2RightMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    remove2RightMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        removeGappedColumnMenuItem.setLabel("Remove Empty Columns");\r
+        removeGappedColumnMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    removeGappedColumnMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        removeAllGapsMenuItem.setLabel("Remove All Gaps");\r
+        removeAllGapsMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    removeAllGapsMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        viewBoxesMenuItem.setLabel("Boxes");\r
+        viewBoxesMenuItem.setState(true);\r
+        viewBoxesMenuItem.addItemListener(new java.awt.event.ItemListener() {\r
+                public void itemStateChanged(ItemEvent e) {\r
+                    viewBoxesMenuItem_actionPerformed(null);\r
+                }\r
+            });\r
+        viewTextMenuItem.setLabel("Text");\r
+        viewTextMenuItem.setState(true);\r
+        viewTextMenuItem.addItemListener(new java.awt.event.ItemListener() {\r
+                public void itemStateChanged(ItemEvent e) {\r
+                    viewTextMenuItem_actionPerformed(null);\r
+                }\r
+            });\r
+        sortPairwiseMenuItem.setLabel("by Pairwise Identity");\r
+        sortPairwiseMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    sortPairwiseMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        sortIDMenuItem.setLabel("by ID");\r
+        sortIDMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    sortIDMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        sortGroupMenuItem.setLabel("by Group");\r
+        sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    sortGroupMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        removeRedundancyMenuItem.setLabel("Remove Redundancy...");\r
+        removeRedundancyMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    removeRedundancyMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        pairwiseAlignmentMenuItem.setLabel("Pairwise Alignments...");\r
+        pairwiseAlignmentMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    pairwiseAlignmentMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        PCAMenuItem.setLabel("Principal Component Analysis");\r
+        PCAMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    PCAMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        averageDistanceTreeMenuItem.setLabel(\r
+            "Average Distance Using % Identity");\r
+        averageDistanceTreeMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    averageDistanceTreeMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        neighbourTreeMenuItem.setLabel("Neighbour Joining Using % Identity");\r
+        neighbourTreeMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    neighbourTreeMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11));\r
+        statusBar.setBackground(Color.white);\r
+        statusBar.setFont(new java.awt.Font("Verdana", 0, 11));\r
+        statusBar.setText("Status bar");\r
+        outputTextboxMenu.setLabel("Output to Textbox");\r
+        clustalColour.setLabel("Clustalx");\r
+\r
+        clustalColour.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    clustalColour_actionPerformed(e);\r
+                }\r
+            });\r
+        zappoColour.setLabel("Zappo");\r
+        zappoColour.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    zappoColour_actionPerformed(e);\r
+                }\r
+            });\r
+        taylorColour.setLabel("Taylor");\r
+        taylorColour.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    taylorColour_actionPerformed(e);\r
+                }\r
+            });\r
+        hydrophobicityColour.setLabel("Hydrophobicity");\r
+        hydrophobicityColour.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    hydrophobicityColour_actionPerformed(e);\r
+                }\r
+            });\r
+        helixColour.setLabel("Helix Propensity");\r
+        helixColour.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    helixColour_actionPerformed(e);\r
+                }\r
+            });\r
+        strandColour.setLabel("Strand Propensity");\r
+        strandColour.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    strandColour_actionPerformed(e);\r
+                }\r
+            });\r
+        turnColour.setLabel("Turn Propensity");\r
+        turnColour.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    turnColour_actionPerformed(e);\r
+                }\r
+            });\r
+        buriedColour.setLabel("Buried Index");\r
+        buriedColour.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    buriedColour_actionPerformed(e);\r
+                }\r
+            });\r
+        userDefinedColour.setLabel("User Defined...");\r
+        userDefinedColour.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    userDefinedColour_actionPerformed(e);\r
+                }\r
+            });\r
+        PIDColour.setLabel("Percentage Identity");\r
+        PIDColour.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    PIDColour_actionPerformed(e);\r
+                }\r
+            });\r
+        BLOSUM62Colour.setLabel("BLOSUM62 Score");\r
+        BLOSUM62Colour.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    BLOSUM62Colour_actionPerformed(e);\r
+                }\r
+            });\r
+        avDistanceTreeBlosumMenuItem.setLabel(\r
+            "Average Distance Using BLOSUM62");\r
+        avDistanceTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    avTreeBlosumMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        njTreeBlosumMenuItem.setLabel("Neighbour Joining Using BLOSUM62");\r
+        njTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    njTreeBlosumMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        annotationPanelMenuItem.setActionCommand("");\r
+        annotationPanelMenuItem.setState(true);\r
+        annotationPanelMenuItem.setLabel("Show Annotations");\r
+        annotationPanelMenuItem.addItemListener(new java.awt.event.ItemListener() {\r
+                public void itemStateChanged(ItemEvent e) {\r
+                    annotationPanelMenuItem_actionPerformed(null);\r
+                }\r
+            });\r
+        colourTextMenuItem.setLabel("Colour Text");\r
+        colourTextMenuItem.addItemListener(new java.awt.event.ItemListener() {\r
+                public void itemStateChanged(ItemEvent e) {\r
+                    colourTextMenuItem_actionPerformed(null);\r
+                }\r
+            });\r
+        overviewMenuItem.setLabel("Overview Window");\r
+        overviewMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    overviewMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        undoMenuItem.setEnabled(false);\r
+        undoMenuItem.setLabel("Undo");\r
+        undoMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    undoMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        redoMenuItem.setEnabled(false);\r
+        redoMenuItem.setLabel("Redo");\r
+        redoMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    redoMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        conservationMenuItem.setLabel("by Conservation");\r
+        conservationMenuItem.addItemListener(new java.awt.event.ItemListener() {\r
+                public void itemStateChanged(ItemEvent e) {\r
+                    conservationMenuItem_actionPerformed(null);\r
+                }\r
+            });\r
+        noColourmenuItem.setLabel("None");\r
+        noColourmenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    noColourmenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        wrapMenuItem.setLabel("Wrap");\r
+        wrapMenuItem.addItemListener(new java.awt.event.ItemListener() {\r
+                public void itemStateChanged(ItemEvent e) {\r
+                    wrapMenuItem_actionPerformed(null);\r
+                }\r
+            });\r
+        renderGapsMenuItem.setLabel("Show Gaps");\r
+        renderGapsMenuItem.setState(true);\r
+        renderGapsMenuItem.addItemListener(new java.awt.event.ItemListener() {\r
+                public void itemStateChanged(ItemEvent e) {\r
+                    renderGapsMenuItem_actionPerformed(null);\r
+                }\r
+            });\r
+        findMenuItem.setLabel("Find...");\r
+        findMenuItem.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    findMenuItem_actionPerformed(e);\r
+                }\r
+            });\r
+        searchMenu.setLabel("Search");\r
+\r
+        abovePIDThreshold.setLabel("Above Identity Threshold");\r
+        abovePIDThreshold.addItemListener(new java.awt.event.ItemListener() {\r
+                public void itemStateChanged(ItemEvent e) {\r
+                    abovePIDThreshold_actionPerformed(null);\r
+                }\r
+            });\r
+        nucleotideColour.setLabel("Nucleotide");\r
+        nucleotideColour.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    nucleotideColour_actionPerformed(e);\r
+                }\r
+            });\r
+        deleteGroups.setLabel("Undefine Groups");\r
+        deleteGroups.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    deleteGroups_actionPerformed(e);\r
+                }\r
+            });\r
+        copy.setLabel("Copy");\r
+        copy.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    copy_actionPerformed(e);\r
+                }\r
+            });\r
+        cut.setLabel("Cut");\r
+        cut.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    cut_actionPerformed(e);\r
+                }\r
+            });\r
+        delete.setLabel("Delete");\r
+        delete.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    delete_actionPerformed(e);\r
+                }\r
+            });\r
+        Menu1.setLabel("Paste");\r
+        pasteNew.setLabel("To New Alignment");\r
+        pasteNew.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    pasteNew_actionPerformed(e);\r
+                }\r
+            });\r
+        pasteThis.setLabel("Add To This Alignment");\r
+        pasteThis.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    pasteThis_actionPerformed(e);\r
+                }\r
+            });\r
+        applyToAllGroups.setLabel("Apply Colour To All Groups");\r
+        applyToAllGroups.setState(true);\r
+        applyToAllGroups.addItemListener(new java.awt.event.ItemListener() {\r
+                public void itemStateChanged(ItemEvent e) {\r
+                    applyToAllGroups_actionPerformed(null);\r
+                }\r
+            });\r
+        font.setLabel("Font...");\r
+        font.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    font_actionPerformed(e);\r
+                }\r
+            });\r
+    dbref.setLabel("ShowSequence DB Refs");\r
+    dbref.setActionCommand("");\r
+    dbref.setState(true);\r
+    dbref.addItemListener(new java.awt.event.ItemListener() {\r
+                public void itemStateChanged(ItemEvent e) {\r
+        dbref_actionPerformed(e);\r
+      }\r
+            });\r
+        scaleAbove.setLabel("Scale Above");\r
+        scaleAbove.setState(true);\r
+        scaleAbove.addItemListener(new java.awt.event.ItemListener() {\r
+                public void itemStateChanged(ItemEvent e) {\r
+                    scaleAbove_actionPerformed(null);\r
+                }\r
+            });\r
+        scaleLeft.setEnabled(false);\r
+        scaleLeft.setState(true);\r
+        scaleLeft.setLabel("Scale Left");\r
+        scaleLeft.addItemListener(new java.awt.event.ItemListener() {\r
+                public void itemStateChanged(ItemEvent e) {\r
+                    scaleLeft_actionPerformed(null);\r
+                }\r
+            });\r
+        scaleRight.setEnabled(false);\r
+        scaleRight.setState(true);\r
+        scaleRight.setLabel("Scale Right");\r
+        scaleRight.addItemListener(new java.awt.event.ItemListener() {\r
+                public void itemStateChanged(ItemEvent e) {\r
+                    scaleRight_actionPerformed(null);\r
+                }\r
+            });\r
+        modifyPID.setLabel("Modify Identity Threshold...");\r
+        modifyPID.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    modifyPID_actionPerformed(e);\r
+                }\r
+            });\r
+        modifyConservation.setLabel("Modify Conservation Threshold...");\r
+        modifyConservation.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    modifyConservation_actionPerformed(e);\r
+                }\r
+            });\r
+        sortByTreeMenu.setLabel("By Tree Order");\r
+        sort.setLabel("Sort");\r
+        calculate.setLabel("Calculate Tree");\r
+        inputText.setLabel("Input from textbox");\r
+        inputText.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    inputText_actionPerformed(e);\r
+                }\r
+            });\r
+\r
+        helpMenu.setLabel("Help");\r
+        documentation.setLabel("Documentation");\r
+        documentation.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    documentation_actionPerformed(e);\r
+                }\r
+            });\r
+\r
+        about.setLabel("About...");\r
+        about.addActionListener(new java.awt.event.ActionListener() {\r
+                public void actionPerformed(ActionEvent e) {\r
+                    about_actionPerformed(e);\r
+                }\r
+            });\r
+          seqLimits.setState(true);\r
+    seqLimits.setLabel("Show Sequence Limits");\r
+    seqLimits.addItemListener(new ItemListener()\r
+    {\r
+      public void itemStateChanged(ItemEvent e)\r
+      {\r
+        seqLimits_itemStateChanged(e);\r
+      }\r
+    });\r
+\r
+    alignFrameMenuBar.add(fileMenu);\r
+        alignFrameMenuBar.add(editMenu);\r
+        alignFrameMenuBar.add(searchMenu);\r
+        alignFrameMenuBar.add(viewMenu);\r
+        alignFrameMenuBar.add(colourMenu);\r
+        alignFrameMenuBar.add(calculateMenu);\r
+        alignFrameMenuBar.add(helpMenu);\r
+        fileMenu.add(inputText);\r
+        fileMenu.add(outputTextboxMenu);\r
+        fileMenu.addSeparator();\r
+        fileMenu.add(closeMenuItem);\r
+        editMenu.add(undoMenuItem);\r
+        editMenu.add(redoMenuItem);\r
+        editMenu.add(cut);\r
+        editMenu.add(copy);\r
+        editMenu.add(Menu1);\r
+        editMenu.add(delete);\r
+        editMenu.addSeparator();\r
+        editMenu.add(selectAllSequenceMenuItem);\r
+        editMenu.add(deselectAllSequenceMenuItem);\r
+        editMenu.add(invertSequenceMenuItem);\r
+        editMenu.add(deleteGroups);\r
+        editMenu.addSeparator();\r
+        editMenu.add(remove2LeftMenuItem);\r
+        editMenu.add(remove2RightMenuItem);\r
+        editMenu.add(removeGappedColumnMenuItem);\r
+        editMenu.add(removeAllGapsMenuItem);\r
+        editMenu.add(removeRedundancyMenuItem);\r
+        searchMenu.add(findMenuItem);\r
+        viewMenu.add(font);\r
+        viewMenu.addSeparator();\r
+        viewMenu.add(dbref);\r
+        viewMenu.add(seqLimits);\r
+        viewMenu.addSeparator();\r
+    viewMenu.add(wrapMenuItem);\r
+        viewMenu.add(scaleAbove);\r
+        viewMenu.add(scaleLeft);\r
+        viewMenu.add(scaleRight);\r
+        viewMenu.addSeparator();\r
+    viewMenu.add(viewBoxesMenuItem);\r
+        viewMenu.add(viewTextMenuItem);\r
+        viewMenu.add(colourTextMenuItem);\r
+        viewMenu.add(renderGapsMenuItem);\r
+        viewMenu.add(annotationPanelMenuItem);\r
+        viewMenu.addSeparator();\r
+        viewMenu.add(overviewMenuItem);\r
+        colourMenu.add(applyToAllGroups);\r
+        colourMenu.addSeparator();\r
+        colourMenu.add(noColourmenuItem);\r
+        colourMenu.add(clustalColour);\r
+        colourMenu.add(BLOSUM62Colour);\r
+        colourMenu.add(PIDColour);\r
+        colourMenu.add(zappoColour);\r
+        colourMenu.add(taylorColour);\r
+        colourMenu.add(hydrophobicityColour);\r
+        colourMenu.add(helixColour);\r
+        colourMenu.add(strandColour);\r
+        colourMenu.add(turnColour);\r
+        colourMenu.add(buriedColour);\r
+        colourMenu.add(nucleotideColour);\r
+        colourMenu.add(userDefinedColour);\r
+        colourMenu.addSeparator();\r
+        colourMenu.add(conservationMenuItem);\r
+        colourMenu.add(modifyConservation);\r
+        colourMenu.add(abovePIDThreshold);\r
+        colourMenu.add(modifyPID);\r
+        calculateMenu.add(sort);\r
+        calculateMenu.add(calculate);\r
+        calculateMenu.addSeparator();\r
+        calculateMenu.add(pairwiseAlignmentMenuItem);\r
+        calculateMenu.add(PCAMenuItem);\r
+        this.add(statusBar, BorderLayout.SOUTH);\r
+        Menu1.add(pasteNew);\r
+        Menu1.add(pasteThis);\r
+        sort.add(sortIDMenuItem);\r
+        sort.add(sortByTreeMenu);\r
+        sort.add(sortGroupMenuItem);\r
+        sort.add(sortPairwiseMenuItem);\r
+        calculate.add(averageDistanceTreeMenuItem);\r
+        calculate.add(neighbourTreeMenuItem);\r
+        calculate.add(avDistanceTreeBlosumMenuItem);\r
+        calculate.add(njTreeBlosumMenuItem);\r
+        helpMenu.add(documentation);\r
+        helpMenu.add(about);\r
+    }\r
 }\r
+\r
index 44370d4..9fb6e62 100755 (executable)
@@ -23,10 +23,8 @@ import java.awt.*;
 import java.awt.event.*;\r
 \r
 import jalview.datamodel.*;\r
-import jalview.jbappletgui.*;\r
 \r
-public class AlignmentPanel\r
-    extends GAlignmentPanel implements AdjustmentListener\r
+public class AlignmentPanel extends Panel implements AdjustmentListener\r
 {\r
 \r
   AlignViewport av;\r
@@ -46,6 +44,15 @@ public class AlignmentPanel
 \r
   public AlignmentPanel(AlignFrame af, final AlignViewport av)\r
   {\r
+    try\r
+    {\r
+      jbInit();\r
+    }\r
+    catch (Exception e)\r
+    {\r
+      e.printStackTrace();\r
+    }\r
+\r
     if(System.getProperty("os.name").startsWith("Mac"))\r
       MAC = true;\r
 \r
@@ -492,6 +499,74 @@ public class AlignmentPanel
     seqPanel.seqCanvas.repaint();\r
     scalePanel.repaint();\r
     annotationPanel.repaint();\r
+  }\r
 \r
+  protected Panel sequenceHolderPanel = new Panel();\r
+  protected Scrollbar vscroll = new Scrollbar();\r
+  protected Scrollbar hscroll = new Scrollbar();\r
+  protected Panel seqPanelHolder = new Panel();\r
+  BorderLayout borderLayout1 = new BorderLayout();\r
+  BorderLayout borderLayout3 = new BorderLayout();\r
+  protected Panel scalePanelHolder = new Panel();\r
+  protected Panel idPanelHolder = new Panel();\r
+  BorderLayout borderLayout5 = new BorderLayout();\r
+  protected Panel idSpaceFillerPanel1 = new Panel();\r
+  public Panel annotationSpaceFillerHolder = new Panel();\r
+  BorderLayout borderLayout6 = new BorderLayout();\r
+  BorderLayout borderLayout7 = new BorderLayout();\r
+  Panel hscrollHolder = new Panel();\r
+  BorderLayout borderLayout10 = new BorderLayout();\r
+  protected Panel hscrollFillerPanel = new Panel();\r
+  BorderLayout borderLayout11 = new BorderLayout();\r
+  public Panel annotationScroller = new Panel();\r
+  BorderLayout borderLayout4 = new BorderLayout();\r
+  BorderLayout borderLayout2 = new BorderLayout();\r
+\r
+  private void jbInit() throws Exception {\r
+      //  idPanelHolder.setPreferredSize(new Dimension(70, 10));\r
+      this.setLayout(borderLayout7);\r
+\r
+      //   sequenceHolderPanel.setPreferredSize(new Dimension(150, 150));\r
+      sequenceHolderPanel.setLayout(borderLayout3);\r
+      seqPanelHolder.setLayout(borderLayout1);\r
+      scalePanelHolder.setBackground(Color.white);\r
+\r
+      // scalePanelHolder.setPreferredSize(new Dimension(10, 30));\r
+      scalePanelHolder.setLayout(borderLayout6);\r
+      idPanelHolder.setLayout(borderLayout5);\r
+      idSpaceFillerPanel1.setBackground(Color.white);\r
+\r
+      //  idSpaceFillerPanel1.setPreferredSize(new Dimension(10, 30));\r
+      idSpaceFillerPanel1.setLayout(borderLayout11);\r
+      annotationSpaceFillerHolder.setBackground(Color.white);\r
+\r
+      //  annotationSpaceFillerHolder.setPreferredSize(new Dimension(10, 80));\r
+      annotationSpaceFillerHolder.setLayout(borderLayout4);\r
+      hscroll.setOrientation(Scrollbar.HORIZONTAL);\r
+      hscrollHolder.setLayout(borderLayout10);\r
+      hscrollFillerPanel.setBackground(Color.white);\r
+\r
+      //  hscrollFillerPanel.setPreferredSize(new Dimension(70, 10));\r
+      hscrollHolder.setBackground(Color.white);\r
+\r
+      //    annotationScroller.setPreferredSize(new Dimension(10, 80));\r
+      //  this.setPreferredSize(new Dimension(220, 166));\r
+      seqPanelHolder.setBackground(Color.white);\r
+      idPanelHolder.setBackground(Color.white);\r
+      annotationScroller.setLayout(borderLayout2);\r
+      sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH);\r
+      sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER);\r
+      seqPanelHolder.add(vscroll, BorderLayout.EAST);\r
+      sequenceHolderPanel.add(annotationScroller, BorderLayout.SOUTH);\r
+\r
+      //  Panel3.add(secondaryPanelHolder,  BorderLayout.SOUTH);\r
+      this.add(idPanelHolder, BorderLayout.WEST);\r
+      idPanelHolder.add(idSpaceFillerPanel1, BorderLayout.NORTH);\r
+      idPanelHolder.add(annotationSpaceFillerHolder, BorderLayout.SOUTH);\r
+      this.add(hscrollHolder, BorderLayout.SOUTH);\r
+      hscrollHolder.add(hscroll, BorderLayout.CENTER);\r
+      hscrollHolder.add(hscrollFillerPanel, BorderLayout.WEST);\r
+      this.add(sequenceHolderPanel, BorderLayout.CENTER);\r
   }\r
+\r
 }\r
index dcdccc5..1df7455 100755 (executable)
@@ -159,11 +159,6 @@ public class AnnotationLabels
 \r
   public void drawComponent(Graphics g, int width)\r
   {\r
-    if (!jalview.bin.JalviewLite.AWT1)\r
-    {\r
-      MyGraphics.AntiAlias(g);\r
-    }\r
-\r
     FontMetrics fm = g.getFontMetrics(g.getFont());\r
     g.setColor(Color.white);\r
     g.fillRect(0, 0, getSize().width, getSize().height);\r
index 15e2671..a1597f8 100755 (executable)
@@ -219,12 +219,6 @@ public class AnnotationPanel
       fastPaint = false;\r
     }\r
 \r
-    if (!jalview.bin.JalviewLite.AWT1)\r
-    {\r
-      MyGraphics.AntiAlias(gg);\r
-    }\r
-\r
-\r
     if (fastPaint)\r
     {\r
       g.drawImage(image, 0, 0, this);\r
index 43ec65e..c366409 100755 (executable)
@@ -24,10 +24,8 @@ import java.awt.event.*;
 \r
 import jalview.datamodel.*;\r
 import jalview.io.*;\r
-import jalview.jbappletgui.*;\r
 \r
-public class CutAndPasteTransfer\r
-    extends GCutAndPasteTransfer\r
+public class CutAndPasteTransfer extends Panel\r
 {\r
   jalview.bin.JalviewLite applet;\r
 \r
@@ -37,7 +35,12 @@ public class CutAndPasteTransfer
 \r
   public CutAndPasteTransfer(boolean forImport, jalview.bin.JalviewLite mainApplet)\r
   {\r
-    super();\r
+    try {\r
+        jbInit();\r
+    } catch (Exception e) {\r
+        e.printStackTrace();\r
+    }\r
+\r
     applet = mainApplet;\r
 \r
     if (!forImport)\r
@@ -102,14 +105,51 @@ public class CutAndPasteTransfer
         af.statusBar.setText("Successfully pasted alignment file");\r
       }\r
     }\r
-    Frame frame = (Frame)this.getParent();\r
-    frame.setVisible(false);\r
+\r
+    setVisible(false);\r
   }\r
 \r
   protected void cancel_actionPerformed(ActionEvent e)\r
   {\r
-    Frame frame = (Frame)this.getParent();\r
-    frame.setVisible(false);\r
+    setVisible(false);\r
+  }\r
+  protected TextArea textarea = new TextArea();\r
+  Button ok = new Button();\r
+  Button cancel = new Button();\r
+  protected Panel buttonPanel = new Panel();\r
+  BorderLayout borderLayout1 = new BorderLayout();\r
+\r
+\r
+  private void jbInit() throws Exception {\r
+      textarea.setFont(new java.awt.Font("Monospaced", Font.PLAIN, 10));\r
+      textarea.setText("Paste your alignment file here");\r
+      textarea.addMouseListener(new java.awt.event.MouseAdapter() {\r
+              public void mousePressed(MouseEvent e) {\r
+                  textarea_mousePressed(e);\r
+              }\r
+          });\r
+      this.setLayout(borderLayout1);\r
+      ok.setLabel("OK");\r
+      ok.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  ok_actionPerformed(e);\r
+              }\r
+          });\r
+      cancel.setLabel("Cancel");\r
+      cancel.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  cancel_actionPerformed(e);\r
+              }\r
+          });\r
+      this.add(buttonPanel, BorderLayout.SOUTH);\r
+      buttonPanel.add(ok, null);\r
+      buttonPanel.add(cancel, null);\r
+      this.add(textarea, java.awt.BorderLayout.CENTER);\r
   }\r
 \r
+  void textarea_mousePressed(MouseEvent e) {\r
+      if (textarea.getText().equals("Paste your alignment file here")) {\r
+          textarea.setText("");\r
+      }\r
+  }\r
 }\r
index 7cb3763..fcca0c1 100755 (executable)
@@ -25,10 +25,8 @@ import java.awt.*;
 import java.awt.event.*;\r
 \r
 import jalview.datamodel.*;\r
-import jalview.jbappletgui.*;\r
 \r
-public class Finder\r
-    extends GFinder\r
+public class Finder extends Panel\r
 {\r
   AlignViewport av;\r
   AlignmentPanel ap;\r
@@ -40,6 +38,15 @@ public class Finder
   int resIndex = 0;\r
   public Finder(final AlignmentPanel ap)\r
   {\r
+    try\r
+    {\r
+      jbInit();\r
+    }\r
+    catch (Exception e)\r
+    {\r
+      e.printStackTrace();\r
+    }\r
+\r
     this.av = ap.av;\r
     this.ap = ap;\r
     frame = new Frame();\r
@@ -297,4 +304,71 @@ public class Finder
 \r
   }\r
 \r
+  Label jLabel1 = new Label();\r
+  protected TextField textfield = new TextField();\r
+  protected Button findAll = new Button();\r
+  protected Button findNext = new Button();\r
+  Panel jPanel1 = new Panel();\r
+  GridLayout gridLayout1 = new GridLayout();\r
+  protected Button createNewGroup = new Button();\r
+\r
+\r
+  private void jbInit() throws Exception {\r
+      jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));\r
+      jLabel1.setText("Find");\r
+      jLabel1.setBounds(new Rectangle(3, 30, 34, 15));\r
+      this.setLayout(null);\r
+      textfield.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));\r
+      textfield.setText("");\r
+      textfield.setBounds(new Rectangle(40, 27, 133, 21));\r
+      textfield.addKeyListener(new java.awt.event.KeyAdapter() {\r
+              public void keyTyped(KeyEvent e) {\r
+                  textfield_keyTyped(e);\r
+              }\r
+          });\r
+      textfield.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  textfield_actionPerformed(e);\r
+              }\r
+          });\r
+      findAll.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));\r
+      findAll.setLabel("Find all");\r
+      findAll.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  findAll_actionPerformed(e);\r
+              }\r
+          });\r
+      findNext.setEnabled(false);\r
+      findNext.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));\r
+      findNext.setLabel("Find Next");\r
+      findNext.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  findNext_actionPerformed(e);\r
+              }\r
+          });\r
+      jPanel1.setBounds(new Rectangle(180, 5, 141, 64));\r
+      jPanel1.setLayout(gridLayout1);\r
+      gridLayout1.setHgap(0);\r
+      gridLayout1.setRows(3);\r
+      gridLayout1.setVgap(2);\r
+      createNewGroup.setEnabled(false);\r
+      createNewGroup.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10));\r
+      createNewGroup.setLabel("Create new group");\r
+      createNewGroup.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  createNewGroup_actionPerformed(e);\r
+              }\r
+          });\r
+      jPanel1.add(findNext, null);\r
+      jPanel1.add(findAll, null);\r
+      jPanel1.add(createNewGroup, null);\r
+      this.add(textfield, null);\r
+      this.add(jLabel1, null);\r
+      this.add(jPanel1, null);\r
+  }\r
+\r
+  void textfield_keyTyped(KeyEvent e) {\r
+      findNext.setEnabled(true);\r
+  }\r
+\r
 }\r
index 17fe98a..27e2a93 100755 (executable)
@@ -21,10 +21,11 @@ package jalview.appletgui;
 \r
 import java.awt.*;\r
 \r
-import jalview.jbappletgui.*;\r
+import java.awt.event.ActionEvent;\r
+import java.awt.event.ItemEvent;\r
 \r
 public class FontChooser\r
-    extends GFontChooser\r
+    extends Panel\r
 {\r
   AlignmentPanel ap;\r
   TreePanel tp;\r
@@ -34,6 +35,15 @@ public class FontChooser
 \r
   public FontChooser(TreePanel tp)\r
   {\r
+    try\r
+    {\r
+      jbInit();\r
+    }\r
+    catch (Exception e)\r
+    {\r
+      e.printStackTrace();\r
+    }\r
+\r
     this.tp = tp;\r
     oldFont = tp.getTreeFont();\r
     init();\r
@@ -152,5 +162,90 @@ public class FontChooser
     }\r
     changeFont();\r
   }\r
+  Label label1 = new Label();\r
+  protected Choice fontSize = new Choice();\r
+  protected Choice fontStyle = new Choice();\r
+  Label label2 = new Label();\r
+  Label label3 = new Label();\r
+  protected Choice fontName = new Choice();\r
+  Button ok = new Button();\r
+  Button cancel = new Button();\r
+  Panel panel1 = new Panel();\r
+  Panel panel2 = new Panel();\r
+  Panel panel3 = new Panel();\r
+  BorderLayout borderLayout1 = new BorderLayout();\r
+  BorderLayout borderLayout2 = new BorderLayout();\r
+  BorderLayout borderLayout3 = new BorderLayout();\r
+  Panel panel4 = new Panel();\r
+  Panel panel5 = new Panel();\r
+  BorderLayout borderLayout4 = new BorderLayout();\r
+\r
+\r
+  private void jbInit() throws Exception {\r
+      label1.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      label1.setAlignment(Label.RIGHT);\r
+      label1.setText("Font: ");\r
+      this.setLayout(borderLayout4);\r
+      fontSize.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      fontSize.addItemListener(new java.awt.event.ItemListener() {\r
+              public void itemStateChanged(ItemEvent e) {\r
+                  fontSize_actionPerformed();\r
+              }\r
+          });\r
+      fontStyle.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      fontStyle.addItemListener(new java.awt.event.ItemListener() {\r
+              public void itemStateChanged(ItemEvent e) {\r
+                  fontStyle_actionPerformed();\r
+              }\r
+          });\r
+      label2.setAlignment(Label.RIGHT);\r
+      label2.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      label2.setText("Size: ");\r
+      label3.setAlignment(Label.RIGHT);\r
+      label3.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      label3.setText("Style: ");\r
+      fontName.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      fontName.addItemListener(new java.awt.event.ItemListener() {\r
+              public void itemStateChanged(ItemEvent e) {\r
+                  fontName_actionPerformed();\r
+              }\r
+          });\r
+      ok.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      ok.setLabel("OK");\r
+      ok.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  ok_actionPerformed();\r
+              }\r
+          });\r
+      cancel.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      cancel.setLabel("Cancel");\r
+      cancel.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  cancel_actionPerformed();\r
+              }\r
+          });\r
+      this.setBackground(Color.white);\r
+      panel1.setLayout(borderLayout1);\r
+      panel2.setLayout(borderLayout3);\r
+      panel3.setLayout(borderLayout2);\r
+      panel5.setBackground(Color.white);\r
+      panel4.setBackground(Color.white);\r
+      panel1.setBackground(Color.white);\r
+      panel2.setBackground(Color.white);\r
+      panel3.setBackground(Color.white);\r
+      panel1.add(label1, BorderLayout.WEST);\r
+      panel1.add(fontName, BorderLayout.CENTER);\r
+      panel5.add(panel1, null);\r
+      panel5.add(panel3, null);\r
+      panel5.add(panel2, null);\r
+      panel2.add(label3, BorderLayout.WEST);\r
+      panel2.add(fontStyle, BorderLayout.CENTER);\r
+      panel3.add(label2, BorderLayout.WEST);\r
+      panel3.add(fontSize, BorderLayout.CENTER);\r
+      this.add(panel4, BorderLayout.SOUTH);\r
+      panel4.add(ok, null);\r
+      panel4.add(cancel, null);\r
+      this.add(panel5, BorderLayout.CENTER);\r
+  }\r
 \r
 }\r
index 7686e8a..7bcc987 100755 (executable)
@@ -157,12 +157,6 @@ public class IdCanvas
       gg.setFont(av.getFont());\r
     }\r
 \r
-    if(!jalview.bin.JalviewLite.AWT1)\r
-    {\r
-      MyGraphics.AntiAlias(gg);\r
-    }\r
-\r
-\r
     //Fill in the background\r
     gg.setColor(Color.white);\r
     Font italic = new Font(av.getFont().getName(), Font.ITALIC,\r
index 026ca09..0368d2a 100755 (executable)
@@ -26,10 +26,10 @@ import java.awt.event.*;
 \r
 import jalview.analysis.*;\r
 import jalview.datamodel.*;\r
-import jalview.jbappletgui.*;\r
+\r
 \r
 public class PCAPanel\r
-    extends GPCAPanel implements Runnable\r
+    extends Frame implements Runnable\r
 {\r
   PCA pca;\r
   int top;\r
@@ -40,6 +40,22 @@ public class PCAPanel
 \r
   public PCAPanel(AlignViewport av)\r
   {\r
+    try\r
+    {\r
+      jbInit();\r
+    }\r
+    catch (Exception e)\r
+    {\r
+      e.printStackTrace();\r
+    }\r
+\r
+    for (int i = 1; i < 8; i++)\r
+    {\r
+      xCombobox.addItem("dim " + i);\r
+      yCombobox.addItem("dim " + i);\r
+      zCombobox.addItem("dim " + i);\r
+    }\r
+\r
     this.av = av;\r
     if (av.getSelectionGroup()!=null && av.getSelectionGroup().getSize() > 3)\r
     {\r
@@ -170,5 +186,87 @@ public class PCAPanel
   {\r
     rc.showLabels( labels.getState() );\r
   }\r
+  Panel jPanel2 = new Panel();\r
+  Label jLabel1 = new Label();\r
+  Label jLabel2 = new Label();\r
+  Label jLabel3 = new Label();\r
+  protected Choice xCombobox = new Choice();\r
+  protected Choice yCombobox = new Choice();\r
+  protected Choice zCombobox = new Choice();\r
+  FlowLayout flowLayout1 = new FlowLayout();\r
+  BorderLayout borderLayout1 = new BorderLayout();\r
+  MenuBar menuBar1 = new MenuBar();\r
+  Menu menu1 = new Menu();\r
+  Menu menu2 = new Menu();\r
+  protected CheckboxMenuItem labels = new CheckboxMenuItem();\r
+  MenuItem values = new MenuItem();\r
+\r
+  private void jbInit()\r
+      throws Exception\r
+  {\r
+    this.setLayout(borderLayout1);\r
+    jPanel2.setLayout(flowLayout1);\r
+    jLabel1.setFont(new java.awt.Font("Verdana", 0, 12));\r
+    jLabel1.setText("x=");\r
+    jLabel2.setFont(new java.awt.Font("Verdana", 0, 12));\r
+    jLabel2.setText("y=");\r
+    jLabel3.setFont(new java.awt.Font("Verdana", 0, 12));\r
+    jLabel3.setText("z=");\r
+    jPanel2.setBackground(Color.white);\r
+    zCombobox.setFont(new java.awt.Font("Verdana", 0, 12));\r
+    zCombobox.addItemListener(new java.awt.event.ItemListener()\r
+    {\r
+      public void itemStateChanged(ItemEvent e)\r
+      {\r
+        zCombobox_actionPerformed(null);\r
+      }\r
+    });\r
+    yCombobox.setFont(new java.awt.Font("Verdana", 0, 12));\r
+    yCombobox.addItemListener(new java.awt.event.ItemListener()\r
+    {\r
+      public void itemStateChanged(ItemEvent e)\r
+      {\r
+        yCombobox_actionPerformed(null);\r
+      }\r
+    });\r
+    xCombobox.setFont(new java.awt.Font("Verdana", 0, 12));\r
+    xCombobox.addItemListener(new java.awt.event.ItemListener()\r
+    {\r
+      public void itemStateChanged(ItemEvent e)\r
+      {\r
+        xCombobox_actionPerformed(null);\r
+      }\r
+    });\r
+    this.setMenuBar(menuBar1);\r
+    menu1.setLabel("File");\r
+    menu2.setLabel("View");\r
+    labels.setLabel("Labels");\r
+    labels.addItemListener(new ItemListener()\r
+    {\r
+      public void itemStateChanged(ItemEvent itemEvent)\r
+      {\r
+        labels_itemStateChanged(itemEvent);\r
+      }\r
+    });\r
+    values.setLabel("Output Values...");\r
+    values.addActionListener(new ActionListener()\r
+    {\r
+      public void actionPerformed(ActionEvent actionEvent)\r
+      {\r
+        values_actionPerformed(actionEvent);\r
+      }\r
+    });\r
+    this.add(jPanel2, BorderLayout.SOUTH);\r
+    jPanel2.add(jLabel1, null);\r
+    jPanel2.add(xCombobox, null);\r
+    jPanel2.add(jLabel2, null);\r
+    jPanel2.add(yCombobox, null);\r
+    jPanel2.add(jLabel3, null);\r
+    jPanel2.add(zCombobox, null);\r
+    menuBar1.add(menu1);\r
+    menuBar1.add(menu2);\r
+    menu2.add(labels);\r
+    menu1.add(values);\r
+  }\r
 \r
 }\r
index e187663..910a206 100755 (executable)
@@ -25,17 +25,24 @@ import java.awt.event.*;
 \r
 import jalview.analysis.*;\r
 import jalview.datamodel.*;\r
-import jalview.jbappletgui.*;\r
+import java.awt.*;\r
 \r
 public class PairwiseAlignPanel\r
-    extends GPairwiseAlignPanel\r
+    extends Panel\r
 {\r
   Vector sequences = new Vector();\r
   AlignmentPanel ap;\r
 \r
   public PairwiseAlignPanel(AlignmentPanel ap)\r
   {\r
-    super();\r
+    try\r
+    {\r
+      jbInit();\r
+    }\r
+    catch (Exception e)\r
+    {\r
+      e.printStackTrace();\r
+  }\r
     this.ap = ap;\r
     float scores[][] = new float[ap.av.alignment.getHeight()][ap.av.alignment.\r
         getHeight()];\r
@@ -93,5 +100,27 @@ public class PairwiseAlignPanel
                                    "Pairwise Aligned Sequences");\r
 \r
   }\r
+  protected ScrollPane scrollPane = new ScrollPane();\r
+  protected TextArea textarea = new TextArea();\r
+  protected Button viewInEditorButton = new Button();\r
+  Panel jPanel1 = new Panel();\r
+  BorderLayout borderLayout1 = new BorderLayout();\r
+\r
+  private void jbInit() throws Exception {\r
+      this.setLayout(borderLayout1);\r
+      textarea.setFont(new java.awt.Font("Monospaced", 0, 12));\r
+      textarea.setText("");\r
+      viewInEditorButton.setFont(new java.awt.Font("Verdana", 0, 12));\r
+      viewInEditorButton.setLabel("View in alignment editor");\r
+      viewInEditorButton.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  viewInEditorButton_actionPerformed(e);\r
+              }\r
+          });\r
+      this.add(scrollPane, BorderLayout.CENTER);\r
+      scrollPane.add(textarea);\r
+      this.add(jPanel1, BorderLayout.SOUTH);\r
+      jPanel1.add(viewInEditorButton, null);\r
+  }\r
 \r
 }\r
index 8aed730..3e3691b 100755 (executable)
@@ -24,10 +24,8 @@ import java.util.*;
 import java.awt.event.*;\r
 \r
 import jalview.datamodel.*;\r
-import jalview.jbappletgui.*;\r
 \r
-public class RedundancyPanel\r
-    extends GSliderPanel\r
+public class RedundancyPanel extends SliderPanel\r
 {\r
   AlignmentPanel ap;\r
 \r
@@ -35,6 +33,8 @@ public class RedundancyPanel
 \r
   public RedundancyPanel(AlignmentPanel ap)\r
   {\r
+    super(ap, 0, false, null);\r
+\r
     this.ap = ap;\r
 \r
     label.setText("Enter the redundancy threshold");\r
index b27ab8a..c7696a0 100755 (executable)
@@ -36,6 +36,8 @@ public class RotatableCanvas
   RotatableMatrix idmat = new RotatableMatrix(3, 3);\r
   RotatableMatrix objmat = new RotatableMatrix(3, 3);\r
   RotatableMatrix rotmat = new RotatableMatrix(3, 3);\r
+  String tooltip;\r
+  int toolx, tooly;\r
 \r
   //RubberbandRectangle rubberband;\r
 \r
@@ -291,13 +293,12 @@ public class RotatableCanvas
     return getPreferredSize();\r
   }\r
 \r
+  public void update(Graphics g)\r
+  {\r
+    paint(g);\r
+  }\r
   public void paint(Graphics g)\r
   {\r
-    if (!jalview.bin.JalviewLite.AWT1)\r
-    {\r
-      MyGraphics.AntiAlias(g);\r
-    }\r
-\r
     if (points == null)\r
     {\r
       g.setFont(new Font("Verdana", Font.PLAIN, 18));\r
@@ -328,6 +329,12 @@ public class RotatableCanvas
         drawAxes(ig);\r
       }\r
 \r
+      if(tooltip!=null)\r
+      {\r
+        ig.setColor(Color.red);\r
+        ig.drawString(tooltip, toolx, tooly);\r
+      }\r
+\r
       g.drawImage(img, 0, 0, this);\r
     }\r
   }\r
@@ -394,14 +401,7 @@ public class RotatableCanvas
                      getName(),\r
                      x - 3, y - 4);\r
       }\r
-\r
     }\r
-//    //Now the rectangle\r
-//    if (rectx2 != -1 && recty2 != -1) {\r
-//      g.setColor(Color.white);\r
-//\r
-//      g.drawRect(rectx1,recty1,rectx2-rectx1,recty2-recty1);\r
-//    }\r
   }\r
 \r
   public Dimension minimumsize()\r
@@ -512,27 +512,26 @@ public class RotatableCanvas
     repaint();\r
   }\r
 \r
-  // private void fireSequenceSelectionEvent(Selection sel) {\r
-  //   controller.handleSequenceSelectionEvent(new SequenceSelectionEvent(this,sel));\r
-  //}\r
 \r
   public void mouseMoved(MouseEvent evt)\r
   {\r
-    // SequenceI found = findPoint(evt.getX(), evt.getY());\r
+     SequenceI found = findPoint(evt.getX(), evt.getY());\r
+     if(found==null)\r
+       tooltip = null;\r
+     else\r
+     {\r
+       tooltip = found.getName();\r
+       toolx = evt.getX();\r
+       tooly = evt.getY();\r
+     }\r
+     repaint();\r
   }\r
 \r
   public void mouseDragged(MouseEvent evt)\r
   {\r
     mx = evt.getX();\r
     my = evt.getY();\r
-    //Check if this is a rectangle drawing drag\r
-    if ( (evt.getModifiers() & InputEvent.BUTTON2_MASK) != 0)\r
-    {\r
-//      rectx2 = evt.getX();\r
-//      recty2 = evt.getY();\r
-    }\r
-    else\r
-    {\r
+\r
       rotmat.setIdentity();\r
 \r
       rotmat.rotate( (float) (my - omy), 'x');\r
@@ -562,8 +561,6 @@ public class RotatableCanvas
       omy = my;\r
 \r
       paint(this.getGraphics());\r
-    }\r
-\r
   }\r
 \r
   public void rectSelect(int x1, int y1, int x2, int y2)\r
@@ -619,26 +616,5 @@ public class RotatableCanvas
       return null;\r
     }\r
   }\r
-  /*  public boolean handleRubberbandEvent(RubberbandEvent evt) {\r
-      System.out.println("Rubberband handler called in RotatableCanvas with " +\r
-                         evt.getBounds());\r
-\r
-      Rubberband rb = (Rubberband)evt.getSource();\r
-\r
-      // Clear the current selection (instance variable)\r
-      //if ((rb.getModifiers() & Event.SHIFT_MASK) == 0) {\r
-      //   clearSelection();\r
-      //}\r
-\r
-      if (rb.getComponent() == this) {\r
-        Rectangle bounds = evt.getBounds();\r
-   rectSelect(bounds.x,bounds.y,bounds.x+bounds.width,bounds.y+bounds.height);\r
-      }\r
-\r
-      redrawneeded = true;\r
-      paint(this.getGraphics());\r
-\r
-      return true;\r
-    }*/\r
 \r
 }\r
index 336da66..af226f3 100755 (executable)
@@ -162,11 +162,6 @@ public class ScalePanel
   public void drawScale(Graphics gg, int startx, int endx, int width,\r
                         int height)\r
   {\r
-    if (!jalview.bin.JalviewLite.AWT1)\r
-    {\r
-      MyGraphics.AntiAlias(gg);\r
-    }\r
-\r
     gg.setFont(av.getFont());\r
 \r
     //Fill in the background\r
index 8984d62..33acb28 100755 (executable)
@@ -256,10 +256,6 @@ public class SeqCanvas
     {\r
       img = createImage(imgWidth, imgHeight);\r
       gg = img.getGraphics();\r
-      if(!jalview.bin.JalviewLite.AWT1)\r
-      {\r
-        MyGraphics.AntiAlias(gg);\r
-      }\r
       gg.setFont(av.getFont());\r
     }\r
 \r
@@ -502,10 +498,12 @@ public class SeqCanvas
                         group.sequences.contains(av.alignment.getSequenceAt(\r
                                 i)))\r
                 {\r
-                    if ((bottom == -1) &&\r
-                            !group.sequences.contains(\r
-                                av.alignment.getSequenceAt(i + 1)))\r
-                    {\r
+\r
+                    if (bottom == -1)\r
+                   {\r
+                     if(i == y2-1 || // Dont check for i+1 if on the bottom row\r
+                      !group.sequences.contains(av.alignment.getSequenceAt(i+1 )))\r
+\r
                         bottom = sy + av.charHeight;\r
                     }\r
 \r
index 3e23728..a53e9dd 100755 (executable)
@@ -25,11 +25,9 @@ import java.awt.*;
 import java.awt.event.*;\r
 \r
 import jalview.datamodel.*;\r
-import jalview.jbappletgui.*;\r
 import jalview.schemes.*;\r
 \r
-public class SliderPanel\r
-    extends GSliderPanel\r
+public class SliderPanel extends Panel\r
 {\r
   AlignmentPanel ap;\r
   boolean forConservation = true;\r
@@ -153,6 +151,11 @@ public class SliderPanel
   public SliderPanel(AlignmentPanel ap, int value, boolean forConserve,\r
                      ColourSchemeI cs)\r
   {\r
+    try {\r
+        jbInit();\r
+    } catch (Exception e) {\r
+        e.printStackTrace();\r
+      }\r
     this.ap = ap;\r
     this.cs = cs;\r
     forConservation = forConserve;\r
@@ -258,4 +261,76 @@ public class SliderPanel
     return Integer.parseInt(valueField.getText());\r
   }\r
 \r
+  // this is used for conservation colours, PID colours and redundancy threshold\r
+  protected Scrollbar slider = new Scrollbar();\r
+  protected TextField valueField = new TextField();\r
+  protected Label label = new Label();\r
+  Panel jPanel1 = new Panel();\r
+  Panel jPanel2 = new Panel();\r
+  protected Button applyButton = new Button();\r
+  protected Button undoButton = new Button();\r
+  FlowLayout flowLayout1 = new FlowLayout();\r
+  protected Checkbox allGroupsCheck = new Checkbox();\r
+  BorderLayout borderLayout1 = new BorderLayout();\r
+  BorderLayout borderLayout2 = new BorderLayout();\r
+  FlowLayout flowLayout2 = new FlowLayout();\r
+\r
+  private void jbInit() throws Exception {\r
+      this.setLayout(borderLayout2);\r
+\r
+      // slider.setMajorTickSpacing(10);\r
+      //  slider.setMinorTickSpacing(1);\r
+      //  slider.setPaintTicks(true);\r
+      slider.setBackground(Color.white);\r
+      slider.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      slider.setOrientation(0);\r
+      valueField.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      valueField.setText("      ");\r
+      valueField.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  valueField_actionPerformed(e);\r
+              }\r
+          });\r
+      label.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      label.setText("set this label text");\r
+      jPanel1.setLayout(borderLayout1);\r
+      jPanel2.setLayout(flowLayout1);\r
+      applyButton.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      applyButton.setLabel("Apply");\r
+      applyButton.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  applyButton_actionPerformed(e);\r
+              }\r
+          });\r
+      undoButton.setEnabled(false);\r
+      undoButton.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      undoButton.setLabel("Undo");\r
+      undoButton.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  undoButton_actionPerformed(e);\r
+              }\r
+          });\r
+      allGroupsCheck.setEnabled(false);\r
+      allGroupsCheck.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      allGroupsCheck.setLabel("Apply threshold to all groups");\r
+      allGroupsCheck.setName("Apply to all Groups");\r
+      this.setBackground(Color.white);\r
+      this.setForeground(Color.black);\r
+      jPanel2.add(label, null);\r
+      jPanel2.add(applyButton, null);\r
+      jPanel2.add(undoButton, null);\r
+      jPanel2.add(allGroupsCheck);\r
+      jPanel1.add(valueField, java.awt.BorderLayout.EAST);\r
+      jPanel1.add(slider, java.awt.BorderLayout.CENTER);\r
+      this.add(jPanel1, java.awt.BorderLayout.SOUTH);\r
+      this.add(jPanel2, java.awt.BorderLayout.CENTER);\r
+  }\r
+\r
+  protected void applyButton_actionPerformed(ActionEvent e)\r
+  {\r
+  }\r
+\r
+  protected void undoButton_actionPerformed(ActionEvent e)\r
+  {\r
+  }\r
 }\r
index f74a1f6..e3f6c3c 100755 (executable)
@@ -354,11 +354,6 @@ public class TreeCanvas
     if(tree==null)\r
       return;\r
 \r
-    if (!jalview.bin.JalviewLite.AWT1)\r
-    {\r
-      MyGraphics.AntiAlias(g);\r
-    }\r
-\r
     g.setFont(font);\r
 \r
 \r
index 3e26a4b..03662ab 100755 (executable)
@@ -22,14 +22,13 @@ package jalview.appletgui;
 import java.util.*;\r
 \r
 import java.awt.event.*;\r
+import java.awt.*;\r
 \r
 import jalview.analysis.*;\r
 import jalview.datamodel.*;\r
 import jalview.io.*;\r
-import jalview.jbappletgui.*;\r
 \r
-public class TreePanel\r
-    extends GTreePanel\r
+public class TreePanel extends Frame\r
 {\r
   SequenceI[] seq;\r
   String type;\r
@@ -58,7 +57,16 @@ public class TreePanel
   public TreePanel(AlignViewport av, Vector seqVector, String type,\r
                    String pwtype, int s, int e)\r
   {\r
-    super();\r
+    try\r
+    {\r
+      jbInit();\r
+      this.setMenuBar(jMenuBar1);\r
+    }\r
+    catch (Exception ex)\r
+    {\r
+      ex.printStackTrace();\r
+    }\r
+\r
     initTreePanel(av, seqVector, type, pwtype, s, e, null);\r
   }\r
 \r
@@ -74,7 +82,16 @@ public class TreePanel
   public TreePanel(AlignViewport av, Vector seqVector, NewickFile newtree,\r
                    String type, String pwtype)\r
   {\r
-    super();\r
+    try\r
+    {\r
+      jbInit();\r
+      this.setMenuBar(jMenuBar1);\r
+    }\r
+    catch (Exception e)\r
+    {\r
+      e.printStackTrace();\r
+    }\r
+\r
     initTreePanel(av, seqVector, type, pwtype, 0, seqVector.size(), newtree);\r
   }\r
 \r
@@ -192,4 +209,103 @@ public class TreePanel
     treeCanvas.setMarkPlaceholders(placeholdersMenu.getState());\r
   }\r
 \r
+  BorderLayout borderLayout1 = new BorderLayout();\r
+  protected ScrollPane scrollPane = new ScrollPane();\r
+  MenuBar jMenuBar1 = new MenuBar();\r
+  Menu jMenu2 = new Menu();\r
+  protected MenuItem fontSize = new MenuItem();\r
+  protected CheckboxMenuItem bootstrapMenu = new CheckboxMenuItem();\r
+  protected CheckboxMenuItem distanceMenu = new CheckboxMenuItem();\r
+  protected CheckboxMenuItem placeholdersMenu = new CheckboxMenuItem();\r
+  protected CheckboxMenuItem fitToWindow = new CheckboxMenuItem();\r
+  Menu fileMenu = new Menu();\r
+  MenuItem newickOutput = new MenuItem();\r
+  CheckboxMenuItem fullId = new CheckboxMenuItem();\r
+\r
+  private void jbInit() throws Exception {\r
+      setLayout(borderLayout1);\r
+      this.setBackground(Color.white);\r
+      this.setFont(new java.awt.Font("Verdana", 0, 12));\r
+      jMenu2.setLabel("View");\r
+      fontSize.setLabel("Font...");\r
+      fontSize.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  fontSize_actionPerformed(e);\r
+              }\r
+          });\r
+      bootstrapMenu.setLabel("Show Bootstrap Values");\r
+      bootstrapMenu.addItemListener(new java.awt.event.ItemListener() {\r
+              public void itemStateChanged(ItemEvent e) {\r
+                  bootstrapMenu_actionPerformed(null);\r
+              }\r
+          });\r
+      distanceMenu.setLabel("Show Distances");\r
+      distanceMenu.addItemListener(new java.awt.event.ItemListener() {\r
+              public void itemStateChanged(ItemEvent e) {\r
+                  distanceMenu_actionPerformed(null);\r
+              }\r
+          });\r
+      placeholdersMenu.setLabel("Mark Unassociated Leaves");\r
+      placeholdersMenu.addItemListener(new java.awt.event.ItemListener() {\r
+              public void itemStateChanged(ItemEvent e) {\r
+                  placeholdersMenu_actionPerformed(null);\r
+              }\r
+          });\r
+      fitToWindow.setState(true);\r
+      fitToWindow.setLabel("Fit To Window");\r
+      fitToWindow.addItemListener(new java.awt.event.ItemListener() {\r
+              public void itemStateChanged(ItemEvent e) {\r
+                  fitToWindow_actionPerformed(null);\r
+              }\r
+          });\r
+      fileMenu.setLabel("File");\r
+      newickOutput.setLabel("Newick Format");\r
+      newickOutput.addActionListener(new ActionListener() {\r
+              public void actionPerformed(ActionEvent actionEvent) {\r
+                  newickOutput_actionPerformed(actionEvent);\r
+              }\r
+          });\r
+    fullId.setLabel("Show Full Id");\r
+    fullId.addItemListener(new ItemListener()\r
+    {\r
+      public void itemStateChanged(ItemEvent itemEvent)\r
+      {\r
+        fullId_itemStateChanged(itemEvent);\r
+      }\r
+    });\r
+\r
+    add(scrollPane, BorderLayout.CENTER);\r
+      jMenuBar1.add(fileMenu);\r
+      jMenuBar1.add(jMenu2);\r
+      jMenu2.add(fitToWindow);\r
+      jMenu2.add(fontSize);\r
+      jMenu2.add(distanceMenu);\r
+      jMenu2.add(bootstrapMenu);\r
+      jMenu2.add(placeholdersMenu);\r
+    jMenu2.add(fullId);\r
+    fullId.setState(true);\r
+    fileMenu.add(newickOutput);\r
+  }\r
+\r
+\r
+  public void fullId_itemStateChanged(ItemEvent itemEvent)\r
+  {\r
+      tree.findHeight(tree.getTopNode());\r
+\r
+      // Now have to calculate longest name based on the leaves\r
+      Vector leaves = tree.findLeaves(tree.getTopNode(), new Vector());\r
+\r
+      treeCanvas.longestName="";\r
+      for (int i = 0; i < leaves.size(); i++)\r
+      {\r
+        SequenceNode lf = (SequenceNode) leaves.elementAt(i);\r
+        Sequence seq = (Sequence) lf.element();\r
+        lf.setName(seq.getDisplayId(fullId.getState(), false));\r
+        if(lf.getName().length() > treeCanvas.longestName.length())\r
+          treeCanvas.longestName = lf.getName();\r
+      }\r
+\r
+      treeCanvas.repaint();\r
+  }\r
+\r
 }\r
index 36df306..7cd0391 100755 (executable)
@@ -25,11 +25,10 @@ import java.awt.*;
 import java.awt.event.*;\r
 \r
 import jalview.datamodel.*;\r
-import jalview.jbappletgui.*;\r
 import jalview.schemes.*;\r
 \r
 public class UserDefinedColours\r
-    extends GUserDefinedColours\r
+    extends Panel\r
 {\r
 \r
   AlignmentPanel ap;\r
@@ -49,7 +48,11 @@ public class UserDefinedColours
 \r
   public UserDefinedColours(AlignmentPanel ap, SequenceGroup sg)\r
   {\r
-    super();\r
+    try {\r
+        jbInit();\r
+    } catch (Exception e) {\r
+        e.printStackTrace();\r
+      }\r
     frame = new Frame();\r
     frame.add(this);\r
     jalview.bin.JalviewLite.addFrame(frame, "User defined colours", 420, 345);\r
@@ -262,4 +265,136 @@ public class UserDefinedColours
     frame.setVisible(false);\r
   }\r
 \r
+\r
+  protected Panel buttonPanel = new Panel();\r
+  protected GridLayout gridLayout = new GridLayout();\r
+  Panel jPanel2 = new Panel();\r
+  protected Button okButton = new Button();\r
+  protected Button applyButton = new Button();\r
+  protected Button cancelButton = new Button();\r
+  protected Scrollbar rScroller = new Scrollbar();\r
+  Label label1 = new Label();\r
+  protected TextField rText = new TextField();\r
+  Label label4 = new Label();\r
+  protected Scrollbar gScroller = new Scrollbar();\r
+  protected TextField gText = new TextField();\r
+  Label label5 = new Label();\r
+  protected Scrollbar bScroller = new Scrollbar();\r
+  protected TextField bText = new TextField();\r
+  protected Panel target = new Panel();\r
+\r
+  private void jbInit() throws Exception {\r
+      this.setLayout(null);\r
+      buttonPanel.setLayout(gridLayout);\r
+      gridLayout.setColumns(6);\r
+      gridLayout.setRows(4);\r
+      okButton.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      okButton.setLabel("OK");\r
+      okButton.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  okButton_actionPerformed(e);\r
+              }\r
+          });\r
+      applyButton.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      applyButton.setLabel("Apply");\r
+      applyButton.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  applyButton_actionPerformed(e);\r
+              }\r
+          });\r
+      cancelButton.setFont(new java.awt.Font("Verdana", 0, 11));\r
+      cancelButton.setLabel("Cancel");\r
+      cancelButton.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  cancelButton_actionPerformed(e);\r
+              }\r
+          });\r
+      this.setBackground(new Color(212, 208, 223));\r
+      jPanel2.setBounds(new Rectangle(0, 265, 400, 35));\r
+      buttonPanel.setBounds(new Rectangle(0, 123, 400, 142));\r
+      rScroller.setMaximum(256);\r
+      rScroller.setMinimum(0);\r
+      rScroller.setOrientation(0);\r
+      rScroller.setUnitIncrement(1);\r
+  rScroller.setVisibleAmount(1);\r
+  rScroller.setBounds(new Rectangle(36, 27, 119, 19));\r
+  rScroller.addAdjustmentListener(new java.awt.event.AdjustmentListener() {\r
+              public void adjustmentValueChanged(AdjustmentEvent e) {\r
+                  rScroller_adjustmentValueChanged(e);\r
+              }\r
+          });\r
+  label1.setAlignment(Label.RIGHT);\r
+  label1.setText("R");\r
+  label1.setBounds(new Rectangle(19, 30, 16, 15));\r
+  rText.setFont(new java.awt.Font("Dialog", Font.PLAIN, 10));\r
+  rText.setText("0        ");\r
+  rText.setBounds(new Rectangle(156, 27, 53, 19));\r
+  rText.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  rText_actionPerformed(e);\r
+              }\r
+          });\r
+  label4.setAlignment(Label.RIGHT);\r
+  label4.setText("G");\r
+  label4.setBounds(new Rectangle(15, 56, 20, 15));\r
+  gScroller.setMaximum(256);\r
+      gScroller.setMinimum(0);\r
+      gScroller.setOrientation(0);\r
+      gScroller.setUnitIncrement(1);\r
+  gScroller.setVisibleAmount(1);\r
+  gScroller.setBounds(new Rectangle(35, 52, 120, 20));\r
+  gScroller.addAdjustmentListener(new java.awt.event.AdjustmentListener() {\r
+              public void adjustmentValueChanged(AdjustmentEvent e) {\r
+                  gScroller_adjustmentValueChanged(e);\r
+              }\r
+          });\r
+  gText.setFont(new java.awt.Font("Dialog", Font.PLAIN, 10));\r
+  gText.setText("0        ");\r
+  gText.setBounds(new Rectangle(156, 52, 53, 20));\r
+  gText.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  gText_actionPerformed(e);\r
+              }\r
+          });\r
+  label5.setAlignment(Label.RIGHT);\r
+  label5.setText("B");\r
+  label5.setBounds(new Rectangle(14, 82, 20, 15));\r
+  bScroller.setMaximum(256);\r
+      bScroller.setMinimum(0);\r
+      bScroller.setOrientation(0);\r
+      bScroller.setUnitIncrement(1);\r
+  bScroller.setVisibleAmount(1);\r
+  bScroller.setBounds(new Rectangle(35, 78, 120, 20));\r
+  bScroller.addAdjustmentListener(new java.awt.event.AdjustmentListener() {\r
+              public void adjustmentValueChanged(AdjustmentEvent e) {\r
+                  bScroller_adjustmentValueChanged(e);\r
+              }\r
+          });\r
+  bText.setFont(new java.awt.Font("Dialog", Font.PLAIN, 10));\r
+  bText.setText("0        ");\r
+  bText.setBounds(new Rectangle(157, 78, 52, 20));\r
+  bText.addActionListener(new java.awt.event.ActionListener() {\r
+              public void actionPerformed(ActionEvent e) {\r
+                  bText_actionPerformed(e);\r
+              }\r
+          });\r
+  target.setBackground(Color.black);\r
+      target.setBounds(new Rectangle(229, 26, 134, 79));\r
+      this.add(jPanel2, null);\r
+      jPanel2.add(okButton, null);\r
+      jPanel2.add(applyButton, null);\r
+      jPanel2.add(cancelButton, null);\r
+      this.add(buttonPanel, null);\r
+  this.add(target, null);\r
+  this.add(gScroller);\r
+  this.add(rScroller);\r
+  this.add(bScroller);\r
+  this.add(label5);\r
+  this.add(label4);\r
+  this.add(label1);\r
+  this.add(gText);\r
+  this.add(rText);\r
+  this.add(bText);\r
+}\r
+\r
 }\r