|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.newdawn.slick.svg.Diagram
public class Diagram
A diagram read from SVG containing multiple figures
Constructor Summary | |
---|---|
Diagram(float width,
float height)
Create a new empty diagram |
Method Summary | |
---|---|
void |
addFigure(Figure figure)
Add a figure to the diagram |
void |
addGradient(java.lang.String name,
Gradient gradient)
Add gradient to the diagram |
void |
addPatternDef(java.lang.String name,
java.lang.String href)
Add a pattern definition basd on a image |
Figure |
getFigure(int index)
Get the figure at a given index |
Figure |
getFigureByID(java.lang.String id)
Get a figure by a given ID |
int |
getFigureCount()
Get the number of figures in the diagram |
Gradient |
getGradient(java.lang.String name)
Get the gradient defined in this document |
float |
getHeight()
Get the height of the diagram |
java.lang.String |
getPatternDef(java.lang.String name)
Get a pattern definition from the diagram |
java.lang.String[] |
getPatternDefNames()
Get the names of the patterns defined |
float |
getWidth()
Get the width of the diagram |
void |
removeFigure(Figure figure)
Remove a figure from the diagram |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Diagram(float width, float height)
width
- The width of the diagramheight
- The height of the diagramMethod Detail |
---|
public float getWidth()
public float getHeight()
public void addPatternDef(java.lang.String name, java.lang.String href)
name
- The name of the patternhref
- The href to the image specified in the docpublic void addGradient(java.lang.String name, Gradient gradient)
name
- The name of the gradientgradient
- The gradient to be addedpublic java.lang.String getPatternDef(java.lang.String name)
name
- The name of the pattern
public Gradient getGradient(java.lang.String name)
name
- The name of the gradient
public java.lang.String[] getPatternDefNames()
public Figure getFigureByID(java.lang.String id)
id
- The ID of the figure
public void addFigure(Figure figure)
figure
- The figure to addpublic int getFigureCount()
public Figure getFigure(int index)
index
- The index of the figure to retrieve
public void removeFigure(Figure figure)
figure
- The figure to be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |