Download Kim Woo Jung 2008. 4. 17

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
GLG for JAVA Language
Contents

Introduction of GLG

GLG Toolkit

GLG Programming for Java

Further Works

Q&A
Introduction of GLG

GLG developed by Generic Logic, Inc.

GLG Toolkit is used to create UI or simulator

Various development environments
Introduction of GLG

GLG consists of
 GLG Graphics Builder
 A set of GLG containers
 (GLG Bean, GLG Wrapper Widget, GLG ActiveX Control, etc)
 Many function(called API) can use
GLG Toolkit
GLG Programming for Java

GLG Toolkit provides a 100% Java class
library
 GlgBean : AWT-based Java bean and applet
(subclass from Applet)
 GlgJBean : Swing-based Java bean and applet
(subclass from JApplet)
 GlgJLWBean : Swing-based Java bean
(for use with JDesktopPane and JInternalFrame)

Toolkit provides GLG jar files containing the
com.genlogic package
GLG Programming for Java

Adding GlgBean to an Application Interface
 As a Java bean component in a stand-alone Java application
 As a top level applet
 - Using GlgBean as an Applet
 As a Java bean component inside another applet
 Using GlgBean as a Component of an Applet
GLG Programming for Java

Loading and Displaying a Drawing
 SetDrawingURL(drawing_url);
 SetDrawingFile(filename);
 SetDrawingName(drawing_name);

GlgBean provides the SetParentApplet method
GLG Programming for Java

Initializing the Drawing

Listener of the GlgBean, GlgJBean, GlgJLWBean
 GlgReadyListener interface : invoked after the drawing is ready
 GlgHListener interface :invoked upon hierarchy setup, after the
drawing is loaded
 GlgVListener interface : invoked after the drawing is loaded
and after the hierarchy setup has
occurred
 GlgReadyListener - public void ReadyCallback(GlgObject viewport);
 GlgHListener – public void HCallback(GlgObject viewport);
 GlgVListener – public void Vcallback(GlgObject viewport);
GLG Programming for Java


Handling user interaction
Listener of the GlgBean, GlgJBean, GlgJLWBean
 GlgInputListener : invoked upon any interaction with the
GLG objects
 GlgSelectListener : invoked when a named GLG object is
selected with the mouse
 GlgTraceListener : invoked mouse clicks and mouse motion
 GlgInputListener – public void InputCallback(GlgObject viewport,
GlgObject message_obj);
 GlgSelectListener – public void SelectCallback(GlgObject viewport,
Object[] name_array, int
button);
 GlgTraceListener – public void TraceCallback(GlgObject viewport,
GlgTraceData trace_info);
GLG Programming for Java

Resource of message_obj
 Format – Defines the format of the input handler which
triggered the event.
 (Button, Slider, Knob, CustomEvent, ObjectSelection, etc)
 Origin – Contains the name of the viewport the event occurred
in or the name of the selected object
 FullOrigin – Full pathname of the viewport
 Action – Describes the occurred action. Action values depend
on the Format
 (ValueChanged, Activate, MouseClick, MouseOver, etc)
 Subaction – additional information about the event.
GLG Programming for Java

Handling Dynamic Updates
 SetDResource() : to set a double type resource
 SetSResource() : to set a string type resource
 SetGResource() : to set a geometric type resource
(Such as FillColor, EdgeColor, etc)
 Update() : to reflect new resource values.
Further Work

1.GLG Toolkit

2. Zito UI 분석

3. Java class library(Swing class)

4. Java Design Pattern
Q&A