Class CheckpointComboBox<E>

All Implemented Interfaces:
ActionListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, ListDataListener

public class CheckpointComboBox<E> extends JComboBox<E>
Override of the basic JComboBox that adds the capacity to checkpoint its current value. Once the value is checkpoint, the hasChanged() method will reflect if the current value equals the checkpoint value or not.
Since:
3/21/14 8:34 AM
See Also:
  • Constructor Details

    • CheckpointComboBox

      @Deprecated(since="0.51.0", forRemoval=true) public CheckpointComboBox()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Default constructor.
    • CheckpointComboBox

      public CheckpointComboBox(E[] items)
      Constructor taking in a list of what items will be displayed in the combobox.
      Parameters:
      items - The items to be displayed in the combobox.
  • Method Details

    • checkpoint

      public void checkpoint()
      Checkpoints the combobox's current state by saving the value of its current index.
    • hasChanged

      public boolean hasChanged()
      Returns:
      TRUE if the checkpoint() method has been called and the currently selected index does not match the checkpoint index.
    • getCheckpointIndex

      @Deprecated(since="0.51.0", forRemoval=true) public int getCheckpointIndex()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The current checkpoint index or -1 if the checkpoint() method has not been called.
    • getCheckpointItem

      @Deprecated(since="0.51.0", forRemoval=true) public Object getCheckpointItem()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The Object stored at the checkpoint index or NULL if the checkpoint() method has not been called.
    • removeCheckpoint

      @Deprecated(since="0.51.0", forRemoval=true) public void removeCheckpoint()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Removes the current checkpoint by resetting the checkpoint index to -1.
    • getMaximumSize

      public Dimension getMaximumSize()
      Overrides:
      getMaximumSize in class JComponent