*/
public GSplitFrame(GAlignFrame top, GAlignFrame bottom)
{
+ setName("jalview-splitframe");
this.topFrame = top;
this.bottomFrame = bottom;
* project
*/
int topFrameHeight = topFrame.getHeight();
- /**
- * TODO SplitFrame.setDividerLocation
- *
- * @j2sNative
- */
+ splitPane.setDividerSize(DIVIDER_SIZE);
+ if (topFrameHeight == 0)
{
- 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);
+ setRelativeDividerLocation(0.5d); // as a proportion
}
+ else
+ {
+ int dividerPosition = topFrameHeight + DIVIDER_SIZE / 2;
+ splitPane.setDividerLocation(dividerPosition); // absolute position
+ }
+ splitPane.setResizeWeight(0.5d);
add(splitPane);
}
*/
protected void hideTitleBars()
{
- if (Platform.isAMac())
+ if (Platform.isAMacAndNotJS())
{
// this saves some space - but doesn't hide the title bar
topFrame.putClientProperty("JInternalFrame.isPalette", true);
}
else
{
- /**
- * @j2sNative
- */
- {
- ((BasicInternalFrameUI) topFrame.getUI()).setNorthPane(null);
- ((BasicInternalFrameUI) bottomFrame.getUI()).setNorthPane(null);
- }
+ ((BasicInternalFrameUI) topFrame.getUI()).setNorthPane(null);
+ ((BasicInternalFrameUI) bottomFrame.getUI()).setNorthPane(null);
}
}
public void setRelativeDividerLocation(double r)
{
this.dividerRatio = r;
- /**
- * @j2sNative
- */
- {
- splitPane.setDividerLocation(r);
- }
+ splitPane.setDividerLocation(r);
}
/**
*/
protected void setDividerLocation(int p)
{
- /**
- * @j2sNative
- */
- {
- splitPane.setDividerLocation(p);
- }
+ splitPane.setDividerLocation(p);
}
/**