public class SelectableItemList extends JPanel
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
SelectableItemList(Object[] currSelection,
Object[] allItems)
Creates the SelectableItemList without the selection buttons.
|
SelectableItemList(Object[] currSelection,
Object[] allItems,
boolean showSelectionButtons)
Creates the SelectableItemList.
|
SelectableItemList(Object[] currSelection,
Object[] allItems,
boolean showSelectionButtons,
Object[] notSelectableItems)
Creates the SelectableItemList.
|
SelectableItemList(Object[] currSelection,
Object[] allItems,
Object[] notSelectableItems)
Creates the SelectableItemList without the selection buttons.
|
Modifier and Type | Method and Description |
---|---|
void |
addCenterRendererComponent(Class clazz,
SelectableItemRendererCenterComponentIf component)
Adds the render component that is to be used for the given class or it's super class.
|
void |
addListSelectionListener(ListSelectionListener listener) |
void |
addMouseListener(MouseListener listener)
Adds a mouse listener to the list.
|
void |
calculateSize()
Calcualtes the size of the list.
|
void |
clearSelection()
Clear the selection.
|
Object[] |
getListSelection()
Current selected Items in the List.
|
Object |
getSelectedValue() |
Object[] |
getSelection()
Attention: This is not a List with all selected Items in the List.
|
void |
invertSelection()
Invert the selection
|
void |
removeListSelectionListener(ListSelectionListener listener) |
void |
selectAll()
Select all items.
|
void |
setEnabled(boolean value) |
void |
setFilterComboBox(JComboBox filterBox)
Sets the combo box that contains ItemFilters to filter
the shown values of the list.
|
void |
setHorizontalScrollBarPolicy(int value)
Sets if the horizontal scroll policy.
|
void |
setListUI(ListUI ui)
Sets the UI to be used for the list.
|
void |
setSelectionMode(int selectionMode) |
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, 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, 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, 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, hide, 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 SelectableItemList(Object[] currSelection, Object[] allItems)
currSelection
- The currently selected Objects.allItems
- All Objects of the list.public SelectableItemList(Object[] currSelection, Object[] allItems, Object[] notSelectableItems)
currSelection
- The currently selected Objects.allItems
- All Objects of the list.notSelectableItems
- All Objects that could not be selected/deselectedpublic SelectableItemList(Object[] currSelection, Object[] allItems, boolean showSelectionButtons)
currSelection
- The currently selected Objects.allItems
- All Objects of the list.showSelectionButtons
- If the selection buttons should be shown.public SelectableItemList(Object[] currSelection, Object[] allItems, boolean showSelectionButtons, Object[] notSelectableItems)
currSelection
- The currently selected Objects.allItems
- All Objects of the list.showSelectionButtons
- If the selection buttons should be shown.notSelectableItems
- All Objects that could not be selected/deselectedpublic void addListSelectionListener(ListSelectionListener listener)
listener
- Add this Listenerpublic void removeListSelectionListener(ListSelectionListener listener)
listener
- Remove this Listenerpublic void setSelectionMode(int selectionMode)
selectionMode
- The selection mode of the list.public Object[] getListSelection()
public Object[] getSelection()
public Object getSelectedValue()
public void invertSelection()
public void selectAll()
public void clearSelection()
public void setEnabled(boolean value)
setEnabled
in class JComponent
public void calculateSize()
public void addCenterRendererComponent(Class clazz, SelectableItemRendererCenterComponentIf component)
clazz
- The class to use the render component for, the render component is also used for the super class of clazz.component
- The render component.public void setListUI(ListUI ui)
ui
- The list ui that should be used for the list.public void setHorizontalScrollBarPolicy(int value)
value
- The values from ScrollPaneConstants.public void addMouseListener(MouseListener listener)
addMouseListener
in class Component
listener
- The listener to add.public void setFilterComboBox(JComboBox filterBox)
filterBox
- The combo box with the ItemFilters.TV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)