Class JThumbnailPanel<T>

  • Type Parameters:
    T - the type enclosed by the thumbnails of the list.
    All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

    public class JThumbnailPanel<T>
    extends javax.swing.JPanel
    A panel dedicated to thumbnail display. This object works like a JList but enable more flexibility on the thumbnail interaction.
    Since:
    1.0.8
    Version:
    1.0.8
    Author:
    Julien Seinturier - COMEX SA
    See Also:
    Serialized Form
    • Nested Class Summary

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

        javax.swing.JPanel.AccessibleJPanel
      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • 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 
      Modifier and Type Field Description
      protected JThumbnail<T> activatedLabel
      The first selected label
      protected java.awt.Color focusColor
      Color used for the coloring the background of the label where it's in focus state
      protected javax.swing.event.EventListenerList idListenerList
      Liste des ecouteurs informes des evenements du thumbnail
      protected boolean isLabelLoading  
      protected java.awt.Color itemPResentColor  
      protected int labelCount  
      protected int labelHeight  
      protected int labelMargin  
      protected java.util.ArrayList<JThumbnail<T>> labels
      The label added to the list
      protected int labelWidth  
      protected int lastSelectedIndex
      The index corresponding to the last selected index
      protected java.awt.Color normalColor
      Color used for the coloring the background of the label where it's in standard state
      protected java.awt.Color selectedColor
      Color used for the coloring the background of the label where it's in selected state
      protected java.util.List<JThumbnail<T>> selectedLabels
      The selected labels
      protected java.lang.String state  
      protected double thumbRatio  
      • Fields inherited from class javax.swing.JComponent

        listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • Fields inherited from class java.awt.Component

        accessibleContext, 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
    • Constructor Summary

      Constructors 
      Constructor Description
      JThumbnailPanel()
      Create a new empty thumbnail panel.
      JThumbnailPanel​(int labelPerLine)
      Create a new thumbnail panel that display the given number of thumbnail per line.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(JThumbnail<T> label)
      Add an active label to the thumbnail.
      void addTaskListener​(TaskListener l)
      Add a Task Listener to this object
      void addThumbnailPanelListener​(JThumbnailPanelListener<T> l)
      Add an Active Thumbnail Listener to this Active Thumbnail
      boolean contains​(java.lang.Object o)
      Returns true if this thumbnail contains the specified element.
      boolean contains​(JThumbnail<T> label)
      Returns true if this thumbnail contains the specified active label.
      protected void fireEvent​(TaskEvent e)  
      protected void fireThumbnailActivated​(JThumbnailPanel<T> panel, JThumbnail<T> thumbnail)  
      protected void fireThumbnailAdded​(JThumbnailPanel<T> panel, JThumbnail<T> thumbnail)  
      protected void fireThumbnailEntered​(JThumbnailPanel<T> panel, JThumbnail<T> thumbnail)  
      protected void fireThumbnailExited​(JThumbnailPanel<T> panel, JThumbnail<T> thumbnail)  
      protected void fireThumbnailNeedRefresh​(JThumbnailPanel<T> panel, JThumbnail<T> thumbnail)  
      protected void fireThumbnailRemoved​(JThumbnailPanel<T> panel, JThumbnail<T> thumbnail)  
      protected void fireThumbnailSelected​(JThumbnailPanel<T> panel, java.util.List<JThumbnail<T>> thumbnails)  
      protected void fireThumbnailSelected​(JThumbnailPanel<T> panel, JThumbnail<T> thumbnail)  
      JThumbnail<T> getActivatedLabel()
      Get the activated thumbnail.
      java.awt.Rectangle getCellBounds​(int index0, int index1)
      Returns the bounds of the specified range of items in JList coordinates.
      JThumbnail<T> getLabelContaining​(java.lang.Object content)
      Get the active label displaying the content object.
      int getLabelCount()
      Get the number of thumbnails that are attached to this panel.
      int getLabelHeight()
      Get the default height of the thumbnails displayed within this panel.
      int getLabelMargin()
      Get the default margin size of the thumbnails displayed within this panel.
      int getLabelWidth()
      Get the default width of the thumbnails displayed within this panel.
      int getSelectedIndex()
      Returns the smallest selected cell index; the selection when only a single item is selected in the list.
      int[] getSelectedIndices()
      Returns an array of all of the selected indices, in increasing order.
      JThumbnail<T> getSelectedThumbnail()
      Returns the first selected label, or null if the selection is empty.
      java.util.List<JThumbnail<T>> getSelectedThumbnails()
      Returns an array of the labels for the selected cells.
      java.lang.Object[] getSelectedValues()
      Returns an array of the values for the selected cells.
      int getSelectionMode()
      Returns whether single-item or multiple-item selections are allowed.
      java.lang.String getState()
      Get the state of this panel.
      double getThumbRatio()
      Get the thumb ratio.
      int indexOf​(java.lang.Object o)
      Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.
      int indexOf​(JThumbnail<T> label)
      Returns the index in this list of the first occurrence of the specified active label, or -1 if this list does not contain this active label.
      boolean isLoading()
      Get if this panel is currently loading.
      protected void processActiveLabelMouseEvent​(java.awt.event.MouseEvent e)
      Process a MouseEvent fired by an active label.
      void refresh()
      Refresh the thumbnail by refreshing all the activelabels conained
      boolean remove​(JThumbnail<T> label)
      Remove the given thumbnail from this panel.
      void removeTaskListener​(TaskListener l)
      Remove a Task Listener from this object
      void removeThumbnailPanelListener​(JThumbnailPanelListener<T> l)
      Remove an Active Thumbnail Listener from this Active Thumbnail
      void scrollToIndices​(int[] indices)
      Move view rect to the component assigned the indices given in parameter.
      void scrollToSelected()
      Scroll the view to selected thumbnails.
      void scrollToSelectedIndices()
      Move view rect to the component assigned to selected indices.
      void select​(JThumbnail<T> l)
      Add the label given in parameter to the selected labels
      void setLabelCount​(int count)
      Set the number of thumbnails that are attached to this panel.
      void setLabelHeight​(int height)
      Set the default height of the thumbnails displayed within this panel.
      void setLabelMargin​(int margin)
      Set the default margin size of the thumbnails displayed within this panel.
      void setLabelWidth​(int width)
      Set the default width of the thumbnails displayed within this panel.
      void setLoading​(boolean b)
      Set if this panel is currently loading.
      void setSelectedIndex​(int index)
      Selects a single cell.
      void setSelectedIndices​(int[] indices)
      Changes the selection to be the set of indices specified by the given array.
      void setSelectedThumbnail​(JThumbnail<T> label, boolean shouldScroll)
      Selects the specified label in the list.
      void setSelectedValue​(java.lang.Object anObject, boolean shouldScroll)
      Selects the specified object from the list.
      void setSelectionMode​(int selectionMode)
      Determines whether single-item or multiple-item selections are allowed.
      void setThumbRatio​(double thumbRatio)
      Set the thumb ratio.
      void unselect​(JThumbnail<T> l)
      Remove the label given in parameter to the selected labels
      void unselectAll()
      Unselect all the selected label.
      • Methods inherited from class javax.swing.JPanel

        getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

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

      • labelWidth

        protected int labelWidth
      • labelHeight

        protected int labelHeight
      • thumbRatio

        protected double thumbRatio
      • labelMargin

        protected int labelMargin
      • labelCount

        protected int labelCount
      • labels

        protected java.util.ArrayList<JThumbnail<T>> labels
        The label added to the list
      • selectedLabels

        protected java.util.List<JThumbnail<T>> selectedLabels
        The selected labels
      • lastSelectedIndex

        protected int lastSelectedIndex
        The index corresponding to the last selected index
      • activatedLabel

        protected JThumbnail<T> activatedLabel
        The first selected label
      • isLabelLoading

        protected volatile boolean isLabelLoading
      • idListenerList

        protected javax.swing.event.EventListenerList idListenerList
        Liste des ecouteurs informes des evenements du thumbnail
      • normalColor

        protected java.awt.Color normalColor
        Color used for the coloring the background of the label where it's in standard state
      • focusColor

        protected java.awt.Color focusColor
        Color used for the coloring the background of the label where it's in focus state
      • selectedColor

        protected java.awt.Color selectedColor
        Color used for the coloring the background of the label where it's in selected state
      • itemPResentColor

        protected java.awt.Color itemPResentColor
      • state

        protected java.lang.String state
    • Constructor Detail

      • JThumbnailPanel

        public JThumbnailPanel()
        Create a new empty thumbnail panel.
      • JThumbnailPanel

        public JThumbnailPanel​(int labelPerLine)
        Create a new thumbnail panel that display the given number of thumbnail per line.
        Parameters:
        labelPerLine - the number of thumbnail to display per line.
    • Method Detail

      • getCellBounds

        public java.awt.Rectangle getCellBounds​(int index0,
                                                int index1)
        Returns the bounds of the specified range of items in JList coordinates. Returns null if index isn't valid.
        Parameters:
        index0 - the index of the first JList cell in the range
        index1 - the index of the last JList cell in the range
        Returns:
        the bounds of the indexed cells in pixels
      • setSelectedIndices

        public void setSelectedIndices​(int[] indices)
        Changes the selection to be the set of indices specified by the given array. Indices greater than or equal to the size are ignored.
        Parameters:
        indices - an array of the indices of the cells to select, non-null
      • getSelectedIndices

        public int[] getSelectedIndices()
        Returns an array of all of the selected indices, in increasing order.
        Returns:
        all of the selected indices, in increasing order, or an empty array if nothing is selected
        See Also:
        setSelectedIndices(int[])
      • getSelectedIndex

        public int getSelectedIndex()
        Returns the smallest selected cell index; the selection when only a single item is selected in the list. When multiple items are selected, it is simply the smallest selected index. Returns -1 if there is no selection.
        Returns:
        the smallest selected cell index
        See Also:
        setSelectedIndex(int)
      • setSelectedIndex

        public void setSelectedIndex​(int index)
        Selects a single cell. Does nothing if the given index is greater than or equal to the model size.
        Parameters:
        index - the index of the cell to select
        See Also:
        getSelectedIndex()
      • setSelectedValue

        public void setSelectedValue​(java.lang.Object anObject,
                                     boolean shouldScroll)
        Selects the specified object from the list.
        Parameters:
        anObject - the object to select
        shouldScroll - true if the list should scroll to display the selected object, if one exists; otherwise false
      • setSelectedThumbnail

        public void setSelectedThumbnail​(JThumbnail<T> label,
                                         boolean shouldScroll)
        Selects the specified label in the list.
        Parameters:
        label - the label to select
        shouldScroll - true if the list should scroll to display the selected label, if one exists; otherwise false
      • getSelectedThumbnail

        public JThumbnail<T> getSelectedThumbnail()
        Returns the first selected label, or null if the selection is empty.
        Returns:
        the first selected label
      • getSelectedThumbnails

        public java.util.List<JThumbnail<T>> getSelectedThumbnails()
        Returns an array of the labels for the selected cells. The returned labels are sorted in increasing index order.
        Returns:
        the selected labels or an empty list if nothing is selected.
      • getSelectedValues

        public java.lang.Object[] getSelectedValues()
        Returns an array of the values for the selected cells. The returned values are sorted in increasing index order.
        Returns:
        the selected values or an empty list if nothing is selected.
      • setSelectionMode

        public void setSelectionMode​(int selectionMode)
        Determines whether single-item or multiple-item selections are allowed. The following selectionMode values are allowed:
        • ListSelectionModel.SINGLE_SELECTION Only one list index can be selected at a time. In this mode the setSelectionInterval and addSelectionInterval methods are equivalent, and only the second index argument is used.
        • ListSelectionModel.SINGLE_INTERVAL_SELECTION One contiguous index interval can be selected at a time. In this mode setSelectionInterval and addSelectionInterval are equivalent.
        • ListSelectionModel.MULTIPLE_INTERVAL_SELECTION In this mode, there's no restriction on what can be selected. This is the default.
        Parameters:
        selectionMode - an integer specifying the type of selections that are permissible
        See Also:
        getSelectionMode()
      • getSelectionMode

        public int getSelectionMode()
        Returns whether single-item or multiple-item selections are allowed.
        Returns:
        the value of the selectionMode property
      • indexOf

        public int indexOf​(java.lang.Object o)
        Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. More formally, returns the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.
        Parameters:
        o - element to search for.
        Returns:
        the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.
      • indexOf

        public int indexOf​(JThumbnail<T> label)
        Returns the index in this list of the first occurrence of the specified active label, or -1 if this list does not contain this active label. More formally, returns the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.
        Parameters:
        label - the active label to search for.
        Returns:
        the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.
      • contains

        public boolean contains​(java.lang.Object o)
        Returns true if this thumbnail contains the specified element. More formally, returns true if and only if this thumbnail contains at least one element e such that (o==null ? e==null : o.equals(e)).
        Parameters:
        o - element whose presence in this list is to be tested.
        Returns:
        true if this list contains the specified element.
      • contains

        public boolean contains​(JThumbnail<T> label)
        Returns true if this thumbnail contains the specified active label. More formally, returns true if and only if this active thumbnail contains at least one element e such that (o==null ? e==null : o.equals(e)).
        Parameters:
        label - element whose presence in this thumbnail is to be tested.
        Returns:
        true if this thumbnail contains the specified label.
      • getActivatedLabel

        public JThumbnail<T> getActivatedLabel()
        Get the activated thumbnail.
        Returns:
        the activated thumbnail.
      • setThumbRatio

        public void setThumbRatio​(double thumbRatio)
        Set the thumb ratio.
        Parameters:
        thumbRatio - the thumb ratio.
      • getThumbRatio

        public double getThumbRatio()
        Get the thumb ratio.
        Returns:
        the thumb ratio.
      • setLabelWidth

        public void setLabelWidth​(int width)
        Set the default width of the thumbnails displayed within this panel.
        Parameters:
        width - the default width of the thumbnails displayed within this panel.
        See Also:
        getLabelWidth()
      • getLabelWidth

        public int getLabelWidth()
        Get the default width of the thumbnails displayed within this panel.
        Returns:
        the default width of the thumbnails displayed within this panel.
        See Also:
        setLabelWidth(int)
      • setLabelHeight

        public void setLabelHeight​(int height)
        Set the default height of the thumbnails displayed within this panel.
        Parameters:
        height - the default height of the thumbnails displayed within this panel.
        See Also:
        getLabelHeight()
      • getLabelHeight

        public int getLabelHeight()
        Get the default height of the thumbnails displayed within this panel.
        Returns:
        the default height of the thumbnails displayed within this panel.
        See Also:
        setLabelHeight(int)
      • setLabelMargin

        public void setLabelMargin​(int margin)
        Set the default margin size of the thumbnails displayed within this panel.
        Parameters:
        margin - the default margin size of the thumbnails displayed within this panel.
        See Also:
        getLabelMargin()
      • getLabelMargin

        public int getLabelMargin()
        Get the default margin size of the thumbnails displayed within this panel.
        Returns:
        the default margin size of the thumbnails displayed within this panel.
        See Also:
        setLabelMargin(int)
      • setLabelCount

        public void setLabelCount​(int count)
        Set the number of thumbnails that are attached to this panel.
        Parameters:
        count - the number of thumbnails that are attached to this panel.
        See Also:
        getLabelCount()
      • getLabelCount

        public int getLabelCount()
        Get the number of thumbnails that are attached to this panel.
        Returns:
        the number of thumbnails that are attached to this panel.
        See Also:
        setLabelCount(int)
      • getState

        public java.lang.String getState()
        Get the state of this panel.
        Returns:
        the state of this panel.
      • setLoading

        public void setLoading​(boolean b)
        Set if this panel is currently loading.
        Parameters:
        b - true if the panel is loading and false otherwise.
        See Also:
        isLoading()
      • isLoading

        public boolean isLoading()
        Get if this panel is currently loading.
        Returns:
        true if the panel is loading and false otherwise.
        See Also:
        setLoading(boolean)
      • scrollToSelected

        public void scrollToSelected()
        Scroll the view to selected thumbnails.
      • refresh

        public void refresh()
        Refresh the thumbnail by refreshing all the activelabels conained
      • add

        public boolean add​(JThumbnail<T> label)
        Add an active label to the thumbnail.
        Parameters:
        label - the label to add
        Returns:
        true if the label is added, false otherwise
      • remove

        public boolean remove​(JThumbnail<T> label)
        Remove the given thumbnail from this panel.
        Parameters:
        label - the thumbnail to remove.
        Returns:
        true if the thumbnail is removed and false otherwise.
      • select

        public void select​(JThumbnail<T> l)
        Add the label given in parameter to the selected labels
        Parameters:
        l - ActiveLabel the label newly selected
      • unselect

        public void unselect​(JThumbnail<T> l)
        Remove the label given in parameter to the selected labels
        Parameters:
        l - ActiveLabel the label to remove selected
      • unselectAll

        public void unselectAll()
        Unselect all the selected label. The graphical refresh of the Active Label is called by this method
      • scrollToSelectedIndices

        public void scrollToSelectedIndices()
        Move view rect to the component assigned to selected indices.
      • scrollToIndices

        public void scrollToIndices​(int[] indices)
        Move view rect to the component assigned the indices given in parameter.
        Parameters:
        indices - the indices to view.
      • getLabelContaining

        public JThumbnail<T> getLabelContaining​(java.lang.Object content)
        Get the active label displaying the content object. If no label is displaying the given object, then null is returned.
        Parameters:
        content - the content attached to the searched label.
        Returns:
        the label.
      • fireThumbnailSelected

        protected void fireThumbnailSelected​(JThumbnailPanel<T> panel,
                                             java.util.List<JThumbnail<T>> thumbnails)
      • fireEvent

        protected void fireEvent​(TaskEvent e)
      • addThumbnailPanelListener

        public void addThumbnailPanelListener​(JThumbnailPanelListener<T> l)
        Add an Active Thumbnail Listener to this Active Thumbnail
        Parameters:
        l - ActiveThumbnailListener Listener added to the Active Thumbnail
      • removeThumbnailPanelListener

        public void removeThumbnailPanelListener​(JThumbnailPanelListener<T> l)
        Remove an Active Thumbnail Listener from this Active Thumbnail
        Parameters:
        l - ActiveThumbnailListener Active Listener to remove
      • addTaskListener

        public void addTaskListener​(TaskListener l)
        Add a Task Listener to this object
        Parameters:
        l - TaskListener Listener added to the object
      • removeTaskListener

        public void removeTaskListener​(TaskListener l)
        Remove a Task Listener from this object
        Parameters:
        l - TaskListener listener to remove
      • processActiveLabelMouseEvent

        protected void processActiveLabelMouseEvent​(java.awt.event.MouseEvent e)
        Process a MouseEvent fired by an active label.
        Parameters:
        e - The event fired.