X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAlignFrame.java;h=f101ab5692834e95f9559d7795f03cb67420271f;hb=08044f16da407871ea84ccbfbc09e34cceb74080;hp=44b163b4f67f90c8a52ec73e2404a2d4c942cf49;hpb=2202e4f29a90e65c507a8d941ce14e42af49b658;p=jalview.git diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 44b163b..f101ab5 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -1,17 +1,24 @@ -/******************** - * 2004 Jalview Reengineered - * Barton Group - * Dundee University +/* + * Jalview - A Sequence Alignment Editor and Viewer + * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * - * AM Waterhouse - *******************/ - - - + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ package jalview.appletgui; -import jalview.jbappletgui.GAlignFrame; import jalview.schemes.*; import jalview.datamodel.*; import jalview.analysis.*; @@ -19,82 +26,236 @@ import jalview.io.*; import java.awt.*; import java.awt.event.*; import java.util.*; +import java.io.InputStreamReader; +import java.io.BufferedReader; +import java.net.URL; -public class AlignFrame extends GAlignFrame +public class AlignFrame extends Frame { final AlignmentPanel alignPanel; - final AlignViewport viewport; - public static final int NEW_WINDOW_WIDTH = 700; - public static final int NEW_WINDOW_HEIGHT = 500; + public final AlignViewport viewport; + int NEW_WINDOW_WIDTH = 700; + int NEW_WINDOW_HEIGHT = 500; jalview.bin.JalviewLite applet; - public AlignFrame(AlignmentI al) - { - this.applet = null; - viewport = new AlignViewport(al, null); - alignPanel = new AlignmentPanel(this, viewport); - add(alignPanel); - alignPanel.validate(); - } - public AlignFrame(AlignmentI al, jalview.bin.JalviewLite applet) + public AlignFrame(AlignmentI al, jalview.bin.JalviewLite applet, String title) { + try{ + jbInit(); + }catch(Exception ex) + { + ex.printStackTrace(); + } this.applet = applet; viewport = new AlignViewport(al, applet); alignPanel = new AlignmentPanel(this, viewport); add(alignPanel); alignPanel.validate(); - String treeFile = applet.getParameter("treeFile"); - TreePanel treepanel = null; - if (treeFile != null) + if(applet!=null) { - try + String treeFile = applet.getParameter("treeFile"); + if (treeFile != null) { - treeFile = treeFile; - jalview.io.NewickFile fin = new jalview.io.NewickFile( applet.getCodeBase()+treeFile, "URL"); - fin.parse(); + try + { + jalview.io.NewickFile fin = new jalview.io.NewickFile(applet. + getCodeBase() + treeFile, "URL"); + fin.parse(); - if (fin.getTree() != null) + if (fin.getTree() != null) + { + TreePanel tp = null; + tp = new TreePanel(viewport, viewport.getAlignment().getSequences(), + fin, "FromFile", applet.getCodeBase() + treeFile); + jalview.bin.JalviewLite.addFrame(tp, treeFile, 600, 500); + addTreeMenuItem(tp, treeFile); + } + } + catch (Exception ex) { - TreePanel tp = null; - tp = new TreePanel(viewport, viewport.getAlignment().getSequences(), - fin, "FromFile", applet.getCodeBase()+treeFile); - jalview.bin.JalviewLite.addFrame(tp, treeFile, 600, 500); - addTreeMenuItem(tp, treeFile); + ex.printStackTrace(); } } - catch (Exception ex) + + String param = applet.getParameter("sortBy"); + if (param != null) { - ex.printStackTrace(); + if (param.equalsIgnoreCase("Id")) + sortIDMenuItem_actionPerformed(null); + else if (param.equalsIgnoreCase("Pairwise Identity")) + sortPairwiseMenuItem_actionPerformed(null); } + + param = applet.getParameter("wrap"); + if (param != null) + { + if (param.equalsIgnoreCase("true")) + { + wrapMenuItem.setState(true); + wrapMenuItem_actionPerformed(null); + } + } + + try + { + param = applet.getParameter("windowWidth"); + if (param != null) + { + int width = Integer.parseInt(param); + NEW_WINDOW_WIDTH = width; + } + param = applet.getParameter("windowHeight"); + if (param != null) + { + int height = Integer.parseInt(param); + NEW_WINDOW_HEIGHT = height; + } + } + catch (Exception ex) + {} + } + this.addWindowListener(new WindowAdapter() + { + public void windowClosing(WindowEvent e) + { + closeMenuItem_actionPerformed(null); + } + }); + + viewport.addPropertyChangeListener(new java.beans.PropertyChangeListener() + { + public void propertyChange(java.beans.PropertyChangeEvent evt) + { + if (evt.getPropertyName().equals("alignment")) + { + alignmentChanged(); + } + } + }); + + jalview.bin.JalviewLite.addFrame(this, title, + NEW_WINDOW_WIDTH, + NEW_WINDOW_HEIGHT); + } - public void inputText_actionPerformed(ActionEvent e) + + /** + * DOCUMENT ME! + * + * @param String DOCUMENT ME! + */ + + public void parseFeaturesFile(String file) { - CutAndPasteTransfer cap = new CutAndPasteTransfer(true); - Frame frame = new Frame(); - frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame, "Cut & Paste Input", 500,500); + try + { + URL url = new URL(file); + + BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream())); + SequenceI seq = null; + String line, type, desc, token; + + int index, start, end; + StringTokenizer st; + SequenceFeature sf; + FeatureRenderer fr = alignPanel.seqPanel.seqCanvas.getFeatureRenderer(); + int lineNo = 0; + while ( (line = in.readLine()) != null) + { + lineNo++; + st = new StringTokenizer(line, "\t"); + if (st.countTokens() == 2) + { + type = st.nextToken(); + UserColourScheme ucs = new UserColourScheme(st.nextToken()); + fr.setColour(type, ucs.findColour("A")); + continue; + } + + while (st.hasMoreElements()) + { + desc = st.nextToken(); + token = st.nextToken(); + if (!token.equals("ID_NOT_SPECIFIED")) + { + index = viewport.alignment.findIndex(viewport.alignment.findName( + token)); + st.nextToken(); + } + else + { + index = Integer.parseInt(st.nextToken()); + } + + start = Integer.parseInt(st.nextToken()); + end = Integer.parseInt(st.nextToken()); + + seq = viewport.alignment.getSequenceAt(index); + start = seq.findIndex(start) - 1; + end = seq.findIndex(end) - 1; + + type = st.nextToken(); + + if(fr.getColour(type)==null) + { + // Probably the old style groups file + UserColourScheme ucs = new UserColourScheme(type); + fr.setColour(type, ucs.findColour("A")); + } + + sf = new SequenceFeature(type, desc, "", start, end); + + seq.addSequenceFeature(sf); + } + } + + viewport.showSequenceFeatures = true; + ((Alignment)viewport.alignment).featuresAdded = true; + + alignPanel.repaint(); + + } + catch (Exception ex) + { + System.out.println("Error parsing groups file: " + ex); + } } + public void inputText_actionPerformed(ActionEvent e) + { + CutAndPasteTransfer cap = new CutAndPasteTransfer(true, applet); + Frame frame = new Frame(); + frame.add(cap); + jalview.bin.JalviewLite.addFrame(frame, "Cut & Paste Input", 500, 500); + } + protected void outputText_actionPerformed(ActionEvent e) { - CutAndPasteTransfer cap = new CutAndPasteTransfer(false); - Frame frame = new Frame(); - frame.add(cap); - jalview.bin.JalviewLite.addFrame(frame,"Alignment output - "+e.getActionCommand(),600, 500); - cap.setText( FormatAdapter.formatSequences(e.getActionCommand(), viewport.getAlignment().getSequences())); + CutAndPasteTransfer cap = new CutAndPasteTransfer(false, applet); + Frame frame = new Frame(); + frame.add(cap); + jalview.bin.JalviewLite.addFrame(frame, + "Alignment output - " + e.getActionCommand(), + 600, 500); + cap.setText(new AppletFormatAdapter().formatSequences(e.getActionCommand(), + viewport.getAlignment().getSequences(), + viewport.showDBPrefix, + viewport.showJVSuffix)); } public void closeMenuItem_actionPerformed(ActionEvent e) { - dispose(); + PaintRefresher.components.remove(viewport.alignment); + if(PaintRefresher.components.size()==0 && applet==null) + System.exit(0); } Stack historyList = new Stack(); @@ -102,24 +263,24 @@ public class AlignFrame extends GAlignFrame void updateEditMenuBar() { - if(historyList.size()>0) - { - undoMenuItem.setEnabled(true); - Object [] history = (Object[])historyList.elementAt(0); - undoMenuItem.setLabel("Undo "+history[0]); - } + if (historyList.size() > 0) + { + undoMenuItem.setEnabled(true); + HistoryItem hi = (HistoryItem) historyList.peek(); + undoMenuItem.setLabel("Undo " + hi.getDescription()); + } else { undoMenuItem.setEnabled(false); undoMenuItem.setLabel("Undo"); } - if(redoList.size()>0) - { - redoMenuItem.setEnabled(true); - Object [] history = (Object[])redoList.elementAt(0); - redoMenuItem.setLabel("Redo "+history[0]); - } + if (redoList.size() > 0) + { + redoMenuItem.setEnabled(true); + HistoryItem hi = (HistoryItem) redoList.peek(); + redoMenuItem.setLabel("Redo " + hi.getDescription()); + } else { redoMenuItem.setEnabled(false); @@ -127,55 +288,80 @@ public class AlignFrame extends GAlignFrame } } - public void addHistoryItem(String type) + public void addHistoryItem(HistoryItem hi) { - // must make sure we add new sequence objects her, not refs to the existing sequences - redoList.removeAllElements(); - SequenceI[] seq = new SequenceI[viewport.getAlignment().getHeight()]; - for(int i=0; i hi.getSequences().size() - 1; i--) + { + viewport.alignment.deleteSequence(i); + } + } + } - AlignmentAnnotation[] old = viewport.alignment.getAlignmentAnnotation(); - viewport.setAlignment(new Alignment(seq)); - updateEditMenuBar(); - for (int i = 0; i < old.length; i++) - viewport.alignment.addAnnotation(old[i]); + updateEditMenuBar(); - viewport.updateConservation(); - viewport.updateConsensus(); - alignPanel.repaint(); + viewport.firePropertyChange("alignment", null, viewport.getAlignment().getSequences()); } public void moveSelectedSequences(boolean up) { SequenceGroup sg = viewport.getSelectionGroup(); if (sg == null) + { return; + } if (up) { @@ -183,11 +369,15 @@ public class AlignFrame extends GAlignFrame { SequenceI seq = viewport.alignment.getSequenceAt(i); if (!sg.sequences.contains(seq)) + { continue; + } SequenceI temp = viewport.alignment.getSequenceAt(i - 1); if (sg.sequences.contains(temp)) + { continue; + } viewport.alignment.getSequences().setElementAt(temp, i); viewport.alignment.getSequences().setElementAt(seq, i - 1); @@ -199,11 +389,15 @@ public class AlignFrame extends GAlignFrame { SequenceI seq = viewport.alignment.getSequenceAt(i); if (!sg.sequences.contains(seq)) + { continue; + } SequenceI temp = viewport.alignment.getSequenceAt(i + 1); if (sg.sequences.contains(temp)) + { continue; + } viewport.alignment.getSequences().setElementAt(temp, i); viewport.alignment.getSequences().setElementAt(seq, i + 1); @@ -213,26 +407,76 @@ public class AlignFrame extends GAlignFrame alignPanel.repaint(); } - StringBuffer copiedSequences; protected void copy_actionPerformed(ActionEvent e) { - if(viewport.getSelectionGroup()==null) - return; + if (viewport.getSelectionGroup() == null) + { + return; + } - SequenceGroup sg = viewport.getSelectionGroup(); - copiedSequences = new StringBuffer(); + SequenceGroup sg = viewport.getSelectionGroup(); + copiedSequences = new StringBuffer(); + Hashtable orderedSeqs = new Hashtable(); + for (int i = 0; i < sg.getSize(); i++) + { + SequenceI seq = sg.getSequenceAt(i); + int index = viewport.alignment.findIndex(seq); + orderedSeqs.put(index + "", seq); + } - for(int i=0; i0) + { + endRes += seq.getStart() -1; + } + + copiedSequences.append(seq.getName() + "\t" + + startRes + "\t" + + endRes + "\t" + + seq.getSequence(sg.getStartRes(), + sg.getEndRes() + 1) + "\n"); + } + + } protected void pasteNew_actionPerformed(ActionEvent e) { @@ -241,15 +485,19 @@ public class AlignFrame extends GAlignFrame protected void pasteThis_actionPerformed(ActionEvent e) { - addHistoryItem("Paste"); + addHistoryItem(new HistoryItem("Paste Sequences", viewport.alignment, + HistoryItem.PASTE)); paste(false); } void paste(boolean newAlignment) { - try{ + try + { if (copiedSequences == null) + { return; + } StringTokenizer st = new StringTokenizer(copiedSequences.toString()); Vector seqs = new Vector(); @@ -258,42 +506,53 @@ public class AlignFrame extends GAlignFrame String name = st.nextToken(); int start = Integer.parseInt(st.nextToken()); int end = Integer.parseInt(st.nextToken()); - Sequence sequence = new Sequence(name,st.nextToken(), start, end); + Sequence sequence = new Sequence(name, st.nextToken(), start, end); - if(!newAlignment) + if (!newAlignment) + { viewport.alignment.addSequence(sequence); + } else + { seqs.addElement(sequence); + } } - if(newAlignment) + if (newAlignment) { SequenceI[] newSeqs = new SequenceI[seqs.size()]; - for(int i=0; i 0) { + addHistoryItem(new HistoryItem("Remove Left", viewport.alignment, + HistoryItem.HIDE)); int min = colSel.getMin(); viewport.getAlignment().trimLeft(min); - colSel.compensateForEdit(0,min); + colSel.compensateForEdit(0, min); - if(viewport.getSelectionGroup()!=null) + if (viewport.getSelectionGroup() != null) + { viewport.getSelectionGroup().adjustForRemoveLeft(min); + } Vector groups = viewport.alignment.getGroups(); - for(int i=0; i 0) { + addHistoryItem(new HistoryItem("Remove Right", viewport.alignment, + HistoryItem.HIDE)); int max = colSel.getMax(); viewport.getAlignment().trimRight(max); - if(viewport.getSelectionGroup()!=null) + if (viewport.getSelectionGroup() != null) + { viewport.getSelectionGroup().adjustForRemoveRight(max); + } Vector groups = viewport.alignment.getGroups(); - for(int i=0; i0) + { + seqs = viewport.getSelectionGroup().sequences; + start = viewport.getSelectionGroup().getStartRes(); + end = viewport.getSelectionGroup().getEndRes()+1; + } + else + seqs = viewport.alignment.getSequences(); + + for (int i = 0; i < seqs.size(); i++) { - current = viewport.getAlignment().getSequenceAt(i); + current = (SequenceI) seqs.elementAt(i); jSize = current.getLength(); - for (int j=0; j < jSize; j++) - if(jalview.util.Comparison.isGap(current.getCharAt(j))) + + // Removing a range is much quicker than removing gaps + // one by one for long sequences + int j = start; + int rangeStart=-1, rangeEnd=-1; + + do + { + if (jalview.util.Comparison.isGap(current.getCharAt(j))) { - current.deleteCharAt(j); - j--; - jSize--; + if(rangeStart==-1) + { + rangeStart = j; + rangeEnd = j+1; + } + else + { + rangeEnd++; + } + j++; + } + else + { + if(rangeStart>-1) + { + current.deleteChars(rangeStart, rangeEnd); + j-=rangeEnd-rangeStart; + jSize-=rangeEnd-rangeStart; + rangeStart = -1; + rangeEnd = -1; + } + else + j++; } + } + while (j < end && j < jSize); + if(rangeStart>-1) + { + current.deleteChars(rangeStart, rangeEnd); + } } - viewport.updateConservation(); + viewport.setStartRes(seq.findIndex(startRes)-1); + viewport.firePropertyChange("alignment", null, viewport.getAlignment().getSequences()); + } + + public void alignmentChanged() + { viewport.updateConsensus(); + viewport.updateConservation (); + resetAllColourSchemes(); + if(alignPanel.overviewPanel!=null) + alignPanel.overviewPanel.updateOverviewImage(); alignPanel.repaint(); } + void resetAllColourSchemes() + { + ColourSchemeI cs = viewport.globalColourScheme; + if(cs!=null) + { + if (cs instanceof ClustalxColourScheme) + { + ( (ClustalxColourScheme) viewport.getGlobalColourScheme()). + resetClustalX(viewport.alignment.getSequences(), + viewport.alignment.getWidth()); + } + + cs.setConsensus(viewport.vconsensus); + if (cs.conservationApplied()) + { + Alignment al = (Alignment) viewport.alignment; + Conservation c = new Conservation("All", + ResidueProperties.propHash, 3, + al.getSequences(), 0, + al.getWidth() - 1); + c.calculate(); + c.verdict(false, viewport.ConsPercGaps); + + cs.setConservation(c); + } + } + + int s, sSize = viewport.alignment.getGroups().size(); + for(s=0; s1) + if (viewport.getSelectionGroup().getSize() > 1) { Frame frame = new Frame(); - frame.add(new PairwiseAlignPanel(viewport)); + frame.add(new PairwiseAlignPanel(alignPanel)); jalview.bin.JalviewLite.addFrame(frame, "Pairwise Alignment", 600, 500); } } public void PCAMenuItem_actionPerformed(ActionEvent e) { + //are the sequences aligned? + if (!viewport.alignment.isAligned()) + { + SequenceI current; + int Width = viewport.getAlignment().getWidth(); - if( (viewport.getSelectionGroup()!=null && viewport.getSelectionGroup().getSize()<4 && viewport.getSelectionGroup().getSize()>0) - || viewport.getAlignment().getHeight()<4) + for (int i = 0; i < viewport.getAlignment().getSequences().size(); + i++) + { + current = viewport.getAlignment().getSequenceAt(i); + + if (current.getLength() < Width) + { + current.insertCharAt(Width - 1, viewport.getGapCharacter()); + } + } + alignPanel.repaint(); + } + + if ( (viewport.getSelectionGroup() != null && + viewport.getSelectionGroup().getSize() < 4 && + viewport.getSelectionGroup().getSize() > 0) + || viewport.getAlignment().getHeight() < 4) { return; } - try{ - PCAPanel pcaPanel = new PCAPanel(viewport, null); - Frame frame = new Frame(); - frame.add(pcaPanel); - jalview.bin.JalviewLite.addFrame(frame, "Principal component analysis", 400, 400); - }catch(java.lang.OutOfMemoryError ex) - { - } - + try + { + new PCAPanel(viewport); + } + catch (java.lang.OutOfMemoryError ex) + { + } } @@ -910,7 +1296,6 @@ public class AlignFrame extends GAlignFrame NewTreePanel("NJ", "PID", "Neighbour joining tree using PID"); } - protected void njTreeBlosumMenuItem_actionPerformed(ActionEvent e) { NewTreePanel("NJ", "BL", "Neighbour joining tree using BLOSUM62"); @@ -924,9 +1309,23 @@ public class AlignFrame extends GAlignFrame void NewTreePanel(String type, String pwType, String title) { //are the sequences aligned? - if(!viewport.alignment.isAligned()) + if (!viewport.alignment.isAligned()) { - return; + SequenceI current; + int Width = viewport.getAlignment().getWidth(); + + for (int i = 0; i < viewport.getAlignment().getSequences().size(); + i++) + { + current = viewport.getAlignment().getSequenceAt(i); + + if (current.getLength() < Width) + { + current.insertCharAt(Width - 1, viewport.getGapCharacter()); + } + } + alignPanel.repaint(); + } final TreePanel tp; @@ -943,9 +1342,9 @@ public class AlignFrame extends GAlignFrame type, pwType, 0, viewport.alignment.getWidth()); } - addTreeMenuItem(tp, title); + addTreeMenuItem(tp, title); - jalview.bin.JalviewLite.addFrame(tp, title, 600, 500); + jalview.bin.JalviewLite.addFrame(tp, title, 600, 500); } void addTreeMenuItem(final TreePanel treePanel, String title) @@ -956,7 +1355,8 @@ public class AlignFrame extends GAlignFrame { public void actionPerformed(ActionEvent e) { - addHistoryItem("sort"); + addHistoryItem(new HistoryItem("Sort", viewport.alignment, + HistoryItem.SORT)); AlignmentSorter.sortByTree(viewport.getAlignment(), treePanel.getTree()); alignPanel.repaint(); } @@ -971,40 +1371,704 @@ public class AlignFrame extends GAlignFrame }); } - protected void documentation_actionPerformed(ActionEvent e) { - - jalview.bin.JalviewLite.showURL("http://www.jalview.org"); - + protected void documentation_actionPerformed(ActionEvent e) + { + showURL("http://www.jalview.org/help.html"); } protected void about_actionPerformed(ActionEvent e) { + class AboutPanel extends Canvas { + String version; + public AboutPanel(String version) + { this.version = version; } + public void paint(Graphics g) { g.setColor(Color.white); - g.fillRect(0,0,getSize().width, getSize().height); + g.fillRect(0, 0, getSize().width, getSize().height); g.setFont(new Font("Helvetica", Font.PLAIN, 12)); FontMetrics fm = g.getFontMetrics(); int fh = fm.getHeight(); - int y=20, x=7; + int y = 5, x = 7; g.setColor(Color.black); g.setFont(new Font("Helvetica", Font.BOLD, 14)); - g.drawString("JalView - Release 2.0", 200,y+=fh); + g.drawString("Jalview - Release "+version, 200, y += fh); g.setFont(new Font("Helvetica", Font.PLAIN, 12)); - g.drawString("Authors: Michele Clamp, James Cuff, Steve Searle, Andrew Waterhouse, Jim Procter & Geoff Barton.",x,y+=fh*2); - g.drawString("Current development managed by Andrew Waterhouse; Barton Group, University of Dundee.",x,y+=fh); - g.drawString("If you use JalView, please cite:",x,y+=fh+8); - g.drawString("\"Clamp, M., Cuff, J., Searle, S. M. and Barton, G. J. (2004), The Jalview Java Alignment Editor\"",x,y+=fh); - g.drawString("Bioinformatics, 2004 12;426-7.",x,y+=fh); + g.drawString("Authors: Michele Clamp, James Cuff, Steve Searle, Andrew Waterhouse, Jim Procter & Geoff Barton.", + x, y += fh * 2); + g.drawString("Current development managed by Andrew Waterhouse; Barton Group, University of Dundee.", + x, y += fh); + g.drawString( + "For any issues relating to Jalview, email help@jalview.org", x, + y += fh); + g.drawString("If you use JalView, please cite:", x, y += fh + 8); + g.drawString("\"Clamp, M., Cuff, J., Searle, S. M. and Barton, G. J. (2004), The Jalview Java Alignment Editor\"", + x, y += fh); + g.drawString("Bioinformatics, 2004 12;426-7.", x, y += fh); } } + + String version = "test"; + java.net.URL url = getClass().getResource("/.build_properties"); + if (url != null) + { + try + { + BufferedReader reader = new BufferedReader(new InputStreamReader( + url.openStream())); + String line; + while ( (line = reader.readLine()) != null) + { + if (line.indexOf("VERSION") > -1) + { + version = line.substring(line.indexOf("=") + 1); + } + } + } + catch (Exception ex) + { + ex.printStackTrace(); + } + } + + Frame frame = new Frame(); - frame.add(new AboutPanel()); - jalview.bin.JalviewLite.addFrame(frame, "Jalview", 580,200); + frame.add(new AboutPanel(version)); + jalview.bin.JalviewLite.addFrame(frame, "Jalview", 580, 200); + } + /** + * Displays the given URL in a new browser window + * + * @param url URL to display in browser window. + *
New window will be named "HELP_WINDOW" + */ + public void showURL(String url) + { + showURL(url, "HELP"); + } + public void showURL(String url, String target) + { + if (applet == null) + { + System.out.println("Not running as applet - no browser available."); + } + else + { + try + { + applet.getAppletContext().showDocument(new java.net.URL(url), + target); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + } } + + + ////////////////////////////////////////////////////////////////////////////////// + //JBuilder Graphics here + + protected MenuBar alignFrameMenuBar = new MenuBar(); + protected Menu fileMenu = new Menu(); + protected MenuItem closeMenuItem = new MenuItem(); + protected Menu editMenu = new Menu(); + protected Menu viewMenu = new Menu(); + protected Menu colourMenu = new Menu(); + protected Menu calculateMenu = new Menu(); + protected MenuItem selectAllSequenceMenuItem = new MenuItem(); + protected MenuItem deselectAllSequenceMenuItem = new MenuItem(); + protected MenuItem invertSequenceMenuItem = new MenuItem(); + protected MenuItem remove2LeftMenuItem = new MenuItem(); + protected MenuItem remove2RightMenuItem = new MenuItem(); + protected MenuItem removeGappedColumnMenuItem = new MenuItem(); + protected MenuItem removeAllGapsMenuItem = new MenuItem(); + protected CheckboxMenuItem viewBoxesMenuItem = new CheckboxMenuItem(); + protected CheckboxMenuItem viewTextMenuItem = new CheckboxMenuItem(); + protected MenuItem sortPairwiseMenuItem = new MenuItem(); + protected MenuItem sortIDMenuItem = new MenuItem(); + protected MenuItem sortGroupMenuItem = new MenuItem(); + protected MenuItem removeRedundancyMenuItem = new MenuItem(); + protected MenuItem pairwiseAlignmentMenuItem = new MenuItem(); + protected MenuItem PCAMenuItem = new MenuItem(); + protected MenuItem averageDistanceTreeMenuItem = new MenuItem(); + protected MenuItem neighbourTreeMenuItem = new MenuItem(); + BorderLayout borderLayout1 = new BorderLayout(); + public Label statusBar = new Label(); + protected Menu outputTextboxMenu = new Menu(); + protected MenuItem clustalColour = new MenuItem(); + protected MenuItem zappoColour = new MenuItem(); + protected MenuItem taylorColour = new MenuItem(); + protected MenuItem hydrophobicityColour = new MenuItem(); + protected MenuItem helixColour = new MenuItem(); + protected MenuItem strandColour = new MenuItem(); + protected MenuItem turnColour = new MenuItem(); + protected MenuItem buriedColour = new MenuItem(); + protected MenuItem userDefinedColour = new MenuItem(); + protected MenuItem PIDColour = new MenuItem(); + protected MenuItem BLOSUM62Colour = new MenuItem(); + MenuItem njTreeBlosumMenuItem = new MenuItem(); + MenuItem avDistanceTreeBlosumMenuItem = new MenuItem(); + protected CheckboxMenuItem annotationPanelMenuItem = new CheckboxMenuItem(); + protected CheckboxMenuItem colourTextMenuItem = new CheckboxMenuItem(); + MenuItem overviewMenuItem = new MenuItem(); + protected MenuItem undoMenuItem = new MenuItem(); + protected MenuItem redoMenuItem = new MenuItem(); + protected CheckboxMenuItem conservationMenuItem = new CheckboxMenuItem(); + MenuItem noColourmenuItem = new MenuItem(); + protected CheckboxMenuItem wrapMenuItem = new CheckboxMenuItem(); + protected CheckboxMenuItem renderGapsMenuItem = new CheckboxMenuItem(); + MenuItem findMenuItem = new MenuItem(); + Menu searchMenu = new Menu(); + protected CheckboxMenuItem abovePIDThreshold = new CheckboxMenuItem(); + protected MenuItem nucleotideColour = new MenuItem(); + MenuItem deleteGroups = new MenuItem(); + MenuItem delete = new MenuItem(); + MenuItem copy = new MenuItem(); + MenuItem cut = new MenuItem(); + Menu Menu1 = new Menu(); + MenuItem pasteNew = new MenuItem(); + MenuItem pasteThis = new MenuItem(); + protected CheckboxMenuItem applyToAllGroups = new CheckboxMenuItem(); + protected MenuItem font = new MenuItem(); + protected CheckboxMenuItem dbref = new CheckboxMenuItem(); + protected CheckboxMenuItem scaleAbove = new CheckboxMenuItem(); + protected CheckboxMenuItem scaleLeft = new CheckboxMenuItem(); + protected CheckboxMenuItem scaleRight = new CheckboxMenuItem(); + MenuItem modifyPID = new MenuItem(); + MenuItem modifyConservation = new MenuItem(); + protected Menu sortByTreeMenu = new Menu(); + Menu sort = new Menu(); + Menu calculate = new Menu(); + MenuItem inputText = new MenuItem(); + Menu helpMenu = new Menu(); + MenuItem documentation = new MenuItem(); + MenuItem about = new MenuItem(); + protected CheckboxMenuItem seqLimits = new CheckboxMenuItem(); + + private void jbInit() throws Exception { + + setMenuBar(alignFrameMenuBar); + + MenuItem item; + + // dynamically fill save as menu with available formats + for (int i = 0; i < jalview.io.AppletFormatAdapter.formats.size(); i++) + { + + item = new MenuItem( (String) jalview.io.AppletFormatAdapter.formats. + elementAt( + i)); + item.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + outputText_actionPerformed(e); + } + }); + + outputTextboxMenu.add(item); + } + + + fileMenu.setLabel("File"); + closeMenuItem.setLabel("Close"); + closeMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + closeMenuItem_actionPerformed(e); + } + }); + editMenu.setLabel("Edit"); + viewMenu.setLabel("View"); + colourMenu.setLabel("Colour"); + calculateMenu.setLabel("Calculate"); + selectAllSequenceMenuItem.setLabel("Select all"); + selectAllSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + selectAllSequenceMenuItem_actionPerformed(e); + } + }); + deselectAllSequenceMenuItem.setLabel("Deselect All"); + deselectAllSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + deselectAllSequenceMenuItem_actionPerformed(e); + } + }); + invertSequenceMenuItem.setLabel("Invert Selection"); + invertSequenceMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + invertSequenceMenuItem_actionPerformed(e); + } + }); + remove2LeftMenuItem.setLabel("Remove Left"); + remove2LeftMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + remove2LeftMenuItem_actionPerformed(e); + } + }); + remove2RightMenuItem.setLabel("Remove Right"); + remove2RightMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + remove2RightMenuItem_actionPerformed(e); + } + }); + removeGappedColumnMenuItem.setLabel("Remove Empty Columns"); + removeGappedColumnMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + removeGappedColumnMenuItem_actionPerformed(e); + } + }); + removeAllGapsMenuItem.setLabel("Remove All Gaps"); + removeAllGapsMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + removeAllGapsMenuItem_actionPerformed(e); + } + }); + viewBoxesMenuItem.setLabel("Boxes"); + viewBoxesMenuItem.setState(true); + viewBoxesMenuItem.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(ItemEvent e) { + viewBoxesMenuItem_actionPerformed(null); + } + }); + viewTextMenuItem.setLabel("Text"); + viewTextMenuItem.setState(true); + viewTextMenuItem.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(ItemEvent e) { + viewTextMenuItem_actionPerformed(null); + } + }); + sortPairwiseMenuItem.setLabel("by Pairwise Identity"); + sortPairwiseMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + sortPairwiseMenuItem_actionPerformed(e); + } + }); + sortIDMenuItem.setLabel("by ID"); + sortIDMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + sortIDMenuItem_actionPerformed(e); + } + }); + sortGroupMenuItem.setLabel("by Group"); + sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + sortGroupMenuItem_actionPerformed(e); + } + }); + removeRedundancyMenuItem.setLabel("Remove Redundancy..."); + removeRedundancyMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + removeRedundancyMenuItem_actionPerformed(e); + } + }); + pairwiseAlignmentMenuItem.setLabel("Pairwise Alignments..."); + pairwiseAlignmentMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + pairwiseAlignmentMenuItem_actionPerformed(e); + } + }); + PCAMenuItem.setLabel("Principal Component Analysis"); + PCAMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + PCAMenuItem_actionPerformed(e); + } + }); + averageDistanceTreeMenuItem.setLabel( + "Average Distance Using % Identity"); + averageDistanceTreeMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + averageDistanceTreeMenuItem_actionPerformed(e); + } + }); + neighbourTreeMenuItem.setLabel("Neighbour Joining Using % Identity"); + neighbourTreeMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + neighbourTreeMenuItem_actionPerformed(e); + } + }); + alignFrameMenuBar.setFont(new java.awt.Font("Verdana", 0, 11)); + statusBar.setBackground(Color.white); + statusBar.setFont(new java.awt.Font("Verdana", 0, 11)); + statusBar.setText("Status bar"); + outputTextboxMenu.setLabel("Output to Textbox"); + clustalColour.setLabel("Clustalx"); + + clustalColour.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + clustalColour_actionPerformed(e); + } + }); + zappoColour.setLabel("Zappo"); + zappoColour.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + zappoColour_actionPerformed(e); + } + }); + taylorColour.setLabel("Taylor"); + taylorColour.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + taylorColour_actionPerformed(e); + } + }); + hydrophobicityColour.setLabel("Hydrophobicity"); + hydrophobicityColour.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + hydrophobicityColour_actionPerformed(e); + } + }); + helixColour.setLabel("Helix Propensity"); + helixColour.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + helixColour_actionPerformed(e); + } + }); + strandColour.setLabel("Strand Propensity"); + strandColour.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + strandColour_actionPerformed(e); + } + }); + turnColour.setLabel("Turn Propensity"); + turnColour.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + turnColour_actionPerformed(e); + } + }); + buriedColour.setLabel("Buried Index"); + buriedColour.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + buriedColour_actionPerformed(e); + } + }); + userDefinedColour.setLabel("User Defined..."); + userDefinedColour.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + userDefinedColour_actionPerformed(e); + } + }); + PIDColour.setLabel("Percentage Identity"); + PIDColour.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + PIDColour_actionPerformed(e); + } + }); + BLOSUM62Colour.setLabel("BLOSUM62 Score"); + BLOSUM62Colour.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + BLOSUM62Colour_actionPerformed(e); + } + }); + avDistanceTreeBlosumMenuItem.setLabel( + "Average Distance Using BLOSUM62"); + avDistanceTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + avTreeBlosumMenuItem_actionPerformed(e); + } + }); + njTreeBlosumMenuItem.setLabel("Neighbour Joining Using BLOSUM62"); + njTreeBlosumMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + njTreeBlosumMenuItem_actionPerformed(e); + } + }); + annotationPanelMenuItem.setActionCommand(""); + annotationPanelMenuItem.setState(true); + annotationPanelMenuItem.setLabel("Show Annotations"); + annotationPanelMenuItem.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(ItemEvent e) { + annotationPanelMenuItem_actionPerformed(null); + } + }); + colourTextMenuItem.setLabel("Colour Text"); + colourTextMenuItem.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(ItemEvent e) { + colourTextMenuItem_actionPerformed(null); + } + }); + overviewMenuItem.setLabel("Overview Window"); + overviewMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + overviewMenuItem_actionPerformed(e); + } + }); + undoMenuItem.setEnabled(false); + undoMenuItem.setLabel("Undo"); + undoMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + undoMenuItem_actionPerformed(e); + } + }); + redoMenuItem.setEnabled(false); + redoMenuItem.setLabel("Redo"); + redoMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + redoMenuItem_actionPerformed(e); + } + }); + conservationMenuItem.setLabel("by Conservation"); + conservationMenuItem.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(ItemEvent e) { + conservationMenuItem_actionPerformed(null); + } + }); + noColourmenuItem.setLabel("None"); + noColourmenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + noColourmenuItem_actionPerformed(e); + } + }); + wrapMenuItem.setLabel("Wrap"); + wrapMenuItem.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(ItemEvent e) { + wrapMenuItem_actionPerformed(null); + } + }); + renderGapsMenuItem.setLabel("Show Gaps"); + renderGapsMenuItem.setState(true); + renderGapsMenuItem.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(ItemEvent e) { + renderGapsMenuItem_actionPerformed(null); + } + }); + findMenuItem.setLabel("Find..."); + findMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + findMenuItem_actionPerformed(e); + } + }); + searchMenu.setLabel("Search"); + + abovePIDThreshold.setLabel("Above Identity Threshold"); + abovePIDThreshold.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(ItemEvent e) { + abovePIDThreshold_actionPerformed(null); + } + }); + nucleotideColour.setLabel("Nucleotide"); + nucleotideColour.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + nucleotideColour_actionPerformed(e); + } + }); + deleteGroups.setLabel("Undefine Groups"); + deleteGroups.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + deleteGroups_actionPerformed(e); + } + }); + copy.setLabel("Copy"); + copy.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + copy_actionPerformed(e); + } + }); + cut.setLabel("Cut"); + cut.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + cut_actionPerformed(e); + } + }); + delete.setLabel("Delete"); + delete.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + delete_actionPerformed(e); + } + }); + Menu1.setLabel("Paste"); + pasteNew.setLabel("To New Alignment"); + pasteNew.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + pasteNew_actionPerformed(e); + } + }); + pasteThis.setLabel("Add To This Alignment"); + pasteThis.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + pasteThis_actionPerformed(e); + } + }); + applyToAllGroups.setLabel("Apply Colour To All Groups"); + applyToAllGroups.setState(true); + applyToAllGroups.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(ItemEvent e) { + applyToAllGroups_actionPerformed(null); + } + }); + font.setLabel("Font..."); + font.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + font_actionPerformed(e); + } + }); + dbref.setLabel("ShowSequence DB Refs"); + dbref.setActionCommand(""); + dbref.setState(true); + dbref.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(ItemEvent e) { + dbref_actionPerformed(e); + } + }); + scaleAbove.setLabel("Scale Above"); + scaleAbove.setState(true); + scaleAbove.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(ItemEvent e) { + scaleAbove_actionPerformed(null); + } + }); + scaleLeft.setEnabled(false); + scaleLeft.setState(true); + scaleLeft.setLabel("Scale Left"); + scaleLeft.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(ItemEvent e) { + scaleLeft_actionPerformed(null); + } + }); + scaleRight.setEnabled(false); + scaleRight.setState(true); + scaleRight.setLabel("Scale Right"); + scaleRight.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(ItemEvent e) { + scaleRight_actionPerformed(null); + } + }); + modifyPID.setLabel("Modify Identity Threshold..."); + modifyPID.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + modifyPID_actionPerformed(e); + } + }); + modifyConservation.setLabel("Modify Conservation Threshold..."); + modifyConservation.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + modifyConservation_actionPerformed(e); + } + }); + sortByTreeMenu.setLabel("By Tree Order"); + sort.setLabel("Sort"); + calculate.setLabel("Calculate Tree"); + inputText.setLabel("Input from textbox"); + inputText.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + inputText_actionPerformed(e); + } + }); + + helpMenu.setLabel("Help"); + documentation.setLabel("Documentation"); + documentation.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + documentation_actionPerformed(e); + } + }); + + about.setLabel("About..."); + about.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(ActionEvent e) { + about_actionPerformed(e); + } + }); + seqLimits.setState(true); + seqLimits.setLabel("Show Sequence Limits"); + seqLimits.addItemListener(new ItemListener() + { + public void itemStateChanged(ItemEvent e) + { + seqLimits_itemStateChanged(e); + } + }); + + alignFrameMenuBar.add(fileMenu); + alignFrameMenuBar.add(editMenu); + alignFrameMenuBar.add(searchMenu); + alignFrameMenuBar.add(viewMenu); + alignFrameMenuBar.add(colourMenu); + alignFrameMenuBar.add(calculateMenu); + alignFrameMenuBar.add(helpMenu); + fileMenu.add(inputText); + fileMenu.add(outputTextboxMenu); + fileMenu.addSeparator(); + fileMenu.add(closeMenuItem); + editMenu.add(undoMenuItem); + editMenu.add(redoMenuItem); + editMenu.add(cut); + editMenu.add(copy); + editMenu.add(Menu1); + editMenu.add(delete); + editMenu.addSeparator(); + editMenu.add(selectAllSequenceMenuItem); + editMenu.add(deselectAllSequenceMenuItem); + editMenu.add(invertSequenceMenuItem); + editMenu.add(deleteGroups); + editMenu.addSeparator(); + editMenu.add(remove2LeftMenuItem); + editMenu.add(remove2RightMenuItem); + editMenu.add(removeGappedColumnMenuItem); + editMenu.add(removeAllGapsMenuItem); + editMenu.add(removeRedundancyMenuItem); + searchMenu.add(findMenuItem); + viewMenu.add(font); + viewMenu.addSeparator(); + viewMenu.add(dbref); + viewMenu.add(seqLimits); + viewMenu.addSeparator(); + viewMenu.add(wrapMenuItem); + viewMenu.add(scaleAbove); + viewMenu.add(scaleLeft); + viewMenu.add(scaleRight); + viewMenu.addSeparator(); + viewMenu.add(viewBoxesMenuItem); + viewMenu.add(viewTextMenuItem); + viewMenu.add(colourTextMenuItem); + viewMenu.add(renderGapsMenuItem); + viewMenu.add(annotationPanelMenuItem); + viewMenu.addSeparator(); + viewMenu.add(overviewMenuItem); + colourMenu.add(applyToAllGroups); + colourMenu.addSeparator(); + colourMenu.add(noColourmenuItem); + colourMenu.add(clustalColour); + colourMenu.add(BLOSUM62Colour); + colourMenu.add(PIDColour); + colourMenu.add(zappoColour); + colourMenu.add(taylorColour); + colourMenu.add(hydrophobicityColour); + colourMenu.add(helixColour); + colourMenu.add(strandColour); + colourMenu.add(turnColour); + colourMenu.add(buriedColour); + colourMenu.add(nucleotideColour); + colourMenu.add(userDefinedColour); + colourMenu.addSeparator(); + colourMenu.add(conservationMenuItem); + colourMenu.add(modifyConservation); + colourMenu.add(abovePIDThreshold); + colourMenu.add(modifyPID); + calculateMenu.add(sort); + calculateMenu.add(calculate); + calculateMenu.addSeparator(); + calculateMenu.add(pairwiseAlignmentMenuItem); + calculateMenu.add(PCAMenuItem); + this.add(statusBar, BorderLayout.SOUTH); + Menu1.add(pasteNew); + Menu1.add(pasteThis); + sort.add(sortIDMenuItem); + sort.add(sortByTreeMenu); + sort.add(sortGroupMenuItem); + sort.add(sortPairwiseMenuItem); + calculate.add(averageDistanceTreeMenuItem); + calculate.add(neighbourTreeMenuItem); + calculate.add(avDistanceTreeBlosumMenuItem); + calculate.add(njTreeBlosumMenuItem); + helpMenu.add(documentation); + helpMenu.add(about); + } } +