ListUI.
BasicListUI instances cannot be shared between multiple
lists.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public class | BasicListUI.
This class should be treated as a "protected" inner class. |
| private class | |
| public class | BasicListUI.
The |
| public class | BasicListUI.
The ListSelectionListener that's added to the JLists selection model at installUI time, and whenever the JList.selectionModel property changes. |
| pack-priv static class | |
| public class | BasicListUI.
Mouse input, and focus handling for JList. |
| public class | BasicListUI.
The PropertyChangeListener that's added to the JList at installUI time. |
| Modifier and Type | Field and Description |
|---|---|
| private static final StringBuilder | |
| protected int | cellHeight
The height of cell. |
| protected int[] | cellHeights
The array of cells' height |
| protected static final int | cellRendererChanged
The bit relates to cell renderer changed property. |
| protected int | cellWidth
The width of cell. |
| private static final int | CHANGE_LEAD
Used by IncrementLeadSelectionAction. |
| private static final int | CHANGE_SELECTION
Used by IncrementLeadSelectionAction. |
| private int | columnCount
Number of columns to create. |
| private static final int | |
| private static final TransferHandler | |
| private static final int | |
| private static final int | EXTEND_SELECTION
Used by IncrementLeadSelectionAction. |
| protected static final int | fixedCellHeightChanged
The bit relates to fixed cell height changed property. |
| protected static final int | fixedCellWidthChanged
The bit relates to fixed cell width changed property. |
| protected FocusListener | focusListener
|
| protected static final int | fontChanged
The bit relates to font changed property. |
| private BasicListUI. | |
| private static final int | |
| private boolean | isFileList
Local cache of JList's client property "List.isFileList" |
| private boolean | isLeftToRight
Local cache of JList's component orientation property |
| private int | layoutOrientation
The layout orientation of the list. |
| private static final int | |
| protected JList | list
The instance of |
| protected ListDataListener | listDataListener
|
| private int | listHeight
Height of the list. |
| protected ListSelectionListener | listSelectionListener
|
| private int | listWidth
Width of the list. |
| protected static final int | modelChanged
The bit relates to model changed property. |
| protected MouseInputListener | mouseInputListener
|
| private int | preferredHeight
Preferred height to make the list, this is only used if the the list is laid out horizontally. |
| protected PropertyChangeListener | propertyChangeListener
|
| protected static final int | prototypeCellValueChanged
The bit relates to prototype cell value changed property. |
| protected CellRendererPane | rendererPane
The instance of |
| private int | rowsPerColumn
Number of rows per column. |
| protected static final int | selectionModelChanged
The bit relates to selection model changed property. |
| private long | timeFactor
The time factor to treat the series of typed alphanumeric key as prefix for first letter navigation. |
| protected int | updateLayoutStateNeeded
The value represents changes to |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static int | |
| private int | |
| private int | convertLocationToModel(int x, int y)
Returns the closest location to the model index of the passed in location. |
| private int | convertLocationToRow(int x, int y0, boolean
If true and the location doesn't exactly match a
particular location, this will return the closest row. closest)Returns the row at location x/y. |
| private int | convertLocationToRowInColumn(int y, int column)
Returns the closest row that starts at the specified y-location in the passed in column. |
| private int | |
| private int | |
| protected int | Returns: the Y coordinate of the origin of row, or -1a row row)Return the |
| protected int | Returns: the row that contains y0, or -1a relative Y coordinate y0)Convert the |
| protected FocusListener | |
| protected ListDataListener | Returns: an instance ofListDataListenerCreates an instance of |
| protected ListSelectionListener | Returns: an instance ofListSelectionHandlerCreates an instance of |
| protected MouseInputListener | Returns: an instance ofMouseInputListenerCreates a delegate that implements |
| protected PropertyChangeListener | Returns: an instance ofPropertyChangeHandlerCreates an instance of |
| public static ComponentUI | Returns: a newListUI implementation for the Windows look and feel.a component list)Hides javax. Returns a new instance of |
| public int | getBaseline(JComponent c, int width, int height)
Overrides javax. Returns the baseline. |
| public Component. | getBaselineResizeBehavior(JComponent c)
Overrides javax. Returns an enum indicating how the baseline of the component changes as the size changes. |
| public Rectangle | getCellBounds(JList<?> list, int index1, int index2)
Implements abstract javax. Returns the bounding rectangle, in the given list's coordinate system, for the range of cells specified by the two indices. |
| private Rectangle | getCellBounds(JList<?> list, int index)
Gets the bounds of the specified model index, returning the resulting
bounds, or null if |
| private Rectangle | |
| private BasicListUI. | |
| private int | |
| pack-priv InputMap | |
| private int | |
| public Dimension | Returns: The total size of the list.The JList component. c)Overrides javax. The preferredSize of the list depends upon the layout orientation. |
| private int | |
| protected int | Returns: the specified row height or -1 if row isn't valida row row)Returns the height of the specified row based on the current layout. |
| public Point | indexToLocation(JList<?> list, int index)
Implements abstract javax. Returns the origin in the given |
| protected void | installDefaults()
Initializes list properties such as font, foreground, and background, and adds the CellRendererPane. |
| protected void | installKeyboardActions()
Registers the keyboard bindings on the |
| protected void | installListeners()
Creates and installs the listeners for the JList, its model, and its selectionModel. |
| public void | installUI(JComponent c)
Overrides javax. Initializes |
| pack-priv static void | |
| public int | locationToIndex(JList<?> list, Point location)
Implements abstract javax. Returns the cell index in the specified |
| protected void | maybeUpdateLayoutState()
If updateLayoutStateNeeded is non zero, call updateLayoutState() and reset updateLayoutStateNeeded. |
| public void | paint(Graphics g, JComponent c)
Overrides javax. Paint the rows that intersect the Graphics objects clipRect. |
| protected void | paintCell(Graphics
an instance of g, int Graphicsa row row, Rectangle a bounding rectangle to render to rowBounds, ListCellRenderer<Object> a list of cellRenderer, ListModel<Object> ListCellRenderera list model dataModel, ListSelectionModel a selection model selModel, int a lead index leadIndex)Paint one List cell: compute the relevant state, get the "rubber stamp"
cell renderer component, and then use the |
| private void | |
| private void | |
| private void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| public void | uninstallUI(JComponent c)
Overrides javax. Uninitializes |
| private void | updateHorizontalLayoutState(int fixedCellWidth, int fixedCellHeight)
Invoked when the list is laid out horizontally to determine how many columns to create. |
| private void | |
| 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. |