E
- the type of the elements of this list
ImageObserver
, MenuContainer
, Serializable
, Accessible
, Scrollable
Nested Classes
protected class
This class implements accessibility support for the JList
class.
static final class
A subclass of TransferHandler.DropLocation
representing a drop location for a JList
.
Fields
static final int
Indicates a "newspaper style" layout with cells flowing horizontally then vertically.
static final int
Indicates a vertical layout of cells, in a single column; the default layout.
static final int
Indicates a "newspaper style" layout with cells flowing vertically then horizontally.
Constructors
Constructs a JList
with an empty, read-only, model.
Constructs a JList
that displays the elements in the specified array.
Constructs a JList
that displays the elements in the specified Vector
.
Constructs a JList
that displays elements from the specified, non-null
, model.
void
Adds a listener to the list, to be notified each time a change to the selection occurs; the preferred way of listening for selection state changes.
void
Sets the selection to be the union of the specified interval with current selection.
void
Clears the selection; after calling this method, isSelectionEmpty
will return true
.
Returns an instance of DefaultListSelectionModel
; called during construction to initialize the list's selection model property.
void
Scrolls the list within an enclosing viewport to make the specified cell completely visible.
protected void
Notifies ListSelectionListener
s added directly to the list of selection changes made to the selection model.
Gets the AccessibleContext
associated with this JList
.
int
Returns the anchor selection index.
Returns the bounding rectangle, in the list's coordinate system, for the range of cells specified by the two indices.
Returns the object responsible for painting list items.
boolean
Returns whether or not automatic drag handling is enabled.
Returns the location that this component should visually indicate as the drop location during a DnD operation over the component, or null
if no location is to currently be shown.
Returns the drop mode for this component.
int
Returns the smallest list index that is currently visible.
int
Returns the value of the fixedCellHeight
property.
int
Returns the value of the fixedCellWidth
property.
int
Returns the largest list index that is currently visible.
int
Returns the layout orientation property for the list: VERTICAL
if the layout is a single column of cells, VERTICAL_WRAP
if the layout is "newspaper style" with the content flowing vertically then horizontally, or HORIZONTAL_WRAP
if the layout is "newspaper style" with the content flowing horizontally then vertically.
int
Returns the lead selection index.
Returns an array of all the ListSelectionListener
s added to this JList
by way of addListSelectionListener
.
int
Returns the largest selected cell index, or -1
if the selection is empty.
int
Returns the smallest selected cell index, or -1
if the selection is empty.
Returns the data model that holds the list of items displayed by the JList
component.
int
Returns the next list element whose toString
value starts with the given prefix.
Computes the size of viewport needed to display visibleRowCount
rows.
Returns the "prototypical" cell value -- a value used to calculate a fixed width and height for cells.
int
Returns the distance to scroll to expose the next or previous block.
boolean
Returns true
if this JList
is displayed in a JViewport
and the viewport is taller than the list's preferred height, or if the layout orientation is VERTICAL_WRAP
and visibleRowCount <= 0
; otherwise returns false
.
boolean
Returns true
if this JList
is displayed in a JViewport
and the viewport is wider than the list's preferred width, or if the layout orientation is HORIZONTAL_WRAP
and visibleRowCount <= 0
; otherwise returns false
.
int
Returns the distance to scroll to expose the next or previous row (for vertical scrolling) or column (for horizontal scrolling).
int
Returns the smallest selected cell index; the selection when only a single item is selected in the list.
int[]
Returns an array of all of the selected indices, in increasing order.
Returns the value for the smallest selected cell index; the selected value when only a single item is selected in the list.
Returns a list of all the selected items, in increasing order based on their indices in the list.
Returns the color used to draw the background of selected items.
Returns the color used to draw the foreground of selected items.
int
Returns the current selection mode for the list.
Returns the current selection model.
Returns the tooltip text to be used for the given event.
Returns the ListUI
, the look and feel object that renders this component.
Returns "ListUI"
, the UIDefaults
key used to look up the name of the javax.swing.plaf.ListUI
class that defines the look and feel for this component.
boolean
Returns the value of the selection model's isAdjusting
property.
int
Returns the value of the visibleRowCount
property.
Returns the origin of the specified item in the list's coordinate system.
boolean
Returns true
if the specified index is selected, else false
.
boolean
Returns true
if nothing is selected, else false
.
int
Returns the cell index closest to the given location in the list's coordinate system.
Returns a String
representation of this JList
.
void
Removes a selection listener from the list.
void
Sets the selection to be the set difference of the specified interval and the current selection.
void
Sets the delegate that is used to paint each cell in the list.
void
Turns on or off automatic drag handling.
final void
Sets the drop mode for this component.
void
Sets a fixed value to be used for the height of every cell in the list.
void
Sets a fixed value to be used for the width of every cell in the list.
void
Defines the way list cells are laid out.
void
Constructs a read-only ListModel
from an array of items, and calls setModel
with this model.
void
Constructs a read-only ListModel
from a Vector
and calls setModel
with this model.
void
Sets the model that represents the contents or "value" of the list, notifies property change listeners, and then clears the list's selection.
void
Sets the prototypeCellValue
property, and then (if the new value is non-null
), computes the fixedCellWidth
and fixedCellHeight
properties by requesting the cell renderer component for the given value (and index 0) from the cell renderer, and using that component's preferred size.
void
void
Changes the selection to be the set of indices specified by the given array.
void
Selects the specified object from the list.
void
Sets the color used to draw the background of selected items, which cell renderers can use fill selected cells.
void
Sets the color used to draw the foreground of selected items, which cell renderers can use to render text and graphics.
void
Selects the specified interval.
void
Sets the selection mode for the list.
void
Sets the selectionModel
for the list to a non-null
ListSelectionModel
implementation.
void
Sets the ListUI
, the look and feel object that renders this component.
void
Sets the selection model's valueIsAdjusting
property.
void
Sets the visibleRowCount
property, which has different meanings depending on the layout orientation: For a VERTICAL
layout orientation, this sets the preferred number of rows to display without requiring scrolling; for other orientations, it affects the wrapping of cells.
void
Resets the ListUI
property by setting it to the value provided by the current look and feel.
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, 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, 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 declared in class java.awt.Containeradd, 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 declared in class java.awt.Componentaction, 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, 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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4