Hi,

I am working on a graphics editor using Batik and am designing property
sheets for SVG elements and would like some feedback on the design. Any and
all comments are welcome.

1) Each property sheet will extend org.apache.batik.ext.swing.JGridBagPanel.
Property sheets may fall into any of these categories

- Presentation Attributes
   JSVGFillStrokePanel (fill, stroke, stroke-width, fill-opacity, etc.),
   JSVGFontPanel (font-family, font-size, etc.)
   JSVGGradientsPanel (stop-color and stop-opacity)
   JSVGTextContentPanel (alignment-baseline, baseline-shift, direction,
etc.)

- Standard Attributes
   JSVGStandardPanel (id and xml:base)

- Element-Specific Attributes
   JSVGRectPanel (x, y, rx, ry, width, and height)
   JSVGEllipsePanel (cx, cy, rx, and ry)

and so on...

2) A subclass of JDialog (JSVGAttributeDialog) will aid in the composition
of these property sheets into a JTabbedPane (or similar). This will be done
by inspecting the SVGElement instance for implemented interfaces. This
dialog may have a show() method that takes an SVGElement as a parameter as
follows:

JSVGAttributeDialog dialog = new JSVGAttributeDialog(owner);
SVGSVGElement elem = doc.getRootElement();
dialog.show(elem);

If the user clicks the "Ok" button, the SVGElement's attributes are
modified.

3) A registration mechanism will be provided for developers to use their own
property sheets for certain attribute classes when they see fit. This
mechanism could also be used if the developer wants only a subset of the
property sheets displayed. This mechanism would also allow for pooling of
the property panel instances.

4) Attribute values which may contain references to other elements within
the document may be selected in a combo box (or similar).

5) These property sheets will be demonstrated in a modification to the SVG
Browser DOM viewer.

How useful does this seem to others? If others would find this useful and
have insight, I'd love to hear it. Also, I am completely willing to
contribute this code to the Batik community.

Thanks.
Andy


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to