javax.swing.plaf.basic
Class BasicListUI

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI 
      extended by javax.swing.plaf.ListUI sample code for javax.swing.plaf.ListUI definition code for javax.swing.plaf.ListUI 
          extended by javax.swing.plaf.basic.BasicListUI

public class BasicListUI
extends ListUI sample code for javax.swing.plaf.ListUI definition code for javax.swing.plaf.ListUI

A Windows L&F implementation of ListUI.


Nested Class Summary
 class BasicListUI.FocusHandler sample code for javax.swing.plaf.basic.BasicListUI.FocusHandler definition code for javax.swing.plaf.basic.BasicListUI.FocusHandler
          This inner class is marked "public" due to a compiler bug.
 class BasicListUI.ListDataHandler sample code for javax.swing.plaf.basic.BasicListUI.ListDataHandler definition code for javax.swing.plaf.basic.BasicListUI.ListDataHandler
          The ListDataListener that's added to the JLists model at installUI time, and whenever the JList.model property changes.
 class BasicListUI.ListSelectionHandler sample code for javax.swing.plaf.basic.BasicListUI.ListSelectionHandler definition code for javax.swing.plaf.basic.BasicListUI.ListSelectionHandler
          The ListSelectionListener that's added to the JLists selection model at installUI time, and whenever the JList.selectionModel property changes.
 class BasicListUI.MouseInputHandler sample code for javax.swing.plaf.basic.BasicListUI.MouseInputHandler definition code for javax.swing.plaf.basic.BasicListUI.MouseInputHandler
          Mouse input, and focus handling for JList.
 class BasicListUI.PropertyChangeHandler sample code for javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler definition code for javax.swing.plaf.basic.BasicListUI.PropertyChangeHandler
          The PropertyChangeListener that's added to the JList at installUI time.
 
Field Summary
protected  int cellHeight sample code for javax.swing.plaf.basic.BasicListUI.cellHeight definition code for javax.swing.plaf.basic.BasicListUI.cellHeight
           
protected  int[] cellHeights sample code for javax.swing.plaf.basic.BasicListUI.cellHeights definition code for javax.swing.plaf.basic.BasicListUI.cellHeights
           
protected static int cellRendererChanged sample code for javax.swing.plaf.basic.BasicListUI.cellRendererChanged definition code for javax.swing.plaf.basic.BasicListUI.cellRendererChanged
           
protected  int cellWidth sample code for javax.swing.plaf.basic.BasicListUI.cellWidth definition code for javax.swing.plaf.basic.BasicListUI.cellWidth
           
protected static int fixedCellHeightChanged sample code for javax.swing.plaf.basic.BasicListUI.fixedCellHeightChanged definition code for javax.swing.plaf.basic.BasicListUI.fixedCellHeightChanged
           
protected static int fixedCellWidthChanged sample code for javax.swing.plaf.basic.BasicListUI.fixedCellWidthChanged definition code for javax.swing.plaf.basic.BasicListUI.fixedCellWidthChanged
           
protected  FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener focusListener sample code for javax.swing.plaf.basic.BasicListUI.focusListener definition code for javax.swing.plaf.basic.BasicListUI.focusListener
           
protected static int fontChanged sample code for javax.swing.plaf.basic.BasicListUI.fontChanged definition code for javax.swing.plaf.basic.BasicListUI.fontChanged
           
protected  JList sample code for javax.swing.JList definition code for javax.swing.JList list sample code for javax.swing.plaf.basic.BasicListUI.list definition code for javax.swing.plaf.basic.BasicListUI.list
           
protected  ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener listDataListener sample code for javax.swing.plaf.basic.BasicListUI.listDataListener definition code for javax.swing.plaf.basic.BasicListUI.listDataListener
           
protected  ListSelectionListener sample code for javax.swing.event.ListSelectionListener definition code for javax.swing.event.ListSelectionListener listSelectionListener sample code for javax.swing.plaf.basic.BasicListUI.listSelectionListener definition code for javax.swing.plaf.basic.BasicListUI.listSelectionListener
           
protected static int modelChanged sample code for javax.swing.plaf.basic.BasicListUI.modelChanged definition code for javax.swing.plaf.basic.BasicListUI.modelChanged
           
protected  MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener mouseInputListener sample code for javax.swing.plaf.basic.BasicListUI.mouseInputListener definition code for javax.swing.plaf.basic.BasicListUI.mouseInputListener
           
protected  PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener propertyChangeListener sample code for javax.swing.plaf.basic.BasicListUI.propertyChangeListener definition code for javax.swing.plaf.basic.BasicListUI.propertyChangeListener
           
