Class Label

All Implemented Interfaces:
Comparable<GUIComponent>

public class Label extends GUIComponent
  • Field Details

    • name

      public String name
    • text

      public StringProcedure text
    • color

      public Color color
    • hasShadow

      public boolean hasShadow
    • 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 final int getWidth(Workspace workspace)
      Specified by:
      getWidth in class GUIComponent
    • getHeight

      public final int getHeight(Workspace workspace)
      Specified by:
      getHeight in class GUIComponent
    • 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)
    • isSizeKnown

      public boolean isSizeKnown()
      Overrides:
      isSizeKnown in class GUIComponent
    • getRenderText

      public String getRenderText()
    • paintComponent

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