|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.plaf.ComponentUI com.levigo.jadice.swing.thumbnailview.ThumbnailViewUI com.levigo.jadice.swing.thumbnailview.BasicThumbnailViewUI
public class BasicThumbnailViewUI
Field Summary | |
---|---|
protected Dimension |
cellSize
|
protected CellRendererPane |
rendererPane
|
protected ThumbnailView |
view
|
protected Dimension |
viewSize
|
Constructor Summary | |
---|---|
BasicThumbnailViewUI()
|
Method Summary | |
---|---|
static ComponentUI |
createUI(JComponent list)
Returns a new instance of BasicThumbnailViewUI. |
Rectangle |
getCellBounds(ThumbnailView list,
int index1,
int index2)
|
Dimension |
getCellSize()
|
Dimension |
getMaximumSize(JComponent c)
|
Dimension |
getPreferredSize(JComponent c)
|
Point |
indexToLocation(ThumbnailView list,
int index)
|
protected void |
installDefaults()
Initialize ThumbnailView properties, e.g. |
protected void |
installKeyboardActions()
Registers the keyboard bindings on the ThumbnailView that the
BasicListUI is associated with. |
protected void |
installListeners()
Create and install the listeners for the ThumbnailView, its model, and its selectionModel. |
void |
installUI(JComponent c)
Initializes this.list by calling installDefaults() ,
installListeners() , and installKeyboardActions() in order. |
int |
locationToIndex(ThumbnailView list,
Point location)
|
void |
paint(Graphics g,
JComponent c)
Paint the rows that intersect the Graphics objects clipRect. |
protected void |
paintCell(Graphics g,
int index,
Rectangle cellBounds,
ThumbnailCellRenderer cellRenderer,
List<Page> 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 ThumbnailView 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 ThumbnailView, its model, and its selectionModel. |
void |
uninstallUI(JComponent c)
Uninitializes this.list by calling uninstallListeners() ,
uninstallKeyboardActions() , and uninstallDefaults() in order. |
protected void |
updateGrid()
Update just the grid dimensions. |
protected void |
updateLayout()
Update the whole view geometry. |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMinimumSize, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Dimension cellSize
protected CellRendererPane rendererPane
protected ThumbnailView view
protected Dimension viewSize
Constructor Detail |
---|
public BasicThumbnailViewUI()
Method Detail |
---|
public static ComponentUI createUI(JComponent list)
public Rectangle getCellBounds(ThumbnailView list, int index1, int index2)
getCellBounds
in class ThumbnailViewUI
public Dimension getCellSize()
getCellSize
in class ThumbnailViewUI
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class ComponentUI
public Dimension getMaximumSize(JComponent c)
getMaximumSize
in class ComponentUI
public Point indexToLocation(ThumbnailView list, int index)
indexToLocation
in class ThumbnailViewUI
protected void installDefaults()
uninstallDefaults()
,
installUI(javax.swing.JComponent)
,
CellRendererPane
protected void installKeyboardActions()
ThumbnailView
that the
BasicListUI
is associated with. This method is called at installUI() time.
installUI(javax.swing.JComponent)
protected void installListeners()
installUI(javax.swing.JComponent)
,
uninstallListeners()
public void installUI(JComponent c)
this.list
by calling installDefaults()
,
installListeners()
, and installKeyboardActions()
in order.
installUI
in class ComponentUI
installDefaults()
,
installListeners()
,
installKeyboardActions()
public int locationToIndex(ThumbnailView list, Point location)
locationToIndex
in class ThumbnailViewUI
NullPointerException
public void paint(Graphics g, JComponent c)
paint
in class ComponentUI
paintCell(java.awt.Graphics, int, java.awt.Rectangle, com.levigo.jadice.swing.thumbnailview.ThumbnailCellRenderer, java.util.List, javax.swing.ListSelectionModel, int)
protected void paintCell(Graphics g, int index, Rectangle cellBounds, ThumbnailCellRenderer cellRenderer, List<Page> dataModel, ListSelectionModel selModel, int leadIndex)
paint(java.awt.Graphics, javax.swing.JComponent)
protected void selectNextIndex()
ThumbnailView.ensureIndexIsVisible(int)
protected void selectPreviousIndex()
ThumbnailView.ensureIndexIsVisible(int)
protected void uninstallDefaults()
installDefaults()
,
uninstallUI(javax.swing.JComponent)
,
CellRendererPane
protected void uninstallKeyboardActions()
installKeyboardActions
. This method is
called at uninstallUI() time - subclasses should ensure that all of the keyboard actions
registered at installUI time are removed here.
installUI(javax.swing.JComponent)
protected void uninstallListeners()
uninstallUI(javax.swing.JComponent)
,
installListeners()
public void uninstallUI(JComponent c)
this.list
by calling uninstallListeners()
,
uninstallKeyboardActions()
, and uninstallDefaults()
in order. Sets
this.list to null.
uninstallUI
in class ComponentUI
uninstallListeners()
,
uninstallKeyboardActions()
,
uninstallDefaults()
protected void updateGrid()
protected void updateLayout()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |