Class AbstractTextAreaWidget

All Implemented Interfaces:
GuiEventListener, Renderable, TabOrderedElement, LayoutElement, NarratableEntry, NarrationSupplier
Direct Known Subclasses:
FittingMultiLineTextWidget, MultiLineEditBox, TelemetryEventWidget

public abstract class AbstractTextAreaWidget extends AbstractScrollArea
  • Field Details

    • BACKGROUND_SPRITES

      private static final WidgetSprites BACKGROUND_SPRITES
    • INNER_PADDING

      private static final int INNER_PADDING
      See Also:
    • DEFAULT_TOTAL_PADDING

      public static final int DEFAULT_TOTAL_PADDING
      See Also:
    • showBackground

      private boolean showBackground
    • showDecorations

      private boolean showDecorations
  • Constructor Details

  • Method Details

    • mouseClicked

      public boolean mouseClicked(MouseButtonEvent event, boolean doubleClick)
      Specified by:
      mouseClicked in interface GuiEventListener
      Overrides:
      mouseClicked in class AbstractWidget
    • keyPressed

      public boolean keyPressed(KeyEvent event)
    • renderWidget

      public void renderWidget(GuiGraphics graphics, int mouseX, int mouseY, float a)
      Specified by:
      renderWidget in class AbstractWidget
    • renderDecorations

      protected void renderDecorations(GuiGraphics graphics)
    • innerPadding

      protected int innerPadding()
    • totalInnerPadding

      protected int totalInnerPadding()
    • isMouseOver

      public boolean isMouseOver(double mouseX, double mouseY)
      Description copied from interface: GuiEventListener
      Checks if the given mouse coordinates are over the GUI element.

      Specified by:
      isMouseOver in interface GuiEventListener
      Overrides:
      isMouseOver in class AbstractWidget
      Parameters:
      mouseX - the X coordinate of the mouse.
      mouseY - the Y coordinate of the mouse.
      Returns:
      true if the mouse is over the GUI element, false otherwise.
    • scrollBarX

      protected int scrollBarX()
      Overrides:
      scrollBarX in class AbstractScrollArea
    • contentHeight

      protected int contentHeight()
      Specified by:
      contentHeight in class AbstractScrollArea
    • renderBackground

      protected void renderBackground(GuiGraphics graphics)
    • renderBorder

      protected void renderBorder(GuiGraphics graphics, int x, int y, int width, int height)
    • withinContentAreaTopBottom

      protected boolean withinContentAreaTopBottom(int top, int bottom)
    • getInnerHeight

      protected abstract int getInnerHeight()
    • renderContents

      protected abstract void renderContents(GuiGraphics graphics, int mouseX, int mouseY, float a)
    • getInnerLeft

      protected int getInnerLeft()
    • getInnerTop

      protected int getInnerTop()
    • playDownSound

      public void playDownSound(SoundManager soundManager)
      Overrides:
      playDownSound in class AbstractWidget