diva.sketch
Class SketchParser

java.lang.Object
  extended by diva.sketch.SketchParser
All Implemented Interfaces:
ModelParser

public class SketchParser
extends Object
implements ModelParser

SketchParser parses a sketch file in XML format (.sk) and produces a SketchModel data structure.

Version:
$Revision: 1.18 $
Author:
Heloise Hse (hwawen@eecs.berkeley.edu), Michael Shilman (michaels@eecs.berkeley.edu)

Field Summary
static String COMPOSITE_TAG
          Indicate a stroke element.
static String DTD_1
          The DTD for sketch files.
static String DTD_URL
          The URL where the DTD is stored.
static String FILL_TAG
          Indicate the fill to draw the gesture with.
static String LINEWIDTH_TAG
          Indicate the line width to draw the gesture with.
static String MODEL_TAG
          Indicate a sketch model.
static String OUTLINE_TAG
          Indicate the outline to draw the gesture with.
static String PUBLIC_ID
          The public identity of the sketch dtd file.
static String STROKE_TAG
          Indicate a stroke symbol.
 
Constructor Summary
SketchParser()
           
 
Method Summary
 Object parse(Reader in)
          Parse the input stream dictated by the given reader into a sketch model.
static Color parseColor(String val)
          Return the color object indicated by "val".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PUBLIC_ID

public static final String PUBLIC_ID
The public identity of the sketch dtd file.

See Also:
Constant Field Values

DTD_URL

public static final String DTD_URL
The URL where the DTD is stored.

See Also:
Constant Field Values

DTD_1

public static final String DTD_1
The DTD for sketch files.

See Also:
Constant Field Values

MODEL_TAG

public static final String MODEL_TAG
Indicate a sketch model.

See Also:
Constant Field Values

STROKE_TAG

public static final String STROKE_TAG
Indicate a stroke symbol.

See Also:
Constant Field Values

COMPOSITE_TAG

public static final String COMPOSITE_TAG
Indicate a stroke element.

See Also:
Constant Field Values

OUTLINE_TAG

public static final String OUTLINE_TAG
Indicate the outline to draw the gesture with.

See Also:
Constant Field Values

FILL_TAG

public static final String FILL_TAG
Indicate the fill to draw the gesture with.

See Also:
Constant Field Values

LINEWIDTH_TAG

public static final String LINEWIDTH_TAG
Indicate the line width to draw the gesture with.

See Also:
Constant Field Values
Constructor Detail

SketchParser

public SketchParser()
Method Detail

parse

public Object parse(Reader in)
             throws Exception
Parse the input stream dictated by the given reader into a sketch model.

Specified by:
parse in interface ModelParser
Throws:
Exception

parseColor

public static Color parseColor(String val)
Return the color object indicated by "val".



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