protected static int prototypeCellValueChanged sample code for javax.swing.plaf.basic.BasicListUI.prototypeCellValueChanged definition code for javax.swing.plaf.basic.BasicListUI.prototypeCellValueChanged
           
protected  CellRendererPane sample code for javax.swing.CellRendererPane definition code for javax.swing.CellRendererPane rendererPane sample code for javax.swing.plaf.basic.BasicListUI.rendererPane definition code for javax.swing.plaf.basic.BasicListUI.rendererPane
           
protected static int selectionModelChanged sample code for javax.swing.plaf.basic.BasicListUI.selectionModelChanged definition code for javax.swing.plaf.basic.BasicListUI.selectionModelChanged
           
protected  int updateLayoutStateNeeded sample code for javax.swing.plaf.basic.BasicListUI.updateLayoutStateNeeded definition code for javax.swing.plaf.basic.BasicListUI.updateLayoutStateNeeded
           
 
Constructor Summary
BasicListUI sample code for javax.swing.plaf.basic.BasicListUI.BasicListUI() definition code for javax.swing.plaf.basic.BasicListUI.BasicListUI() ()
           
 
Method Summary
protected  int convertRowToY sample code for javax.swing.plaf.basic.BasicListUI.convertRowToY(int) definition code for javax.swing.plaf.basic.BasicListUI.convertRowToY(int) (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 sample code for javax.swing.plaf.basic.BasicListUI.convertYToRow(int) definition code for javax.swing.plaf.basic.BasicListUI.convertYToRow(int) (int y0)
          Convert the JList relative coordinate to the row that contains it, based on the current layout.
protected  FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener createFocusListener sample code for javax.swing.plaf.basic.BasicListUI.createFocusListener() definition code for javax.swing.plaf.basic.BasicListUI.createFocusListener() ()
           
protected  ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener createListDataListener sample code for javax.swing.plaf.basic.BasicListUI.createListDataListener() definition code for javax.swing.plaf.basic.BasicListUI.createListDataListener() ()
          Creates an instance of ListDataListener that's added to the JLists by model as needed.
protected  ListSelectionListener sample code for javax.swing.event.ListSelectionListener definition code for javax.swing.event.ListSelectionListener createListSelectionListener sample code for javax.swing.plaf.basic.BasicListUI.createListSelectionListener() definition code for javax.swing.plaf.basic.BasicListUI.createListSelectionListener() ()
          Creates an instance of ListSelectionHandler that's added to the JLists by selectionModel as needed.
protected  MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener createMouseInputListener sample code for javax.swing.plaf.basic.BasicListUI.createMouseInputListener() definition code for javax.swing.plaf.basic.BasicListUI.createMouseInputListener() ()
          Creates a delegate that implements MouseInputListener.
protected  PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener createPropertyChangeListener sample code for javax.swing.plaf.basic.BasicListUI.createPropertyChangeListener() definition code for javax.swing.plaf.basic.BasicListUI.createPropertyChangeListener() ()
          Creates an instance of PropertyChangeHandler that's added to the JList by installUI().
static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI createUI sample code for javax.swing.plaf.basic.BasicListUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.createUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  list)
          Returns a new instance of BasicListUI.
 Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle getCellBounds sample code for javax.swing.plaf.basic.BasicListUI.getCellBounds(javax.swing.JList, int, int) definition code for javax.swing.plaf.basic.BasicListUI.getCellBounds(javax.swing.JList, int, int) (JList sample code for javax.swing.JList definition code for javax.swing.JList  list, int index1, int index2)
          Returns the bounds of the specified item in JList coordinates, null if index isn't valid.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getPreferredSize sample code for javax.swing.plaf.basic.BasicListUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.getPreferredSize(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          The preferredSize of the list depends upon the layout orientation.
protected  int getRowHeight sample code for javax.swing.plaf.basic.BasicListUI.getRowHeight(int) definition code for javax.swing.plaf.basic.BasicListUI.getRowHeight(int) (int row)
          Returns the height of the specified row based on the current layout.
 Point sample code for java.awt.Point definition code for java.awt.Point indexToLocation sample code for javax.swing.plaf.basic.BasicListUI.indexToLocation(javax.swing.JList, int) definition code for javax.swing.plaf.basic.BasicListUI.indexToLocation(javax.swing.JList, int) (JList sample code for javax.swing.JList definition code for javax.swing.JList  list, int index)
          Returns the origin of the specified item in JList coordinates, null if index isn't valid.
protected  void installDefaults sample code for javax.swing.plaf.basic.BasicListUI.installDefaults() definition code for javax.swing.plaf.basic.BasicListUI.installDefaults() ()
          Initialize JList properties, e.g.
