SWT/AWT flickering problem [message #464023] |
Wed, 16 November 2005 14:47 |
Eclipse User |
|
|
|
Originally posted by: nlupanov.outsourcingbg.com
I am integrating existing Swing gui into Eclipse plugin - therefore i use
the
SWT_AWT.new_Frame() method to gain java.awt.Frame class and add swing
component to it.
This is the code of the eclipse plugin view:
public class ETL4ALLWorkerView extends ViewPart {
public static final String ID = "EclipsePluginETL4ALL.WorkerView";
Frame frame;
Composite swt_frame;
Canvas canvas;
public ETL4ALLWorkerView() {
super();
}
public void createPartControl(Composite parent) {
swt_frame = new Composite(parent, SWT.EMBEDDED | SWT.NO_REDRAW_RESIZE);
frame = SWT_AWT.new_Frame(swt_frame);
TransformClient clientFrame = null;
if((clientFrame = Perspective.getETL4ALLMainFrame()) == null){
clientFrame = TransformClient.plugin_main();
Perspective.setETL4ALLMainFrame(clientFrame);
}
//The following is a JDesktopPane that i use to add JInternalFrames to:
WorkerPanel workerPane = clientFrame.getWorkerPane();
frame.setBackground(new Color(180,70,220));
frame.add(workerPane);
public void setFocus() {
}
}
I am trying to add the swing JDesktopPane to java.awt.Frame .The
JDesktopPane includes
JInternalFrame.The problem is that the GUI is flickering when resized or
moved.
I migrated from jre1.4 to jre1.5 and the flickering of the JDesktopPane
stops but the
JInternalFrame is still flickering when resized/moved.I am wondering if at
this point this is
a SWT/Swing integration issue or AWT/Swing issue.
|
|
|
|
|
|
|
Re: SWT/AWT flickering problem [message #464186 is a reply to message #464025] |
Fri, 18 November 2005 12:12 |
Eclipse User |
|
|
|
Originally posted by: nlupanov.outsourcingbg.com
I am aware with this example it it still does not help.I am trying to embedd
a swing JDesktopPane into java.awt.Frame that is integrated with the SWT
Composite object of the plugin view.Another think i have noticed is that it
flickers with the java.awt.Frame's background so maybe it is an AWT/Swing
issue.
"Gordon Hirsch" <eclipse@gordonh.com> wrote in message
news:dlfi52$63h$1@news.eclipse.org...
> Following the example of this snippet may help:
>
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet154.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup
>
> If you setup a root pane and possibly set the sun.awt.noerasebackground
> property, flicker will be reduced (but, in my experience, not completely
> eliminated).
>
> N.Lupanov wrote:
>> I am integrating existing Swing gui into Eclipse plugin - therefore i use
>> the
>> SWT_AWT.new_Frame() method to gain java.awt.Frame class and add swing
>> component to it.
>> This is the code of the eclipse plugin view:
>>
>>
>> public class ETL4ALLWorkerView extends ViewPart {
>>
>> public static final String ID = "EclipsePluginETL4ALL.WorkerView";
>> Frame frame;
>> Composite swt_frame;
>> Canvas canvas;
>> public ETL4ALLWorkerView() {
>> super();
>> }
>>
>> public void createPartControl(Composite parent) {
>>
>> swt_frame = new Composite(parent, SWT.EMBEDDED |
>> SWT.NO_REDRAW_RESIZE);
>> frame = SWT_AWT.new_Frame(swt_frame);
>> TransformClient clientFrame = null;
>> if((clientFrame = Perspective.getETL4ALLMainFrame()) == null){
>> clientFrame = TransformClient.plugin_main();
>> Perspective.setETL4ALLMainFrame(clientFrame);
>> }
>>
>> //The following is a JDesktopPane that i use to add JInternalFrames to:
>> WorkerPanel workerPane = clientFrame.getWorkerPane();
>> frame.setBackground(new Color(180,70,220));
>> frame.add(workerPane);
>>
>>
>> public void setFocus() {
>>
>> }
>>
>> }
>>
>> I am trying to add the swing JDesktopPane to java.awt.Frame .The
>> JDesktopPane includes
>> JInternalFrame.The problem is that the GUI is flickering when resized or
>> moved.
>> I migrated from jre1.4 to jre1.5 and the flickering of the JDesktopPane
>> stops but the
>> JInternalFrame is still flickering when resized/moved.I am wondering if
>> at this point this is
>> a SWT/Swing integration issue or AWT/Swing issue.
>>
|
|
|
Powered by
FUDForum. Page generated in 0.04219 seconds