java.lang.Object
com.ultikits.ultitools.abstracts.gui.declarative.widgets.IconWrapper

public class IconWrapper extends Object
IconWrapper is a simple wrapper around Icon, used to pass it through the Widget tree.

It is immutable and can be safely shared across multiple Widgets.

Since:
6.2.0
Version:
1.0.0
Author:
UltiTools Team
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Builder for IconWrapper.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final @NotNull mc.obliviate.inventory.Icon
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    IconWrapper(@NotNull mc.obliviate.inventory.Icon icon)
     
    IconWrapper(@NotNull org.bukkit.inventory.ItemStack itemStack)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull IconWrapper.Builder
    builder(@NotNull org.bukkit.inventory.ItemStack itemStack)
    Creates a builder for IconWrapper.
    @NotNull mc.obliviate.inventory.Icon
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • icon

      @NotNull private final @NotNull mc.obliviate.inventory.Icon icon
  • Constructor Details

    • IconWrapper

      public IconWrapper(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
    • IconWrapper

      public IconWrapper(@NotNull @NotNull mc.obliviate.inventory.Icon icon)
  • Method Details

    • getIcon

      @NotNull public @NotNull mc.obliviate.inventory.Icon getIcon()
    • builder

      @NotNull public static @NotNull IconWrapper.Builder builder(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
      Creates a builder for IconWrapper.
      Parameters:
      itemStack - the item stack
      Returns:
      the Builder