org.objectweb.jac.ide.diagrams
Class PaletteLayout

java.lang.Object
  extended byorg.objectweb.jac.ide.diagrams.PaletteLayout
All Implemented Interfaces:
LayoutManager

public class PaletteLayout
extends Object
implements LayoutManager

A custom layout manager for the palette. Copied from CH.ifa.draw.util.PaletteLayout and enhanced to provide centered alignment.


Constructor Summary
PaletteLayout(int gap)
          Initializes the palette layout.
PaletteLayout(int gap, Point border)
           
PaletteLayout(int gap, Point border, boolean vertical)
           
 
Method Summary
 void addLayoutComponent(String name, Component comp)
           
 void layoutContainer(Container target)
           
 Dimension minimumLayoutSize(Container target)
           
 Dimension preferredLayoutSize(Container target)
           
 void removeLayoutComponent(Component comp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaletteLayout

public PaletteLayout(int gap)
Initializes the palette layout.

Parameters:
gap - the gap between palette entries.

PaletteLayout

public PaletteLayout(int gap,
                     Point border)

PaletteLayout

public PaletteLayout(int gap,
                     Point border,
                     boolean vertical)
Method Detail

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Specified by:
addLayoutComponent in interface LayoutManager

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Specified by:
removeLayoutComponent in interface LayoutManager

preferredLayoutSize

public Dimension preferredLayoutSize(Container target)
Specified by:
preferredLayoutSize in interface LayoutManager

minimumLayoutSize

public Dimension minimumLayoutSize(Container target)
Specified by:
minimumLayoutSize in interface LayoutManager

layoutContainer

public void layoutContainer(Container target)
Specified by:
layoutContainer in interface LayoutManager