127 |
public class QtToolkit extends ClasspathToolkit |
public class QtToolkit extends ClasspathToolkit |
128 |
{ |
{ |
129 |
public static EventQueue eventQueue = null; // the native event queue |
public static EventQueue eventQueue = null; // the native event queue |
130 |
|
public static QtRepaintThread repaintThread = null; |
131 |
public static MainQtThread guiThread = null; |
public static MainQtThread guiThread = null; |
132 |
public static QtGraphicsEnvironment graphicsEnv = null; |
public static QtGraphicsEnvironment graphicsEnv = null; |
133 |
|
|
134 |
private static void initToolkit() |
private static void initToolkit() |
135 |
{ |
{ |
136 |
eventQueue = new EventQueue(); |
eventQueue = new EventQueue(); |
137 |
|
repaintThread = new QtRepaintThread(); |
138 |
System.loadLibrary("qtpeer"); |
System.loadLibrary("qtpeer"); |
139 |
|
|
140 |
String theme = null; |
String theme = null; |
151 |
{ |
{ |
152 |
} |
} |
153 |
|
|
154 |
guiThread = new MainQtThread( theme ); |
boolean doublebuffer = true; |
155 |
|
try |
156 |
|
{ |
157 |
|
String style = System.getProperty("qtoptions.nodoublebuffer"); |
158 |
|
if(style != null) |
159 |
|
doublebuffer = false; |
160 |
|
} |
161 |
|
catch(SecurityException e) |
162 |
|
{ |
163 |
|
} |
164 |
|
catch(IllegalArgumentException e) |
165 |
|
{ |
166 |
|
} |
167 |
|
|
168 |
|
guiThread = new MainQtThread( theme, doublebuffer ); |
169 |
guiThread.start(); |
guiThread.start(); |
170 |
|
repaintThread.start(); |
171 |
} |
} |
172 |
|
|
173 |
/** |
/** |
212 |
return new QtCanvasPeer( this, target ); |
return new QtCanvasPeer( this, target ); |
213 |
} |
} |
214 |
|
|
|
protected LightweightPeer createComponent(Component target) |
|
|
{ |
|
|
return new QtPanelPeer( this, target ); |
|
|
} |
|
|
|
|
215 |
protected CheckboxPeer createCheckbox(Checkbox target) |
protected CheckboxPeer createCheckbox(Checkbox target) |
216 |
{ |
{ |
217 |
return new QtCheckboxPeer( this, target ); |
return new QtCheckboxPeer( this, target ); |
462 |
throw new UnsupportedOperationException(); |
throw new UnsupportedOperationException(); |
463 |
} |
} |
464 |
|
|
|
// REMOVE. |
|
|
public void registerImageIOSpis(IIORegistry reg) |
|
|
{ |
|
|
} |
|
|
|
|
465 |
public EmbeddedWindowPeer createEmbeddedWindow(EmbeddedWindow w) |
public EmbeddedWindowPeer createEmbeddedWindow(EmbeddedWindow w) |
466 |
{ |
{ |
467 |
return null; // FIXME |
// return new QtEmbeddedWindowPeer( this, w ); |
468 |
} |
return null; |
|
|
|
|
// Yucky. |
|
|
|
|
|
public boolean nativeQueueEmpty() |
|
|
{ |
|
|
return true; |
|
|
} |
|
|
|
|
|
public void wakeNativeQueue() |
|
|
{ |
|
|
} |
|
|
|
|
|
public void iterateNativeQueue(EventQueue locked, boolean block) |
|
|
{ |
|
469 |
} |
} |
470 |
} |
} |