protected  void installKeyboardActions sample code for javax.swing.plaf.basic.BasicListUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicListUI.installKeyboardActions() ()
          Registers the keyboard bindings on the JList that the BasicListUI is associated with.
protected  void installListeners sample code for javax.swing.plaf.basic.BasicListUI.installListeners() definition code for javax.swing.plaf.basic.BasicListUI.installListeners() ()
          Create and install the listeners for the JList, its model, and its selectionModel.
 void installUI sample code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Initializes this.list by calling installDefaults(), installListeners(), and installKeyboardActions() in order.
 int locationToIndex sample code for javax.swing.plaf.basic.BasicListUI.locationToIndex(javax.swing.JList, java.awt.Point) definition code for javax.swing.plaf.basic.BasicListUI.locationToIndex(javax.swing.JList, java.awt.Point) (JList sample code for javax.swing.JList definition code for javax.swing.JList  list, Point sample code for java.awt.Point definition code for java.awt.Point  location)
          Convert a point in JList coordinates to the closest index of the cell at that location.
protected  void maybeUpdateLayoutState sample code for javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState() definition code for javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState() ()
          If updateLayoutStateNeeded is non zero, call updateLayoutState() and reset updateLayoutStateNeeded.
 void paint sample code for javax.swing.plaf.basic.BasicListUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.paint(java.awt.Graphics, javax.swing.JComponent) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Paint the rows that intersect the Graphics objects clipRect.
protected  void paintCell sample code for javax.swing.plaf.basic.BasicListUI.paintCell(java.awt.Graphics, int, java.awt.Rectangle, javax.swing.ListCellRenderer, javax.swing.ListModel, javax.swing.ListSelectionModel, int) definition code for javax.swing.plaf.basic.BasicListUI.paintCell(java.awt.Graphics, int, java.awt.Rectangle, javax.swing.ListCellRenderer, javax.swing.ListModel, javax.swing.ListSelectionModel, int) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, int row, Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  rowBounds, ListCellRenderer sample code for javax.swing.ListCellRenderer definition code for javax.swing.ListCellRenderer  cellRenderer, ListModel sample code for javax.swing.ListModel definition code for javax.swing.ListModel  dataModel, ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.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 sample code for javax.swing.plaf.basic.BasicListUI.selectNextIndex() definition code for javax.swing.plaf.basic.BasicListUI.selectNextIndex() ()
          Selected the previous row and force it to be visible.
protected  void selectPreviousIndex sample code for javax.swing.plaf.basic.BasicListUI.selectPreviousIndex() definition code for javax.swing.plaf.basic.BasicListUI.selectPreviousIndex() ()
          Selected the previous row and force it to be visible.
protected  void uninstallDefaults sample code for javax.swing.plaf.basic.BasicListUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicListUI.uninstallDefaults() ()
          Set the JList properties that haven't been explicitly overridden to null.
protected  void uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicListUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicListUI.uninstallKeyboardActions() ()
          Unregisters keyboard actions installed from installKeyboardActions.
protected  void uninstallListeners sample code for javax.swing.plaf.basic.BasicListUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicListUI.uninstallListeners() ()
          Remove the listeners for the JList, its model, and its selectionModel.
 void uninstallUI sample code for javax.swing.plaf.basic.BasicListUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.uninstallUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Uninitializes this.list by calling uninstallListeners(), uninstallKeyboardActions(), and uninstallDefaults() in order.
protected  void updateLayoutState sample code for javax.swing.plaf.basic.BasicListUI.updateLayoutState() definition code for javax.swing.plaf.basic.BasicListUI.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.
 
Methods inherited from class javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
contains sample code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) definition code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) , getAccessibleChild sample code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) , getAccessibleChildrenCount sample code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) , getMaximumSize sample code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) , getMinimumSize sample code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) , update sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

list sample code for javax.swing.plaf.basic.BasicListUI.list

protected JList sample code for javax.swing.JList definition code for javax.swing.JList  list

rendererPane sample code for javax.swing.plaf.basic.BasicListUI.rendererPane

protected CellRendererPane sample code for javax.swing.CellRendererPane definition code for javax.swing.CellRendererPane  rendererPane

focusListener sample code for javax.swing.plaf.basic.BasicListUI.focusListener

protected FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener  focusListener

mouseInputListener sample code for javax.swing.plaf.basic.BasicListUI.mouseInputListener

protected MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener  mouseInputListener

listSelectionListener sample code for javax.swing.plaf.basic.BasicListUI.listSelectionListener

protected ListSelectionListener sample code for javax.swing.event.ListSelectionListener definition code for javax.swing.event.ListSelectionListener  listSelectionListener

listDataListener sample code for javax.swing.plaf.basic.BasicListUI.listDataListener

protected ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener  listDataListener

