public void doExpansion(Panel panel)
{
ScenePanel scene = (ScenePanel) panel;
Style style = scene.getStyle();
final Stage stage = scene.stage;
if(stage == null)
{
Log.warn("ScenePanel - doLayout called on un-staged scene.");
return;
}
Insets insets = stage.getInsets();
panel.setLocation(insets.left, insets.top);
final int consumableWidth = stage.getWidth() - insets.left - insets.right;
final int consumableHeight = stage.getHeight() - insets.top - insets.bottom;
final int width = style.getCompiledWidth().calculateDimension(consumableWidth, style.getCompiledMinWidth(), style.getCompiledMaxWidth(), 0);
final int height = style.getCompiledHeight().calculateDimension(consumableHeight, style.getCompiledMinHeight(), style.getCompiledMaxHeight(), 0);
scene.setSize(width, height);
PropPanelLayout.instance.doExpansion(scene);