dsto.dfc.swing.panels
Class SizeCalculator

java.lang.Object
  extended by dsto.dfc.swing.panels.SizeCalculator

public class SizeCalculator
extends Object

Calculates the minimum and preferred sizes of the panel manager. The preferred size is the maximum preferred size of all components displayed within the PanelManager's panels. The minimum size is the largest minimum size of all components displayed within the PanelManager's panels. Both sizes are enlarged by a variable, platform dependent measure, tabPaneInsets, which needs to be dynamically calculated.


Constructor Summary
SizeCalculator(PanelManager panelManager)
           
 
Method Summary
protected  Dimension enlargeByTabPaneInsets(Dimension first)
           
 Dimension getMinimumSizeOfLargestPanel()
           
 Dimension getPreferredSizeOfLargestPanel()
           
protected  Dimension getSize(dsto.dfc.swing.panels.SizeCalculator.Measurer measurer)
           
static Dimension getTabPaneInsets()
          Returns the space between the edges of the tabbed pane and the component selected inside it.
protected  Dimension maxDimension(Dimension first, Dimension second)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SizeCalculator

public SizeCalculator(PanelManager panelManager)
Method Detail

getPreferredSizeOfLargestPanel

public Dimension getPreferredSizeOfLargestPanel()

getMinimumSizeOfLargestPanel

public Dimension getMinimumSizeOfLargestPanel()

getSize

protected Dimension getSize(dsto.dfc.swing.panels.SizeCalculator.Measurer measurer)

maxDimension

protected Dimension maxDimension(Dimension first,
                                 Dimension second)

enlargeByTabPaneInsets

protected Dimension enlargeByTabPaneInsets(Dimension first)

getTabPaneInsets

public static Dimension getTabPaneInsets()
Returns the space between the edges of the tabbed pane and the component selected inside it.

Returns:
A Dimension object with the width and height difference between the tabbed pane and the component selected inside it.


Copyright © 2008 Commonwealth of Australia