import jalview.structures.models.AAStructureBindingModel;
import jalview.util.MappingUtils;
import jalview.util.MessageManager;
+import jalview.viewmodel.AlignmentViewport;
public class AlignFrame extends EmbmenuFrame implements ActionListener,
ItemListener, KeyListener, AlignViewControllerGuiI
public AlignViewport viewport;
- int DEFAULT_WIDTH = 700;
+ // width and height may be overridden by applet parameters
+ int frameWidth = 700;
- int DEFAULT_HEIGHT = 500;
+ int frameHeight = 500;
String jalviewServletURL;
if (param != null)
{
int width = Integer.parseInt(param);
- DEFAULT_WIDTH = width;
+ frameWidth = width;
}
param = applet.getParameter("windowHeight");
if (param != null)
{
int height = Integer.parseInt(param);
- DEFAULT_HEIGHT = height;
+ frameHeight = height;
}
} catch (Exception ex)
{
viewport.updateConsensus(alignPanel);
displayNonconservedMenuItem.setState(viewport.getShowUnconserved());
- followMouseOverFlag.setState(viewport.getFollowHighlight());
+ followMouseOverFlag.setState(viewport.isFollowHighlight());
showGroupConsensus.setState(viewport.isShowGroupConsensus());
showGroupConservation.setState(viewport.isShowGroupConservation());
showConsensusHistogram.setState(viewport.isShowConsensusHistogram());
showSequenceLogo.setState(viewport.isShowSequenceLogo());
normSequenceLogo.setState(viewport.isNormaliseSequenceLogo());
applyToAllGroups.setState(viewport.getColourAppliesToAllGroups());
+ annotationPanelMenuItem.setState(viewport.isShowAnnotation());
showAlignmentAnnotations.setState(viewport.isShowAnnotation());
showSequenceAnnotations.setState(viewport.isShowAnnotation());
private void mouseOverFlag_stateChanged()
{
- viewport.followHighlight = followMouseOverFlag.getState();
+ viewport.setFollowHighlight(followMouseOverFlag.getState());
// TODO: could kick the scrollTo mechanism to reset view for current
// searchresults.
}
viewport.addToRedoList(command);
command.undoCommand(null);
- AlignViewport originalSource = getOriginatingSource(command);
+ AlignmentViewport originalSource = getOriginatingSource(command);
// JBPNote Test
if (originalSource != viewport)
{
viewport.addToHistoryList(command);
command.doCommand(null);
- AlignViewport originalSource = getOriginatingSource(command);
+ AlignmentViewport originalSource = getOriginatingSource(command);
// JBPNote Test
if (originalSource != viewport)
{
.getAlignment().getSequences());
}
- AlignViewport getOriginatingSource(CommandI command)
+ AlignmentViewport getOriginatingSource(CommandI command)
{
- AlignViewport originalSource = null;
+ AlignmentViewport originalSource = null;
// For sequence removal and addition, we need to fire
// the property change event FROM the viewport where the
// original alignment was altered
}
}
- jalview.bin.JalviewLite.addFrame(af, newtitle, DEFAULT_WIDTH,
- DEFAULT_HEIGHT);
+ jalview.bin.JalviewLite.addFrame(af, newtitle, frameWidth,
+ frameHeight);
}
else
{
/*
* Annotations menu
*/
- // annotationsMenu.add(annotationPanelMenuItem);
- // annotationsMenu.addSeparator();
+ annotationsMenu.add(annotationPanelMenuItem);
+ annotationsMenu.addSeparator();
annotationsMenu.add(showAlignmentAnnotations);
annotationsMenu.add(showSequenceAnnotations);
annotationsMenu.add(sortAnnBySequence);
private CheckboxMenuItem showAutoLast;
+ private SplitFrame splitFrame;
+
/**
* Attach the alignFrame panels after embedding menus, if necessary. This used
* to be called setEmbedded, but is now creates the dropdown menus in a
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(),
- DEFAULT_WIDTH,
- DEFAULT_HEIGHT);
+ frameWidth,
+ frameHeight);
}
}
return false;
}
+ public SplitFrame getSplitFrame()
+ {
+ return this.splitFrame;
+ }
+
+ public void setSplitFrame(SplitFrame sf)
+ {
+ this.splitFrame = sf;
+ }
}