Class TextField

All Implemented Interfaces:
Comparable<GUIComponent>

public class TextField extends SizedComponent
  • Field Details

    • placeholder

      public String placeholder
    • name

      public String name
  • Constructor Details

    • TextField

      public TextField(String name, int x, int y, int width, int height, String placeholder)
  • 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
    • 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