Dockable dockable = manager.getActiveDockable();
if(dockable==null)
return 0;
Rectangle rect = DockbarLayoutManager.getManager().getViewArea(manager, dockable);
DockablePropertySet props = dockable.getDockingProperties();
// determine what percentage of the viewable area we want the viewpane to take up
float viewSize = props.getPreviewSize().floatValue();
int edge = manager.getActiveEdge();
if(edge==MinimizationManager.LEFT || edge==MinimizationManager.RIGHT) {
return (int)(((float)rect.width)*viewSize);
}
return (int)(((float)rect.height)*viewSize);