|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ListUI
javax.swing.plaf.basic.BasicListUI
net.datacrow.console.components.lists.DcListUI
public class DcListUI
Nested Class Summary | |
---|---|
class |
DcListUI.ListSelectionHandler
The ListSelectionListener that's added to the JLists selection model at installUI time, and whenever the JList.selectionModel property changes. |
class |
DcListUI.MouseInputHandler
Mouse input, and focus handling for JList. |
class |
DcListUI.PropertyChangeHandler
The PropertyChangeListener that's added to the JList at installUI time. |
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicListUI |
---|
javax.swing.plaf.basic.BasicListUI.FocusHandler, javax.swing.plaf.basic.BasicListUI.ListDataHandler |
Field Summary | |
---|---|
protected int[] |
cellWidths
|
protected int |
columnsPerRow
|
protected static int |
columnsPerRowChanged
|
Fields inherited from class javax.swing.plaf.basic.BasicListUI |
---|
cellHeight, cellHeights, cellRendererChanged, cellWidth, fixedCellHeightChanged, fixedCellWidthChanged, focusListener, fontChanged, list, listDataListener, listSelectionListener, modelChanged, mouseInputListener, propertyChangeListener, prototypeCellValueChanged, rendererPane, selectionModelChanged, updateLayoutStateNeeded |
Constructor Summary | |
---|---|
DcListUI()
|
Method Summary | |
---|---|
protected int |
convertItemToX(int index)
|
protected int |
convertItemToY(int index)
|
protected int |
convertRowToY(int row)
|
protected int |
convertXToColumn(int x0)
|
protected int |
convertXYToIndex(int x,
int y)
|
protected int |
convertYToRow(int y0)
Convert the JList relative coordinate to the row that contains it, based on the current layout. |
protected javax.swing.event.ListDataListener |
createListDataListener()
Creates an instance of ListDataListener that's added to the JLists by model as needed. |
protected javax.swing.event.ListSelectionListener |
createListSelectionListener()
Creates an instance of ListSelectionHandler that's added to the JLists by selectionModel as needed. |
protected javax.swing.event.MouseInputListener |
createMouseInputListener()
Creates a delegate that implements MouseInputListener. |
protected java.beans.PropertyChangeListener |
createPropertyChangeListener()
Creates an instance of PropertyChangeHandler that's added to the JList by installUI(). |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent list)
Returns a new instance of Basic2DListUI. |
java.awt.Rectangle |
getCellBounds(javax.swing.JList list,
int index1,
int index2)
|
java.awt.Rectangle |
getCellBoundsPerColumnRow(javax.swing.JList list,
int column,
int row)
|
protected int |
getItemHeight(int index)
|
protected int |
getItemWidth(int index)
|
protected int |
getMaxColumnsPerRow(int width)
|
java.awt.Dimension |
getMaximumSize(javax.swing.JComponent c)
|
java.awt.Dimension |
getMinimumSize(javax.swing.JComponent c)
|
java.awt.Dimension |
getPreferredSize(javax.swing.JComponent c)
The preferredSize of a list is total height of the rows and the maximum width of the cells. |
protected int |
getRowHeight(int row)
|
java.awt.Point |
indexToLocation(javax.swing.JList list,
int index)
|
int |
locationToIndex(javax.swing.JList list,
java.awt.Point location)
|
int |
locationToNearestIndex(DcList list,
java.awt.Point p)
|
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c)
Paint the rows that intersect the Graphics objects clipRect. |
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. |
Methods inherited from class javax.swing.plaf.basic.BasicListUI |
---|
createFocusListener, getBaseline, getBaselineResizeBehavior, installDefaults, installKeyboardActions, installListeners, installUI, maybeUpdateLayoutState, paintCell, selectNextIndex, selectPreviousIndex, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int columnsPerRowChanged
protected int columnsPerRow
protected int[] cellWidths
Constructor Detail |
---|
public DcListUI()
Method Detail |
---|
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
paint
in class javax.swing.plaf.basic.BasicListUI
BasicListUI.paintCell(java.awt.Graphics, int, java.awt.Rectangle, javax.swing.ListCellRenderer, javax.swing.ListModel, javax.swing.ListSelectionModel, int)
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
getPreferredSize
in class javax.swing.plaf.basic.BasicListUI
c
- The JList component.
public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
getMinimumSize
in class javax.swing.plaf.ComponentUI
public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
getMaximumSize
in class javax.swing.plaf.ComponentUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent list)
public int locationToIndex(javax.swing.JList list, java.awt.Point location)
locationToIndex
in class javax.swing.plaf.basic.BasicListUI
ListUI.locationToIndex(javax.swing.JList, java.awt.Point)
public java.awt.Point indexToLocation(javax.swing.JList list, int index)
indexToLocation
in class javax.swing.plaf.basic.BasicListUI
ListUI.indexToLocation(javax.swing.JList, int)
public int locationToNearestIndex(DcList list, java.awt.Point p)
public java.awt.Rectangle getCellBoundsPerColumnRow(javax.swing.JList list, int column, int row)
public java.awt.Rectangle getCellBounds(javax.swing.JList list, int index1, int index2)
getCellBounds
in class javax.swing.plaf.basic.BasicListUI
ListUI.getCellBounds(javax.swing.JList, int, int)
protected int getRowHeight(int row)
getRowHeight
in class javax.swing.plaf.basic.BasicListUI
protected int getItemHeight(int index)
protected int getItemWidth(int index)
protected int convertXYToIndex(int x, int y)
protected int convertYToRow(int y0)
convertYToRow
in class javax.swing.plaf.basic.BasicListUI
getRowHeight(int)
,
updateLayoutState()
protected int convertXToColumn(int x0)
protected int convertRowToY(int row)
convertRowToY
in class javax.swing.plaf.basic.BasicListUI
protected int convertItemToY(int index)
protected int convertItemToX(int index)
protected void updateLayoutState()
updateLayoutState
in class javax.swing.plaf.basic.BasicListUI
BasicListUI.maybeUpdateLayoutState()
protected int getMaxColumnsPerRow(int width)
protected javax.swing.event.MouseInputListener createMouseInputListener()
createMouseInputListener
in class javax.swing.plaf.basic.BasicListUI
DcListUI.MouseInputHandler
,
BasicListUI.installUI(javax.swing.JComponent)
protected javax.swing.event.ListSelectionListener createListSelectionListener()
createListSelectionListener
in class javax.swing.plaf.basic.BasicListUI
DcListUI.ListSelectionHandler
,
BasicListUI.installUI(javax.swing.JComponent)
protected javax.swing.event.ListDataListener createListDataListener()
createListDataListener
in class javax.swing.plaf.basic.BasicListUI
ListDataListener
,
JList.getModel()
,
BasicListUI.installUI(javax.swing.JComponent)
protected java.beans.PropertyChangeListener createPropertyChangeListener()
createPropertyChangeListener
in class javax.swing.plaf.basic.BasicListUI
PropertyChangeListener
,
BasicListUI.installUI(javax.swing.JComponent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |