Package com.iizix.swt
Class AWTEmbeddedCompositeResizer
java.lang.Object
com.iizix.swt.AWTEmbeddedCompositeResizer
- All Implemented Interfaces:
- EventListener,- ControlListener,- SWTEventListener
Class used to quickly handle resize changes in the SWT-AWT-embed-composite.
Though it is necessary, setting sun.awt.noerasebackground has negative consequences. Leaving the background uncleared may result in the temporary display of previously drawn pixels (an example of what is sometimes called cheese) during resize operations and before the initial Swing contents are displayed.
- Author:
- Christopher Mindus
- Method SummaryModifier and TypeMethodDescription- static voidAdds a composite that embeds the AWT frame to the resizer.- void- voidChange in composite size.- static voidInitializes the AWT for SWT embedding.
- Method Details- initializepublic static void initialize()Initializes the AWT for SWT embedding.
- _addAdds a composite that embeds the AWT frame to the resizer.
- controlResizedChange in composite size.- These effects are removed by adding a resize listener to the parent SWT composite. When the composite is resized larger, exposing an unpainted region, the listener fills it immediately with the background color. The invalidated region is removed immediately, providing a cosmetic improvement during any delay while the embedded Swing component repaints. - Specified by:
- controlResizedin interface- ControlListener
 
- controlMoved- Specified by:
- controlMovedin interface- ControlListener