Package ij.gui

Class 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 Detail

      • ImageLayout

        public ImageLayout​(ImageCanvas ic)
        Creates a new ImageLayout with center alignment.
    • Method Detail

      • ignoreNonImageWidths

        public void ignoreNonImageWidths​(boolean ignoreNonImageWidths)
        Determines whether to ignore the width of non-image components when calculating the preferred width (default false, i.e. the maximum of the widths of all components is used). When true, components that do not fit the window will be truncated at the right. The width of the 0th component (the ImageCanvas) is always taken into account.
      • 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