Class Image

All Implemented Interfaces:
Comparable<GUIComponent>

public class Image extends GUIComponent
  • Field Details

    • image

      public String image
    • use1Xscale

      public boolean use1Xscale
    • displayCondition

      public Procedure displayCondition
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Description copied from class: GUIComponent
      Returns the name of the component. Name should be Java and registry name compatible.

      The name should be unique for the components that need it.

      Specified by:
      getName in class GUIComponent
      Returns:
      Component name
    • getWidth

      public int getWidth(Workspace workspace)
      Specified by:
      getWidth in class GUIComponent
    • getHeight

      public int getHeight(Workspace workspace)
      Specified by:
      getHeight in class GUIComponent
    • getImage

      public Image getImage(Workspace workspace)
    • getWeight

      public int getWeight()
      Description copied from class: GUIComponent
      Returns the priority for when this component should be drawn in the UI, to represent how Minecraft draws components in the game.
      Specified by:
      getWeight in class GUIComponent
      Returns:
      The priority of the component (lower means it will be rendered closer to the screen and higher means it will "sink" more behind other components)
    • paintComponent

      public void paintComponent(int cx, int cy, WYSIWYGEditor wysiwygEditor, Graphics2D g)
      Specified by:
      paintComponent in class GUIComponent