propertyChangeListener sample code for javax.swing.plaf.basic.BasicListUI.propertyChangeListener

protected PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  propertyChangeListener

cellHeights sample code for javax.swing.plaf.basic.BasicListUI.cellHeights

protected int[] cellHeights

cellHeight sample code for javax.swing.plaf.basic.BasicListUI.cellHeight

protected int cellHeight

cellWidth sample code for javax.swing.plaf.basic.BasicListUI.cellWidth

protected int cellWidth

updateLayoutStateNeeded sample code for javax.swing.plaf.basic.BasicListUI.updateLayoutStateNeeded

protected int updateLayoutStateNeeded

modelChanged sample code for javax.swing.plaf.basic.BasicListUI.modelChanged

protected static final int modelChanged
See Also:
Constant Field Values

selectionModelChanged sample code for javax.swing.plaf.basic.BasicListUI.selectionModelChanged

protected static final int selectionModelChanged
See Also:
Constant Field Values

fontChanged sample code for javax.swing.plaf.basic.BasicListUI.fontChanged

protected static final int fontChanged
See Also:
Constant Field Values

fixedCellWidthChanged sample code for javax.swing.plaf.basic.BasicListUI.fixedCellWidthChanged

protected static final int fixedCellWidthChanged
See Also:
Constant Field Values

fixedCellHeightChanged sample code for javax.swing.plaf.basic.BasicListUI.fixedCellHeightChanged

protected static final int fixedCellHeightChanged
See Also:
Constant Field Values

prototypeCellValueChanged sample code for javax.swing.plaf.basic.BasicListUI.prototypeCellValueChanged

protected static final int prototypeCellValueChanged
See Also:
Constant Field Values

cellRendererChanged sample code for javax.swing.plaf.basic.BasicListUI.cellRendererChanged

protected static final int cellRendererChanged
See Also:
Constant Field Values
Constructor Detail

BasicListUI sample code for javax.swing.plaf.basic.BasicListUI() definition code for javax.swing.plaf.basic.BasicListUI()

public BasicListUI()
Method Detail

paintCell sample code for javax.swing.plaf.basic.BasicListUI.paintCell(java.awt.Graphics, int, java.awt.Rectangle, javax.swing.ListCellRenderer, javax.swing.ListModel, javax.swing.ListSelectionModel, int) definition code for javax.swing.plaf.basic.BasicListUI.paintCell(java.awt.Graphics, int, java.awt.Rectangle, javax.swing.ListCellRenderer, javax.swing.ListModel, javax.swing.ListSelectionModel, int)

