// undecorated overview with defined size
frame.setName(Jalview.getAppID("overview"));
//
- Dimension dim = (Dimension) Platform.getEmbeddedAttribute(frame,
- Platform.EMBEDDED_DIM);
+ Dimension dim = Platform.getDimIfEmbedded(frame, -1, -1);
if (dim != null && dim.width == 0)
{
dim = null; // hidden, not embedded
}
-
OverviewPanel overview = new OverviewPanel(alignPanel, dim);
frame.setContentPane(overview);
frameTitle += this.title;
- Desktop.addInternalFrame(tp, frameTitle, 600, 500);
+ Dimension dim = Platform.getDimIfEmbedded(tp, 600, 500);
+ Desktop.addInternalFrame(tp, frameTitle, dim.width, dim.height);
}
/**
if (nf.getTree() != null)
{
tp = new TreePanel(alignPanel, nf, treeTitle, input);
-
- tp.setSize(w, h);
+ Dimension dim = Platform.getDimIfEmbedded(tp, -1, -1);
+ if (dim == null)
+ {
+ dim = new Dimension(w, h);
+ }
+ else
+ {
+ // no offset, either
+ x = 0;
+ }
+ tp.setSize(dim.width, dim.height);
if (x > 0 && y > 0)
{
tp.setLocation(x, y);
}
- Desktop.addInternalFrame(tp, treeTitle, w, h);
+ Desktop.addInternalFrame(tp, treeTitle, dim.width, dim.height);
}
} catch (Exception ex)
{