Add jvsuffix and dbref to menu
authoramwaterhouse <Andrew Waterhouse>
Wed, 2 Nov 2005 16:06:05 +0000 (16:06 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 2 Nov 2005 16:06:05 +0000 (16:06 +0000)
src/jalview/appletgui/AlignFrame.java
src/jalview/jbappletgui/GAlignFrame.java

index 4fc6208..6e2d32b 100755 (executable)
@@ -241,8 +241,9 @@ public class AlignFrame
                                      "Alignment output - " + e.getActionCommand(),\r
                                      600, 500);\r
     cap.setText(new AppletFormatAdapter().formatSequences(e.getActionCommand(),\r
-                                              viewport.getAlignment().\r
-                                              getSequences()));\r
+                                              viewport.getAlignment().getSequences(),\r
+                                                      viewport.showDBPrefix,\r
+                                                      viewport.showJVSuffix));\r
   }\r
 \r
   public void closeMenuItem_actionPerformed(ActionEvent e)\r
@@ -863,13 +864,21 @@ public class AlignFrame
     new FontChooser(alignPanel);\r
   }\r
 \r
-  protected void fullSeqId_actionPerformed(ActionEvent e)\r
+  public void dbref_actionPerformed(ItemEvent e)\r
   {\r
-    viewport.setShowJVSuffix(fullSeqId.getState());\r
+    viewport.showDBPrefix = dbref.getState();\r
     alignPanel.fontChanged();\r
     alignPanel.repaint();\r
   }\r
 \r
+  public void seqLimits_itemStateChanged(ItemEvent e)\r
+  {\r
+    viewport.setShowJVSuffix(seqLimits.getState());\r
+    alignPanel.fontChanged();\r
+    alignPanel.repaint();\r
+  }\r
+\r
+\r
   protected void colourTextMenuItem_actionPerformed(ActionEvent e)\r
   {\r
     viewport.setColourText(colourTextMenuItem.getState());\r
index 5123317..6eb72d9 100755 (executable)
@@ -85,7 +85,7 @@ public class GAlignFrame extends Frame {
     MenuItem pasteThis = new MenuItem();\r
     protected CheckboxMenuItem applyToAllGroups = new CheckboxMenuItem();\r
     protected MenuItem font = new MenuItem();\r
-    protected CheckboxMenuItem fullSeqId = new CheckboxMenuItem();\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
@@ -98,8 +98,9 @@ public class GAlignFrame extends Frame {
     Menu helpMenu = new Menu();\r
     MenuItem documentation = new MenuItem();\r
     MenuItem about = new MenuItem();\r
+  protected CheckboxMenuItem seqLimits = new CheckboxMenuItem();\r
 \r
-    public GAlignFrame() {\r
+  public GAlignFrame() {\r
         try {\r
             jbInit();\r
             setMenuBar(alignFrameMenuBar);\r
@@ -462,12 +463,13 @@ public class GAlignFrame extends Frame {
                     font_actionPerformed(e);\r
                 }\r
             });\r
-        fullSeqId.setLabel("Show Full Sequence ID");\r
-        fullSeqId.setState(true);\r
-        fullSeqId.addItemListener(new java.awt.event.ItemListener() {\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
-                    fullSeqId_actionPerformed(null);\r
-                }\r
+        dbref_actionPerformed(e);\r
+      }\r
             });\r
         scaleAbove.setLabel("Scale Above");\r
         scaleAbove.setState(true);\r
@@ -528,8 +530,17 @@ public class GAlignFrame extends Frame {
                     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(fileMenu);\r
         alignFrameMenuBar.add(editMenu);\r
         alignFrameMenuBar.add(searchMenu);\r
         alignFrameMenuBar.add(viewMenu);\r
@@ -560,13 +571,15 @@ public class GAlignFrame extends Frame {
         searchMenu.add(findMenuItem);\r
         viewMenu.add(font);\r
         viewMenu.addSeparator();\r
-        viewMenu.add(wrapMenuItem);\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(fullSeqId);\r
-        viewMenu.add(viewBoxesMenuItem);\r
+    viewMenu.add(viewBoxesMenuItem);\r
         viewMenu.add(viewTextMenuItem);\r
         viewMenu.add(colourTextMenuItem);\r
         viewMenu.add(renderGapsMenuItem);\r
@@ -787,9 +800,6 @@ public class GAlignFrame extends Frame {
     protected void font_actionPerformed(ActionEvent e) {\r
     }\r
 \r
-    protected void fullSeqId_actionPerformed(ActionEvent e) {\r
-    }\r
-\r
     protected void epsFile_actionPerformed(ActionEvent e) {\r
     }\r
 \r
@@ -828,4 +838,14 @@ public class GAlignFrame extends Frame {
 \r
     protected void about_actionPerformed(ActionEvent e) {\r
     }\r
+\r
+  public void dbref_actionPerformed(ItemEvent e)\r
+  {\r
+\r
+  }\r
+\r
+  public void seqLimits_itemStateChanged(ItemEvent e)\r
+  {\r
+\r
+  }\r
 }\r