public void padGapsMenuitem_actionPerformed(ActionEvent e)
{
viewport.padGaps = padGapsMenuitem.isSelected();
-
viewport.firePropertyChange("alignment", null, viewport.getAlignment()
.getSequences());
}
-
+
+ //else
+ {
+ // if (justifySeqs>0)
+ {
+ // alignment.justify(justifySeqs!=RIGHT_JUSTIFY);
+ }
+ }
+ //}
+
/**
* DOCUMENT ME!
*
}
/**
- * DOCUMENT ME!
+ * Set or clear 'Show Sequence Features'
*
* @param evt
* DOCUMENT ME!
alignPanel.getOverviewPanel().updateOverviewImage();
}
}
+ /**
+ * Set or clear 'Show Sequence Features'
+ *
+ * @param evt
+ * DOCUMENT ME!
+ */
+ public void showSeqFeaturesHeight_actionPerformed(ActionEvent evt)
+ {
+ viewport.setShowSequenceFeaturesHeight(showSeqFeaturesHeight.isSelected());
+ if (viewport.getShowSequenceFeaturesHeight())
+ {
+ // ensure we're actually displaying features
+ viewport.setShowSequenceFeatures(true);
+ showSeqFeatures.setSelected(true);
+ }
+ alignPanel.paintAlignment(true);
+ if (alignPanel.getOverviewPanel() != null)
+ {
+ alignPanel.getOverviewPanel().updateOverviewImage();
+ }
+ }
/**
* DOCUMENT ME!
addHistoryItem(new OrderCommand("ID Sort", oldOrder, viewport.alignment));
alignPanel.paintAlignment(true);
}
+ /**
+ * DOCUMENT ME!
+ *
+ * @param e
+ * DOCUMENT ME!
+ */
+ public void sortLengthMenuItem_actionPerformed(ActionEvent e)
+ {
+ SequenceI[] oldOrder = viewport.getAlignment().getSequencesArray();
+ AlignmentSorter.sortByLength(viewport.getAlignment());
+ addHistoryItem(new OrderCommand("Length Sort", oldOrder, viewport.alignment));
+ alignPanel.paintAlignment(true);
+ }
/**
* DOCUMENT ME!
}
}
}
+ /**
+ * Left justify the whole alignment.
+ */
+ protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
+ {
+ AlignmentI al = viewport.getAlignment();
+ al.justify(false);
+ viewport.firePropertyChange("alignment", null, al);
+ }
+ /**
+ * Right justify the whole alignment.
+ */
+ protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
+ {
+ AlignmentI al = viewport.getAlignment();
+ al.justify(true);
+ viewport.firePropertyChange("alignment", null, al);
+ }
}
class PrintThread extends Thread
*/
public class AlignViewport implements SelectionSource
{
+ private static final int RIGHT_JUSTIFY = 1;
+
int startRes;
int endRes;
{
alignment.padGaps();
}
-
if (hconsensus != null && autoCalculateConsensus)
{
updateConsensus(ap);
return followSelection;
}
private long sgrouphash=-1,colselhash=-1;
+
+ boolean showSeqFeaturesHeight;
/**
* checks current SelectionGroup against record of last hash value, and updates record.
* @return true if SelectionGroup changed since last call
{
jalview.structure.StructureSelectionManager.getStructureSelectionManager().sendSelection(new SequenceGroup(getSelectionGroup()), new ColumnSelection(getColumnSelection()), this);
}
+ public void setShowSequenceFeaturesHeight(boolean selected)
+ {
+ showSeqFeaturesHeight = selected;
+ }
+ public boolean getShowSequenceFeaturesHeight()
+ {
+ return showSeqFeaturesHeight;
+ }
}
protected JMenuItem sortIDMenuItem = new JMenuItem();
+ protected JMenuItem sortLengthMenuItem = new JMenuItem();
+
protected JMenuItem sortGroupMenuItem = new JMenuItem();
protected JMenu sortByAnnotScore = new JMenu();
public JCheckBoxMenuItem abovePIDThreshold = new JCheckBoxMenuItem();
public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
+ public JCheckBoxMenuItem showSeqFeaturesHeight = new JCheckBoxMenuItem();
protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem();
JMenuItem alignmentProperties = new JMenuItem();
JMenu tooltipSettingsMenu = new JMenu();
+
+ private JMenuItem justifyLeftMenuItem=new JMenuItem();
+
+ private JMenuItem justifyRightMenuItem=new JMenuItem();
public GAlignFrame()
{
removeAllGapsMenuItem_actionPerformed(e);
}
});
+ justifyLeftMenuItem.setText("Left Justify Alignment");
+ justifyLeftMenuItem.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ justifyLeftMenuItem_actionPerformed(e);
+ }
+ });
+ justifyRightMenuItem.setText("Right Justify Alignment");
+ justifyRightMenuItem.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ justifyRightMenuItem_actionPerformed(e);
+ }
+ });
viewBoxesMenuItem.setText("Boxes");
viewBoxesMenuItem.setState(true);
viewBoxesMenuItem.addActionListener(new java.awt.event.ActionListener()
sortIDMenuItem_actionPerformed(e);
}
});
+ sortLengthMenuItem.setText("By Length");
+ sortLengthMenuItem.addActionListener(new java.awt.event.ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ sortLengthMenuItem_actionPerformed(e);
+ }
+ });
sortGroupMenuItem.setText("by Group");
sortGroupMenuItem.addActionListener(new java.awt.event.ActionListener()
{
showSeqFeatures_actionPerformed(actionEvent);
}
});
+ showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
+ showSeqFeaturesHeight.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent actionEvent)
+ {
+ showSeqFeaturesHeight_actionPerformed(actionEvent);
+ }
+ });
showDbRefsMenuitem.setText("Show Database Refs");
showDbRefsMenuitem.addActionListener(new ActionListener()
{
editMenu.add(removeAllGapsMenuItem);
editMenu.add(removeRedundancyMenuItem);
editMenu.addSeparator();
+ editMenu.add(justifyLeftMenuItem);
+ editMenu.add(justifyRightMenuItem);
+ editMenu.addSeparator();
editMenu.add(padGapsMenuitem);
viewMenu.add(newView);
viewMenu.add(expandViews);
viewMenu.add(annotationPanelMenuItem);
viewMenu.addSeparator();
viewMenu.add(showSeqFeatures);
+ viewMenu.add(showSeqFeaturesHeight);
+
viewMenu.add(featureSettings);
tooltipSettingsMenu.add(showDbRefsMenuitem);
tooltipSettingsMenu.add(showNpFeatsMenuitem);
pasteMenu.add(pasteNew);
pasteMenu.add(pasteThis);
sort.add(sortIDMenuItem);
+ sort.add(sortLengthMenuItem);
sort.add(sortGroupMenuItem);
sort.add(sortPairwiseMenuItem);
sort.add(sortByTreeMenu);
selectMenu.add(deleteGroups);
}
+ protected void showSeqFeaturesHeight_actionPerformed(
+ ActionEvent actionEvent)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void justifyRightMenuItem_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void justifyLeftMenuItem_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
protected void followHighlight_actionPerformed()
{
// TODO Auto-generated method stub
{
}
+ protected void sortLengthMenuItem_actionPerformed(ActionEvent e)
+ {
+ }
+
protected void sortGroupMenuItem_actionPerformed(ActionEvent e)
{
}