}
if (selectioncom.length() > 0)
{
- // TODO is performing selectioncom redundant here? is done later on
- // System.out.println("Select regions:\n" + selectioncom.toString());
- executeCommand("select *; cartoons off; backbone; select ("
- + selectioncom.toString() + "); cartoons; ", false);
- // selcom.append("; ribbons; ");
String cmdString = command.toString();
- // System.out.println("Superimpose command(s):\n" + cmdString);
-
executeCommand(cmdString, false);
}
}
if (selectioncom.length() > 0)
- {// finally, mark all regions that were superposed.
- if (selectioncom.substring(selectioncom.length() - 1).equals("|"))
+ {
+ /*
+ * finally, highlight with cartoons the residues that were superposed
+ */
+ if (selectioncom.charAt(selectioncom.length() - 1) == '|')
{
selectioncom.setLength(selectioncom.length() - 1);
}
- // System.out.println("Select regions:\n" + selectioncom.toString());
executeCommand("select *; cartoons off; backbone; select ("
+ selectioncom.toString() + "); cartoons; ", false);
- // evalStateCommand("select *; backbone; select "+selcom.toString()+";
- // cartoons; center "+selcom.toString());
}
return null;
}
}
- // End StructureListener
- // //////////////////////////
-
- /**
- * map between index of model filename returned from getPdbFile and the first
- * index of models from this file in the viewer. Note - this is not trimmed -
- * use getPdbFile to get number of unique models.
- */
- private int _modelFileNameMap[];
-
- // ////////////////////////////////
- // /StructureListener
@Override
public synchronized String[] getStructureFiles()
{
public int sendFeaturesToViewer(AlignmentViewPanel avp)
{
// TODO refactor as required to pull up to an interface
- AlignmentI alignment = avp.getAlignment();
-
String[] files = getStructureFiles();
if (files == null)
{
import jalview.gui.StructureViewer.ViewerType;
import jalview.structures.models.AAStructureBindingModel;
import jalview.util.BrowserLauncher;
+import jalview.util.ImageMaker;
import jalview.util.MessageManager;
import jalview.util.Platform;
import jalview.ws.dbsources.Pdb;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Rectangle;
-import java.awt.event.ActionEvent;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
}
else
{
- alignStructs_withAllAlignPanels();
+ alignStructsWithAllAlignPanels();
}
}
});
}
@Override
- public void eps_actionPerformed(ActionEvent e)
+ public void eps_actionPerformed()
{
- makePDBImage(jalview.util.ImageMaker.TYPE.EPS);
+ makePDBImage(ImageMaker.TYPE.EPS);
}
@Override
- public void png_actionPerformed(ActionEvent e)
+ public void png_actionPerformed()
{
- makePDBImage(jalview.util.ImageMaker.TYPE.PNG);
+ makePDBImage(ImageMaker.TYPE.PNG);
}
- void makePDBImage(jalview.util.ImageMaker.TYPE type)
+ void makePDBImage(ImageMaker.TYPE type)
{
int width = getWidth();
int height = getHeight();
- jalview.util.ImageMaker im;
+ ImageMaker im;
- if (type == jalview.util.ImageMaker.TYPE.PNG)
+ if (type == ImageMaker.TYPE.PNG)
{
- im = new jalview.util.ImageMaker(this,
- jalview.util.ImageMaker.TYPE.PNG, "Make PNG image from view",
+ im = new ImageMaker(this, ImageMaker.TYPE.PNG,
+ "Make PNG image from view",
width, height, null, null, null, 0, false);
}
- else if (type == jalview.util.ImageMaker.TYPE.EPS)
+ else if (type == ImageMaker.TYPE.EPS)
{
- im = new jalview.util.ImageMaker(this,
- jalview.util.ImageMaker.TYPE.EPS, "Make EPS file from view",
+ im = new ImageMaker(this, ImageMaker.TYPE.EPS,
+ "Make EPS file from view",
width, height, null, this.getTitle(), null, 0, false);
}
else
{
-
im = new jalview.util.ImageMaker(this,
- jalview.util.ImageMaker.TYPE.SVG, "Make SVG file from PCA",
+ ImageMaker.TYPE.SVG, "Make SVG file from PCA",
width, height, null, this.getTitle(), null, 0, false);
}
}
@Override
- public void showHelp_actionPerformed(ActionEvent actionEvent)
+ public void showHelp_actionPerformed()
{
try
{
@Override
public void run()
{
- alignStructs_withAllAlignPanels();
+ alignStructsWithAllAlignPanels();
}
}).start();
}
}
@Override
- public void eps_actionPerformed(ActionEvent e)
+ public void eps_actionPerformed()
{
throw new Error(MessageManager
.getString("error.eps_generation_not_implemented"));
}
@Override
- public void png_actionPerformed(ActionEvent e)
+ public void png_actionPerformed()
{
throw new Error(MessageManager
.getString("error.png_generation_not_implemented"));
}
@Override
- public void showHelp_actionPerformed(ActionEvent actionEvent)
+ public void showHelp_actionPerformed()
{
try
{
* @return
*/
@Override
- protected String alignStructs_withAllAlignPanels()
+ protected String alignStructsWithAllAlignPanels()
{
- String reply = super.alignStructs_withAllAlignPanels();
+ String reply = super.alignStructsWithAllAlignPanels();
if (reply != null)
{
statusBar.setText("Superposition failed: " + reply);
@Override
public void actionPerformed(ActionEvent actionEvent)
{
- viewerColour_actionPerformed(actionEvent);
+ viewerColour_actionPerformed();
}
});
colourMenu.add(viewerColour);
@Override
public void actionPerformed(ActionEvent actionEvent)
{
- background_actionPerformed(actionEvent);
+ background_actionPerformed();
}
});
colourMenu.add(backGround);
@Override
public void actionPerformed(ActionEvent actionEvent)
{
- seqColour_actionPerformed(actionEvent);
+ seqColour_actionPerformed();
}
});
@Override
public void actionPerformed(ActionEvent actionEvent)
{
- chainColour_actionPerformed(actionEvent);
+ chainColour_actionPerformed();
}
});
@Override
public void actionPerformed(ActionEvent actionEvent)
{
- chargeColour_actionPerformed(actionEvent);
+ chargeColour_actionPerformed();
}
});
else
{
// update the Chimera display now.
- seqColour_actionPerformed(null);
+ seqColour_actionPerformed();
}
}
});
* the operation.
*/
@Override
- protected String alignStructs_actionPerformed(ActionEvent actionEvent)
- {
- return alignStructs_withAllAlignPanels();
- }
-
- protected String alignStructs_withAllAlignPanels()
+ protected String alignStructsWithAllAlignPanels()
{
if (getAlignmentPanel() == null)
{
}
@Override
- public void background_actionPerformed(ActionEvent actionEvent)
+ public void background_actionPerformed()
{
Color col = JColorChooser.showDialog(this,
MessageManager.getString("label.select_background_colour"),
}
@Override
- public void viewerColour_actionPerformed(ActionEvent actionEvent)
+ public void viewerColour_actionPerformed()
{
if (viewerColour.isSelected())
{
}
@Override
- public void chainColour_actionPerformed(ActionEvent actionEvent)
+ public void chainColour_actionPerformed()
{
chainColour.setSelected(true);
getBinding().colourByChain();
}
@Override
- public void chargeColour_actionPerformed(ActionEvent actionEvent)
+ public void chargeColour_actionPerformed()
{
chargeColour.setSelected(true);
getBinding().colourByCharge();
}
@Override
- public void seqColour_actionPerformed(ActionEvent actionEvent)
+ public void seqColour_actionPerformed()
{
AAStructureBindingModel binding = getBinding();
binding.setColourBySequence(seqColour.isSelected());
}
@Override
- public void pdbFile_actionPerformed(ActionEvent actionEvent)
+ public void pdbFile_actionPerformed()
{
JalviewFileChooser chooser = new JalviewFileChooser(
Cache.getProperty("LAST_DIRECTORY"));
}
@Override
- public void viewMapping_actionPerformed(ActionEvent actionEvent)
+ public void viewMapping_actionPerformed()
{
CutAndPasteTransfer cap = new CutAndPasteTransfer();
try
if (!binding.isLoadingFromArchive())
{
- seqColour_actionPerformed(null);
+ seqColour_actionPerformed();
}
}
@Override
public void actionPerformed(ActionEvent actionEvent)
{
- pdbFile_actionPerformed(actionEvent);
+ pdbFile_actionPerformed();
}
});
@Override
public void actionPerformed(ActionEvent actionEvent)
{
- png_actionPerformed(actionEvent);
+ png_actionPerformed();
}
});
@Override
public void actionPerformed(ActionEvent actionEvent)
{
- eps_actionPerformed(actionEvent);
+ eps_actionPerformed();
}
});
@Override
public void actionPerformed(ActionEvent actionEvent)
{
- viewMapping_actionPerformed(actionEvent);
+ viewMapping_actionPerformed();
}
});
@Override
public void actionPerformed(ActionEvent actionEvent)
{
- showHelp_actionPerformed(actionEvent);
+ showHelp_actionPerformed();
}
});
alignStructs = new JMenuItem();
@Override
public void actionPerformed(ActionEvent actionEvent)
{
- alignStructs_actionPerformed(actionEvent);
+ alignStructsWithAllAlignPanels();
}
});
{
}
- protected void viewerColour_actionPerformed(ActionEvent actionEvent)
+ protected void viewerColour_actionPerformed()
{
}
- protected abstract String alignStructs_actionPerformed(
- ActionEvent actionEvent);
+ protected abstract String alignStructsWithAllAlignPanels();
- public void pdbFile_actionPerformed(ActionEvent actionEvent)
+ public void pdbFile_actionPerformed()
{
}
- public void png_actionPerformed(ActionEvent actionEvent)
+ public void png_actionPerformed()
{
}
- public void eps_actionPerformed(ActionEvent actionEvent)
+ public void eps_actionPerformed()
{
}
- public void viewMapping_actionPerformed(ActionEvent actionEvent)
+ public void viewMapping_actionPerformed()
{
}
- public void seqColour_actionPerformed(ActionEvent actionEvent)
+ public void seqColour_actionPerformed()
{
}
- public void chainColour_actionPerformed(ActionEvent actionEvent)
+ public void chainColour_actionPerformed()
{
}
- public void chargeColour_actionPerformed(ActionEvent actionEvent)
+ public void chargeColour_actionPerformed()
{
}
- public void background_actionPerformed(ActionEvent actionEvent)
+ public void background_actionPerformed()
{
}
- public void showHelp_actionPerformed(ActionEvent actionEvent)
+ public void showHelp_actionPerformed()
{
}