|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.toolbox.GraphicsParser
public class GraphicsParser
A collection of utilities to help parsing graphics from strings and other kinds of external storage.
Constructor Summary | |
---|---|
GraphicsParser()
|
Method Summary | |
---|---|
static PaintedObject |
createPaintedObject(java.lang.String type,
java.util.Map attributes)
Create a new painted object. |
static PaintedObject |
createPaintedObject(java.lang.String type,
java.util.Map attributes,
java.lang.String content)
Create a new painted object. |
static PaintedObject |
createPaintedObject(java.lang.String type,
java.lang.String attributes,
java.lang.String content)
Create a new painted object. |
static void |
hashAttributes(java.lang.String s,
java.util.Map map)
Given a XML-style attribute string and a hash-table, add each attribute and its value to the table. |
private static java.awt.Color |
lookupColor(java.lang.String color)
Given a string, return a color. |
private static double[] |
parseCoordString(java.lang.String s)
Parse a string of numbers into an array of double |
private static void |
processPaintedPathAttributes(PaintedPath pp,
java.util.Map attributes)
Set the attributes of a PaintedPath from a hash-table |
private static void |
processPaintedShapeAttributes(PaintedShape ps,
java.util.Map attributes)
Set the attributes of a PaintedShape from a hash-table |
private static void |
processPaintedStringAttributes(PaintedString pp,
java.util.Map attributes)
Set the attributes of a PaintedString from a hash-table |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphicsParser()
Method Detail |
---|
public static PaintedObject createPaintedObject(java.lang.String type, java.lang.String attributes, java.lang.String content)
public static PaintedObject createPaintedObject(java.lang.String type, java.util.Map attributes, java.lang.String content)
public static PaintedObject createPaintedObject(java.lang.String type, java.util.Map attributes)
public static void hashAttributes(java.lang.String s, java.util.Map map)
FIXME: this sucks.
private static java.awt.Color lookupColor(java.lang.String color)
private static double[] parseCoordString(java.lang.String s)
private static void processPaintedShapeAttributes(PaintedShape ps, java.util.Map attributes)
private static void processPaintedPathAttributes(PaintedPath pp, java.util.Map attributes)
private static void processPaintedStringAttributes(PaintedString pp, java.util.Map attributes)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |