public class JListWithProgressBar<E>
extends javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
javax.swing.JList<E> |
jListLoading |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
JListWithProgressBar()
These are the default constructors, which are similar
with the jList constructors.
|
JListWithProgressBar(E[] listData)
Instantiates a new j list with progress bar.
|
JListWithProgressBar(javax.swing.ListModel<E> listModel)
Instantiates a new j list with progress bar.
|
JListWithProgressBar(java.util.Vector<E> listData)
Instantiates a new j list with progress bar.
|
Modifier and Type | Method and Description |
---|---|
void |
addListSelectionListener(javax.swing.event.ListSelectionListener listener)
From here we start with the copy of methods/functions comming from JList.
|
void |
addSelectionInterval(int anchor,
int lead)
Adds the selection interval.
|
void |
clearSelection()
Clear selection.
|
void |
ensureIndexIsVisible(int index)
Ensure index is visible.
|
int |
getAnchorSelectionIndex()
Gets the anchor selection index.
|
java.awt.Rectangle |
getCellBounds(int index0,
int index1)
Gets the cell bounds.
|
javax.swing.ListCellRenderer<? super E> |
getCellRenderer()
Gets the cell renderer.
|
boolean |
getDragEnabled()
Gets the drag enabled.
|
javax.swing.JList.DropLocation |
getDropLocation()
Gets the drop location.
|
javax.swing.DropMode |
getDropMode()
Gets the drop mode.
|
int |
getFirstVisibleIndex()
Gets the first visible index.
|
int |
getFixedCellHeight()
Gets the fixed cell height.
|
int |
getFixedCellWidth()
Gets the fixed cell width.
|
int |
getLastVisibleIndex()
Gets the last visible index.
|
int |
getLayoutOrientation()
Gets the layout orientation.
|
int |
getLeadSelectionIndex()
Gets the lead selection index.
|
javax.swing.event.ListSelectionListener[] |
getListSelectionListeners()
Gets the list selection listeners.
|
int |
getMaxSelectionIndex()
Gets the max selection index.
|
int |
getMinSelectionIndex()
Gets the min selection index.
|
javax.swing.ListModel<E> |
getModel()
Gets the model.
|
int |
getNextMatch(java.lang.String prefix,
int startIndex,
javax.swing.text.Position.Bias bias)
Gets the next match.
|
java.awt.Dimension |
getPreferredScrollableViewportSize()
Gets the preferred scrollable viewport size.
|
java.lang.Object |
getPrototypeCellValue()
Gets the prototype cell value.
|
int |
getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
Gets the scrollable block increment.
|
boolean |
getScrollableTracksViewportHeight()
Gets the scrollable tracks viewport height.
|
boolean |
getScrollableTracksViewportWidth()
Gets the scrollable tracks viewport width.
|
int |
getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
Gets the scrollable unit increment.
|
int |
getSelectedIndex()
Gets the selected index.
|
int[] |
getSelectedIndices()
Gets the selected indices.
|
java.lang.Object |
getSelectedValue()
Gets the selected value.
|
java.util.List<E> |
getSelectedValuesList()
Gets the selected values.
|
java.awt.Color |
getSelectionBackground()
Gets the selection background.
|
java.awt.Color |
getSelectionForeground()
Gets the selection foreground.
|
int |
getSelectionMode()
Gets the selection mode.
|
javax.swing.ListSelectionModel |
getSelectionModel()
Gets the selection model.
|
boolean |
getValueIsAdjusting()
Gets the value is adjusting.
|
int |
getVisibleRowCount()
Gets the visible row count.
|
java.awt.Point |
indexToLocation(int index)
Index to location.
|
boolean |
isSelectedIndex(int index)
Checks if is selected index.
|
boolean |
isSelectionEmpty()
Checks if is selection empty.
|
int |
locationToIndex(java.awt.Point location)
Location to index.
|
void |
removeListSelectionListener(javax.swing.event.ListSelectionListener listener)
Removes the list selection listener.
|
void |
removeSelectionInterval(int index0,
int index1)
Removes the selection interval.
|
void |
setBusy(boolean busy)
shows/hides the progress bar, to indicate, that the
loading of the JList is currently running.
|
void |
setCellRenderer(javax.swing.ListCellRenderer<E> cellRenderer)
Sets the cell renderer.
|
void |
setDragEnabled(boolean b)
Sets the drag enabled.
|
void |
setDropMode(javax.swing.DropMode dropMode)
Sets the drop mode.
|
void |
setFixedCellHeight(int height)
Sets the fixed cell height.
|
void |
setFixedCellWidth(int width)
Sets the fixed cell width.
|
void |
setLayoutOrientation(int layoutOrientation)
Sets the layout orientation.
|
void |
setListData(E[] listData)
Sets the list data.
|
void |
setListData(java.util.Vector<E> listData)
Sets the list data.
|
void |
setModel(javax.swing.ListModel<E> model)
Sets the model.
|
void |
setPrototypeCellValue(E prototypeCellValue)
Sets the prototype cell value.
|
void |
setSelectedIndex(int index)
Sets the selected index.
|
void |
setSelectedIndices(int[] indices)
Sets the selected indices.
|
void |
setSelectedValue(java.lang.Object anObject,
boolean shouldScroll)
Sets the selected value.
|
void |
setSelectionBackground(java.awt.Color selectionBackground)
Sets the selection background.
|
void |
setSelectionForeground(java.awt.Color selectionForeground)
Sets the selection foreground.
|
void |
setSelectionInterval(int anchor,
int lead)
Sets the selection interval.
|
void |
setSelectionMode(int selectionMode)
Sets the selection mode.
|
void |
setSelectionModel(javax.swing.ListSelectionModel selectionModel)
Sets the selection model.
|
void |
setUI(javax.swing.plaf.ListUI ui)
Sets the uI.
|
void |
setValueIsAdjusting(boolean b)
Sets the value is adjusting.
|
void |
setVisibleRowCount(int visibleRowCount)
Sets the visible row count.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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
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
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, getPeer, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public javax.swing.JList<E> jListLoading
public JListWithProgressBar()
public JListWithProgressBar(javax.swing.ListModel<E> listModel)
listModel
- the list modelpublic JListWithProgressBar(E[] listData)
listData
- the list datapublic JListWithProgressBar(java.util.Vector<E> listData)
listData
- the list datapublic void setBusy(boolean busy)
busy
- the new busypublic void addListSelectionListener(javax.swing.event.ListSelectionListener listener)
listener
- the listenerpublic void addSelectionInterval(int anchor, int lead)
anchor
- the anchorlead
- the leadpublic void clearSelection()
public void ensureIndexIsVisible(int index)
index
- the indexpublic int getAnchorSelectionIndex()
public java.awt.Rectangle getCellBounds(int index0, int index1)
index0
- the index0index1
- the index1public javax.swing.ListCellRenderer<? super E> getCellRenderer()
public boolean getDragEnabled()
public javax.swing.JList.DropLocation getDropLocation()
public javax.swing.DropMode getDropMode()
public int getFirstVisibleIndex()
public int getFixedCellHeight()
public int getFixedCellWidth()
public int getLastVisibleIndex()
public int getLayoutOrientation()
public int getLeadSelectionIndex()
public javax.swing.event.ListSelectionListener[] getListSelectionListeners()
public int getMaxSelectionIndex()
public int getMinSelectionIndex()
public javax.swing.ListModel<E> getModel()
public int getNextMatch(java.lang.String prefix, int startIndex, javax.swing.text.Position.Bias bias)
prefix
- the prefixstartIndex
- the start indexbias
- the biaspublic java.awt.Dimension getPreferredScrollableViewportSize()
public java.lang.Object getPrototypeCellValue()
public int getScrollableBlockIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
visibleRect
- the visible rectorientation
- the orientationdirection
- the directionpublic boolean getScrollableTracksViewportHeight()
public boolean getScrollableTracksViewportWidth()
public int getScrollableUnitIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
visibleRect
- the visible rectorientation
- the orientationdirection
- the directionpublic int getSelectedIndex()
public int[] getSelectedIndices()
public java.lang.Object getSelectedValue()
public java.util.List<E> getSelectedValuesList()
public java.awt.Color getSelectionBackground()
public java.awt.Color getSelectionForeground()
public int getSelectionMode()
public javax.swing.ListSelectionModel getSelectionModel()
public boolean getValueIsAdjusting()
public int getVisibleRowCount()
public java.awt.Point indexToLocation(int index)
index
- the indexpublic boolean isSelectedIndex(int index)
index
- the indexpublic boolean isSelectionEmpty()
public int locationToIndex(java.awt.Point location)
location
- the locationpublic void removeListSelectionListener(javax.swing.event.ListSelectionListener listener)
listener
- the listenerpublic void removeSelectionInterval(int index0, int index1)
index0
- the index0index1
- the index1public void setCellRenderer(javax.swing.ListCellRenderer<E> cellRenderer)
cellRenderer
- the new cell rendererpublic void setDragEnabled(boolean b)
b
- the new drag enabledpublic void setDropMode(javax.swing.DropMode dropMode)
dropMode
- the new drop modepublic void setFixedCellHeight(int height)
height
- the new fixed cell heightpublic void setFixedCellWidth(int width)
width
- the new fixed cell widthpublic void setLayoutOrientation(int layoutOrientation)
layoutOrientation
- the new layout orientationpublic void setListData(E[] listData)
listData
- the new list datapublic void setListData(java.util.Vector<E> listData)
listData
- the new list datapublic void setModel(javax.swing.ListModel<E> model)
model
- the new modelpublic void setPrototypeCellValue(E prototypeCellValue)
prototypeCellValue
- the new prototype cell valuepublic void setSelectedIndex(int index)
index
- the new selected indexpublic void setSelectedIndices(int[] indices)
indices
- the new selected indicespublic void setSelectedValue(java.lang.Object anObject, boolean shouldScroll)
anObject
- the an objectshouldScroll
- the should scrollpublic void setSelectionBackground(java.awt.Color selectionBackground)
selectionBackground
- the new selection backgroundpublic void setSelectionForeground(java.awt.Color selectionForeground)
selectionForeground
- the new selection foregroundpublic void setSelectionInterval(int anchor, int lead)
anchor
- the anchorlead
- the leadpublic void setSelectionMode(int selectionMode)
selectionMode
- the new selection modepublic void setSelectionModel(javax.swing.ListSelectionModel selectionModel)
selectionModel
- the new selection modelpublic void setUI(javax.swing.plaf.ListUI ui)
ui
- the new uIpublic void setValueIsAdjusting(boolean b)
b
- the new value is adjustingpublic void setVisibleRowCount(int visibleRowCount)
visibleRowCount
- the new visible row count