org.tigris.swidgets

Class ProportionalLayout

Implemented Interfaces:
LayoutManager2
Known Direct Subclasses:
SplitterLayout

public class ProportionalLayout
extends LineLayout

Allows components to be a set as a proportion to their container or left as fixed size. Components are resized accordingly when the parent is resized.
Author:
Bob Tarling

Field Summary

protected Hashtable
componentTable

Fields inherited from class org.tigris.swidgets.LineLayout

HORIZONTAL, VERTICAL, _gap, _orientation

Constructor Summary

ProportionalLayout()
ProportionalLayout(Orientation orientation)

Method Summary

void
addLayoutComponent(Component comp, Object constraints)
void
addLayoutComponent(String name, Component comp)
void
layoutContainer(Container parent)
void
removeLayoutComponent(Component comp)

Methods inherited from class org.tigris.swidgets.LineLayout

addLayoutComponent, addLayoutComponent, getLayoutAlignmentX, getLayoutAlignmentY, invalidateLayout, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent

Field Details

componentTable

protected Hashtable componentTable

Constructor Details

ProportionalLayout

public ProportionalLayout()

ProportionalLayout

public ProportionalLayout(Orientation orientation)

Method Details

addLayoutComponent

public final void addLayoutComponent(Component comp,
                                     Object constraints)
Overrides:
addLayoutComponent in interface LineLayout

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Overrides:
addLayoutComponent in interface LineLayout

layoutContainer

public void layoutContainer(Container parent)

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Overrides:
removeLayoutComponent in interface LineLayout