{\r
new FeatureSettings(alignPanel);\r
}\r
+ else if(source== alProperties)\r
+ {\r
+ StringBuffer contents = new StringBuffer();\r
+\r
+ float avg = 0;\r
+ int min=Integer.MAX_VALUE, max=0;\r
+ for(int i=0; i<viewport.alignment.getHeight(); i++)\r
+ {\r
+ int size = viewport.alignment.getSequenceAt(i).getEnd()\r
+ -viewport.alignment.getSequenceAt(i).getStart();\r
+ avg += size;\r
+ if(size>max)\r
+ max = size;\r
+ if(size<min)\r
+ min = size;\r
+ }\r
+ avg = avg/(float)viewport.alignment.getHeight();\r
+\r
+ contents.append("\nSequences: "+ viewport.alignment.getHeight());\r
+ contents.append("\nMinimum Sequence Length: "+min);\r
+ contents.append("\nMaximum Sequence Length: "+max);\r
+ contents.append("\nAverage Length: "+(int)avg);\r
+\r
+ if (((Alignment)viewport.alignment).alignmentProperties != null)\r
+ {\r
+ Hashtable props = ((Alignment)viewport.alignment).alignmentProperties;\r
+ Enumeration en = props.keys();\r
+ while(en.hasMoreElements())\r
+ {\r
+ String key = en.nextElement().toString();\r
+ contents.append("\n"+key+"\t"+props.get(key));\r
+ }\r
+ }\r
+\r
+ CutAndPasteTransfer cap = new CutAndPasteTransfer(false, this);\r
+ cap.setText(contents.toString());\r
+ Frame frame = new Frame();\r
+ frame.add(cap);\r
+ jalview.bin.JalviewLite.addFrame(frame,\r
+ "Alignment Properties: "+getTitle()\r
+ , 400, 250);\r
+ }\r
else if (source == overviewMenuItem)\r
{\r
overviewMenuItem_actionPerformed();\r
//////////////////////////////////////////////////////////////////////////////////\r
//JBuilder Graphics here\r
\r
- protected MenuBar alignFrameMenuBar = new MenuBar();\r
- protected Menu fileMenu = new Menu("File");\r
- protected MenuItem loadApplication = new MenuItem("View in Full Application");\r
- protected MenuItem loadTree = new MenuItem("Load Associated Tree ...");\r
- protected MenuItem loadAnnotations = new MenuItem(\r
+ MenuBar alignFrameMenuBar = new MenuBar();\r
+ Menu fileMenu = new Menu("File");\r
+ MenuItem loadApplication = new MenuItem("View in Full Application");\r
+ MenuItem loadTree = new MenuItem("Load Associated Tree ...");\r
+ MenuItem loadAnnotations = new MenuItem(\r
"Load Features/Annotations ...");\r
- protected MenuItem outputFeatures = new MenuItem("Export Features ...");\r
- protected MenuItem outputAnnotations = new MenuItem("Export Annotations ...");\r
-\r
- protected MenuItem closeMenuItem = new MenuItem("Close");\r
- protected Menu editMenu = new Menu("Edit");\r
- protected Menu viewMenu = new Menu("View");\r
- protected Menu colourMenu = new Menu("Colour");\r
- protected Menu calculateMenu = new Menu("Calculate");\r
- protected MenuItem selectAllSequenceMenuItem = new MenuItem("Select all");\r
- protected MenuItem deselectAllSequenceMenuItem = new MenuItem("Deselect All");\r
- protected MenuItem invertSequenceMenuItem = new MenuItem("Invert Selection");\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
+ MenuItem outputFeatures = new MenuItem("Export Features ...");\r
+ MenuItem outputAnnotations = new MenuItem("Export Annotations ...");\r
+\r
+ MenuItem closeMenuItem = new MenuItem("Close");\r
+ Menu editMenu = new Menu("Edit");\r
+ Menu viewMenu = new Menu("View");\r
+ Menu colourMenu = new Menu("Colour");\r
+ Menu calculateMenu = new Menu("Calculate");\r
+ MenuItem selectAllSequenceMenuItem = new MenuItem("Select all");\r
+ MenuItem deselectAllSequenceMenuItem = new MenuItem("Deselect All");\r
+ MenuItem invertSequenceMenuItem = new MenuItem("Invert Selection");\r
+ MenuItem remove2LeftMenuItem = new MenuItem();\r
+ MenuItem remove2RightMenuItem = new MenuItem();\r
+ MenuItem removeGappedColumnMenuItem = new MenuItem();\r
+ MenuItem removeAllGapsMenuItem = new MenuItem();\r
+ CheckboxMenuItem viewBoxesMenuItem = new CheckboxMenuItem();\r
+ CheckboxMenuItem viewTextMenuItem = new CheckboxMenuItem();\r
+ MenuItem sortPairwiseMenuItem = new MenuItem();\r
+ MenuItem sortIDMenuItem = new MenuItem();\r
+ MenuItem sortGroupMenuItem = new MenuItem();\r
+ MenuItem removeRedundancyMenuItem = new MenuItem();\r
+ MenuItem pairwiseAlignmentMenuItem = new MenuItem();\r
+ MenuItem PCAMenuItem = new MenuItem();\r
+ MenuItem averageDistanceTreeMenuItem = new MenuItem();\r
+ 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
+ Menu outputTextboxMenu = new Menu();\r
+ MenuItem clustalColour = new MenuItem();\r
+ MenuItem zappoColour = new MenuItem();\r
+ MenuItem taylorColour = new MenuItem();\r
+ MenuItem hydrophobicityColour = new MenuItem();\r
+ MenuItem helixColour = new MenuItem();\r
+ MenuItem strandColour = new MenuItem();\r
+ MenuItem turnColour = new MenuItem();\r
+ MenuItem buriedColour = new MenuItem();\r
+ MenuItem userDefinedColour = new MenuItem();\r
+ MenuItem PIDColour = new MenuItem();\r
+ 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
+ CheckboxMenuItem annotationPanelMenuItem = new CheckboxMenuItem();\r
+ CheckboxMenuItem colourTextMenuItem = new CheckboxMenuItem();\r
+ MenuItem alProperties = new MenuItem("Alignment Properties...");\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 undoMenuItem = new MenuItem();\r
+ MenuItem redoMenuItem = new MenuItem();\r
+ CheckboxMenuItem conservationMenuItem = new CheckboxMenuItem();\r
MenuItem noColourmenuItem = new MenuItem();\r
- protected CheckboxMenuItem wrapMenuItem = new CheckboxMenuItem();\r
- protected CheckboxMenuItem renderGapsMenuItem = new CheckboxMenuItem();\r
+ CheckboxMenuItem wrapMenuItem = new CheckboxMenuItem();\r
+ CheckboxMenuItem renderGapsMenuItem = new CheckboxMenuItem();\r
MenuItem findMenuItem = new MenuItem();\r
- protected CheckboxMenuItem abovePIDThreshold = new CheckboxMenuItem();\r
- protected MenuItem nucleotideColour = new MenuItem();\r
+ CheckboxMenuItem abovePIDThreshold = new CheckboxMenuItem();\r
+ MenuItem nucleotideColour = new MenuItem();\r
MenuItem deleteGroups = new MenuItem();\r
MenuItem delete = new MenuItem();\r
MenuItem copy = new MenuItem();\r
Menu pasteMenu = 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 scaleAbove = new CheckboxMenuItem();\r
- protected CheckboxMenuItem scaleLeft = new CheckboxMenuItem();\r
- protected CheckboxMenuItem scaleRight = new CheckboxMenuItem();\r
+ CheckboxMenuItem applyToAllGroups = new CheckboxMenuItem();\r
+ MenuItem font = new MenuItem();\r
+ CheckboxMenuItem scaleAbove = new CheckboxMenuItem();\r
+ CheckboxMenuItem scaleLeft = new CheckboxMenuItem();\r
+ CheckboxMenuItem scaleRight = new CheckboxMenuItem();\r
MenuItem modifyPID = new MenuItem();\r
MenuItem modifyConservation = new MenuItem();\r
- protected CheckboxMenuItem autoCalculate\r
+ CheckboxMenuItem autoCalculate\r
= new CheckboxMenuItem("Autocalculate Consensus", true);\r
- protected Menu sortByTreeMenu = new Menu();\r
+ 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
+ CheckboxMenuItem seqLimits = new CheckboxMenuItem();\r
Panel embeddedMenu;\r
Label embeddedEdit;\r
Label embeddedSelect;\r
annotationPanelMenuItem.addItemListener(this);\r
colourTextMenuItem.setLabel("Colour Text");\r
colourTextMenuItem.addItemListener(this);\r
+ alProperties.addActionListener(this);\r
overviewMenuItem.setLabel("Overview Window");\r
overviewMenuItem.addActionListener(this);\r
undoMenuItem.setEnabled(false);\r
viewMenu.add(sequenceFeatures);\r
viewMenu.add(featureSettings);\r
viewMenu.addSeparator();\r
+ viewMenu.add(alProperties);\r
+ viewMenu.addSeparator();\r
viewMenu.add(overviewMenuItem);\r
colourMenu.add(applyToAllGroups);\r
colourMenu.addSeparator();\r