Class ItemRandomizerPanel<T>

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
is.codion.swing.common.ui.tools.randomizer.ItemRandomizerPanel<T>
Type Parameters:
T - the type of items being randomized
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public final class ItemRandomizerPanel<T> extends JPanel
A default UI for the ItemRandomizer class. For instances use the factory method itemRandomizerPanel(ItemRandomizer).
See Also:
  • Method Details

    • itemRandomizer

      public is.codion.common.model.randomizer.ItemRandomizer<T> itemRandomizer()
      Returns:
      the randomizer this panel is based on
    • selectedItemsEvent

      public is.codion.common.event.EventObserver<List<is.codion.common.model.randomizer.ItemRandomizer.RandomItem<T>>> selectedItemsEvent()
      Returns:
      an observer notified each time the selected items change
    • selectedItems

      public List<is.codion.common.model.randomizer.ItemRandomizer.RandomItem<T>> selectedItems()
      Returns:
      the currently selected item
    • itemRandomizerPanel

      public static <T> ItemRandomizerPanel<T> itemRandomizerPanel(is.codion.common.model.randomizer.ItemRandomizer<T> itemRandomizer)
      Instantiates a new ItemRandomizerPanel.
      Type Parameters:
      T - the item type
      Parameters:
      itemRandomizer - the item randomizer
      Returns:
      a new ItemRandomizerPanel