| |
|
| java.lang.Object org.apache.harmony.x.swing.BlitSupport
BlitSupport | public class BlitSupport (Code) | | Blit engine which allows to 'repaint' moving components using Graphics.copyArea() (blitting mode).
To use this class a component and its parent should be JComponent.
Parent can be dynamically changed which causes blitting reset.
|
Constructor Summary | |
public | BlitSupport() Constructs BlitSupport with no component set. | public | BlitSupport(JComponent c) Constructs BlitSupport for the specified component. |
Method Summary | |
public void | onPaint() Must be called from Component.paint() or related method to synchromize
'normal' and optimized paints. | public boolean | paint() Should be called from the place where component position was changed and optimized repainting is required. | public void | setBlitComponent(JComponent c) Sets blitting component. |
BlitSupport | public BlitSupport()(Code) | | Constructs BlitSupport with no component set.
In this case component must be set before first call to
BlitSupport.paint() method.
|
BlitSupport | public BlitSupport(JComponent c)(Code) | | Constructs BlitSupport for the specified component.
Parameters: c - JComponent which drag-related repaints should be optimized |
onPaint | public void onPaint()(Code) | | Must be called from Component.paint() or related method to synchromize
'normal' and optimized paints. Method must be called from
the event-dispatching thread.
|
paint | public boolean paint()(Code) | | Should be called from the place where component position was changed and optimized repainting is required.
Note that if optimized repainting was not called or failed (returned false) the 'normal' repainting will occur automatically.
Method must be called from the event-dispatching thread.
true if optimized repainting was successful, false otherwise |
setBlitComponent | public void setBlitComponent(JComponent c)(Code) | | Sets blitting component.
Parameters: c - JComponent which drag-related repaints shoudl be optimized |
|
|
|