Class LayoutProp

    • Constructor Detail

      • LayoutProp

        public LayoutProp()
        Creates a LayoutProp container without name and with a null value.
      • LayoutProp

        public LayoutProp​(Atom propertyAtom)
        Creates a LayoutProp container with the specified name with a null value.
        Parameters:
        propertyAtom - the property atom.
      • LayoutProp

        public LayoutProp​(Atom propertyAtom,
                          GProp<?>[] properties)
                   throws PropException
        Creates a LayoutProp container with the specified name and properties.
        Parameters:
        propertyAtom - the property atom.
        properties - the property array value for the property.
        Throws:
        PropException - as structural changes in containers on client is prohibited.
    • Method Detail

      • canSetPosition

        public boolean canSetPosition()
        Verifies if the component position can be set.
        Returns:
        true if the X/Y positions can be set.
      • setPosition

        public boolean setPosition​(GUnit x,
                                   GUnit y,
                                   IComplexOperation op)
        Assigns the composite X and/or Y position.
        Parameters:
        x - The X position to set, null for no change.
        y - The Y position to set, null for no change.
        op - The complex operation interface for undo/redo operations, null for none.
        Returns:
        true for success, false for failure (i.e. unsupported operation).
      • getLayoutWidth

        public final GUnit getLayoutWidth()
        Returns the layout width.
        Returns:
        The width in units, null if not defined or not supported.
      • getLayoutHeight

        public final GUnit getLayoutHeight()
        Returns the layout height.
        Returns:
        The height in units, null if not defined or not supported.
      • canSetWidth

        public boolean canSetWidth()
        Verifies if the component width can be set.
        Returns:
        true if the width can be set.
      • canSetHeight

        public boolean canSetHeight()
        Verifies if the component height can be set.
        Returns:
        true if the height can be set.
      • setSize

        public boolean setSize​(GUnit width,
                               GUnit height,
                               IComplexOperation op)
        Assigns the component width and/or height.
        Parameters:
        width - The width to set, null for no change.
        height - The height to set, null for no change.
        op - The complex operation interface for undo/redo operations, null for none.
        Returns:
        true for success, false for failure (i.e. unsupported operation). true is also returned for partial success, i.e. component can set width but not height and both values were to be set.
      • isWidthIndirectlyDefined

        public boolean isWidthIndirectlyDefined()
        Returns if the width is indirectly defined due to settings of this layout.

        This is used e.g. for grid layout data that has Grab remaining horizontal option.

        Returns:
        true if the layout for the component indirectly causes the width to be set, false otherwise.
      • isHeightIndirectlyDefined

        public boolean isHeightIndirectlyDefined()
        Returns if the height is indirectly defined due to settings of this layout.

        This is used e.g. for grid layout data that has Grab remaining vertical option.

        Returns:
        true if the layout for the component indirectly causes the height to be set, false otherwise.