- im = new jalview.util.ImageMaker(this, jalview.util.ImageMaker.EPS,
- "Make EPS file from view", width, height, null, this
- .getTitle());
- }
-
- if (im.getGraphics() != null)
- {
- Rectangle rect = new Rectangle(width, height);
- viewer.renderScreenImage(im.getGraphics(), rect.getSize(), rect);
- im.writeImage();
- }
- }
-
- public void seqColour_actionPerformed(ActionEvent actionEvent)
- {
- lastCommand = null;
- colourBySequence = seqColour.isSelected();
- colourBySequence(ap.alignFrame.alignPanel);
- }
-
- public void chainColour_actionPerformed(ActionEvent actionEvent)
- {
- colourBySequence = false;
- seqColour.setSelected(false);
- viewer.evalStringQuiet("select *;color chain");
- }
-
- public void chargeColour_actionPerformed(ActionEvent actionEvent)
- {
- colourBySequence = false;
- seqColour.setSelected(false);
- viewer.evalStringQuiet("select *;color white;select ASP,GLU;color red;"
- + "select LYS,ARG;color blue;select CYS;color yellow");
- }
-
- public void zappoColour_actionPerformed(ActionEvent actionEvent)
- {
- setJalviewColourScheme(new ZappoColourScheme());
- }
-
- public void taylorColour_actionPerformed(ActionEvent actionEvent)
- {
- setJalviewColourScheme(new TaylorColourScheme());
- }
-
- public void hydroColour_actionPerformed(ActionEvent actionEvent)
- {
- setJalviewColourScheme(new HydrophobicColourScheme());
- }
-
- public void helixColour_actionPerformed(ActionEvent actionEvent)
- {
- setJalviewColourScheme(new HelixColourScheme());
- }
-
- public void strandColour_actionPerformed(ActionEvent actionEvent)
- {
- setJalviewColourScheme(new StrandColourScheme());
- }
-
- public void turnColour_actionPerformed(ActionEvent actionEvent)
- {
- setJalviewColourScheme(new TurnColourScheme());
- }
-
- public void buriedColour_actionPerformed(ActionEvent actionEvent)
- {
- setJalviewColourScheme(new BuriedColourScheme());
- }
-
- public void setJalviewColourScheme(ColourSchemeI cs)
- {
- colourBySequence = false;
- seqColour.setSelected(false);
-
- if (cs == null)
- return;
-
- String res;
- int index;
- Color col;
-
- Enumeration en = ResidueProperties.aa3Hash.keys();
- StringBuffer command = new StringBuffer("select *;color white;");
- while (en.hasMoreElements())
- {
- res = en.nextElement().toString();
- index = ((Integer) ResidueProperties.aa3Hash.get(res)).intValue();
- if (index > 20)
- continue;
-
- col = cs.findColour(ResidueProperties.aa[index].charAt(0));
-
- command.append("select " + res + ";color[" + col.getRed() + ","
- + col.getGreen() + "," + col.getBlue() + "];");
- }
-
- viewer.evalStringQuiet(command.toString());
- }
-
- public void userColour_actionPerformed(ActionEvent actionEvent)
- {
- new UserDefinedColours(this, null);
- }
-
- public void backGround_actionPerformed(ActionEvent actionEvent)
- {
- java.awt.Color col = JColorChooser.showDialog(this,
- "Select Background Colour", null);
-
- if (col != null)
- {
- viewer.evalStringQuiet("background [" + col.getRed() + ","
- + col.getGreen() + "," + col.getBlue() + "];");
- }
- }
-
- public void jmolHelp_actionPerformed(ActionEvent actionEvent)
- {
- try
- {
- jalview.util.BrowserLauncher
- .openURL("http://jmol.sourceforge.net/docs/JmolUserGuide/");
- } catch (Exception ex)
- {
- }
- }