Class FPMILayout
java.lang.Object
com.inductiveautomation.factorypmi.application.components.util.FPMILayout
- All Implemented Interfaces:
LayoutManager
-
Field Summary
FieldsModifier 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 Summary
Constructors -
Method Summary
Modifier 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_N
public static final int ANCHOR_N- See Also:
-
ANCHOR_S
public static final int ANCHOR_S- See Also:
-
ANCHOR_E
public static final int ANCHOR_E- See Also:
-
ANCHOR_W
public static final int ANCHOR_W- See Also:
-
SCALE_RELATIVE
public static final int SCALE_RELATIVE- See Also:
-
CENTER_X
public static final int CENTER_X- See Also:
-
CENTER_Y
public static final int CENTER_Y- See Also:
-
AR_LEADING
public static final int AR_LEADING- See Also:
-
AR_TRAILING
public static final int AR_TRAILING- See Also:
-
AR_OFF
public static final int AR_OFF- See Also:
-
DEFAULT_FLAGS
public static final int DEFAULT_FLAGS- See Also:
-
-
Constructor Details
-
FPMILayout
public FPMILayout()
-
-
Method Details
-
setRelativeEnabled
Deprecated.No longer used. Relative layout mode is only enabled in the runtime, never in the designer. -
getLayoutConstraints
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
- Specified by:
addLayoutComponentin interfaceLayoutManager
-
removeLayoutComponent
- Specified by:
removeLayoutComponentin interfaceLayoutManager
-
preferredLayoutSize
- Specified by:
preferredLayoutSizein interfaceLayoutManager
-
minimumLayoutSize
- Specified by:
minimumLayoutSizein interfaceLayoutManager
-
getPreferredBounds
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
-
setPreferredBounds
Set the preferred bounding box of a component. This function detects for the two strategies for storing this: normalJComponentvsBounds2DComponent -
getBounds
Provides a consistent way to get the bounds of a component. Detects the two major kinds of components -Bounds2DComponentand normalJComponent. -
getBounds
-
setBounds
Sets the actual bounds of a component. This function detects for the two strategies for storing this: normalJComponentvsBounds2DComponent -
layoutContainer
- Specified by:
layoutContainerin interfaceLayoutManager
-
getOffsettingParent
Find the closest VisionContainer parent of the source component that is an offsetting parent
-