All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----c2.framework.Brick
|
+----c2.framework.Component
|
+----c2.framework.ComponentThread
|
+----c2.comp.graphics.GraphicsBinding
GraphicsBinding accepts notifications from C2 components above it and reifies them as calls to Java AWT methods. It also transforms user-generated events into C2 requests, which are sent up an architecture.
The binding currently supports manipulation of AWT frames, panels, buttons, text fields, arcs, lines, ovals, rectangles, and text strings. The binding is extensible and is intended to support additional AWT functionality.
NOTE: Italicized message parameters have a default value and are hence optional.
Incoming Notifications
ApplicationTerminated ();
ViewportCreated (Integer x, Integer y,
Integer width, Integer height,
String title, String id,
String foreground, String background);
ViewportDestroyed (String id);
ViewportCleared (String id);
PanelAdded (Integer x, Integer y,
Integer width, Integer height,
String foreground, String background,
String id, String parent_id);
PanelCleared (String id);
ButtonAdded (Integer x, Integer y,
Integer width, Integer height,
String foreground, String background,
String label, String parent_id);
TextFieldAdded (Integer x, Integer y,
Integer width, Integer height,
String foreground, String background,
String label, String value,
String parent_id);
TextFieldSet (String label, String value,
String parent_id);
TextFieldCleared (String label, String parent_id);
c2Grectangle (Integer x, Integer y,
Integer width, Integer height,
String fill, String border,
String parent_id);
c2Gline (Integer x1, Integer y1,
Integer x2, Integer y2,
String color, String parent_id);
c2Garc (Integer x, Integer y,
Integer width, Integer height,
Integer angle1, Integer angle2,
String fill, String border,
String parent_id);
c2Goval (Integer x, Integer y,
Integer width, Integer height,
String fill, String border,
String parent_id);
c2Gtext (Integer x, Integer y,
String value, String font,
String color, String style,
Integer size, String parent_id);
Outgoing Requests
AcceptEvent (String button, String parent_id);
AcceptEvent (String text_field, String value,
String parent_id);
AcceptEvent (String c2GkeyEvent, String parent_id);
AcceptEvent (Integer otherC2GkeyEvent, String parent_id);
Incoming Requests
none
Outgoing Notifications
none
protected Vector vports
protected Vector panels
public GraphicsBinding()
public GraphicsBinding(String name)
public void create(String name)
public synchronized void handle(Notification n)
public synchronized void handle(Request r)
public void send(Request r)
public C2Viewport createViewport(String id,
int x,
int y,
int width,
int height,
String title,
Color foreground,
Color background,
GraphicsBinding gb)
public void destroyViewport(C2Viewport v)
public void clearViewport(C2Viewport v)
public void shutdown()
public C2Panel addPanel(String id,
C2Viewport v,
int x,
int y,
int width,
int height,
Color foreground,
Color background,
GraphicsBinding gb)
public void clearPanel(C2Panel p)
public C2Button addButton(C2Viewport v,
int x,
int y,
int width,
int height,
String label,
Color foreground,
Color background)
public C2Button addButton(C2Panel p,
int x,
int y,
int width,
int height,
String label,
Color foreground,
Color background)
public String getTextField(C2TextField tf)
public void setTextField(C2TextField tf,
String s)
public void eraseTextField(C2TextField tf)
public C2TextField addTextField(String id,
C2Viewport v,
int x,
int y,
int width,
int height,
Color foreground,
Color background,
String initial)
public C2TextField addTextField(String id,
C2Panel p,
int x,
int y,
int width,
int height,
Color foreground,
Color background,
String initial)
public void rectangle(C2Viewport v,
int x,
int y,
int width,
int height,
Color fill,
Color border)
public void oval(C2Viewport v,
int x,
int y,
int width,
int height,
Color fill,
Color border)
public void arc(C2Viewport v,
int x,
int y,
int width,
int height,
int angle1,
int angle2,
Color fill,
Color border)
public void line(C2Viewport v,
int x1,
int y1,
int x2,
int y2,
Color c)
public void text(C2Viewport v,
int x,
int y,
String message,
String font,
String style,
int size,
Color c)
public void rectangle(C2Panel p,
int x,
int y,
int width,
int height,
Color fill,
Color border)
public void oval(C2Panel p,
int x,
int y,
int width,
int height,
Color fill,
Color border)
public void arc(C2Panel p,
int x,
int y,
int width,
int height,
int angle1,
int angle2,
Color fill,
Color border)
public void line(C2Panel p,
int x1,
int y1,
int x2,
int y2,
Color c)
public void text(C2Panel p,
int x,
int y,
String message,
String font,
String style,
int size,
Color c)
All Packages Class Hierarchy This Package Previous Next Index