Class ResizeLeaf<T>

java.lang.Object
bibliothek.gui.dock.facile.station.split.ResizeElement<T>
bibliothek.gui.dock.facile.station.split.ResizeLeaf<T>

public class ResizeLeaf<T> extends ResizeElement<T>
Represents a Leaf.
Author:
Benjamin Sigg
  • Constructor Details

    • ResizeLeaf

      public ResizeLeaf(LockedResizeLayoutManager<T> layout, ResizeElement<T> parent, Leaf leaf)
      Creates a new leaf element.
      Parameters:
      layout - the layout manager that uses this leafs
      parent - the parent of this node
      leaf - the leaf that is represented by this element
  • Method Details

    • getLeaf

      public Leaf getLeaf()
      Gets the leaf which is represented by this leaf-element.
      Returns:
      the origin
    • createRequest

      protected ResizeRequest createRequest()
      Description copied from class: ResizeElement
      Creates the initial request of changed sizes.
      Specified by:
      createRequest in class ResizeElement<T>
      Returns:
      the initial request or null
    • prepareResize

      public void prepareResize()
      Description copied from class: ResizeElement
      Called before the bounds of a tree are updated, can be used to store some properties that are later needed to create the ResizeRequest.
      Overrides:
      prepareResize in class ResizeElement<T>
    • getChildren

      protected ResizeElement<T>[] getChildren()
      Description copied from class: ResizeElement
      Gets the children of this element.
      Specified by:
      getChildren in class ResizeElement<T>
      Returns:
      the children or null
    • adapt

      public void adapt(double deltaWidth, double deltaHeight)
      Description copied from class: ResizeElement
      Adapts the size of the children of this element given the size change the parent could provide.
      Specified by:
      adapt in class ResizeElement<T>
      Parameters:
      deltaWidth - the change of this elements width
      deltaHeight - the change of this elements height