API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.plaf.basic. BasicListUI View Source
Author(s)
Hans Muller
Philip Milne
Shannon Hickey (drag and drop)
Since
Version
1.124 12/07/06
Serial
Hierarchy
 Object
      ComponentUI
          ListUI
              BasicListUI
Implements
Subclasses
Description
public class BasicListUI
  An extensible implementation of ListUI.
See also:   
Constructors
public BasicListUI ()
Methods
Hide/Show inherited methods
public boolean contains (JComponent c, int x, int y) [Inherited From ComponentUI]
  Returns true if the specified x,y location is contained within the look and feel's defined shape of the specified component.
protected int convertRowToY (int row)
  Return the JList relative Y coordinate of the origin of the specified row or -1 if row isn't valid.
protected int convertYToRow (int y0)
  Convert the JList relative coordinate to the row that contains it, based on the current layout.
protected FocusListener createFocusListener ()
protected ListDataListener createListDataListener ()
  Creates an instance of ListDataListener that's added to the JLists by model as needed.
protected ListSelectionListener createListSelectionListener ()
  Creates an instance of ListSelectionHandler that's added to the JLists by selectionModel as needed.
protected MouseInputListener createMouseInputListener ()
  Creates a delegate that implements MouseInputListener.
protected PropertyChangeListener createPropertyChangeListener ()
  Creates an instance of PropertyChangeHandler that's added to the JList by installUI().
publicstatic ComponentUI createUI (JComponent list) [Overrides ComponentUI]
  Returns a new instance of BasicListUI.
public Accessible getAccessibleChild (JComponent c, int i) [Inherited From ComponentUI]
  Returns the ith Accessible child of the object.
public int getAccessibleChildrenCount (JComponent c) [Inherited From ComponentUI]
  Returns the number of accessible children in the object.
public int getBaseline (JComponent c, int width, int height) [Overrides ComponentUI]
  Returns the baseline.
public BaselineResizeBehavior getBaselineResizeBehavior (JComponent c) [Overrides ComponentUI]
  Returns an enum indicating how the baseline of the component changes as the size changes.
public Rectangle getCellBounds (JList list, int index1, int index2) [Specified in ListUI]
  Returns the bounding rectangle, in the given list's coordinate system, for the range of cells specified by the two indices.
pack-private InputMap getInputMap (int condition)
public Dimension getMaximumSize (JComponent c) [Inherited From ComponentUI]
  Returns the specified component's maximum size appropriate for the look and feel.
public Dimension getMinimumSize (JComponent c) [Inherited From ComponentUI]
  Returns the specified component's minimum size appropriate for the look and feel.
public Dimension getPreferredSize (JComponent c) [Overrides ComponentUI]
  The preferredSize of the list depends upon the layout orientation.
protected int getRowHeight (int row)
  Returns the height of the specified row based on the current layout.
public Point indexToLocation (JList list, int index) [Specified in ListUI]
  Returns the origin in the given JList, of the specified item, in the list's coordinate system.
protected void installDefaults ()
  Initialize JList properties, e.g.
protected void installKeyboardActions ()
  Registers the keyboard bindings on the JList that the BasicListUI is associated with.
protected void installListeners ()
  Create and install the listeners for the JList, its model, and its selectionModel.
public void installUI (JComponent c) [Overrides ComponentUI]
  Initializes this.list by calling installDefaults(), installListeners(), and installKeyboardActions() in order.
pack-privatestatic void loadActionMap (LazyActionMap map)
public int locationToIndex (JList list, Point location) [Specified in ListUI]
  Returns the cell index in the specified JList closest to the given location in the list's coordinate system.
protected void maybeUpdateLayoutState ()
  If updateLayoutStateNeeded is non zero, call updateLayoutState() and reset updateLayoutStateNeeded.
public void paint (Graphics g, JComponent c) [Overrides ComponentUI]
  Paint the rows that intersect the Graphics objects clipRect.
protected void paintCell (Graphics g, int row, Rectangle rowBounds, ListCellRenderer cellRenderer, ListModel dataModel, ListSelectionModel selModel, int leadIndex)
  Paint one List cell: compute the relevant state, get the "rubber stamp" cell renderer component, and then use the CellRendererPane to paint it.
protected void selectNextIndex ()
  Selected the previous row and force it to be visible.
protected void selectPreviousIndex ()
  Selected the previous row and force it to be visible.
protected void uninstallDefaults ()
  Set the JList properties that haven't been explicitly overridden to null.
protected void uninstallKeyboardActions ()
  Unregisters keyboard actions installed from installKeyboardActions.
protected void uninstallListeners ()
  Remove the listeners for the JList, its model, and its selectionModel.
public void uninstallUI (JComponent c) [Overrides ComponentUI]
  Uninitializes this.list by calling uninstallListeners(), uninstallKeyboardActions(), and uninstallDefaults() in order.
public void update (Graphics g, JComponent c) [Inherited From ComponentUI]
  Notifies this UI delegate that it's time to paint the specified component.
protected void updateLayoutState ()
  Recompute the value of cellHeight or cellHeights based and cellWidth, based on the current font and the current values of fixedCellWidth, fixedCellHeight, and prototypeCellValue.
Fields
Hide/Show inherited fields
protected int cellHeight
protected int cellHeights
protectedfinalstatic int cellRendererChanged = "64"
protected int cellWidth
protectedfinalstatic int fixedCellHeightChanged = "16"
protectedfinalstatic int fixedCellWidthChanged = "8"
protected FocusListener focusListener
protectedfinalstatic int fontChanged = "4"
protected JList list
protected ListDataListener listDataListener
protected ListSelectionListener listSelectionListener
protectedfinalstatic int modelChanged = "1"
protected MouseInputListener mouseInputListener
protected PropertyChangeListener propertyChangeListener
protectedfinalstatic int prototypeCellValueChanged = "32"
protected CellRendererPane rendererPane
protectedfinalstatic int selectionModelChanged = "2"
protected int updateLayoutStateNeeded
Nested Classes
  BasicListUI.MouseInputHandler
Mouse input, and focus handling for JList.
  BasicListUI.FocusHandler
This inner class is marked "public" due to a compiler bug.
  BasicListUI.ListSelectionHandler
The ListSelectionListener that's added to the JLists selection model at installUI time, and whenever the JList.selectionModel property changes.
  BasicListUI.ListDataHandler
The ListDataListener that's added to the JLists model at installUI time, and whenever the JList.model property changes.
  BasicListUI.PropertyChangeHandler
The PropertyChangeListener that's added to the JList at installUI time.
  BasicListUI.ListTransferHandler
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar