Save This Page
Home » openjdk-7 » javax » swing » plaf » basic » [javadoc | source]
javax.swing.plaf.basic
public class: BasicListUI [javadoc | source]
java.lang.Object
   javax.swing.plaf.ComponentUI
      javax.swing.plaf.ListUI
         javax.swing.plaf.basic.BasicListUI

Direct Known Subclasses:
    SynthListUI

The Basic Look and Feel UI delegate for the JList.
Nested Class Summary:
public class  BasicListUI.FocusHandler  A helper class which listens for {@link FocusEvent}s from the JList. 
public class  BasicListUI.ListDataHandler  A helper class which listens for {@link ListDataEvent}s generated by the {@link JList}'s {@link ListModel}. 
public class  BasicListUI.ListSelectionHandler  A helper class which listens for {@link ListSelectionEvent}s from the {@link JList}'s {@link ListSelectionModel}. 
class  BasicListUI.ListAction   
public class  BasicListUI.MouseInputHandler  A helper class which listens for {@link MouseEvent}s from the {@link JList}. 
public class  BasicListUI.PropertyChangeHandler  Helper class which listens to {@link PropertyChangeEvent}s from the {@link JList}. 
Field Summary
protected static final  int modelChanged    A constant to indicate that the model has changed. 
protected static final  int selectionModelChanged    A constant to indicate that the selection model has changed. 
protected static final  int fontChanged    A constant to indicate that the font has changed. 
protected static final  int fixedCellWidthChanged    A constant to indicate that the fixedCellWidth has changed. 
protected static final  int fixedCellHeightChanged    A constant to indicate that the fixedCellHeight has changed. 
protected static final  int prototypeCellValueChanged    A constant to indicate that the prototypeCellValue has changed. 
protected static final  int cellRendererChanged    A constant to indicate that the cellRenderer has changed. 
protected  FocusListener focusListener    The current focus listener. 
protected  ListDataListener listDataListener    The data listener listening to the model. 
protected  ListSelectionListener listSelectionListener    The selection listener listening to the selection model. 
protected  MouseInputListener mouseInputListener    The mouse listener listening to the list. 
protected  PropertyChangeListener propertyChangeListener    The property change listener listening to the list. 
protected  JList list    Saved reference to the list this UI was created for. 
protected  int cellHeight    The height of a single cell in the list. This field is used when the fixedCellHeight property of the list is set. Otherwise this field is set to -1 and #cellHeights is used instead. 
protected  int cellWidth    The width of a single cell in the list. 
protected  int[] cellHeights    An array of varying heights of cells in the list, in cases where each cell might have a different height. This field is used when the fixedCellHeight property of the list is not set. Otherwise this field is null and #cellHeight is used. 
protected  int updateLayoutStateNeeded    A bitmask that indicates which properties of the JList have changed. When nonzero, indicates that the UI class is out of date with respect to the underlying list, and must recalculate the list layout before painting or performing size calculations. 
protected  CellRendererPane rendererPane    The CellRendererPane that is used for painting. 
 BasicListUI.ListAction action    The action bound to KeyStrokes. 
Constructor:
 public BasicListUI() 
Method from javax.swing.plaf.basic.BasicListUI Summary:
convertRowToY,   convertYToRow,   createFocusListener,   createListDataListener,   createListSelectionListener,   createMouseInputListener,   createPropertyChangeListener,   createUI,   getCellBounds,   getPreferredSize,   getRowHeight,   indexToLocation,   installDefaults,   installKeyboardActions,   installListeners,   installUI,   locationToIndex,   maybeUpdateLayoutState,   paint,   paintCell,   selectNextIndex,   selectPreviousIndex,   uninstallDefaults,   uninstallKeyboardActions,   uninstallListeners,   uninstallUI,   updateLayoutState
Methods from javax.swing.plaf.ListUI:
getCellBounds,   indexToLocation,   locationToIndex
Methods from javax.swing.plaf.ComponentUI:
contains,   createUI,   getAccessibleChild,   getAccessibleChildrenCount,   getBaseline,   getBaselineResizeBehavior,   getMaximumSize,   getMinimumSize,   getPreferredSize,   installUI,   paint,   uninstallUI,   update
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.plaf.basic.BasicListUI Detail:
 protected int convertRowToY(int row) 
    Calculate the Y coordinate of the upper edge of a particular row, considering the Y coordinate 0 to occur at the top of the list.
 protected int convertYToRow(int y0) 
    Calculate the row number containing a particular Y coordinate, considering the Y coodrinate 0 to occur at the top of the list.
 protected FocusListener createFocusListener() 
    Creates and returns the focus listener for this UI.
 protected ListDataListener createListDataListener() 
    Creates and returns the list data listener for this UI.
 protected ListSelectionListener createListSelectionListener() 
    Creates and returns the list selection listener for this UI.
 protected MouseInputListener createMouseInputListener() 
    Creates and returns the mouse input listener for this UI.
 protected PropertyChangeListener createPropertyChangeListener() 
    Creates and returns the property change listener for this UI.
 public static ComponentUI createUI(JComponent c) 
    Creates a new BasicListUI for the component.
 public Rectangle getCellBounds(JList l,
    int index1,
    int index2) 
    Calculate the bounds of a particular cell, considering the upper left corner of the list as the origin position (0,0).
 public Dimension getPreferredSize(JComponent c) 
    Gets the size this list would prefer to assume. This is calculated by calling #getCellBounds over the entire list.
 protected int getRowHeight(int row) 
    Calculate the height of a particular row. If there is a fixed #cellHeight , return it; otherwise return the specific row height requested from the #cellHeights array. If the requested row is invalid, return -1.
 public Point indexToLocation(JList l,
    int index) 
 protected  void installDefaults() 
    Installs various default settings (mostly colors) from the UIDefaults into the JList
 protected  void installKeyboardActions() 
    Installs keyboard actions for this UI in the JList .
 protected  void installListeners() 
    Attaches all the listeners we have in the UI class to the JList , its model and its selection model.
 public  void installUI(JComponent c) 
 public int locationToIndex(JList l,
    Point location) 
    Computes the index of a list cell given a point within the list. If the location lies outside the bounds of the list, the greatest index in the list model is returned.
 protected  void maybeUpdateLayoutState() 
 public  void paint(Graphics g,
    JComponent c) 
    Paints the list by repeatedly calling #paintCell for each visible cell in the list.
 protected  void paintCell(Graphics g,
    int row,
    Rectangle bounds,
    ListCellRenderer rend,
    ListModel data,
    ListSelectionModel sel,
    int lead) 
    Paints a single cell in the list.
 protected  void selectNextIndex() 
    Selects the next list item and force it to be visible.
 protected  void selectPreviousIndex() 
    Selects the previous list item and force it to be visible.
 protected  void uninstallDefaults() 
 protected  void uninstallKeyboardActions() throws NotImplementedException 
    Uninstalls keyboard actions for this UI in the JList .
 protected  void uninstallListeners() 
 public  void uninstallUI(JComponent c) 
    Uninstalls all the aspects of the UI which were installed in #installUI . When finished uninstalling, drops the saved reference to the JList .
 protected  void updateLayoutState()