Liking cljdoc? Tell your friends :D

javax.swing.CellRendererPane

This class is inserted in between cell renderers and the components that use them. It just exists to thwart the repaint() and invalidate() methods which would otherwise propagate up the tree when the renderer was configured. It's used by the implementations of JTable, JTree, and JList. For example, here's how CellRendererPane is used in the code the paints each row in a JList:

cellRendererPane = new CellRendererPane(); ... Component rendererComponent = renderer.getListCellRendererComponent(); renderer.configureListCellRenderer(dataModel.getElementAt(row), row); cellRendererPane.paintComponent(g, rendererComponent, this, x, y, w, h);

A renderer component must override isShowing() and unconditionally return true to work correctly because the Swing paint does nothing for components with isShowing false.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

This class is inserted in between cell renderers and the components that
use them.  It just exists to thwart the repaint() and invalidate() methods
which would otherwise propagate up the tree when the renderer was configured.
It's used by the implementations of JTable, JTree, and JList.  For example,
here's how CellRendererPane is used in the code the paints each row
in a JList:


  cellRendererPane = new CellRendererPane();
  ...
  Component rendererComponent = renderer.getListCellRendererComponent();
  renderer.configureListCellRenderer(dataModel.getElementAt(row), row);
  cellRendererPane.paintComponent(g, rendererComponent, this, x, y, w, h);

A renderer component must override isShowing() and unconditionally return
true to work correctly because the Swing paint does nothing for components
with isShowing false.

Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing.  As of 1.4, support for long term storage
of all JavaBeans™
has been added to the java.beans package.
Please see XMLEncoder.
raw docstring

->cell-renderer-paneclj

(->cell-renderer-pane)

Constructor.

Construct a CellRendererPane object.

Constructor.

Construct a CellRendererPane object.
raw docstring

get-accessible-contextclj

(get-accessible-context this)

Gets the AccessibleContext associated with this CellRendererPane. For CellRendererPanes, the AccessibleContext takes the form of an AccessibleCellRendererPane. A new AccessibleCellRendererPane instance is created if necessary.

returns: an AccessibleCellRendererPane that serves as the AccessibleContext of this CellRendererPane - javax.accessibility.AccessibleContext

Gets the AccessibleContext associated with this CellRendererPane.
 For CellRendererPanes, the AccessibleContext takes the form of an
 AccessibleCellRendererPane.
 A new AccessibleCellRendererPane instance is created if necessary.

returns: an AccessibleCellRendererPane that serves as the
         AccessibleContext of this CellRendererPane - `javax.accessibility.AccessibleContext`
raw docstring

invalidateclj

(invalidate this)

Overridden to avoid propagating a invalidate up the tree when the cell renderer child is configured.

Overridden to avoid propagating a invalidate up the tree when the
cell renderer child is configured.
raw docstring

paintclj

(paint this g)

Shouldn't be called.

g - the specified Graphics window - java.awt.Graphics

Shouldn't be called.

g - the specified Graphics window - `java.awt.Graphics`
raw docstring

paint-componentclj

(paint-component this g c p r)
(paint-component this g c p x y w h)
(paint-component this g c p x y w h should-validate)

Paint a cell renderer component c on graphics object g. Before the component is drawn it's reparented to this (if that's necessary), it's bounds are set to w,h and the graphics object is (effectively) translated to x,y. If it's a JComponent, double buffering is temporarily turned off. After the component is painted it's bounds are reset to -w, -h, 0, 0 so that, if it's the last renderer component painted, it will not start consuming input. The Container p is the component we're actually drawing on, typically it's equal to this.getParent(). If shouldValidate is true the component c will be validated before painted.

g - java.awt.Graphics c - java.awt.Component p - java.awt.Container x - int y - int w - int h - int should-validate - boolean

Paint a cell renderer component c on graphics object g.  Before the component
 is drawn it's reparented to this (if that's necessary), it's bounds
 are set to w,h and the graphics object is (effectively) translated to x,y.
 If it's a JComponent, double buffering is temporarily turned off. After
 the component is painted it's bounds are reset to -w, -h, 0, 0 so that, if
 it's the last renderer component painted, it will not start consuming input.
 The Container p is the component we're actually drawing on, typically it's
 equal to this.getParent(). If shouldValidate is true the component c will be
 validated before painted.

g - `java.awt.Graphics`
c - `java.awt.Component`
p - `java.awt.Container`
x - `int`
y - `int`
w - `int`
h - `int`
should-validate - `boolean`
raw docstring

updateclj

(update this g)

Shouldn't be called.

g - the specified Graphics window - java.awt.Graphics

Shouldn't be called.

g - the specified Graphics window - `java.awt.Graphics`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close