JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.legend
Class LegendComponentLayout

java.lang.Object
  |
  +--com.klg.jclass.util.legend.LegendComponentLayout
All Implemented Interfaces:
LayoutManager, Serializable
Direct Known Subclasses:
DefaultChartLayout

public class LegendComponentLayout
extends Object
implements LayoutManager, Serializable

A layout manager that implements a default layout for large JClass components, such as JClass Chart and JClass Gauge, that comprise a drawing area, a header, a footer, and a legend (a JCLegend object). This layout places the drawing area class in the leftover space after the legend, the header and the footer have been layed out, unless specific layout hints were set on the object in JCChart. Any component using this layout manager must implement LegendComponentLayoutUser.

See Also:
Serialized Form

Constructor Summary
LegendComponentLayout()
           
 
Method Summary
 void addLayoutComponent(String name, Component comp)
          Adds the specified component with the specified name to the layout.
 void layoutContainer(Container parent)
          Lays out the specified container.
 Dimension minimumLayoutSize(Container parent)
          Determines the minimum size of the container using this layout.
 Dimension preferredLayoutSize(Container parent)
          Determines the preferred size of the container by laying out the container's header, footer, legend, and drawing area.
 void removeLayoutComponent(Component comp)
          Removes the specified component from the layout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegendComponentLayout

public LegendComponentLayout()
Method Detail

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Adds the specified component with the specified name to the layout. Not used in this layout.

Specified by:
addLayoutComponent in interface LayoutManager
Parameters:
name - the name of the component
comp - the component to be added

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Removes the specified component from the layout. Not used in this layout.

Specified by:
removeLayoutComponent in interface LayoutManager
Parameters:
comp - the component to be removed

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Determines the preferred size of the container by laying out the container's header, footer, legend, and drawing area. If container does not implement LegendComponentLayoutUser, this method returns a size of zero.

Specified by:
preferredLayoutSize in interface LayoutManager
Parameters:
parent - the container in which to do the layout. Must be a class that implements LegendComponentLayoutUser
Returns:
the preferred dimensions of the container

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Determines the minimum size of the container using this layout. If container does not implement LegendComponentLayoutUser, this method returns a size of zero.

Specified by:
minimumLayoutSize in interface LayoutManager
Parameters:
parent - the container in which to do the layout. Must be a class that implements LegendComponentLayoutUser
Returns:
the minimum dimensions of this container

layoutContainer

public void layoutContainer(Container parent)
Lays out the specified container. If container does not implement LegendComponentLayoutUser, no layout is done.

Specified by:
layoutContainer in interface LayoutManager
Parameters:
parent - the container in which to do the layout. Must be a class that implements LegendComponentLayoutUser

Copyright © 2004 Quest Software Inc..
All rights reserved.