/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*/
public GSplitFrame(GAlignFrame top, GAlignFrame bottom)
{
+ setName("jalview-splitframe");
this.topFrame = top;
this.bottomFrame = bottom;
* project
*/
int topFrameHeight = topFrame.getHeight();
- splitPane.setDividerSize(DIVIDER_SIZE);
- if (topFrameHeight == 0)
- {
- setRelativeDividerLocation(0.5d); // as a proportion
- }
- else
+ /**
+ * TODO SplitFrame.setDividerLocation
+ *
+ * @j2sNative
+ */
{
- int dividerPosition = topFrameHeight + DIVIDER_SIZE / 2;
- splitPane.setDividerLocation(dividerPosition); // absolute position
+ splitPane.setDividerSize(DIVIDER_SIZE);
+ if (topFrameHeight == 0)
+ {
+ setRelativeDividerLocation(0.5d); // as a proportion
+ }
+ else
+ {
+ int dividerPosition = topFrameHeight + DIVIDER_SIZE / 2;
+ splitPane.setDividerLocation(dividerPosition); // absolute position
+ }
+ splitPane.setResizeWeight(0.5d);
}
- splitPane.setResizeWeight(0.5d);
add(splitPane);
}
*/
protected void hideTitleBars()
{
- if (new Platform().isAMac())
+ if (Platform.isAMacAndNotJS())
{
// this saves some space - but doesn't hide the title bar
topFrame.putClientProperty("JInternalFrame.isPalette", true);
}
else
{
- ((BasicInternalFrameUI) topFrame.getUI()).setNorthPane(null);
- ((BasicInternalFrameUI) bottomFrame.getUI()).setNorthPane(null);
+ ((BasicInternalFrameUI) topFrame.getUI()).setNorthPane(null);
+ ((BasicInternalFrameUI) bottomFrame.getUI()).setNorthPane(null);
}
}
return false;
}
Point p = comp.getLocationOnScreen();
- Rectangle r = new Rectangle(p.x, p.y, comp.getWidth(), comp.getHeight());
+ Rectangle r = new Rectangle(p.x, p.y, comp.getWidth(),
+ comp.getHeight());
return r.contains(loc);
}
else
{
this.dividerRatio = splitPane.getDividerLocation()
- / (double) (splitPane.getHeight() - splitPane
- .getDividerSize());
+ / (double) (splitPane.getHeight()
+ - splitPane.getDividerSize());
}
if (alignFrame == this.topFrame)
public void setRelativeDividerLocation(double r)
{
this.dividerRatio = r;
- splitPane.setDividerLocation(r);
+ /**
+ *
+ * BH need for this? - NOT setting the location?
+ *
+ * @j2sNative
+ */
+ {
+ splitPane.setDividerLocation(r);
+ }
}
/**
*/
protected void setDividerLocation(int p)
{
- splitPane.setDividerLocation(p);
+ /**
+ * BH: Why are we not setting the location?
+ *
+ * @j2sNative
+ */
+ {
+ splitPane.setDividerLocation(p);
+ }
}
/**