Class FPMILayout
- java.lang.Object
- 
- com.inductiveautomation.factorypmi.application.components.util.FPMILayout
 
- 
- All Implemented Interfaces:
- java.awt.LayoutManager
 
 public class FPMILayout extends java.lang.Object implements java.awt.LayoutManager
- 
- 
Field SummaryFields Modifier and Type Field Description static intANCHOR_Estatic intANCHOR_Nstatic intANCHOR_Sstatic intANCHOR_Wstatic intAR_LEADINGstatic intAR_OFFstatic intAR_TRAILINGstatic java.lang.StringBOUNDS_2Dstatic intCENTER_Xstatic intCENTER_Ystatic intDEFAULT_FLAGSstatic java.lang.StringLAYOUT_CONSTRAINTSstatic java.lang.StringLAYOUT_FLAGSstatic java.lang.StringNO_SCALE_FONTSstatic java.lang.StringPREF_SIZE_2Dstatic intSCALE_RELATIVE
 - 
Constructor SummaryConstructors Constructor Description FPMILayout()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.awt.geom.Point2D_getPrefSize(javax.swing.JComponent comp)voidaddLayoutComponent(java.lang.String name, java.awt.Component comp)static java.awt.geom.Rectangle2DgetBounds(javax.swing.JComponent comp)Provides a consistent way to get the bounds of a component.static java.awt.geom.Rectangle2DgetBounds(javax.swing.JComponent comp, java.awt.geom.Rectangle2D rv)static FPMI_LCgetLayoutConstraints(javax.swing.JComponent comp)Looks for the layout constraints (FPMI_LC object) on the component using client property key "fpmi.lc".static javax.swing.JComponentgetOffsettingParent(javax.swing.JComponent source)Find the closest VisionContainer parent of the source component that is an offsetting parentstatic java.awt.geom.Rectangle2DgetPreferredBounds(javax.swing.JComponent comp)Provides a consistent way to get the preferred bounds of a component.voidlayoutContainer(java.awt.Container parent)java.awt.DimensionminimumLayoutSize(java.awt.Container parent)java.awt.DimensionpreferredLayoutSize(java.awt.Container parent)voidremoveLayoutComponent(java.awt.Component comp)static voidsetBounds(javax.swing.JComponent comp, java.awt.geom.Rectangle2D bounds)Sets the actual bounds of a component.static voidsetPreferredBounds(javax.swing.JComponent comp, java.awt.geom.Rectangle2D bounds)Set the preferred bounding box of a component.static voidsetRelativeEnabled(boolean b)Deprecated.
 
- 
- 
- 
Field Detail- 
LAYOUT_FLAGSpublic static final java.lang.String LAYOUT_FLAGS - See Also:
- Constant Field Values
 
 - 
NO_SCALE_FONTSpublic static final java.lang.String NO_SCALE_FONTS - See Also:
- Constant Field Values
 
 - 
PREF_SIZE_2Dpublic static final java.lang.String PREF_SIZE_2D - See Also:
- Constant Field Values
 
 - 
BOUNDS_2Dpublic static final java.lang.String BOUNDS_2D - See Also:
- Constant Field Values
 
 - 
LAYOUT_CONSTRAINTSpublic static final java.lang.String LAYOUT_CONSTRAINTS - See Also:
- Constant Field Values
 
 - 
ANCHOR_Npublic static final int ANCHOR_N - See Also:
- Constant Field Values
 
 - 
ANCHOR_Spublic static final int ANCHOR_S - See Also:
- Constant Field Values
 
 - 
ANCHOR_Epublic static final int ANCHOR_E - See Also:
- Constant Field Values
 
 - 
ANCHOR_Wpublic static final int ANCHOR_W - See Also:
- Constant Field Values
 
 - 
SCALE_RELATIVEpublic static final int SCALE_RELATIVE - See Also:
- Constant Field Values
 
 - 
CENTER_Xpublic static final int CENTER_X - See Also:
- Constant Field Values
 
 - 
CENTER_Ypublic static final int CENTER_Y - See Also:
- Constant Field Values
 
 - 
AR_LEADINGpublic static final int AR_LEADING - See Also:
- Constant Field Values
 
 - 
AR_TRAILINGpublic static final int AR_TRAILING - See Also:
- Constant Field Values
 
 - 
AR_OFFpublic static final int AR_OFF - See Also:
- Constant Field Values
 
 - 
DEFAULT_FLAGSpublic static final int DEFAULT_FLAGS - See Also:
- Constant Field Values
 
 
- 
 - 
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.
 - 
getLayoutConstraintspublic 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.
 - 
addLayoutComponentpublic void addLayoutComponent(java.lang.String name, java.awt.Component comp)- Specified by:
- addLayoutComponentin interface- java.awt.LayoutManager
 
 - 
removeLayoutComponentpublic void removeLayoutComponent(java.awt.Component comp) - Specified by:
- removeLayoutComponentin interface- java.awt.LayoutManager
 
 - 
preferredLayoutSizepublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent) - Specified by:
- preferredLayoutSizein interface- java.awt.LayoutManager
 
 - 
minimumLayoutSizepublic java.awt.Dimension minimumLayoutSize(java.awt.Container parent) - Specified by:
- minimumLayoutSizein interface- java.awt.LayoutManager
 
 - 
getPreferredBoundspublic 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.
 
 - 
_getPrefSizepublic static java.awt.geom.Point2D _getPrefSize(javax.swing.JComponent comp) 
 - 
setPreferredBoundspublic 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: normalJComponentvsBounds2DComponent
 - 
getBoundspublic 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 -Bounds2DComponentand normalJComponent.
 - 
getBoundspublic static java.awt.geom.Rectangle2D getBounds(javax.swing.JComponent comp, java.awt.geom.Rectangle2D rv)
 - 
setBoundspublic 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: normalJComponentvsBounds2DComponent
 - 
layoutContainerpublic void layoutContainer(java.awt.Container parent) - Specified by:
- layoutContainerin interface- java.awt.LayoutManager
 
 - 
getOffsettingParentpublic static javax.swing.JComponent getOffsettingParent(javax.swing.JComponent source) Find the closest VisionContainer parent of the source component that is an offsetting parent
 
- 
 
-