simtools.images.svg.test
Class TestSVGShape

java.lang.Object
  extended by simtools.shapes.AbstractShape
      extended by simtools.images.svg.test.TestSVGShape
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable, Resizable, SVGImageFactory.FactoryListener, NamedProperties

public class TestSVGShape
extends AbstractShape
implements SVGImageFactory.FactoryListener, Resizable, java.io.Serializable

A shape to test SVGImageFactory

Author:
cazenave_c
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class simtools.shapes.AbstractShape
AbstractShape.AbstractShapePropertiesNames
 
Field Summary
 
Fields inherited from class simtools.shapes.AbstractShape
_h, _ox, _oy, _propertyNames, _w, _x, _y, ANTI_ALIASING, currentDialogBox, FONT_NAMES, listeners, REFRESH_PERIOD
 
Constructor Summary
TestSVGShape(java.io.File f, int ox, int oy)
           
 
Method Summary
 void done(java.awt.image.BufferedImage img)
          If the loading is successful as well as the painting then the resulting image is provided to the caller
 void draw(java.awt.Graphics2D g)
          Draws the shape
 void failed(java.lang.String msg)
          If the loading is not successful or the painting then the error message is provided to the caller
 void removeListener(ShapeListener sl)
           
 void resize(int dx, int dy)
          Resize the component
 
Methods inherited from class simtools.shapes.AbstractShape
addListener, cloneShape, contains, contains, contains, contains, getAnchor, getBounds, getBounds2D, getInnerProperties, getMax, getMaxTranslated, getMin, getPathIterator, getPathIterator, getPropertyNames, getPropertyValue, intersects, intersects, notifyChange, notifyChange, refresh, setAnchor, setAnchor, setProperties, setPropertyValue, translate, wipeOff
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestSVGShape

public TestSVGShape(java.io.File f,
                    int ox,
                    int oy)
Parameters:
f -
ox -
oy -
Method Detail

draw

public void draw(java.awt.Graphics2D g)
Description copied from class: AbstractShape
Draws the shape

Specified by:
draw in class AbstractShape
Parameters:
g - the graphics context

done

public void done(java.awt.image.BufferedImage img)
Description copied from interface: SVGImageFactory.FactoryListener
If the loading is successful as well as the painting then the resulting image is provided to the caller

Specified by:
done in interface SVGImageFactory.FactoryListener
Parameters:
img - the resulting image

failed

public void failed(java.lang.String msg)
Description copied from interface: SVGImageFactory.FactoryListener
If the loading is not successful or the painting then the error message is provided to the caller

Specified by:
failed in interface SVGImageFactory.FactoryListener
Parameters:
msg - the error message

removeListener

public void removeListener(ShapeListener sl)
Overrides:
removeListener in class AbstractShape

resize

public void resize(int dx,
                   int dy)
Description copied from interface: Resizable
Resize the component

Specified by:
resize in interface Resizable
Parameters:
dx - value on x axis
dy - value on y axis