Class FPMILayout

  • All Implemented Interfaces:
    java.awt.LayoutManager

    public class FPMILayout
    extends java.lang.Object
    implements java.awt.LayoutManager
    • Constructor Summary

      Constructors 
      Constructor Description
      FPMILayout()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static java.awt.geom.Point2D _getPrefSize​(javax.swing.JComponent comp)  
      void addLayoutComponent​(java.lang.String name, java.awt.Component comp)  
      static java.awt.geom.Rectangle2D getBounds​(javax.swing.JComponent comp)
      Provides a consistent way to get the bounds of a component.
      static java.awt.geom.Rectangle2D getBounds​(javax.swing.JComponent comp, java.awt.geom.Rectangle2D rv)  
      static FPMI_LC getLayoutConstraints​(javax.swing.JComponent comp)
      Looks for the layout constraints (FPMI_LC object) on the component using client property key "fpmi.lc".
      static javax.swing.JComponent getOffsettingParent​(javax.swing.JComponent source)
      Find the closest VisionContainer parent of the source component that is an offsetting parent
      static java.awt.geom.Rectangle2D getPreferredBounds​(javax.swing.JComponent comp)
      Provides a consistent way to get the preferred bounds of a component.
      void layoutContainer​(java.awt.Container parent)  
      java.awt.Dimension minimumLayoutSize​(java.awt.Container parent)  
      java.awt.Dimension preferredLayoutSize​(java.awt.Container parent)  
      void removeLayoutComponent​(java.awt.Component comp)  
      static void setBounds​(javax.swing.JComponent comp, java.awt.geom.Rectangle2D bounds)
      Sets the actual bounds of a component.
      static void setPreferredBounds​(javax.swing.JComponent comp, java.awt.geom.Rectangle2D bounds)
      Set the preferred bounding box of a component.
      static void setRelativeEnabled​(boolean b)
      Deprecated.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FPMILayout

        public FPMILayout()
    • Method Detail

      • setRelativeEnabled

        @Deprecated
        public static void setRelativeEnabled​(boolean b)
        Deprecated.
        No longer used. Relative layout mode is only enabled in the runtime, never in the designer.
      • getLayoutConstraints

        public static FPMI_LC getLayoutConstraints​(javax.swing.JComponent comp)
        Looks for the layout constraints (FPMI_LC object) on the component using client property key "fpmi.lc". If it isn't found, it tries to make a new FPMI_LC object using the old PREF_LOCATION and NO_SCALE_FONTS properties. If those aren't there, it makes a new, clean FPMI_LC object and stores it in the client props.
      • addLayoutComponent

        public void addLayoutComponent​(java.lang.String name,
                                       java.awt.Component comp)
        Specified by:
        addLayoutComponent in interface java.awt.LayoutManager
      • removeLayoutComponent

        public void removeLayoutComponent​(java.awt.Component comp)
        Specified by:
        removeLayoutComponent in interface java.awt.LayoutManager
      • preferredLayoutSize

        public java.awt.Dimension preferredLayoutSize​(java.awt.Container parent)
        Specified by:
        preferredLayoutSize in interface java.awt.LayoutManager
      • minimumLayoutSize

        public java.awt.Dimension minimumLayoutSize​(java.awt.Container parent)
        Specified by:
        minimumLayoutSize in interface java.awt.LayoutManager
      • getPreferredBounds

        public static java.awt.geom.Rectangle2D getPreferredBounds​(javax.swing.JComponent comp)
        Provides a consistent way to get the preferred bounds of a component. This is the bounding box of a component as it was last time it's parent container's layout was validated in the designer. Layouts may use this box to derive a new bounding box if the parent container changes. This function detects for the two ways that this box is stored:
        • Normal JComponent: Uses Jcomponent's preferred size property as the Dimension, and the FPMI_LC's preferred location Point to create the rectangle.
        • Bounds2DComponent: Uses the originalBounds property.
      • _getPrefSize

        public static java.awt.geom.Point2D _getPrefSize​(javax.swing.JComponent comp)
      • setPreferredBounds

        public static void setPreferredBounds​(javax.swing.JComponent comp,
                                              java.awt.geom.Rectangle2D bounds)
        Set the preferred bounding box of a component. This function detects for the two strategies for storing this: normal JComponent vs Bounds2DComponent
      • getBounds

        public static java.awt.geom.Rectangle2D getBounds​(javax.swing.JComponent comp)
        Provides a consistent way to get the bounds of a component. Detects the two major kinds of components - Bounds2DComponent and normal JComponent.
      • getBounds

        public static java.awt.geom.Rectangle2D getBounds​(javax.swing.JComponent comp,
                                                          java.awt.geom.Rectangle2D rv)
      • setBounds

        public static void setBounds​(javax.swing.JComponent comp,
                                     java.awt.geom.Rectangle2D bounds)
        Sets the actual bounds of a component. This function detects for the two strategies for storing this: normal JComponent vs Bounds2DComponent
      • layoutContainer

        public void layoutContainer​(java.awt.Container parent)
        Specified by:
        layoutContainer in interface java.awt.LayoutManager
      • getOffsettingParent

        public static javax.swing.JComponent getOffsettingParent​(javax.swing.JComponent source)
        Find the closest VisionContainer parent of the source component that is an offsetting parent