java.lang.Object
com.realtime.crossfire.jxclient.gui.gui.Extent

public class Extent extends Object
Encapsulates the extent of a GUI element. It consists of a location and a size.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Extent(@NotNull Expression x, @NotNull Expression y, @NotNull Expression w, @NotNull Expression h)
    Creates a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getH(int width, int height, int prefWidth, int prefHeight)
    Returns the height.
    int
    getW(int width, int height, int prefWidth, int prefHeight)
    Returns the width.
    int
    getX(int width, int height, int prefWidth, int prefHeight)
    Returns the x coordinate.
    int
    getY(int width, int height, int prefWidth, int prefHeight)
    Returns the y coordinate.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Extent

      public Extent(@NotNull @NotNull Expression x, @NotNull @NotNull Expression y, @NotNull @NotNull Expression w, @NotNull @NotNull Expression h)
      Creates a new instance.
      Parameters:
      x - the x coordinate
      y - the y coordinate
      w - the width
      h - thr height
  • Method Details

    • getX

      public int getX(int width, int height, int prefWidth, int prefHeight)
      Returns the x coordinate.
      Parameters:
      width - the screen width
      height - the screen height
      prefWidth - the preferred dialog width
      prefHeight - the preferred dialog height
      Returns:
      the x coordinate
    • getY

      public int getY(int width, int height, int prefWidth, int prefHeight)
      Returns the y coordinate.
      Parameters:
      width - the screen width
      height - the screen height
      prefWidth - the preferred dialog width
      prefHeight - the preferred dialog height
      Returns:
      the y coordinate
    • getW

      public int getW(int width, int height, int prefWidth, int prefHeight)
      Returns the width.
      Parameters:
      width - the screen width
      height - the screen height
      prefWidth - the preferred dialog width
      prefHeight - the preferred dialog height
      Returns:
      the width
    • getH

      public int getH(int width, int height, int prefWidth, int prefHeight)
      Returns the height.
      Parameters:
      width - the screen width
      height - the screen height
      prefWidth - the preferred dialog width
      prefHeight - the preferred dialog height
      Returns:
      the height