Class ButtonImages

java.lang.Object
com.realtime.crossfire.jxclient.gui.button.ButtonImages

public class ButtonImages extends Object
A set of images to form a button image. The button image consists of a left, a middle, and a right part. Left and right parts have fixed size, the middle part is clipped or repeated to the button's width.
  • Constructor Details

    • ButtonImages

      public ButtonImages(@NotNull @NotNull Image imageLeft, @NotNull @NotNull Image imageMiddle, @NotNull @NotNull Image imageRight)
      Creates a new instance.
      Parameters:
      imageLeft - the left image
      imageMiddle - the middle image
      imageRight - the right image
  • Method Details

    • getHeight

      public int getHeight()
      Returns the button's height.
      Returns:
      the height
    • render

      public void render(@NotNull @NotNull Graphics g, int w)
      Draws the button.
      Parameters:
      g - the graphics to paint into
      w - the button width