Class GUIItemSpellSkill

All Implemented Interfaces:
GUIElement, GUIScrollable, ImageObserver, MenuContainer, Serializable

public class GUIItemSpellSkill extends GUIItemItem
See Also:
  • Constructor Details

    • GUIItemSpellSkill

      public GUIItemSpellSkill(@NotNull @NotNull TooltipManager tooltipManager, @NotNull @NotNull GUIElementListener elementListener, @NotNull @NotNull String name, @NotNull @NotNull ItemPainter itemPainter, int defaultIndex, @NotNull @NotNull FacesManager facesManager, @NotNull @NotNull SpellsManager spellsManager, @NotNull @NotNull ItemView itemView, @NotNull @NotNull FaceImages defaultSkillIcon, int size, @NotNull @NotNull GuiFactory guiFactory)
      Creates a new instance.
      Parameters:
      tooltipManager - the tooltip manager to update
      elementListener - the element listener to notify
      name - the name of this element
      itemPainter - the item painter for painting the icon
      defaultIndex - the default scroll index
      facesManager - the faces manager for looking up faces
      spellsManager - the spells manager instance to watch
      itemView - the spells view to use
      defaultSkillIcon - the default icon to use the skills if not defined
      size - the size of the component or 0 for undefined
      guiFactory - the global GUI factory instance
  • Method Details

    • dispose

      public void dispose()
      Description copied from interface: GUIElement
      Releases all allocated resources.
      Specified by:
      dispose in interface GUIElement
      Overrides:
      dispose in class GUIItemItem
    • notifyOpen

      public void notifyOpen()
      Description copied from interface: GUIElement
      Called each time the enclosing dialog is opened (or raised).
    • canScroll

      public boolean canScroll(int distance)
      Description copied from interface: GUIScrollable
      Returns whether scrolling is possible.
      Parameters:
      distance - the distance to scroll
      Returns:
      whether scrolling is possible
    • scroll

      public void scroll(int distance)
      Description copied from interface: GUIScrollable
      Scrolls the element.
      Parameters:
      distance - the distance to scroll
    • resetScroll

      public void resetScroll()
      Description copied from interface: GUIScrollable
      Resets the scroll index to the default value.
    • getPreferredSize

      @NotNull public @NotNull Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class GUIItemItem
    • getMinimumSize

      @NotNull public @NotNull Dimension getMinimumSize()
      Overrides:
      getMinimumSize in class GUIItemItem
    • getFace

      @NotNull protected @NotNull Image getFace(@NotNull @NotNull CfItem item)
      Description copied from class: GUIItemItem
      Returns the face for a CfItem instance.
      Specified by:
      getFace in class GUIItemItem
      Parameters:
      item - the item instance
      Returns:
      the face
    • setSelected

      public void setSelected(boolean selected)
      Description copied from class: GUIItemItem
      Sets the selected state.
      Specified by:
      setSelected in class GUIItemItem
      Parameters:
      selected - whether this element should be drawn as "selected"
    • isSelected

      protected boolean isSelected()
      Description copied from class: GUIItemItem
      Returns whether this element should be drawn as "selected".
      Specified by:
      isSelected in class GUIItemItem
      Returns:
      whether this element is selected
    • getIndex

      public int getIndex()
      Description copied from class: GUIItemItem
      Returns the slot index.
      Specified by:
      getIndex in class GUIItemItem
      Returns:
      the slot index
    • setIndexNoListeners

      public void setIndexNoListeners(int index)
      Description copied from class: GUIItemItem
      Sets the slot index to display without registering listeners for updates.
      Specified by:
      setIndexNoListeners in class GUIItemItem
      Parameters:
      index - the slot index
    • button1Clicked

      public void button1Clicked(int modifiers)
      Description copied from class: GUIItem
      Called when the left mouse button was pressed.
      Specified by:
      button1Clicked in class GUIItem
      Parameters:
      modifiers - the input event modifiers
    • button2Clicked

      public void button2Clicked(int modifiers)
      Description copied from class: GUIItem
      Called when the middle mouse button was pressed.
      Specified by:
      button2Clicked in class GUIItem
      Parameters:
      modifiers - the input event modifiers
    • button3Clicked

      public void button3Clicked(int modifiers)
      Description copied from class: GUIItem
      Called when the right mouse button was pressed.
      Specified by:
      button3Clicked in class GUIItem
      Parameters:
      modifiers - the input event modifiers