49 |
gfxapi = new gzz.client.awt.AWTAPI(); |
gfxapi = new gzz.client.awt.AWTAPI(); |
50 |
else if(cl.equals("gl")) |
else if(cl.equals("gl")) |
51 |
gfxapi = new gzz.client.gl.GLAPI(); |
gfxapi = new gzz.client.gl.GLAPI(); |
52 |
else |
else |
53 |
throw new Error("Invalid client type '"+cl+"': should be awt or gl"); |
throw new Error("Invalid client type '"+cl+"': should be awt or gl"); |
54 |
} |
} |
55 |
|
|
65 |
public abstract void startUpdateManager(Runnable r); |
public abstract void startUpdateManager(Runnable r); |
66 |
|
|
67 |
/** Create a new window. |
/** Create a new window. |
68 |
|
* @param repr The client-level object representing this window. |
69 |
|
* Passed to the binder when an event occurs. |
70 |
*/ |
*/ |
71 |
public abstract Window createWindow() ; |
public abstract Window createWindow(Object repr); |
72 |
|
|
73 |
/** Obtain a text style object for an abstract font at a given |
/** Obtain a text style object for an abstract font at a given |
74 |
* size. The parameters are as |
* size. The parameters are as |
102 |
* size as size. |
* size as size. |
103 |
* This vobscene will <b>not</b> contain any instructions |
* This vobscene will <b>not</b> contain any instructions |
104 |
* to clear the window etc., since vobscenes can be used as |
* to clear the window etc., since vobscenes can be used as |
105 |
* viewports. |
* viewports. |
106 |
*/ |
*/ |
107 |
public VobScene createVobScene() { |
public VobScene createVobScene() { |
108 |
return createVobScene(getSize()); |
return createVobScene(getSize()); |
116 |
*/ |
*/ |
117 |
abstract public void registerBinder(Binder s); |
abstract public void registerBinder(Binder s); |
118 |
|
|
119 |
/** Add a timeout: Binder.timeout() is called after |
/** Add a timeout: Binder.timeout() is called after |
120 |
* given number of milliseconds. |
* given number of milliseconds. |
121 |
*/ |
*/ |
122 |
public void addTimeout(int ms, Object o) { |
public void addTimeout(int ms, Object o) { |
123 |
throw new UnsupportedOperationException("Not in this gfxapi"); |
throw new UnsupportedOperationException("Not in this gfxapi"); |
124 |
} |
} |
125 |
|
|
126 |
public Window(GraphicsAPI api) { this.gfxapi = api; } |
/** @param repr The object represented by this window (passed to binder) |
127 |
|
*/ |
128 |
|
public Window(GraphicsAPI api, Object repr) { |
129 |
|
this.gfxapi = api; |
130 |
|
this.repr = repr; |
131 |
|
} |
132 |
private final GraphicsAPI gfxapi; |
private final GraphicsAPI gfxapi; |
133 |
|
protected final Object repr; |
134 |
|
|
135 |
/** Get the GraphicsAPI this window is associated with. |
/** Get the GraphicsAPI this window is associated with. |
136 |
*/ |
*/ |