diva.sketch.demo
Class SketchDemo

java.lang.Object
  extended by diva.sketch.demo.SketchDemo

public class SketchDemo
extends Object

This application illustrates how to use the diva.sketch framework to build a sketch-based application.

The demo launches an editor for sketching and provides file saving and loading capabilities. The main purpose of this demo is to illustrate how to set up a sketch-based UI using the diva.sketch package. It does not show how to add gesture recognition to interprete the sketch. Please see SimpleDemo for more information.

The figures sketched can be selected by control-clicking on the stroke itself. When selected, a set of blue handles will appear around the figure and a red drag handle will appear in the center of the figure. To resize, drag one of the blue handles; to move, drag the red, square handle.

The following three lines are all you need to create a sketch-based user interface using the package:

 JFrame f = new JFrame();
 JSketch sketch = new JSketch();
 f.getContentPane().add("Center", sketch);
 
The rest of the code in the demo is mainly to add more functionality.

Version:
$Revision: 1.16 $
Author:
Heloise Hse (hwawen@eecs.berkeley.edu)

Constructor Summary
SketchDemo(AppContext context)
          Construct a new sketch-based editor.
 
Method Summary
static void main(String[] argv)
          Create and run a basic sketch application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SketchDemo

public SketchDemo(AppContext context)
Construct a new sketch-based editor.

Method Detail

main

public static void main(String[] argv)
Create and run a basic sketch application.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.