Interface GUIElement

All Known Implementing Classes:
AbstractButton, AbstractButton2, AbstractGUIElement, AbstractGUIMap, AbstractLabel, ActivatableGUIElement, GUIButton, GUICharacter, GUICharacterList, GUICharOptionsComboBox, GUICheckBox, GUIClassesComboBox, GUIComboBox, GUICommandText, GUIDialogBackground, GUIDialogTitle, GUIDupGauge, GUIFill, GUIFloorList, GUIGauge, GUIHTMLLabel, GUIInventoryList, GUIItem, GUIItemFloor, GUIItemInventory, GUIItemItem, GUIItemKnowledge, GUIItemKnowledgeType, GUIItemList, GUIItemQuest, GUIItemShortcut, GUIItemSpell, GUIItemSpellSkill, GUIKnowledgeList, GUIKnowledgeTypeList, GUILabel, GUILabelFailure, GUILabelLog, GUILabelMessage, GUILabelQuery, GUILabelStats, GUILabelStats2, GUIList, GUILog, GUIMap, GUIMapDirections, GUIMessageLog, GUIMetaElement, GUIMetaElementList, GUIMiniMap, GUIMultiLineLabel, GUINewcharLabel, GUIOneLineLabel, GUIPicture, GUIPictureStat, GUIQueryText, GUIQuestList, GUIRacesComboBox, GUIScrollBar, GUISelectableButton, GUISpellList, GUISpellSkillList, GUISpinner, GUIStartingMapsComboBox, GUIText, GUITextButton, GUITextField, GUITextGauge

public interface GUIElement
Interface defining an abstract GUI element.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Releases all allocated resources.
    @NotNull String
    Returns the internal name of this gui element.
    boolean
    Returns whether this element is the default element.
    boolean
    Returns whether this gui element is to be ignored for user interaction.
    void
    Will be called when the user has clicked (pressed+released) this element.
    void
    Will be called when the mouse moves within this component while the button is pressed.
    void
    Will be called when the mouse has entered the bounding box of this element.
    void
    mouseExited(@NotNull MouseEvent e)
    Will be called when the mouse has left the bounding box of this element.
    void
    mouseMoved(@NotNull MouseEvent e)
    Will be called when the mouse moves within this component.
    void
    Will be called when the user has pressed the mouse inside this element.
    void
    Will be called when the user has released the mouse.
    void
    mouseWheelMoved(int wheelRotation)
    Will be called when the mouse wheel has been moved.
    void
    Called each time the enclosing dialog is opened (or raised).
    void
    Records that the contents have changed and must be repainted.
    void
    setChangedListener(@Nullable GUIElementChangedListener changedListener)
    Sets the GUIElementChangedListener to be notified.
    void
    setDefault(boolean isDefault)
    Sets whether this element is the default element.
    void
    Marks this gui element to be ignored for user interaction.
  • Method Details

    • dispose

      void dispose()
      Releases all allocated resources.
    • isDefault

      boolean isDefault()
      Returns whether this element is the default element. The default element is selected with the ENTER key.
      Returns:
      whether this element is the default element
    • setDefault

      void setDefault(boolean isDefault)
      Sets whether this element is the default element. The default element is selected with the ENTER key.
      Parameters:
      isDefault - whether this element is the default element
    • setIgnore

      void setIgnore()
      Marks this gui element to be ignored for user interaction.
    • isIgnore

      boolean isIgnore()
      Returns whether this gui element is to be ignored for user interaction.
      Returns:
      whether this gui element is ignored
    • getName

      @NotNull @NotNull String getName()
      Returns the internal name of this gui element. The name is used in skin files for identifying an element.
      Returns:
      the name
    • mouseClicked

      void mouseClicked(@NotNull @NotNull MouseEvent e)
      Will be called when the user has clicked (pressed+released) this element. This event will be delivered after mouseReleased(MouseEvent).
      Parameters:
      e - the mouse event relative to this element
    • mouseEntered

      void mouseEntered(@NotNull @NotNull MouseEvent e)
      Will be called when the mouse has entered the bounding box of this element.
      Parameters:
      e - the mouse event relative to this element
    • mouseExited

      void mouseExited(@NotNull @NotNull MouseEvent e)
      Will be called when the mouse has left the bounding box of this element. This function will not be called unless mouseEntered(MouseEvent) has been called before.
      Parameters:
      e - the mouse event relative to this element
    • mousePressed

      void mousePressed(@NotNull @NotNull MouseEvent e)
      Will be called when the user has pressed the mouse inside this element.
      Parameters:
      e - the mouse event relative to this element
    • mouseReleased

      void mouseReleased(@NotNull @NotNull MouseEvent e)
      Will be called when the user has released the mouse. This event may be delivered even if no previous mousePressed(MouseEvent) has been delivered before.
      Parameters:
      e - the mouse event relative to this element
    • mouseMoved

      void mouseMoved(@NotNull @NotNull MouseEvent e)
      Will be called when the mouse moves within this component. before.
      Parameters:
      e - the mouse event relative to this element
    • mouseDragged

      void mouseDragged(@NotNull @NotNull MouseEvent e)
      Will be called when the mouse moves within this component while the button is pressed. This event will be delivered after mouseMoved(MouseEvent).

      Note: if the mouse leaves this element's bounding box while the mouse button is still pressed, further mouseDragged (but no mouseMoved) events will be generated.

      Parameters:
      e - the mouse event relative to this element
    • mouseWheelMoved

      void mouseWheelMoved(int wheelRotation)
      Will be called when the mouse wheel has been moved.
      Parameters:
      wheelRotation - the movement amount; negative=away from the user, positive=towards the user
    • setChanged

      void setChanged()
      Records that the contents have changed and must be repainted.
    • setChangedListener

      void setChangedListener(@Nullable @Nullable GUIElementChangedListener changedListener)
      Sets the GUIElementChangedListener to be notified. Note that at most one such listener may be set per gui element.
      Parameters:
      changedListener - the listener or null to unset
    • notifyOpen

      void notifyOpen()
      Called each time the enclosing dialog is opened (or raised).