protected void paintCell(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                         int row,
                         Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  rowBounds,
                         ListCellRenderer sample code for javax.swing.ListCellRenderer definition code for javax.swing.ListCellRenderer  cellRenderer,
                         ListModel sample code for javax.swing.ListModel definition code for javax.swing.ListModel  dataModel,
                         ListSelectionModel sample code for javax.swing.ListSelectionModel definition code for javax.swing.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. Subclasses may want to override this method rather than paint().

See Also:
paint(java.awt.Graphics, javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicListUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.paint(java.awt.Graphics, javax.swing.JComponent)

paint sample code for javax.swing.plaf.basic.BasicListUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.paint(java.awt.Graphics, javax.swing.JComponent)

public void paint(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                  JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Paint the rows that intersect the Graphics objects clipRect. This method calls paintCell as necessary. Subclasses may want to override these methods.

Overrides:
paint sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
g - the Graphics context in which to paint
c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
paintCell(java.awt.Graphics, int, java.awt.Rectangle, javax.swing.ListCellRenderer, javax.swing.ListModel, javax.swing.ListSelectionModel, int) sample code for javax.swing.plaf.basic.BasicListUI.paintCell(java.awt.Graphics, int, java.awt.Rectangle, javax.swing.ListCellRenderer, javax.swing.ListModel, javax.swing.ListSelectionModel, int) definition code for javax.swing.plaf.basic.BasicListUI.paintCell(java.awt.Graphics, int, java.awt.Rectangle, javax.swing.ListCellRenderer, javax.swing.ListModel, javax.swing.ListSelectionModel, int)

getPreferredSize sample code for javax.swing.plaf.basic.BasicListUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.getPreferredSize(javax.swing.JComponent)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getPreferredSize(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
The preferredSize of the list depends upon the layout orientation.
Layout OrientationPreferred Size
JList.VERTICAL The preferredSize of the list is total height of the rows and the maximum width of the cells. If JList.fixedCellHeight is specified then the total height of the rows is just (cellVerticalMargins + fixedCellHeight) * model.getSize() where rowVerticalMargins is the space we allocate for drawing the yellow focus outline. Similarly if fixedCellWidth is specified then we just use that.
JList.VERTICAL_WRAP If the visible row count is greater than zero, the preferredHeight is the maximum cell height * visibleRowCount. If the visible row count is <= 0, the preferred height is either the current height of the list, or the maximum cell height, whichever is bigger. The preferred width is than the maximum cell width * number of columns needed. Where the number of columns needs is list.height / max cell height. Max cell height is either the fixed cell height, or is determined by iterating through all the cells to find the maximum height from the ListCellRenderer.
JList.HORIZONTAL_WRAP If the visible row count is greater than zero, the preferredHeight is the maximum cell height * adjustedRowCount. Where visibleRowCount is used to determine the number of columns. Because this lays out horizontally the number of rows is then determined from the column count. For example, lets say you have a model with 10 items and the visible row count is 8. The number of columns needed to display this is 2, but you no longer need 8 rows to display this, you only need 5, thus the adjustedRowCount is 5.

If the visible row count is <= 0, the preferred height is dictated by the number of columns, which will be as many as can fit in the width of the JList (width / max cell width), with at least one column. The preferred height then becomes the model size / number of columns * maximum cell height. Max cell height is either the fixed cell height, or is determined by iterating through all the cells to find the maximum height from the ListCellRenderer.

The above specifies the raw preferred width and height. The resulting preferred width is the above width + insets.left + insets.right and the resulting preferred height is the above height + insets.top + insets.bottom. Where the Insets are determined from list.getInsets().

Overrides:
getPreferredSize sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - The JList component.
Returns:
The total size of the list.
See Also:
JComponent.getPreferredSize() sample code for javax.swing.JComponent.getPreferredSize() definition code for javax.swing.JComponent.getPreferredSize() , LayoutManager.preferredLayoutSize(java.awt.Container) sample code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container) definition code for java.awt.LayoutManager.preferredLayoutSize(java.awt.Container)

selectPreviousIndex sample code for javax.swing.plaf.basic.BasicListUI.selectPreviousIndex() definition code for javax.swing.plaf.basic.BasicListUI.selectPreviousIndex()

protected void selectPreviousIndex()
Selected the previous row and force it to be visible.

See Also:
JList.ensureIndexIsVisible(int) sample code for javax.swing.JList.ensureIndexIsVisible(int) definition code for javax.swing.JList.ensureIndexIsVisible(int)

selectNextIndex sample code for javax.swing.plaf.basic.BasicListUI.selectNextIndex() definition code for javax.swing.plaf.basic.BasicListUI.selectNextIndex()

protected void selectNextIndex()
Selected the previous row and force it to be visible.

See Also:
JList.ensureIndexIsVisible(int) sample code for javax.swing.JList.ensureIndexIsVisible(int) definition code for javax.swing.JList.ensureIndexIsVisible(int)

installKeyboardActions sample code for javax.swing.plaf.basic.BasicListUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicListUI.installKeyboardActions()

protected void installKeyboardActions()
Registers the keyboard bindings on the JList that the BasicListUI is associated with. This method is called at installUI() time.

See Also:
installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent)

uninstallKeyboardActions sample code for javax.swing.plaf.basic.BasicListUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicListUI.uninstallKeyboardActions()

protected void uninstallKeyboardActions()
Unregisters keyboard actions installed from installKeyboardActions. This method is called at uninstallUI() time - subclassess should ensure that all of the keyboard actions registered at installUI time are removed here.

See Also:
installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent)

installListeners sample code for javax.swing.plaf.basic.BasicListUI.installListeners() definition code for javax.swing.plaf.basic.BasicListUI.installListeners()

protected void installListeners()
Create and install the listeners for the JList, its model, and its selectionModel. This method is called at installUI() time.

See Also:
installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent) , uninstallListeners() sample code for javax.swing.plaf.basic.BasicListUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicListUI.uninstallListeners()

uninstallListeners sample code for javax.swing.plaf.basic.BasicListUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicListUI.uninstallListeners()

protected void uninstallListeners()
Remove the listeners for the JList, its model, and its selectionModel. All of the listener fields, are reset to null here. This method is called at uninstallUI() time, it should be kept in sync with installListeners.

See Also:
uninstallUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicListUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.uninstallUI(javax.swing.JComponent) , installListeners() sample code for javax.swing.plaf.basic.BasicListUI.installListeners() definition code for javax.swing.plaf.basic.BasicListUI.installListeners()

installDefaults sample code for javax.swing.plaf.basic.BasicListUI.installDefaults() definition code for javax.swing.plaf.basic.BasicListUI.installDefaults()

protected void installDefaults()
Initialize JList properties, e.g. font, foreground, and background, and add the CellRendererPane. The font, foreground, and background properties are only set if their current value is either null or a UIResource, other properties are set if the current value is null.

See Also:
uninstallDefaults() sample code for javax.swing.plaf.basic.BasicListUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicListUI.uninstallDefaults() , installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent) , CellRendererPane sample code for javax.swing.CellRendererPane definition code for javax.swing.CellRendererPane

uninstallDefaults sample code for javax.swing.plaf.basic.BasicListUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicListUI.uninstallDefaults()

protected void uninstallDefaults()
Set the JList properties that haven't been explicitly overridden to null. A property is considered overridden if its current value is not a UIResource.

See Also:
installDefaults() sample code for javax.swing.plaf.basic.BasicListUI.installDefaults() definition code for javax.swing.plaf.basic.BasicListUI.installDefaults() , uninstallUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicListUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.uninstallUI(javax.swing.JComponent) , CellRendererPane sample code for javax.swing.CellRendererPane definition code for javax.swing.CellRendererPane

installUI sample code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent)

public void installUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Initializes this.list by calling installDefaults(), installListeners(), and installKeyboardActions() in order.

Overrides:
installUI sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component where this UI delegate is being installed
See Also:
installDefaults() sample code for javax.swing.plaf.basic.BasicListUI.installDefaults() definition code for javax.swing.plaf.basic.BasicListUI.installDefaults() , installListeners() sample code for javax.swing.plaf.basic.BasicListUI.installListeners() definition code for javax.swing.plaf.basic.BasicListUI.installListeners() , installKeyboardActions() sample code for javax.swing.plaf.basic.BasicListUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicListUI.installKeyboardActions()

uninstallUI sample code for javax.swing.plaf.basic.BasicListUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.uninstallUI(javax.swing.JComponent)

public void uninstallUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Uninitializes this.list by calling uninstallListeners(), uninstallKeyboardActions(), and uninstallDefaults() in order. Sets this.list to null.

Overrides:
uninstallUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
uninstallListeners() sample code for javax.swing.plaf.basic.BasicListUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicListUI.uninstallListeners() , uninstallKeyboardActions() sample code for javax.swing.plaf.basic.BasicListUI.uninstallKeyboardActions() definition code for javax.swing.plaf.basic.BasicListUI.uninstallKeyboardActions() , uninstallDefaults() sample code for javax.swing.plaf.basic.BasicListUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicListUI.uninstallDefaults()

createUI sample code for javax.swing.plaf.basic.BasicListUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.createUI(javax.swing.JComponent)

public static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI  createUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  list)
Returns a new instance of BasicListUI. BasicListUI delegates are allocated one per JList.

Returns:
A new ListUI implementation for the Windows look and feel.

locationToIndex sample code for javax.swing.plaf.basic.BasicListUI.locationToIndex(javax.swing.JList, java.awt.Point) definition code for javax.swing.plaf.basic.BasicListUI.locationToIndex(javax.swing.JList, java.awt.Point)

public int locationToIndex(JList sample code for javax.swing.JList definition code for javax.swing.JList  list,
                           Point sample code for java.awt.Point definition code for java.awt.Point  location)
Convert a point in JList coordinates to the closest index of the cell at that location. To determine if the cell actually contains the specified location use a combination of this method and getCellBounds. Returns -1 if the model is empty.

Specified by:
locationToIndex sample code for javax.swing.plaf.ListUI.locationToIndex(javax.swing.JList, java.awt.Point) definition code for javax.swing.plaf.ListUI.locationToIndex(javax.swing.JList, java.awt.Point) in class ListUI sample code for javax.swing.plaf.ListUI definition code for javax.swing.plaf.ListUI
location - The JList relative coordinates of the cell
Returns:
The index of the cell at location, or -1.
See Also:
ListUI.locationToIndex(javax.swing.JList, java.awt.Point) sample code for javax.swing.plaf.ListUI.locationToIndex(javax.swing.JList, java.awt.Point) definition code for javax.swing.plaf.ListUI.locationToIndex(javax.swing.JList, java.awt.Point)

indexToLocation sample code for javax.swing.plaf.basic.BasicListUI.indexToLocation(javax.swing.JList, int) definition code for javax.swing.plaf.basic.BasicListUI.indexToLocation(javax.swing.JList, int)

public Point sample code for java.awt.Point definition code for java.awt.Point  indexToLocation(JList sample code for javax.swing.JList definition code for javax.swing.JList  list,
                             int index)
Description copied from class: ListUI sample code for javax.swing.plaf.ListUI.indexToLocation(javax.swing.JList, int) definition code for javax.swing.plaf.ListUI.indexToLocation(javax.swing.JList, int)
Returns the origin of the specified item in JList coordinates, null if index isn't valid.

Specified by:
indexToLocation sample code for javax.swing.plaf.ListUI.indexToLocation(javax.swing.JList, int) definition code for javax.swing.plaf.ListUI.indexToLocation(javax.swing.JList, int) in class ListUI sample code for javax.swing.plaf.ListUI definition code for javax.swing.plaf.ListUI
index - The index of the JList cell.
Returns:
The origin of the index'th cell, null if index is invalid.
See Also:
ListUI.indexToLocation(javax.swing.JList, int) sample code for javax.swing.plaf.ListUI.indexToLocation(javax.swing.JList, int) definition code for javax.swing.plaf.ListUI.indexToLocation(javax.swing.JList, int)

getCellBounds sample code for javax.swing.plaf.basic.BasicListUI.getCellBounds(javax.swing.JList, int, int) definition code for javax.swing.plaf.basic.BasicListUI.getCellBounds(javax.swing.JList, int, int)

public Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  getCellBounds(JList sample code for javax.swing.JList definition code for javax.swing.JList  list,
                               int index1,
                               int index2)
Description copied from class: ListUI sample code for javax.swing.plaf.ListUI.getCellBounds(javax.swing.JList, int, int) definition code for javax.swing.plaf.ListUI.getCellBounds(javax.swing.JList, int, int)
Returns the bounds of the specified item in JList coordinates, null if index isn't valid.

Specified by:
getCellBounds sample code for javax.swing.plaf.ListUI.getCellBounds(javax.swing.JList, int, int) definition code for javax.swing.plaf.ListUI.getCellBounds(javax.swing.JList, int, int) in class ListUI sample code for javax.swing.plaf.ListUI definition code for javax.swing.plaf.ListUI
Returns:
The bounds of the index'th cell.
See Also:
ListUI.getCellBounds(javax.swing.JList, int, int) sample code for javax.swing.plaf.ListUI.getCellBounds(javax.swing.JList, int, int) definition code for javax.swing.plaf.ListUI.getCellBounds(javax.swing.JList, int, int)

getRowHeight sample code for javax.swing.plaf.basic.BasicListUI.getRowHeight(int) definition code for javax.swing.plaf.basic.BasicListUI.getRowHeight(int)

protected int getRowHeight(int row)
Returns the height of the specified row based on the current layout.

Returns:
The specified row height or -1 if row isn't valid.
See Also:
convertYToRow(int) sample code for javax.swing.plaf.basic.BasicListUI.convertYToRow(int) definition code for javax.swing.plaf.basic.BasicListUI.convertYToRow(int) , convertRowToY(int) sample code for javax.swing.plaf.basic.BasicListUI.convertRowToY(int) definition code for javax.swing.plaf.basic.BasicListUI.convertRowToY(int) , updateLayoutState() sample code for javax.swing.plaf.basic.BasicListUI.updateLayoutState() definition code for javax.swing.plaf.basic.BasicListUI.updateLayoutState()

convertYToRow sample code for javax.swing.plaf.basic.BasicListUI.convertYToRow(int) definition code for javax.swing.plaf.basic.BasicListUI.convertYToRow(int)

protected int convertYToRow(int y0)
Convert the JList relative coordinate to the row that contains it, based on the current layout. If y0 doesn't fall within any row, return -1.

Returns:
The row that contains y0, or -1.
See Also:
getRowHeight(int) sample code for javax.swing.plaf.basic.BasicListUI.getRowHeight(int) definition code for javax.swing.plaf.basic.BasicListUI.getRowHeight(int) , updateLayoutState() sample code for javax.swing.plaf.basic.BasicListUI.updateLayoutState() definition code for javax.swing.plaf.basic.BasicListUI.updateLayoutState()

convertRowToY sample code for javax.swing.plaf.basic.BasicListUI.convertRowToY(int) definition code for javax.swing.plaf.basic.BasicListUI.convertRowToY(int)

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.

Returns:
The Y coordinate of the origin of row, or -1.
See Also:
getRowHeight(int) sample code for javax.swing.plaf.basic.BasicListUI.getRowHeight(int) definition code for javax.swing.plaf.basic.BasicListUI.getRowHeight(int) , updateLayoutState() sample code for javax.swing.plaf.basic.BasicListUI.updateLayoutState() definition code for javax.swing.plaf.basic.BasicListUI.updateLayoutState()

maybeUpdateLayoutState sample code for javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState() definition code for javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState()

protected void maybeUpdateLayoutState()
If updateLayoutStateNeeded is non zero, call updateLayoutState() and reset updateLayoutStateNeeded. This method should be called by methods before doing any computation based on the geometry of the list. For example it's the first call in paint() and getPreferredSize().

See Also:
updateLayoutState() sample code for javax.swing.plaf.basic.BasicListUI.updateLayoutState() definition code for javax.swing.plaf.basic.BasicListUI.updateLayoutState()

updateLayoutState sample code for javax.swing.plaf.basic.BasicListUI.updateLayoutState() definition code for javax.swing.plaf.basic.BasicListUI.updateLayoutState()

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.

See Also:
maybeUpdateLayoutState() sample code for javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState() definition code for javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState()

createMouseInputListener sample code for javax.swing.plaf.basic.BasicListUI.createMouseInputListener() definition code for javax.swing.plaf.basic.BasicListUI.createMouseInputListener()

protected MouseInputListener sample code for javax.swing.event.MouseInputListener definition code for javax.swing.event.MouseInputListener  createMouseInputListener()
Creates a delegate that implements MouseInputListener. The delegate is added to the corresponding java.awt.Component listener lists at installUI() time. Subclasses can override this method to return a custom MouseInputListener, e.g.
 class MyListUI extends BasicListUI {
    protected MouseInputListener createMouseInputListener() {
        return new MyMouseInputHandler();
    }
    public class MyMouseInputHandler extends MouseInputHandler {
        public void mouseMoved(MouseEvent e) {
            // do some extra work when the mouse moves
            super.mouseMoved(e);
        }
    }
 }
 

See Also:
BasicListUI.MouseInputHandler sample code for javax.swing.plaf.basic.BasicListUI.MouseInputHandler definition code for javax.swing.plaf.basic.BasicListUI.MouseInputHandler , installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent)

createFocusListener sample code for javax.swing.plaf.basic.BasicListUI.createFocusListener() definition code for javax.swing.plaf.basic.BasicListUI.createFocusListener()

protected FocusListener sample code for java.awt.event.FocusListener definition code for java.awt.event.FocusListener  createFocusListener()

createListSelectionListener sample code for javax.swing.plaf.basic.BasicListUI.createListSelectionListener() definition code for javax.swing.plaf.basic.BasicListUI.createListSelectionListener()

protected ListSelectionListener sample code for javax.swing.event.ListSelectionListener definition code for javax.swing.event.ListSelectionListener  createListSelectionListener()
Creates an instance of ListSelectionHandler that's added to the JLists by selectionModel as needed. Subclasses can override this method to return a custom ListSelectionListener, e.g.
 class MyListUI extends BasicListUI {
    protected ListSelectionListener createListSelectionListener() {
        return new MySelectionListener();
    }
    public class MySelectionListener extends ListSelectionHandler {
        public void valueChanged(ListSelectionEvent e) {
            // do some extra work when the selection changes
            super.valueChange(e);
        }
    }
 }
 

See Also:
BasicListUI.ListSelectionHandler sample code for javax.swing.plaf.basic.BasicListUI.ListSelectionHandler definition code for javax.swing.plaf.basic.BasicListUI.ListSelectionHandler , installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent)

createListDataListener sample code for javax.swing.plaf.basic.BasicListUI.createListDataListener() definition code for javax.swing.plaf.basic.BasicListUI.createListDataListener()

protected ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener  createListDataListener()
Creates an instance of ListDataListener that's added to the JLists by model as needed. Subclasses can override this method to return a custom ListDataListener, e.g.
 class MyListUI extends BasicListUI {
    protected ListDataListener createListDataListener() {
        return new MyListDataListener();
    }
    public class MyListDataListener extends ListDataHandler {
        public void contentsChanged(ListDataEvent e) {
            // do some extra work when the models contents change
            super.contentsChange(e);
        }
    }
 }
 

See Also:
ListDataListener sample code for javax.swing.event.ListDataListener definition code for javax.swing.event.ListDataListener , JList.getModel() sample code for javax.swing.JList.getModel() definition code for javax.swing.JList.getModel() , installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent)

createPropertyChangeListener sample code for javax.swing.plaf.basic.BasicListUI.createPropertyChangeListener() definition code for javax.swing.plaf.basic.BasicListUI.createPropertyChangeListener()

protected PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  createPropertyChangeListener()
Creates an instance of PropertyChangeHandler that's added to the JList by installUI(). Subclasses can override this method to return a custom PropertyChangeListener, e.g.
 class MyListUI extends BasicListUI {
    protected PropertyChangeListener createPropertyChangeListener() {
        return new MyPropertyChangeListener();
    }
    public class MyPropertyChangeListener extends PropertyChangeHandler {
        public void propertyChange(PropertyChangeEvent e) {
            if (e.getPropertyName().equals("model")) {
                // do some extra work when the model changes
            }
            super.propertyChange(e);
        }
    }
 }
 

See Also:
PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener , installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicListUI.installUI(javax.swing.JComponent)