import jalview.analysis.AlignmentAnnotationUtils;
import jalview.analysis.AlignmentUtils;
import jalview.analysis.Conservation;
+import jalview.bin.JalviewLite;
import jalview.commands.ChangeCaseCommand;
import jalview.commands.EditCommand;
import jalview.commands.EditCommand.Action;
import jalview.schemes.TaylorColourScheme;
import jalview.schemes.TurnColourScheme;
import jalview.schemes.ZappoColourScheme;
+import jalview.util.DBRefUtils;
import jalview.util.MessageManager;
import jalview.util.UrlLink;
e.printStackTrace();
}
- for (int i = 0; i < jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS.length; i++)
+ for (int i = 0; i < AppletFormatAdapter.WRITEABLE_FORMATS.length; i++)
{
MenuItem item = new MenuItem(
- jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS[i]);
+AppletFormatAdapter.WRITEABLE_FORMATS[i]);
item.addActionListener(this);
outputmenu.add(item);
{
// collect matching db-refs
- DBRefEntry[] dbr = jalview.util.DBRefUtils.selectRefs(
+ DBRefEntry[] dbr = DBRefUtils.selectRefs(
seq.getDBRef(), new String[]
{ target });
// collect id string too
*
* String url_suff = link.substring(link.indexOf("$SEQUENCE_ID$") + 13);
* // collect matching db-refs DBRefEntry[] dbr =
- * jalview.util.DBRefUtils.selectRefs(seq.getDBRef(), new
- * String[]{target}); // collect id string too String id =
- * seq.getName(); if (id.indexOf("|") > -1) { id =
- * id.substring(id.lastIndexOf("|") + 1); } if (dbr!=null) { for (int
- * r=0;r<dbr.length; r++) { if (dbr[r].getAccessionId().equals(id)) { //
- * suppress duplicate link creation for the bare sequence ID string with
- * this link id = null; } addshowLink(linkMenu,
- * dbr[r].getSource()+"|"+dbr[r].getAccessionId(), target,
- * url_pref+dbr[r].getAccessionId()+url_suff); } } if (id!=null) { //
- * create Bare ID link for this RUL addshowLink(linkMenu, target,
+ * DBRefUtils.selectRefs(seq.getDBRef(), new String[]{target}); //
+ * collect id string too String id = seq.getName(); if (id.indexOf("|")
+ * > -1) { id = id.substring(id.lastIndexOf("|") + 1); } if (dbr!=null)
+ * { for (int r=0;r<dbr.length; r++) { if
+ * (dbr[r].getAccessionId().equals(id)) { // suppress duplicate link
+ * creation for the bare sequence ID string with this link id = null; }
+ * addshowLink(linkMenu, dbr[r].getSource()+"|"+dbr[r].getAccessionId(),
+ * target, url_pref+dbr[r].getAccessionId()+url_suff); } } if (id!=null)
+ * { // create Bare ID link for this RUL addshowLink(linkMenu, target,
* url_pref + id + url_suff); } } else { addshowLink(linkMenu, target,
* link.substring(link.lastIndexOf("|")+1)); }
*/
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage(
+ JalviewLite.addFrame(frame, MessageManager.formatMessage(
"label.selection_output_command", new Object[]
{ e.getActionCommand() }), 600, 500);
// JBPNote: getSelectionAsNewSequence behaviour has changed - this method
// now returns a full copy of sequence data
// TODO consider using getSequenceSelection instead here
- cap.setText(new jalview.io.AppletFormatAdapter().formatSequences(
+ cap.setText(new AppletFormatAdapter().formatSequences(
e.getActionCommand(), ap.av.getShowJVSuffix(), ap, true));
}
}
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, "Sequence Details for "
+ JalviewLite.addFrame(frame, "Sequence Details for "
+ (sequences.length == 1 ? sequences[0].getDisplayId(true)
: "Selection"), 600, 500);
cap.setText(MessageManager.formatMessage("label.html_content",
if (ap.av.applet.jmolAvailable)
{
- new jalview.appletgui.AppletJmol(entry, new SequenceI[]
+ new AppletJmol(entry, new SequenceI[]
{ seq }, null, ap, AppletFormatAdapter.URL);
}
else
cap.setPDBImport(seq);
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage(
+ JalviewLite.addFrame(frame, MessageManager.formatMessage(
"label.paste_pdb_file_for_sequence", new Object[]
{ seq.getName() }), 400, 300);
}
import jalview.commands.RemoveGapsCommand;
import jalview.commands.SlideSequencesCommand;
import jalview.commands.TrimRegionCommand;
+import jalview.controller.AlignViewController;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import jalview.io.AlignmentProperties;
import jalview.io.AnnotationFile;
import jalview.io.AppletFormatAdapter;
import jalview.io.FeaturesFile;
+import jalview.io.NewickFile;
import jalview.io.TCoffeeScoreFile;
import jalview.schemes.Blosum62ColourScheme;
import jalview.schemes.BuriedColourScheme;
import jalview.schemes.ZappoColourScheme;
import jalview.structure.StructureSelectionManager;
import jalview.structures.models.AAStructureBindingModel;
+import jalview.util.Comparison;
import jalview.util.MappingUtils;
import jalview.util.MessageManager;
import jalview.viewmodel.AlignmentViewport;
}
alignPanel = new AlignmentPanel(this, viewport);
- avc = new jalview.controller.AlignViewController(this, viewport,
+ avc = new AlignViewController(this, viewport,
alignPanel);
viewport.updateConservation(alignPanel);
viewport.updateConsensus(alignPanel);
boolean featuresFile = false;
try
{
- featuresFile = new jalview.io.FeaturesFile(file, type)
+ featuresFile = new FeaturesFile(file, type)
.parse(viewport.getAlignment(), alignPanel.seqPanel.seqCanvas
.getFeatureRenderer().getFeatureColours(), featureLinks,
true, viewport.applet.getDefaultParameter(
}
else if (source == alProperties)
{
- StringBuffer contents = new jalview.io.AlignmentProperties(
+ StringBuffer contents = new AlignmentProperties(
viewport.getAlignment()).formatAsString();
CutAndPasteTransfer cap = new CutAndPasteTransfer(false, this);
cap.setText(contents.toString());
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage(
+ JalviewLite.addFrame(frame, MessageManager.formatMessage(
"label.alignment_properties", new String[]
{ getTitle() }), 400, 250);
}
CutAndPasteTransfer cap = new CutAndPasteTransfer(true, this);
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("label.input_cut_paste"), 500, 500);
}
CutAndPasteTransfer cap = new CutAndPasteTransfer(true, this);
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage(
+ JalviewLite.addFrame(frame, MessageManager.formatMessage(
"label.alignment_output_command", new Object[]
{ e.getActionCommand() }), 600, 500);
cap.setAnnotationImport();
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("action.paste_annotations"), 400, 300);
}
CutAndPasteTransfer cap = new CutAndPasteTransfer(false, this);
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("label.annotations"), 600, 500);
cap.setText(annotation);
}
}
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("label.features"), 600, 500);
cap.setText(features);
}
for (int j = 0; j < sg.getEndRes() + 1 && j < seq.getLength(); j++)
{
ch = seq.getCharAt(j);
- if (!jalview.util.Comparison.isGap((ch)))
+ if (!Comparison.isGap((ch)))
{
endRes++;
}
}
}
- jalview.bin.JalviewLite.addFrame(af, newtitle, frameWidth,
+ JalviewLite.addFrame(af, newtitle, frameWidth,
frameHeight);
}
else
OverviewPanel overview = new OverviewPanel(alignPanel);
frame.add(overview);
// +50 must allow for applet frame window
- jalview.bin.JalviewLite.addFrame(frame, MessageManager.formatMessage(
+ JalviewLite.addFrame(frame, MessageManager.formatMessage(
"label.overview_params", new String[]
{ this.getTitle() }), overview.getPreferredSize().width,
overview.getPreferredSize().height + 50);
alignPanel.getOverviewPanel().updateOverviewImage();
}
- jalview.structure.StructureSelectionManager
- .getStructureSelectionManager(viewport.applet)
+ StructureSelectionManager.getStructureSelectionManager(viewport.applet)
.sequenceColoursChanged(alignPanel);
alignPanel.paintAlignment(true);
{
Frame frame = new Frame();
frame.add(new PairwiseAlignPanel(alignPanel));
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("action.pairwise_alignment"), 600,
500);
}
addTreeMenuItem(tp, title);
- jalview.bin.JalviewLite.addFrame(tp, title, 600, 500);
+ JalviewLite.addFrame(tp, title, 600, 500);
}
}
cap.setTreeImport();
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("label.paste_newick_file"), 400, 300);
}
- public void loadTree(jalview.io.NewickFile tree, String treeFile)
+ public void loadTree(NewickFile tree, String treeFile)
{
TreePanel tp = new TreePanel(alignPanel, treeFile,
MessageManager.getString("label.load_tree_from_file"), tree);
- jalview.bin.JalviewLite.addFrame(tp, treeFile, 600, 500);
+ JalviewLite.addFrame(tp, treeFile, 600, 500);
addTreeMenuItem(tp, treeFile);
}
Frame frame = new Frame();
frame.add(new AboutPanel(JalviewLite.getVersion(), JalviewLite
.getBuildDate()));
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("label.jalview"), 580, 220);
}
inputText.addActionListener(this);
Menu outputTextboxMenu = new Menu(
MessageManager.getString("label.out_to_textbox"));
- for (int i = 0; i < jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS.length; i++)
+ for (int i = 0; i < AppletFormatAdapter.WRITEABLE_FORMATS.length; i++)
{
- MenuItem item = new MenuItem(
- jalview.io.AppletFormatAdapter.WRITEABLE_FORMATS[i]);
+ MenuItem item = new MenuItem(AppletFormatAdapter.WRITEABLE_FORMATS[i]);
item.addActionListener(new java.awt.event.ActionListener()
{
add(statusBar, BorderLayout.SOUTH);
add(alignPanel, BorderLayout.CENTER);
// and register with the applet so it can pass external API calls to us
- jalview.bin.JalviewLite.addFrame(this, this.getTitle(),
+ JalviewLite.addFrame(this, this.getTitle(),
frameWidth,
frameHeight);
}
{
// can only do alignments with Jmol
// find the last jmol window assigned to this alignment
- jalview.appletgui.AppletJmol ajm = null, tajm;
+ AppletJmol ajm = null, tajm;
Vector jmols = applet
- .getAppletWindow(jalview.appletgui.AppletJmol.class);
+.getAppletWindow(AppletJmol.class);
for (int i = 0, iSize = jmols.size(); i < iSize; i++)
{
- tajm = (jalview.appletgui.AppletJmol) jmols.elementAt(i);
+ tajm = (AppletJmol) jmols.elementAt(i);
if (tajm.ap.alignFrame == this)
{
ajm = tajm;
// otherwise, create a new window
if (applet.jmolAvailable)
{
- new jalview.appletgui.AppletJmol(pdb, seqs, chains, alignPanel,
- protocol);
+ new AppletJmol(pdb, seqs, chains, alignPanel, protocol);
applet.lastFrameX += 40;
applet.lastFrameY += 40;
}
import jalview.structure.SelectionSource;
import jalview.structure.StructureSelectionManager;
import jalview.structure.VamsasSource;
+import jalview.util.Platform;
import jalview.viewmodel.AlignmentViewport;
+import jalview.workers.AlignCalcManager;
import java.awt.Font;
NJTree currentTree = null;
- public jalview.bin.JalviewLite applet;
+ public JalviewLite applet;
boolean MAC = false;
public AlignViewport(AlignmentI al, JalviewLite applet)
{
super();
- calculator = new jalview.workers.AlignCalcManager();
+ calculator = new AlignCalcManager();
this.applet = applet;
alignment = al;
// we always pad gaps
}
setFont(font);
- MAC = new jalview.util.Platform().isAMac();
+ MAC = Platform.isAMac();
if (applet != null)
{
@Override
public StructureSelectionManager getStructureSelectionManager()
{
- return jalview.structure.StructureSelectionManager
- .getStructureSelectionManager(applet);
+ return StructureSelectionManager.getStructureSelectionManager(applet);
}
/**
if (updateOverview)
{
- jalview.structure.StructureSelectionManager
- .getStructureSelectionManager(av.applet)
+ StructureSelectionManager.getStructureSelectionManager(av.applet)
.sequenceColoursChanged(this);
if (overviewPanel != null)
*/
package jalview.appletgui;
+import jalview.bin.JalviewLite;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.GraphLine;
import jalview.datamodel.SequenceGroup;
import jalview.schemes.AnnotationColourGradient;
import jalview.schemes.ColourSchemeI;
Hashtable oldgroupColours;
- jalview.datamodel.AlignmentAnnotation currentAnnotation;
+ AlignmentAnnotation currentAnnotation;
boolean adjusting = false;
frame = new Frame();
frame.add(this);
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("label.colour_by_annotation"), 560,
175);
validate();
&& currentAnnotation.threshold == null)
{
currentAnnotation
- .setThreshold(new jalview.datamodel.GraphLine(
+ .setThreshold(new GraphLine(
(currentAnnotation.graphMax - currentAnnotation.graphMin) / 2f,
"Threshold", Color.black));
}
package jalview.appletgui;
+import jalview.bin.JalviewLite;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.GraphLine;
import jalview.schemes.AnnotationColourGradient;
import jalview.util.MessageManager;
import jalview.viewmodel.annotationfilter.AnnotationFilterParameter;
super(av, ap);
frame = new Frame();
frame.add(this);
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("label.select_by_annotation"), 520,
215);
{
getCurrentAnnotation()
.setThreshold(
- new jalview.datamodel.GraphLine(
+ new GraphLine(
(getCurrentAnnotation().graphMax - getCurrentAnnotation().graphMin) / 2f,
"Threshold", Color.black));
}
*/
package jalview.appletgui;
+import jalview.analysis.AlignmentUtils;
+import jalview.bin.JalviewLite;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.Annotation;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.util.MessageManager;
+import jalview.util.ParseHtmlBodyAndLinks;
+
import java.awt.Checkbox;
import java.awt.CheckboxMenuItem;
import java.awt.Color;
import java.util.Collections;
import java.util.Vector;
-import jalview.analysis.AlignmentUtils;
-import jalview.datamodel.AlignmentAnnotation;
-import jalview.datamodel.Annotation;
-import jalview.datamodel.SequenceGroup;
-import jalview.datamodel.SequenceI;
-import jalview.util.MessageManager;
-import jalview.util.ParseHtmlBodyAndLinks;
-
public class AnnotationLabels extends Panel implements ActionListener,
MouseListener, MouseMotionListener
{
ap.alignFrame);
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, ap.alignFrame.getTitle()
+ JalviewLite.addFrame(frame, ap.alignFrame.getTitle()
+ " - " + aa[selectedRow].label, 500, 100);
cap.setText(aa[selectedRow].toString());
}
{
return;
}
- jalview.appletgui.AlignFrame.copiedSequences = new StringBuffer();
- jalview.appletgui.AlignFrame.copiedSequences.append(sq.getName() + "\t"
+ AlignFrame.copiedSequences = new StringBuffer();
+ AlignFrame.copiedSequences.append(sq.getName() + "\t"
+ sq.getStart() + "\t" + sq.getEnd() + "\t"
+ sq.getSequenceAsString() + "\n");
if (av.hasHiddenColumns())
{
- jalview.appletgui.AlignFrame.copiedHiddenColumns = new Vector();
+ AlignFrame.copiedHiddenColumns = new Vector();
for (int[] region : av.getColumnSelection().getHiddenColumns())
{
- jalview.appletgui.AlignFrame.copiedHiddenColumns
+ AlignFrame.copiedHiddenColumns
.addElement(new int[]
{ region[0], region[1] });
}
import jalview.renderer.AnnotationRenderer;
import jalview.renderer.AwtRenderPanelI;
import jalview.util.MessageManager;
+import jalview.util.Platform;
import java.awt.Color;
import java.awt.Dimension;
public AnnotationPanel(AlignmentPanel ap)
{
- MAC = new jalview.util.Platform().isAMac();
+ MAC = Platform.isAMac();
this.ap = ap;
av = ap.av;
setLayout(null);
package jalview.appletgui;
+import jalview.datamodel.AlignmentAnnotation;
import jalview.schemes.AnnotationColourGradient;
import jalview.util.MessageManager;
protected boolean enableSeqAss = false;
- private jalview.datamodel.AlignmentAnnotation currentAnnotation;
+ private AlignmentAnnotation currentAnnotation;
protected boolean adjusting = false;
}
- public jalview.datamodel.AlignmentAnnotation getCurrentAnnotation()
+ public AlignmentAnnotation getCurrentAnnotation()
{
return currentAnnotation;
}
- public void setCurrentAnnotation(
- jalview.datamodel.AlignmentAnnotation currentAnnotation)
+ public void setCurrentAnnotation(AlignmentAnnotation currentAnnotation)
{
this.currentAnnotation = currentAnnotation;
}
*/
package jalview.appletgui;
+import jalview.bin.JalviewLite;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SequenceI;
}
}
- if (jalview.bin.JalviewLite.debug)
+ if (JalviewLite.debug)
{
System.err
.println("AppletJmol: PDB ID is '" + pdbentry.getId() + "'");
java.io.Reader freader = null;
if (reader != null)
{
- if (jalview.bin.JalviewLite.debug)
+ if (JalviewLite.debug)
{
System.err
.println("AppletJmol:Trying to reuse existing PDBfile IO parser.");
}
if (freader == null)
{
- if (jalview.bin.JalviewLite.debug)
+ if (JalviewLite.debug)
{
System.err
.println("AppletJmol:Creating new PDBfile IO parser.");
}
}
- jalview.bin.JalviewLite.addFrame(this, jmb.getViewerTitle(), 400, 400);
+ JalviewLite.addFrame(this, jmb.getViewerTitle(), 400, 400);
}
public void loadInline(String string)
{
if (evt.getSource() == mappingMenuItem)
{
- jalview.appletgui.CutAndPasteTransfer cap = new jalview.appletgui.CutAndPasteTransfer(
+ CutAndPasteTransfer cap = new CutAndPasteTransfer(
false, null);
Frame frame = new Frame();
frame.add(cap);
.println("Out of memory when trying to create dialog box with sequence-structure mapping.");
return;
}
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("label.pdb_sequence_mapping"), 550,
600);
}
try
{
tcf = new TCoffeeScoreFile(textarea.getText(),
- jalview.io.AppletFormatAdapter.PASTE);
+ AppletFormatAdapter.PASTE);
if (tcf.isValid())
{
if (tcf.annotateAlignment(alignFrame.viewport.getAlignment(),
if (tcf == null)
{
if (new AnnotationFile().annotateAlignmentView(alignFrame.viewport,
- textarea.getText(),
- jalview.io.AppletFormatAdapter.PASTE))
+ textarea.getText(), AppletFormatAdapter.PASTE))
{
alignFrame.alignPanel.fontChanged();
alignFrame.alignPanel.setScrollValues(0, 0);
else
{
if (!alignFrame.parseFeaturesFile(textarea.getText(),
- jalview.io.AppletFormatAdapter.PASTE))
+ AppletFormatAdapter.PASTE))
{
alignFrame.statusBar
.setText(MessageManager
if (alignFrame.alignPanel.av.applet.jmolAvailable)
{
- new jalview.appletgui.AppletJmol(pdb, new SequenceI[]
+ new AppletJmol(pdb, new SequenceI[]
{ seq }, null, alignFrame.alignPanel, AppletFormatAdapter.PASTE);
}
else
*/
package jalview.appletgui;
+import jalview.util.Platform;
+
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
return false;
}
// DEBUG Hint: can test embedded menus by inserting true here.
- if (new jalview.util.Platform().isAMac())
+ if (Platform.isAMac())
{
// Build the embedded menu panel, allowing override with system font
embeddedMenu = makeEmbeddedPopupMenu(topMenuBar, true, false);
*/
package jalview.appletgui;
-import java.util.*;
-
-import java.awt.*;
-import java.awt.event.*;
-
-import jalview.datamodel.*;
-import jalview.schemes.*;
+import jalview.datamodel.GraphLine;
+import jalview.schemes.AnnotationColourGradient;
+import jalview.schemes.GraduatedColor;
import jalview.util.MessageManager;
+import java.awt.Checkbox;
+import java.awt.Choice;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.Frame;
+import java.awt.GridLayout;
+import java.awt.Label;
+import java.awt.Panel;
+import java.awt.Scrollbar;
+import java.awt.TextField;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.AdjustmentEvent;
+import java.awt.event.AdjustmentListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.Hashtable;
+
public class FeatureColourChooser extends Panel implements ActionListener,
AdjustmentListener, ItemListener, MouseListener
{
{
if (!adjusting)
{
- thresholdValue.setText(((float) slider.getValue() / 1000f) + "");
+ thresholdValue.setText((slider.getValue() / 1000f) + "");
valueChanged();
}
}
protected void valueChanged()
{
- threshline.value = (float) slider.getValue() / 1000f;
+ threshline.value = slider.getValue() / 1000f;
cs.setThresh(threshline.value);
changeColour();
PaintRefresher.Refresh(this, fr.getViewport().getSequenceSetId());
&& threshline == null)
{
// todo visual indication of feature threshold
- threshline = new jalview.datamodel.GraphLine((max - min) / 2f,
+ threshline = new GraphLine((max - min) / 2f,
"Threshold", Color.black);
}
*/
package jalview.appletgui;
+import jalview.datamodel.SearchResults;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceI;
+import jalview.io.FeaturesFile;
+import jalview.schemes.AnnotationColourGradient;
+import jalview.schemes.GraduatedColor;
+import jalview.schemes.UserColourScheme;
+import jalview.util.MessageManager;
+import jalview.viewmodel.AlignmentViewport;
+
import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Choice;
import java.awt.event.ActionListener;
import java.util.Hashtable;
-import jalview.datamodel.SearchResults;
-import jalview.datamodel.SequenceFeature;
-import jalview.datamodel.SequenceI;
-import jalview.schemes.AnnotationColourGradient;
-import jalview.schemes.GraduatedColor;
-import jalview.util.MessageManager;
-import jalview.viewmodel.AlignmentViewport;
-
/**
* DOCUMENT ME!
*
Object col = getFeatureStyle(name.getText());
if (col == null)
{
- col = new jalview.schemes.UserColourScheme()
- .createColourFromName(name.getText());
+ col = new UserColourScheme().createColourFromName(name
+ .getText());
}
colourPanel.updateColor(col);
Color col = getColour(name.getText());
if (col == null)
{
- col = new jalview.schemes.UserColourScheme()
+ col = new UserColourScheme()
.createColourFromName(name.getText());
}
Object fcol = getFeatureStyle(name.getText());
});
dialog.setVisible(true);
- jalview.io.FeaturesFile ffile = new jalview.io.FeaturesFile();
+ FeaturesFile ffile = new FeaturesFile();
if (dialog.accept)
{
}
}
// refresh the alignment and the feature settings dialog
- if (((jalview.appletgui.AlignViewport) av).featureSettings != null)
+ if (((AlignViewport) av).featureSettings != null)
{
- ((jalview.appletgui.AlignViewport) av).featureSettings.refreshTable();
+ ((AlignViewport) av).featureSettings.refreshTable();
}
// findAllFeatures();
package jalview.appletgui;
import jalview.api.FeatureSettingsControllerI;
+import jalview.bin.JalviewLite;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceFeature;
import jalview.schemes.AnnotationColourGradient;
height = Math.max(200, height);
height = Math.min(400, height);
int width = 300;
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("label.feature_settings"), width,
height);
}
*/
package jalview.appletgui;
+import jalview.bin.JalviewLite;
import jalview.datamodel.SearchResults;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
this.ap = ap;
frame = new Frame();
frame.add(this);
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("action.find"), 340, 120);
frame.repaint();
frame.addWindowListener(new WindowAdapter()
*/
package jalview.appletgui;
+import jalview.api.ViewStyleI;
+import jalview.bin.JalviewLite;
+import jalview.util.MessageManager;
+
import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Checkbox;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
-import jalview.api.ViewStyleI;
-import jalview.util.MessageManager;
-
/**
* This dialog allows the user to try different font settings and related
* options. Changes are immediately visible on the alignment or tree. The user
this.frame = new Frame();
frame.add(this);
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("action.change_font"), 440, 115);
init = false;
*/
package jalview.appletgui;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
+import jalview.util.UrlLink;
+import jalview.viewmodel.AlignmentViewport;
+
import java.awt.BorderLayout;
import java.awt.Panel;
import java.awt.event.InputEvent;
import java.util.List;
import java.util.Vector;
-import jalview.datamodel.Sequence;
-import jalview.datamodel.SequenceFeature;
-import jalview.datamodel.SequenceGroup;
-import jalview.datamodel.SequenceI;
-import jalview.util.UrlLink;
-import jalview.viewmodel.AlignmentViewport;
-
public class IdPanel extends Panel implements MouseListener,
MouseMotionListener
{
// DEFAULT LINK IS FIRST IN THE LINK LIST
// BUT IF ITS A REGEX AND DOES NOT MATCH THE NEXT ONE WILL BE TRIED
url = links.elementAt(i++).toString();
- jalview.util.UrlLink urlLink = null;
+ UrlLink urlLink = null;
try
{
urlLink = new UrlLink(url);
package jalview.appletgui;
import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SequenceI;
import java.awt.Color;
import java.awt.Dimension;
int xstart = 0, ystart = 0;
Color color = Color.yellow;
int row, col, sameRow = 0, sameCol = 0;
- jalview.datamodel.SequenceI seq;
+ SequenceI seq;
final boolean hasHiddenRows = av.hasHiddenRows(), hasHiddenCols = av
.hasHiddenColumns();
boolean hiddenRow = false;
*/
package jalview.appletgui;
-import java.awt.*;
-import java.awt.event.*;
-
-import jalview.datamodel.*;
+import jalview.bin.JalviewLite;
+import jalview.datamodel.Alignment;
+import jalview.datamodel.AlignmentView;
+import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.SeqCigar;
+import jalview.datamodel.SequenceI;
import jalview.util.MessageManager;
import jalview.viewmodel.PCAModel;
+import java.awt.BorderLayout;
+import java.awt.Button;
+import java.awt.CheckboxMenuItem;
+import java.awt.Choice;
+import java.awt.Color;
+import java.awt.FlowLayout;
+import java.awt.Frame;
+import java.awt.Label;
+import java.awt.Menu;
+import java.awt.MenuBar;
+import java.awt.MenuItem;
+import java.awt.Panel;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+
public class PCAPanel extends EmbmenuFrame implements Runnable,
ActionListener, ItemListener
{
embedMenuIfNeeded(rc);
add(rc, BorderLayout.CENTER);
- jalview.bin.JalviewLite.addFrame(this,
+ JalviewLite.addFrame(this,
MessageManager.getString("label.principal_component_analysis"),
475, 400);
CutAndPasteTransfer cap = new CutAndPasteTransfer(false, null);
Frame frame = new Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("label.pca_details"), 500, 500);
cap.setText(pcaModel.getDetails());
import jalview.datamodel.Alignment;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceI;
+import jalview.util.Format;
import jalview.util.MessageManager;
import java.awt.BorderLayout;
for (int i = 0; i < count; i++)
{
- jalview.util.Format.print(System.out, "%s \n", ("" + i) + " "
+ Format.print(System.out, "%s \n",
+ ("" + i) + " "
+ seqs[i].getName());
}
{
for (int j = 0; j < i; j++)
{
- jalview.util.Format.printDouble(System.out, "%7.3f", scores[i][j]
+ Format.printDouble(System.out, "%7.3f", scores[i][j]
/ totscore);
}
}
package jalview.appletgui;
import jalview.analysis.AlignSeq;
+import jalview.bin.JalviewLite;
import jalview.commands.CommandI;
import jalview.commands.EditCommand;
import jalview.commands.EditCommand.Action;
frame = new Frame();
frame.add(this);
- jalview.bin.JalviewLite.addFrame(frame, MessageManager
+ JalviewLite.addFrame(frame, MessageManager
.getString("label.redundancy_threshold_selection"), 400, 100);
frame.addWindowListener(this);
import jalview.datamodel.SearchResults;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
+import jalview.util.Comparison;
import jalview.viewmodel.AlignmentViewport;
import java.awt.Color;
while (index < endx)
{
- if (jalview.util.Comparison.isGap(seq.getCharAt(index)))
+ if (Comparison.isGap(seq.getCharAt(index)))
{
index++;
while (index > startx)
{
- if (jalview.util.Comparison.isGap(seq.getCharAt(index)))
+ if (Comparison.isGap(seq.getCharAt(index)))
{
index--;
*/
package jalview.appletgui;
-import java.awt.BorderLayout;
-import java.awt.Font;
-import java.awt.FontMetrics;
-import java.awt.Panel;
-import java.awt.Point;
-import java.awt.event.InputEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-import java.awt.event.MouseMotionListener;
-import java.util.List;
-import java.util.Vector;
-
import jalview.api.AlignViewportI;
import jalview.commands.EditCommand;
import jalview.commands.EditCommand.Action;
import jalview.structure.SequenceListener;
import jalview.structure.StructureSelectionManager;
import jalview.structure.VamsasSource;
+import jalview.util.Comparison;
import jalview.util.MappingUtils;
import jalview.util.MessageManager;
import jalview.viewmodel.AlignmentViewport;
+import java.awt.BorderLayout;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Panel;
+import java.awt.Point;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+import java.util.List;
+import java.util.Vector;
+
public class SeqPanel extends Panel implements MouseMotionListener,
MouseListener, SequenceListener, SelectionListener
{
{
for (int j = 0; j < startres - lastres; j++)
{
- if (!jalview.util.Comparison.isGap(gs.getCharAt(fixedRight
+ if (!Comparison.isGap(gs.getCharAt(fixedRight
- j)))
{
blank = false;
continue;
}
- if (!jalview.util.Comparison.isGap(gs.getCharAt(j)))
+ if (!Comparison.isGap(gs.getCharAt(j)))
{
// Not a gap, block edit not valid
endEditing();
{
for (int j = lastres; j > startres; j--)
{
- if (!jalview.util.Comparison.isGap(seq.getCharAt(startres)))
+ if (!Comparison.isGap(seq.getCharAt(startres)))
{
endEditing();
break;
int max = 0;
for (int m = startres; m < lastres; m++)
{
- if (!jalview.util.Comparison.isGap(seq.getCharAt(m)))
+ if (!Comparison.isGap(seq.getCharAt(m)))
{
break;
}
for (blankColumn = fixedColumn; blankColumn > j; blankColumn--)
{
- if (jalview.util.Comparison.isGap(seq[s].getCharAt(blankColumn)))
+ if (Comparison.isGap(seq[s].getCharAt(blankColumn)))
{
// Theres a space, so break and insert the gap
break;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
import jalview.schemes.ColourSchemeI;
+import jalview.util.Comparison;
import java.awt.Color;
import java.awt.Font;
{
resBoxColour = cs.findColour(seq.getCharAt(i), i, seq);
}
- else if (forOverview
- && !jalview.util.Comparison.isGap(seq.getCharAt(i)))
+ else if (forOverview && !Comparison.isGap(seq.getCharAt(i)))
{
resBoxColour = Color.lightGray;
}
graphics.setColor(Color.black);
s = seq.getCharAt(i);
- if (!renderGaps && jalview.util.Comparison.isGap(s))
+ if (!renderGaps && Comparison.isGap(s))
{
continue;
}
*/
package jalview.appletgui;
+import jalview.bin.JalviewLite;
import jalview.datamodel.SequenceGroup;
import jalview.schemes.ColourSchemeI;
import jalview.util.MessageManager;
if (!conservationSlider.isVisible())
{
- jalview.bin.JalviewLite.addFrame(conservationSlider,
+ JalviewLite.addFrame(conservationSlider,
conservationSlider.getTitle(), 420, 100);
conservationSlider.addWindowListener(new WindowAdapter()
{
if (!PIDSlider.isVisible())
{
- jalview.bin.JalviewLite.addFrame(PIDSlider, PIDSlider.getTitle(),
+ JalviewLite.addFrame(PIDSlider, PIDSlider.getTitle(),
420, 100);
PIDSlider.addWindowListener(new WindowAdapter()
{
package jalview.appletgui;
-import java.awt.BorderLayout;
-import java.awt.Dimension;
-import java.awt.GridLayout;
-import java.awt.Panel;
-
import jalview.analysis.AlignmentUtils;
import jalview.api.AlignmentViewPanel;
import jalview.api.ViewStyleI;
import jalview.structure.StructureSelectionManager;
import jalview.viewmodel.AlignmentViewport;
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.GridLayout;
+import java.awt.Panel;
+
public class SplitFrame extends EmbmenuFrame
{
private static final long serialVersionUID = 1L;
this.add(outermost);
int width = Math.max(topFrame.frameWidth, bottomFrame.frameWidth);
int height = topFrame.frameHeight + bottomFrame.frameHeight;
- jalview.bin.JalviewLite
- .addFrame(this, this.getTitle(), width, height);
+ JalviewLite.addFrame(this, this.getTitle(), width, height);
}
}
import jalview.analysis.NJTree;
import jalview.api.analysis.ScoreModelI;
import jalview.api.analysis.ViewBasedAnalysisI;
+import jalview.bin.JalviewLite;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentView;
import jalview.datamodel.ColumnSelection;
{
NewickFile newtree;
- jalview.datamodel.AlignmentView odata = null;
+ AlignmentView odata = null;
public TreeLoader(NewickFile newtree)
{
public void newickOutput_actionPerformed()
{
- jalview.io.NewickFile fout = new jalview.io.NewickFile(
- tree.getTopNode());
+ NewickFile fout = new NewickFile(tree.getTopNode());
String output = fout.print(false, true);
CutAndPasteTransfer cap = new CutAndPasteTransfer(false, null);
cap.setText(output);
java.awt.Frame frame = new java.awt.Frame();
frame.add(cap);
- jalview.bin.JalviewLite.addFrame(frame, type + " " + pwtype, 500, 100);
+ JalviewLite.addFrame(frame, type + " " + pwtype, 500, 100);
}
public java.awt.Font getTreeFont()
*/
package jalview.appletgui;
+import jalview.bin.JalviewLite;
+import jalview.datamodel.SequenceGroup;
+import jalview.schemes.ColourSchemeI;
+import jalview.schemes.GraduatedColor;
+import jalview.schemes.ResidueProperties;
+import jalview.schemes.UserColourScheme;
+import jalview.util.MessageManager;
+
import java.awt.Button;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.MouseEvent;
import java.util.Vector;
-import jalview.datamodel.SequenceGroup;
-import jalview.schemes.ColourSchemeI;
-import jalview.schemes.GraduatedColor;
-import jalview.schemes.ResidueProperties;
-import jalview.schemes.UserColourScheme;
-import jalview.util.MessageManager;
-
public class UserDefinedColours extends Panel implements ActionListener,
AdjustmentListener, FocusListener
{
}
frame = new Frame();
frame.add(this);
- jalview.bin.JalviewLite.addFrame(frame,
+ JalviewLite.addFrame(frame,
MessageManager.getString("label.user_defined_colours"), 420,
345);