Class AbsoluteData

All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, ILayoutAssumeHeight, ILayoutAssumeWidth, ILayoutDataAlignX, ILayoutDataAlignY, ILayoutUnitHeight, ILayoutUnitWidth, Cloneable
Direct Known Subclasses:
EAbsoluteData

The AbsoluteData is the layout data for components in a container with AbsoluteLayout.
Author:
Christopher Mindus
  • Field Details

    • MOVE_SIZE_X

      public static final String MOVE_SIZE_X
      Attribute of property to move-size. Move = 1, Size = 2, nothing = 0 or undefined.
      See Also:
    • MOVE_SIZE_Y

      public static final String MOVE_SIZE_Y
      Attribute of property to move-size. Move = 1, Size = 2, nothing = 0 or undefined.
      See Also:
  • Constructor Details

    • AbsoluteData

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

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

      public AbsoluteData(Atom propertyAtom, GProp<?>[] properties) throws PropException
      Creates a AbsoluteData 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

    • getMoveSizeX

      public int getMoveSizeX()
      Gets the move-size setting in X.
      Returns:
      0 = nothing, 1 = move, 2 = size.
    • getMoveSizeY

      public int getMoveSizeY()
      Gets the move-size setting in Y.
      Returns:
      0 = nothing, 1 = move, 2 = size.
    • setMoveSize

      public boolean setMoveSize(boolean isX, int v, IComplexOperation op)
      Sets the horizontal (X) or vertical (Y) move or size attributed to the component.
      Parameters:
      isX - If it's X or Y, i.e. horizontally or vertically.
      v - The new move/size attribute: 0 for nothing, 1 for move, 2 for size. If the value is not 0 to 2, nothing will be performed.
      op - The complex operation interface for undo/redo operations, null for none.
      Returns:
      true for success, false for nothing done.
    • canSetPosition

      public boolean canSetPosition()
      Verifies if the component position can be set.
      Overrides:
      canSetPosition in class LayoutProp
      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.
      Overrides:
      setPosition in class LayoutProp
      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).
    • canSetWidth

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

      public boolean canSetHeight()
      Verifies if the component height can be set.
      Overrides:
      canSetHeight in class LayoutProp
      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.
      Overrides:
      setSize in class LayoutProp
      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.