Overview
Package
Class
Use
Tree
Deprecated
Index
All Classes
Help
Prev Class
Next Class
Java Native Rendering
Class org.violetlib.jnr.CenteredInsetter1
Inherited members: ShowHide
Deprecated: ShowHide
org.violetlib.jnr

Class CenteredInsetter1

  • Object
    • NonInvertibleInsetterBase
      • CenteredInsetter1
  • All Implemented Interfaces:
    Insetter1
    public class CenteredInsetter1 extends NonInvertibleInsetterBase implements Insetter1
    A floating insetter defines a region of fixed size that is centered in the component, with an optional offset.
    • Static Methods 
      Modifier and Type Static Method and Description
      Ordinary member indicator createCentered Reveal DetailHide Detail
      static CenteredInsetter1 createCentered(float regionSize)
      Create a single dimension insets for a fixed size region that is centered in the component.
      @NotNull public static CenteredInsetter1 createCentered(float regionSize)
      Create a single dimension insets for a fixed size region that is centered in the component.
      Parameters:
      regionSize - The fixed region size.
      Throws:
      IllegalArgumentException - if regionSize is negative.
      Ordinary member indicator createCentered Reveal DetailHide Detail
      static CenteredInsetter1 createCentered(float regionSize, float offset)
      Create a single dimension insets for a fixed size region that is centered in the component.
      @NotNull public static CenteredInsetter1 createCentered(float regionSize, float offset)
      Create a single dimension insets for a fixed size region that is centered in the component.
      Parameters:
      regionSize - The fixed region size.
      offset - An optional offset that is applied after centering.
      Throws:
      IllegalArgumentException - if regionSize is negative.
      Ordinary member indicator createCentered Reveal DetailHide Detail
      static CenteredInsetter1 createCentered(float regionSize, float alignmentRegionSize, float offset)
      Create a single dimension insets for a fixed size region that is centered in the component.
      @NotNull public static CenteredInsetter1 createCentered(float regionSize, float alignmentRegionSize, float offset)
      Create a single dimension insets for a fixed size region that is centered in the component.
      Parameters:
      regionSize - The fixed region size.
      alignmentRegionSize - A virtual region size that is used to calculate the centered position.
      offset - An optional offset that is applied after centering.
      Throws:
      IllegalArgumentException - if regionSize is negative.
    • Methods 
      Modifier and Type Method and Description
      Inherited member indicator getComponentSize Reveal DetailHide Detail
      float getComponentSize(float regionSize)
      Map the region size to the size of the component.
      public float getComponentSize(float regionSize) throws InsetterNotInvertibleException
      Description copied from interface: Insetter1
      Map the region size to the size of the component. This operation is valid only if the insetter is invertible.
      Specified by:
      getComponentSize in interface Insetter1
      Parameters:
      regionSize - The region size along the relevant axis.
      Returns:
      the component size along the axis.
      Throws:
      InsetterNotInvertibleException - if this insetter is not invertible.
      Inherited member indicator getFixedInset1 Reveal DetailHide Detail
      float getFixedInset1()
      Return the left or top inset, if it is fixed.
      public float getFixedInset1()
      Description copied from interface: Insetter1
      Return the left or top inset, if it is fixed.
      Specified by:
      getFixedInset1 in interface Insetter1
      Returns:
      the inset, or -1 if not fixed.
      Inherited member indicator getFixedInset2 Reveal DetailHide Detail
      float getFixedInset2()
      Return the right or bottom inset, if it is fixed.
      public float getFixedInset2()
      Description copied from interface: Insetter1
      Return the right or bottom inset, if it is fixed.
      Specified by:
      getFixedInset2 in interface Insetter1
      Returns:
      the inset, or -1 if not fixed.
      Ordinary member indicator getRegionOrigin Reveal DetailHide Detail
      float getRegionOrigin(float componentSize)
      Map the component size to the origin of the region, relative to the left or top edge of the component.
      public float getRegionOrigin(float componentSize)
      Description copied from interface: Insetter1
      Map the component size to the origin of the region, relative to the left or top edge of the component.
      Specified by:
      getRegionOrigin in interface Insetter1
      Parameters:
      componentSize - The component size along the relevant axis.
      Returns:
      The origin of the region along the axis relative to the component.
      Ordinary member indicator getRegionSize Reveal DetailHide Detail
      float getRegionSize(float componentSize)
      Map the component size to the size of the region.
      public float getRegionSize(float componentSize)
      Description copied from interface: Insetter1
      Map the component size to the size of the region.
      Specified by:
      getRegionSize in interface Insetter1
      Parameters:
      componentSize - The component size along the relevant axis.
      Returns:
      the region size along the relevant axis.
      Inherited member indicator isInvertible Reveal DetailHide Detail
      boolean isInvertible()
      Indicate whether this insetter is invertible.
      public boolean isInvertible()
      Description copied from interface: Insetter1
      Indicate whether this insetter is invertible. An invertible insetter can map a region size to the component size.
      Specified by:
      isInvertible in interface Insetter1
      • Methods inherited from class Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait