Class LayoutProp

All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, Cloneable
Direct Known Subclasses:
AbsoluteData, AccordionData, BorderData, CalendarData, ContextMenuData, FlexData, GridData, HeadingData, ListData, MapData, MenuBarData, MenuData, MListData, PanelData, SwapData, TabBarData, TabData, UITableData

public class LayoutProp extends PropCnr
The LayoutProp is the generic property for layout managers using properties to layout it's components. Each layout manager stores different data for the components depending on their type.
Author:
Christopher Mindus
  • Constructor Details Link icon

    • LayoutProp Link icon

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

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

      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 Details Link icon

    • canSetPosition Link icon

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

      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 Link icon

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

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

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

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

      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 Link icon

      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 Link icon

      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.