Class BreadcrumbItem<T>

  • Type Parameters:
    T - Type of associated data.


    public final class BreadcrumbItem<T>
    extends java.lang.Object
    A single item in the JBreadcrumbBar model.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected T data
      Data value for this item.
      protected java.lang.String key
      Display key for this item.
    • Constructor Summary

      Constructors 
      Constructor Description
      BreadcrumbItem​(java.lang.String s)
      Creates a new item.
      BreadcrumbItem​(java.lang.String key, T data)
      Creates a new item.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getData​()  
      javax.swing.Icon getIcon​()
      Returns the icon of this item.
      int getIndex​()
      Returns the index of this item.
      java.lang.String getKey​()  
      void setIcon​(javax.swing.Icon icon)
      Sets the new icon on this item.
      void setIndex​(int index)
      Sets the index of this item.
      void setKey​(java.lang.String key)  
      java.lang.String toString​()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • key

        protected java.lang.String key
        Display key for this item.
      • data

        protected T data
        Data value for this item.
    • Constructor Detail

      • BreadcrumbItem

        public BreadcrumbItem​(java.lang.String key,
                              T data)
        Creates a new item.
        Parameters:
        key - Item key.
        data - Item data.
      • BreadcrumbItem

        public BreadcrumbItem​(java.lang.String s)
        Creates a new item.
        Parameters:
        s - String that will be used for display purposes.
    • Method Detail

      • getKey

        public java.lang.String getKey​()
      • getData

        public T getData​()
      • setKey

        public void setKey​(java.lang.String key)
      • getIndex

        public int getIndex​()
        Returns the index of this item.
        Returns:
        The index of this item.
      • setIndex

        public void setIndex​(int index)
        Sets the index of this item.
        Parameters:
        index - The new index of this item.
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object
      • getIcon

        public javax.swing.Icon getIcon​()
        Returns the icon of this item.
        Returns:
        The icon of this item.
      • setIcon

        public void setIcon​(javax.swing.Icon icon)
        Sets the new icon on this item.
        Parameters:
        icon - The new icon for this item.