Class FPMILayout
java.lang.Object
com.inductiveautomation.factorypmi.application.components.util.FPMILayout
- All Implemented Interfaces:
- LayoutManager
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final Stringstatic final intstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic Point2D_getPrefSize(JComponent comp) voidaddLayoutComponent(String name, Component comp) static Rectangle2DgetBounds(JComponent comp) Provides a consistent way to get the bounds of a component.static Rectangle2DgetBounds(JComponent comp, Rectangle2D rv) static FPMI_LCLooks for the layout constraints (FPMI_LC object) on the component using client property key "fpmi.lc".static JComponentgetOffsettingParent(JComponent source) Find the closest VisionContainer parent of the source component that is an offsetting parentstatic Rectangle2DgetPreferredBounds(JComponent comp) Provides a consistent way to get the preferred bounds of a component.voidlayoutContainer(Container parent) minimumLayoutSize(Container parent) preferredLayoutSize(Container parent) voidstatic voidsetBounds(JComponent comp, Rectangle2D bounds) Sets the actual bounds of a component.static voidsetPreferredBounds(JComponent comp, Rectangle2D bounds) Set the preferred bounding box of a component.static voidsetRelativeEnabled(boolean b) Deprecated.
- 
Field Details- 
LAYOUT_FLAGS- See Also:
 
- 
NO_SCALE_FONTS- See Also:
 
- 
PREF_SIZE_2D- See Also:
 
- 
BOUNDS_2D- See Also:
 
- 
LAYOUT_CONSTRAINTS- See Also:
 
- 
ANCHOR_Npublic static final int ANCHOR_N- See Also:
 
- 
ANCHOR_Spublic static final int ANCHOR_S- See Also:
 
- 
ANCHOR_Epublic static final int ANCHOR_E- See Also:
 
- 
ANCHOR_Wpublic static final int ANCHOR_W- See Also:
 
- 
SCALE_RELATIVEpublic static final int SCALE_RELATIVE- See Also:
 
- 
CENTER_Xpublic static final int CENTER_X- See Also:
 
- 
CENTER_Ypublic static final int CENTER_Y- See Also:
 
- 
AR_LEADINGpublic static final int AR_LEADING- See Also:
 
- 
AR_TRAILINGpublic static final int AR_TRAILING- See Also:
 
- 
AR_OFFpublic static final int AR_OFF- See Also:
 
- 
DEFAULT_FLAGSpublic static final int DEFAULT_FLAGS- See Also:
 
 
- 
- 
Constructor Details- 
FPMILayoutpublic FPMILayout()
 
- 
- 
Method Details- 
setRelativeEnabledDeprecated.No longer used. Relative layout mode is only enabled in the runtime, never in the designer.
- 
getLayoutConstraintsLooks 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- Specified by:
- addLayoutComponentin interface- LayoutManager
 
- 
removeLayoutComponent- Specified by:
- removeLayoutComponentin interface- LayoutManager
 
- 
preferredLayoutSize- Specified by:
- preferredLayoutSizein interface- LayoutManager
 
- 
minimumLayoutSize- Specified by:
- minimumLayoutSizein interface- LayoutManager
 
- 
getPreferredBoundsProvides 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
- 
setPreferredBoundsSet the preferred bounding box of a component. This function detects for the two strategies for storing this: normalJComponentvsBounds2DComponent
- 
getBoundsProvides a consistent way to get the bounds of a component. Detects the two major kinds of components -Bounds2DComponentand normalJComponent.
- 
getBounds
- 
setBoundsSets the actual bounds of a component. This function detects for the two strategies for storing this: normalJComponentvsBounds2DComponent
- 
layoutContainer- Specified by:
- layoutContainerin interface- LayoutManager
 
- 
getOffsettingParentFind the closest VisionContainer parent of the source component that is an offsetting parent
 
-