Class ChoiceDialog<T>

  • Type Parameters:
    T - The data type of the choice values. Allows any value to be supported as a choice value.
    All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

    public class ChoiceDialog<T>
    extends javax.swing.JDialog
    Displays a dialog allowing a user to select one or more choices.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JDialog

        javax.swing.JDialog.AccessibleJDialog
      • Nested classes/interfaces inherited from class java.awt.Dialog

        java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
      • Nested classes/interfaces inherited from class java.awt.Window

        java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      • Fields inherited from class javax.swing.JDialog

        accessibleContext, rootPane, rootPaneCheckingEnabled
      • Fields inherited from class java.awt.Dialog

        DEFAULT_MODALITY_TYPE
      • Fields inherited from class java.awt.Component

        BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
      • Fields inherited from interface javax.swing.WindowConstants

        DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
    • Constructor Summary

      Constructors 
      Constructor Description
      ChoiceDialog​(java.lang.String valueTypeName)
      Create a new instance
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.List<T> forChoices​(java.util.List<Choice<T>> choices, java.lang.String typeName, java.lang.String title)
      Shows a choice dialog for a provided list of choices.
      static <T> java.util.List<T> forChoices​(java.util.List<Choice<T>> choices, java.lang.String typeName, java.lang.String title, boolean singleSelectMode)
      Shows a choice dialog for a provided list of choices.
      static java.util.List<java.lang.String> forCustodians​(nuix.Case nuixCase)
      Presents the user with a dialog where they can select custodian names.
      static java.util.List<nuix.Item> forEvidenceItems​(nuix.Case nuixCase)
      Presents the user with a dialog where they can select evidence items.
      static java.util.List<nuix.ItemSet> forItemSets​(nuix.Case nuixCase)
      Presents the user with a dialog where they can select item sets.
      static java.util.List<nuix.ItemKind> forKinds()
      Presents the user with a dialog where they can select item kinds.
      static java.util.List<nuix.ProductionSet> forProductionSets​(nuix.Case nuixCase)
      Presents the user with a dialog where they can select productions sets.
      static java.util.List<java.lang.String> forTags​(nuix.Case nuixCase)
      Presents the user with a dialog where they can select tag names.
      static <T> java.util.List<T> forValues​(java.util.Collection<T> choiceValues, java.lang.String typeName, java.lang.String title)
      Shows a choice dialog for a provided collection of values.
      boolean getDialogResult()
      Provides a value signifying whether the dialog was cancelled/closed or user hit ok.
      ChoiceTableModel<T> getTableModel()  
      void setTableModel​(ChoiceTableModel<T> tableModel)  
      • Methods inherited from class javax.swing.JDialog

        addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
      • Methods inherited from class java.awt.Dialog

        addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBack
      • Methods inherited from class java.awt.Window

        addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

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

      • ChoiceDialog

        public ChoiceDialog​(java.lang.String valueTypeName)
        Create a new instance
        Parameters:
        valueTypeName - Determines what the label of the value column will be.
    • Method Detail

      • getDialogResult

        public boolean getDialogResult()
        Provides a value signifying whether the dialog was cancelled/closed or user hit ok.
        Returns:
        True if user selected ok button, cancel otherwise.
      • forValues

        public static <T> java.util.List<T> forValues​(java.util.Collection<T> choiceValues,
                                                      java.lang.String typeName,
                                                      java.lang.String title)
        Shows a choice dialog for a provided collection of values.
        Type Parameters:
        T - The data type of the choice values. Allows any value to be supported as a choice value.
        Parameters:
        choiceValues - A collection of values to show the user.
        typeName - Determines the label placed on the second column.
        title - Determines the title of the dialog.
        Returns:
        A list of selected values, or null if the user cancels or closes the dialog.
      • forChoices

        public static <T> java.util.List<T> forChoices​(java.util.List<Choice<T>> choices,
                                                       java.lang.String typeName,
                                                       java.lang.String title,
                                                       boolean singleSelectMode)
        Shows a choice dialog for a provided list of choices.
        Type Parameters:
        T - The data type of the choice values. Allows any value to be supported as a choice value.
        Parameters:
        choices - A collection of choices to show the user.
        typeName - Determines the label placed on the second column.
        title - Determines the title of the dialog.
        singleSelectMode - Whether we wish to restrict user to a single selection
        Returns:
        A list of selected values, or null if the user cancels or closes the dialog.
      • forChoices

        public static <T> java.util.List<T> forChoices​(java.util.List<Choice<T>> choices,
                                                       java.lang.String typeName,
                                                       java.lang.String title)
        Shows a choice dialog for a provided list of choices.
        Type Parameters:
        T - The data type of the choice values. Allows any value to be supported as a choice value.
        Parameters:
        choices - A collection of choices to show the user.
        typeName - Determines the label placed on the second column.
        title - Determines the title of the dialog.
        Returns:
        A list of selected values, or null if the user cancels or closes the dialog.
      • forTags

        public static java.util.List<java.lang.String> forTags​(nuix.Case nuixCase)
                                                        throws java.io.IOException
        Presents the user with a dialog where they can select tag names.
        Parameters:
        nuixCase - The case to obtain the list of possible tags from. If null is provided will attempt to use result of NuixConnection.getCurrentCase()
        Returns:
        A list of selected tag names, or null if the user cancelled or closed the dialog.
        Throws:
        java.io.IOException - May throw exception caused by call into Nuix API
      • forCustodians

        public static java.util.List<java.lang.String> forCustodians​(nuix.Case nuixCase)
                                                              throws java.io.IOException
        Presents the user with a dialog where they can select custodian names.
        Parameters:
        nuixCase - The case to obtain the list of possible custodian names from. If null is provided will attempt to use result of NuixConnection.getCurrentCase()
        Returns:
        A list of selected custodian names, or null if the user cancelled or closed the dialog.
        Throws:
        java.io.IOException - May throw exception caused by call into Nuix API
      • forProductionSets

        public static java.util.List<nuix.ProductionSet> forProductionSets​(nuix.Case nuixCase)
                                                                    throws java.io.IOException
        Presents the user with a dialog where they can select productions sets.
        Parameters:
        nuixCase - The case to obtain the list of possible production sets from. If null is provided will attempt to use result of NuixConnection.getCurrentCase()
        Returns:
        A list of selected production sets, or null if the user cancelled or closed the dialog.
        Throws:
        java.io.IOException - May throw exception caused by call into Nuix API
      • forItemSets

        public static java.util.List<nuix.ItemSet> forItemSets​(nuix.Case nuixCase)
                                                        throws java.io.IOException
        Presents the user with a dialog where they can select item sets.
        Parameters:
        nuixCase - The case to obtain the list of possible item sets from. If null is provided will attempt to use result of NuixConnection.getCurrentCase()
        Returns:
        A list of selected item sets, or null if the user cancelled or closed the dialog.
        Throws:
        java.io.IOException - May throw exception caused by call into Nuix API
      • forEvidenceItems

        public static java.util.List<nuix.Item> forEvidenceItems​(nuix.Case nuixCase)
                                                          throws java.io.IOException
        Presents the user with a dialog where they can select evidence items.
        Parameters:
        nuixCase - The case to obtain the list of possible evidence items from. If null is provided will attempt to use result of NuixConnection.getCurrentCase()
        Returns:
        A list of selected evidence items, or null if the user cancelled or closed the dialog.
        Throws:
        java.io.IOException - May throw exception caused by call into Nuix API
      • forKinds

        public static java.util.List<nuix.ItemKind> forKinds()
        Presents the user with a dialog where they can select item kinds.
        Returns:
        A list of selected item kinds, or null if the user cancelled or closed the dialog.