com.darwinsys.swingui.layout
Class CircleLayout

java.lang.Object
  extended by com.darwinsys.swingui.layout.CircleLayout
All Implemented Interfaces:
java.awt.LayoutManager

public class CircleLayout
extends java.lang.Object
implements java.awt.LayoutManager

A simplistic CircleLayout implementation of the LayoutManager interface. Components are drawn at their preferred size.
Bugs:

Version:
$Id: CircleLayout.java,v 1.10 2006/04/11 22:25:34 ian Exp $
Author:
Ian F. Darwin, http://www.darwinsys.com/

Constructor Summary
CircleLayout()
          Construct a CircleLayout with default values.
CircleLayout(boolean isTop)
          Construct a CircleLayout
 
Method Summary
 void addLayoutComponent(java.lang.String name, java.awt.Component comp)
          Adds the specified component with the specified constraint to the layout; required by LayoutManager but not used.
protected  java.awt.Dimension computelayoutSize(java.awt.Container parent)
          Compute the size of the whole mess.
 void layoutContainer(java.awt.Container parent)
          Lays out the container in the specified panel.
 java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
          Find the minimum Dimension for the specified container given the components therein.
 java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
          Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
 void removeLayoutComponent(java.awt.Component comp)
          Removes the specified component from the layout; required by LayoutManager, but does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CircleLayout

public CircleLayout(boolean isTop)
Construct a CircleLayout


CircleLayout

public CircleLayout()
Construct a CircleLayout with default values.

Method Detail

addLayoutComponent

public void addLayoutComponent(java.lang.String name,
                               java.awt.Component comp)
Adds the specified component with the specified constraint to the layout; required by LayoutManager but not used.

Specified by:
addLayoutComponent in interface java.awt.LayoutManager

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout; required by LayoutManager, but does nothing.

Specified by:
removeLayoutComponent in interface java.awt.LayoutManager

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.

Specified by:
preferredLayoutSize in interface java.awt.LayoutManager

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
Find the minimum Dimension for the specified container given the components therein.

Specified by:
minimumLayoutSize in interface java.awt.LayoutManager

computelayoutSize

protected java.awt.Dimension computelayoutSize(java.awt.Container parent)
Compute the size of the whole mess. Serves as the guts of preferredLayoutSize() and minimumLayoutSize().


layoutContainer

public void layoutContainer(java.awt.Container parent)
Lays out the container in the specified panel.

Specified by:
layoutContainer in interface java.awt.LayoutManager


Copyright © 1996-2004 Ian F. Darwin. See license.html for usage license.