ij.gui
Class ImageLayout

java.lang.Object
  extended by ij.gui.ImageLayout
All Implemented Interfaces:
LayoutManager

public class ImageLayout
extends Object
implements LayoutManager

This is a custom layout manager that supports resizing of zoomed images. It's based on FlowLayout, but with vertical and centered flow.


Constructor Summary
ImageLayout(ImageCanvas ic)
          Creates a new ImageLayout with center alignment.
 
Method Summary
 void addLayoutComponent(String name, Component comp)
          Not used by this class.
 void layoutContainer(Container target)
          Lays out the container and calls ImageCanvas.resizeCanvas() to adjust the image canvas size as needed.
 Dimension minimumLayoutSize(Container target)
          Returns the minimum dimensions for this layout.
 Dimension preferredLayoutSize(Container target)
          Returns the preferred dimensions for this layout.
 void removeLayoutComponent(Component comp)
          Not used by this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageLayout

public ImageLayout(ImageCanvas ic)
Creates a new ImageLayout with center alignment.

Method Detail

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Not used by this class.

Specified by:
addLayoutComponent in interface LayoutManager

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Not used by this class.

Specified by:
removeLayoutComponent in interface LayoutManager

preferredLayoutSize

public Dimension preferredLayoutSize(Container target)
Returns the preferred dimensions for this layout.

Specified by:
preferredLayoutSize in interface LayoutManager

minimumLayoutSize

public Dimension minimumLayoutSize(Container target)
Returns the minimum dimensions for this layout.

Specified by:
minimumLayoutSize in interface LayoutManager

layoutContainer

public void layoutContainer(Container target)
Lays out the container and calls ImageCanvas.resizeCanvas() to adjust the image canvas size as needed.

Specified by:
layoutContainer in interface LayoutManager


Copyright © 1997–2015 NIH. All rights reserved.