[XML Graphics - Batik Wiki] Updated: FrontPage

2005-02-17 Thread xml-batik-cvs
   Date: 2005-02-17T01:59:14
   Editor: AndrewArmstrong
   Wiki: XML Graphics - Batik Wiki
   Page: FrontPage
   URL: http://wiki.apache.org/xmlgraphics-batik/FrontPage

   gotta start somewhere

Change Log:

--
@@ -8,3 +8,8 @@
 This wiki has just been set up as part of the [wiki:ApacheGeneral:FrontPage 
big Apache Wiki Farm]. It does not contain anything yet.
 
 ''(SpecialWikiPages)'''
+
+== Batik Help ==
+
+  *  HowTo - Solutions to common Batik problems
+  *  UserContributions - See how others have used Batik

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



[XML Graphics - Batik Wiki] Updated: HowTo

2005-02-17 Thread xml-batik-cvs
   Date: 2005-02-17T04:02:17
   Editor: AndrewArmstrong
   Wiki: XML Graphics - Batik Wiki
   Page: HowTo
   URL: http://wiki.apache.org/xmlgraphics-batik/HowTo

   no comment

Change Log:

--
@@ -1,7 +1,11 @@
 ##language:en
+#pragma section-numbers off
 
 = Batik HowTos =
 
 == PDF Transcoder ==
 
 * XmlGraphicsFop:SvgNotes/PdfTranscoderTrueTypeEmbedding (Notes on TTF 
embedding in PDF)
+
+== Inline SVG ==
+* AboutBox - Display an About box using inline SVG

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



[XML Graphics - Batik Wiki] New: AboutBox

2005-02-17 Thread xml-batik-cvs
   Date: 2005-02-17T04:06:02
   Editor: AndrewArmstrong
   Wiki: XML Graphics - Batik Wiki
   Page: AboutBox
   URL: http://wiki.apache.org/xmlgraphics-batik/AboutBox

   no comment

New Page:

* A full working example of an SVG About box...
{{{
/*
555 Timer Design Tool
Copyright (C) 2000-2005 Andrew J. Armstrong

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Author:
Andrew J. Armstrong 

Created using IntelliJ IDEA 4.5 
*/
package au.com.hpo.c555.panel;

import org.apache.batik.bridge.ExternalResourceSecurity;
import org.apache.batik.bridge.ScriptSecurity;
import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
import org.apache.batik.swing.JSVGCanvas;
import org.apache.batik.swing.svg.LinkActivationEvent;
import org.apache.batik.swing.svg.LinkActivationListener;
import org.apache.batik.swing.svg.SVGUserAgent;
import org.apache.batik.util.ParsedURL;
import org.apache.batik.util.XMLResourceDescriptor;
import org.w3c.dom.Element;
import org.w3c.dom.svg.SVGDocument;

import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import java.io.StringReader;
import java.net.URL;

/**
 * Displays an about box using inline SVG
 */
public class About extends JSVGCanvas
{
private static final boolean EVENTS_ENABLED = true;
private static final boolean SELECTABLE_TEXT = true;

private static final String LOGO = "555 Timer";
private static final String DESIGN_TOOL = "Design Tool";
private static final String VERSION = "Version " + Version.getVersion();
private static final String AUTHOR = "Copyright © 1999-2005 Andrew J. 
Armstrong";
private static final String AUTHOR_EMAIL = 
"andrew_armstrong(ad)unwired(dod)com(dod)au";

private static final String ABOUT_BOX_INFO =
""
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>"
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""

+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""

+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ getEmbossedString(120, 50, 35, "172,20,20", LOGO)
+ getEmbossedString(72, 50, 48, "172,20,20", DESIGN_TOOL)
+ getEmbossedString(48, 50, 60, "0,40,220", VERSION)
+ getString(14, 50, 75, "0,40,220", AUTHOR)
+ getString(14, 50, 80, "0,40,220", AUTHOR_EMAIL)
+ ""
;

private static String getEmbossedString(int size, int x, int y, String 
color, String text)
{
return
""
+ "" + text + ""
+ "" + text + ""
+ "" + 
text + ""
+ "";
}

private static String getString(int size, int x, int y, String color, 
String text)
{
return
""
+ ""
+ ""
+ text
+ ""
+ ""
+ " ";
}

public About()
{

super(new SVGUserAgent()
{

public void displayError(Exception e)
{
}

public void displayError(String s)
{
}

public void displayMessage(String s)
{
}

public String getLanguages()
{
return "en";
}

public float getPixelToMM()
{
return 25.4f / 96; // = 0.26458f; // 96 dpi
}

/**
 * Returns the user stylesheet uri.
 *
 * @return null if no user style sheet was specified.
 */
public String getUserStyleSheetURI()
{
return null;
}

public String getXMLParserClassName()
{
String parserName = 

[XML Graphics - Batik Wiki] Updated: AboutBox

2005-02-17 Thread xml-batik-cvs
   Date: 2005-02-17T04:12:09
   Editor: AndrewArmstrong
   Wiki: XML Graphics - Batik Wiki
   Page: AboutBox
   URL: http://wiki.apache.org/xmlgraphics-batik/AboutBox

   removed some flab

Change Log:

--
@@ -65,74 +65,6 @@
 + ""
 + ""
 + ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
-+ ""
 
 + ""
 + ""
@@ -152,9 +84,9 @@
 + ""
 + ""
 + ""
-+ getEmbossedString(120, 50, 35, "172,20,20", LOGO)
-+ getEmbossedString(72, 50, 48, "172,20,20", DESIGN_TOOL)
-+ getEmbossedString(48, 50, 60, "0,40,220", VERSION)
++ getEmbossedString(72, 50, 35, "172,20,20", LOGO)
++ getEmbossedString(48, 50, 48, "172,20,20", DESIGN_TOOL)
++ getEmbossedString(32, 50, 60, "0,40,220", VERSION)
 + getString(14, 50, 75, "0,40,220", AUTHOR)
 + getString(14, 50, 80, "0,40,220", AUTHOR_EMAIL)
 + ""
@@ -163,7 +95,7 @@
 private static String getEmbossedString(int size, int x, int y, String 
color, String text)
 {
 return
-""
+""
 + "" + text + ""
 + "" + text + ""
 + "" + 
text + ""

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



[XML Graphics - Batik Wiki] Updated: HowTo

2005-02-17 Thread xml-batik-cvs
   Date: 2005-02-17T07:57:34
   Editor: JeremiasMaerki
   Wiki: XML Graphics - Batik Wiki
   Page: HowTo
   URL: http://wiki.apache.org/xmlgraphics-batik/HowTo

   Bullets nead a space before the *

Change Log:

--
@@ -5,7 +5,8 @@
 
 == PDF Transcoder ==
 
-* XmlGraphicsFop:SvgNotes/PdfTranscoderTrueTypeEmbedding (Notes on TTF 
embedding in PDF)
+ * XmlGraphicsFop:SvgNotes/PdfTranscoderTrueTypeEmbedding (Notes on TTF 
embedding in PDF)
 
 == Inline SVG ==
-* AboutBox - Display an About box using inline SVG
+
+ * AboutBox - Display an About box using inline SVG

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



[XML Graphics - Batik Wiki] Updated: UserContributions

2005-02-17 Thread xml-batik-cvs
   Date: 2005-02-17T10:30:17
   Editor: JamesShaw
   Wiki: XML Graphics - Batik Wiki
   Page: UserContributions
   URL: http://wiki.apache.org/xmlgraphics-batik/UserContributions

   no comment

Change Log:

--
@@ -2,3 +2,4 @@
 #pragma section-numbers off
 
   *  SvgLineCharts - Create line charts using the Batk rasterizer and XSLT
+  *  CanvasInteractors - Set up custom interactors for use on a JSVGCanvas

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



[XML Graphics - Batik Wiki] New: CanvasInteractors

2005-02-17 Thread xml-batik-cvs
   Date: 2005-02-17T10:49:33
   Editor: JamesShaw
   Wiki: XML Graphics - Batik Wiki
   Page: CanvasInteractors
   URL: http://wiki.apache.org/xmlgraphics-batik/CanvasInteractors

   no comment

New Page:

The following default mouse interactions can be performed on a JSVGCanvas:
  *  Shift+LeftButton - Pan
  *  Ctrl+LeftButton - Zoom Box
  *  Shift+RightButton - Zoom (with instant feedback)
  *  Ctrl+RightButton - Rotate

You can enable or disable these interactors by using the 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/JSVGCanvas.html 
setEnable*Interactor()] methods of JSVGCanvas.

To add your own interactors, create an Interactor instance, possibly by 
extending one of the {{{org.apache.batik.swing.gvt.Abstract*Interactor}}} 
classes.

For example:
{{{
private Interactor panInteractor = new AbstractPanInteractor() {
public boolean startInteraction(InputEvent ie) {
int mods = ie.getModifiers();
return ie.getID() == MouseEvent.MOUSE_PRESSED &&
(mods & InputEvent.BUTTON1_MASK) != 0;
}
};
}}}
Then invoke {{{canvas.getInteractors().add(panInteractor)}}} to add your 
interactor to the canvas' interactor list.

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



[XML Graphics - Batik Wiki] Updated: CanvasInteractors

2005-02-17 Thread xml-batik-cvs
   Date: 2005-02-17T14:35:55
   Editor: AndrewArmstrong
   Wiki: XML Graphics - Batik Wiki
   Page: CanvasInteractors
   URL: http://wiki.apache.org/xmlgraphics-batik/CanvasInteractors

   no comment

Change Log:

--
@@ -1,8 +1,8 @@
 The following default mouse interactions can be performed on a JSVGCanvas:
-  *  Shift+LeftButton - Pan
-  *  Ctrl+LeftButton - Zoom Box
-  *  Shift+RightButton - Zoom (with instant feedback)
-  *  Ctrl+RightButton - Rotate
+  *  Shift+Left``Button - Pan
+  *  Ctrl+Left``Button - Zoom Box
+  *  Shift+Right``Button - Zoom (with instant feedback)
+  *  Ctrl+Right``Button - Rotate
 
 You can enable or disable these interactors by using the 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/JSVGCanvas.html 
setEnable*Interactor()] methods of JSVGCanvas.
 

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



[XML Graphics - Batik Wiki] Updated: SvgLineCharts

2005-02-17 Thread xml-batik-cvs
   Date: 2005-02-17T14:46:49
   Editor: AndrewArmstrong
   Wiki: XML Graphics - Batik Wiki
   Page: SvgLineCharts
   URL: http://wiki.apache.org/xmlgraphics-batik/SvgLineCharts

   used the MailTo macro

Change Log:

--
@@ -6,4 +6,4 @@
  * Mainframers with z/OS can download a more familiar distro from 
[http://www.cbttape.org/ftp/updates/CBT706.zip CBT File 706]
  * The rest of us can download it from this wiki attachment:svglinecharts.zip 
(the zip includes an XSLT stylesheet, html doco and a tutorial)
 
-Send feedback to [mailto:andrew_armstrong(ad)unwired(dod)com(dod)au Andrew 
Armstrong]
+Send feedback to [[MailTo(andrew_armstrong AT IPSUM unwired DOT LOREM DOLOR 
SIT com AMET DOT au, Andrew Armstrong)]]

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



[XML Graphics - Batik Wiki] Updated: FrontPage

2005-02-17 Thread xml-batik-cvs
   Date: 2005-02-17T15:08:54
   Editor: AndrewArmstrong
   Wiki: XML Graphics - Batik Wiki
   Page: FrontPage
   URL: http://wiki.apache.org/xmlgraphics-batik/FrontPage

   no comment

Change Log:

--
@@ -11,5 +11,6 @@
 
 == Batik Help ==
 
+  *  [http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED] batik-users] 
- Search the Batik Users mailing list archives
   *  HowTo - Solutions to common Batik problems
   *  UserContributions - See how others have used Batik

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



[XML Graphics - Batik Wiki] Updated: FrontPage

2005-02-18 Thread xml-batik-cvs
   Date: 2005-02-18T02:22:20
   Editor: AndrewArmstrong
   Wiki: XML Graphics - Batik Wiki
   Page: FrontPage
   URL: http://wiki.apache.org/xmlgraphics-batik/FrontPage

   no comment

Change Log:

--
@@ -1,15 +1,15 @@
 ##language:en
 #pragma section-numbers off
-
-Go back to the [wiki:XmlGraphics:FrontPage XML Graphics Wiki]...
-
 = Welcome to the XML Graphics - Batik Wiki =
 
-This wiki has just been set up as part of the [wiki:ApacheGeneral:FrontPage 
big Apache Wiki Farm]. It does not contain anything yet.
+|| http://xml.apache.org/batik/images/logo.gif || This is the 
[wiki:ApacheGeneral/ Apache Wiki] for the [http://xml.apache.org/batik Apache 
Batik] project. You will not be able to edit pages until you login. Please 
visit UserPreferences at the top-right of any page to create a user profile or 
to login. Notifications of all changes you make will be sent to the Batik CVS 
mailing list ||
+ * Go back to the [wiki:XmlGraphics:FrontPage XML Graphics Wiki]
+ * This wiki is part of the [wiki:ApacheGeneral:FrontPage big Apache Wiki Farm]
+ * SpecialWikiPages
+
 
-''(SpecialWikiPages)'''
 
-== Batik Help ==
+= Batik Help =
 
   *  [http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED] batik-users] 
- Search the Batik Users mailing list archives
   *  HowTo - Solutions to common Batik problems

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



[XML Graphics - Batik Wiki] Updated: HowTo

2005-02-18 Thread xml-batik-cvs
   Date: 2005-02-18T05:07:49
   Editor: ThomasDeWeese
   Wiki: XML Graphics - Batik Wiki
   Page: HowTo
   URL: http://wiki.apache.org/xmlgraphics-batik/HowTo

   no comment

Change Log:

--
@@ -3,6 +3,10 @@
 
 = Batik HowTos =
 
+== ApacheCON presentation (2003) ==
+
+  [http://cvs.apache.org/~deweese/ac2003/ "Java Applications with Apache 
Batik"] is the Batik presentation given at ApacheCON 2003.  It attempts to give 
an overview of the structure of Batik as well as some examples of "non-trivial" 
things that can be done with Batik.
+
 == PDF Transcoder ==
 
  * XmlGraphicsFop:SvgNotes/PdfTranscoderTrueTypeEmbedding (Notes on TTF 
embedding in PDF)

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



[XML Graphics - Batik Wiki] Updated: SvgLineCharts

2005-02-18 Thread xml-batik-cvs
   Date: 2005-02-18T16:56:42
   Editor: AndrewArmstrong
   Wiki: XML Graphics - Batik Wiki
   Page: SvgLineCharts
   URL: http://wiki.apache.org/xmlgraphics-batik/SvgLineCharts

   no comment

Change Log:

--
@@ -1,5 +1,59 @@
 #pragma section-numbers off
 = Create line charts using SVG and the Batik rasterizer =
+= What it does =
+
+ * Transforms this... 
+{{{
+

[XML Graphics - Batik Wiki] New: SVG12Branch

2005-02-22 Thread xml-batik-cvs
   Date: 2005-02-22T06:42:27
   Editor: CameronMcCormack
   Wiki: XML Graphics - Batik Wiki
   Page: SVG12Branch
   URL: http://wiki.apache.org/xmlgraphics-batik/SVG12Branch

   no comment

New Page:

##language:en
#pragma section-numbers off

= The svg12 Branch =
There is a branch in the Batik CVS called 'svg12', which will contain major 
code additions
for SVG 1.2 support.  Currently, it has support for:

  * DOM Level 3 Core, Events and X``Path
  * Mouse wheel events

= Checking out the svg12 branch =

To check out the svg12 branch, use:

{{{
cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
password: anoncvs

cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout -r svg12 xml-batik
}}}

= Using DOM 3 features =

JDKs < 1.5 include the DOM 2 interfaces and this can cause problems when
trying to use the DOM 3 versions of these same interface files (org.w3c.dom).
To work around this, the package org.apache.batik.dom.dom3 contains interfaces
with the same names as the DOM 3 interfaces, which can be used instead of
the org.w3c.dom inerfaces when you want to use some DOM 3 functionality.

This is because, for example, referring to org.w3c.dom.Node in a 1.4 JDK
will get you the DOM 2 Node interface, and you won't be able to access the new
DOM 3 methods.  The org.apache.batik.dom.dom3 interfaces all extend their
org.w3c.dom counterparts and then add the DOM 3 methods and constants.
In a 1.4 JDK, this will result in an interface with the DOM 2 methods supplied
by the org.w3c.dom interface and the DOM 3 methods from the 
org.apache.batik.dom.dom3
interface.  Under a 1.5 JDK, the org.w3c.dom interfaces will already include
the DOM 3 methods, and including them again on the org.apache.batik.dom.dom3
interfaces causes no harm.

Thus, if you want to write code using DOM 3 functionality that will work on all
JDKs supported by Batik, you should cast DOM objects to the interfaces in
org.apache.batik.dom.dom3.

An example:
{{{
  import org.apache.batik.dom.svg.SVGDOMImplementation;
  import org.w3c.dom.DOMImplementation;
  import org.w3c.dom.Document;
  import org.w3c.dom.Element;

  public class C {
  public void f() {
  // Create a new SVG document
  DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
  Document doc = impl.createDocument("http://www.w3.org/2000/svg";, 
"svg", null);

  // Create a 'g' element and append it to the root 'svg' element
  Element e = doc.createElementNS("http://www.w3.org/2000/svg";, "g");
  doc.getDocumentElement().appendChild(e);

  // Cast the document object to org.apache.batik.dom.dom3.Document,
  // so that DOM 3 methods will be guaranteed to be visible
  org.apache.batik.dom.dom3.Document document
  = (org.apache.batik.dom.dom3.Document) doc;

  // Now a DOM 3 method can be used
  document.renameNode(e, "http://www.w3.org/2000/svg";, "text");
  }
  }
}}}

If this casting to the org.apache.batik.dom.dom3.Document interface was not 
done,
the code would only compile on JDK 1.5.  (It is possible to use the DOM 3
org.w3c.dom interfaces directly on earlier JDKs, but this requires messing with 
the bootclasspath.)

Note that using these org.apache.batik.dom.dom3 interfaces is only needed for
the DOM 3 Core and DOM 3 Events interfaces.  There were no earlier versions of
the DOM XPath interfaces to conflict with, so these can be used directly
(org.w3c.dom.xpath).

Of course, none of this matters if you are just using the DOM 3 functionality
in ECMAScript, as the matter of interfaces is hidden from the scripting
environment.

''[I am considering changing the names of the org.apache.batik.dom.dom3 
interfaces
so they don't conflict with the standard org.w3c.dom interfaces.  This would 
then
allow both to be imported, and avoid the ugly long class name references in
the code.  Comments on this are welcome.]''

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



[XML Graphics - Batik Wiki] Updated: FrontPage

2005-02-22 Thread xml-batik-cvs
   Date: 2005-02-22T06:44:32
   Editor: CameronMcCormack
   Wiki: XML Graphics - Batik Wiki
   Page: FrontPage
   URL: http://wiki.apache.org/xmlgraphics-batik/FrontPage

   no comment

Change Log:

--
@@ -14,3 +14,4 @@
   *  [http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED] batik-users] 
- Search the Batik Users mailing list archives
   *  HowTo - Solutions to common Batik problems
   *  UserContributions - See how others have used Batik
+  *  ["SVG12Branch"] - How to get and work with the 'svg12' branch in CVS.

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



[XML Graphics - Batik Wiki] Updated: SVG12Branch

2005-02-22 Thread xml-batik-cvs
   Date: 2005-02-22T06:45:50
   Editor: CameronMcCormack
   Wiki: XML Graphics - Batik Wiki
   Page: SVG12Branch
   URL: http://wiki.apache.org/xmlgraphics-batik/SVG12Branch

   no comment

Change Log:

--
@@ -8,7 +8,7 @@
   * DOM Level 3 Core, Events and X``Path
   * Mouse wheel events
 
-= Checking out the svg12 branch =
+== Checking out the svg12 branch ==
 
 To check out the svg12 branch, use:
 
@@ -19,7 +19,7 @@
 cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout -r svg12 xml-batik
 }}}
 
-= Using DOM 3 features =
+== Using DOM 3 features ==
 
 JDKs < 1.5 include the DOM 2 interfaces and this can cause problems when
 trying to use the DOM 3 versions of these same interface files (org.w3c.dom).

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



[XML Graphics - Batik Wiki] Updated: SVG12Branch

2005-02-24 Thread xml-batik-cvs
   Date: 2005-02-24T19:20:07
   Editor: CameronMcCormack
   Wiki: XML Graphics - Batik Wiki
   Page: SVG12Branch
   URL: http://wiki.apache.org/xmlgraphics-batik/SVG12Branch

   no comment

Change Log:

--
@@ -7,6 +7,7 @@
 
   * DOM Level 3 Core, Events and X``Path
   * Mouse wheel events
+  * svg:handler element
 
 == Checking out the svg12 branch ==
 

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



[XML Graphics - Batik Wiki] Updated: AboutBox

2005-02-25 Thread xml-batik-cvs
   Date: 2005-02-25T02:07:54
   Editor: AndrewArmstrong
   Wiki: XML Graphics - Batik Wiki
   Page: AboutBox
   URL: http://wiki.apache.org/xmlgraphics-batik/AboutBox

   no comment

Change Log:

--
@@ -1,4 +1,5 @@
-* A full working example of an SVG About box...
+#pragma section-numbers off
+= A full working example of an SVG About box =
 {{{
 /*
555 Timer Design Tool

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



[XML Graphics - Batik Wiki] Updated: FrontPage

2005-03-02 Thread xml-batik-cvs
   Date: 2005-03-02T06:17:12
   Editor: StevenHuey
   Wiki: XML Graphics - Batik Wiki
   Page: FrontPage
   URL: http://wiki.apache.org/xmlgraphics-batik/FrontPage

   no comment

Change Log:

--
@@ -15,3 +15,4 @@
   *  HowTo - Solutions to common Batik problems
   *  UserContributions - See how others have used Batik
   *  ["SVG12Branch"] - How to get and work with the 'svg12' branch in CVS.
+  * BatikRenderingSummary - Learn how Batik renders SVG documents.

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



[XML Graphics - Batik Wiki] New: BatikRenderingSummary

2005-03-02 Thread xml-batik-cvs
   Date: 2005-03-02T06:37:03
   Editor: StevenHuey
   Wiki: XML Graphics - Batik Wiki
   Page: BatikRenderingSummary
   URL: http://wiki.apache.org/xmlgraphics-batik/BatikRenderingSummary

   no comment

New Page:

= A Summary of Using the JSVGCanvas Class to Display a SVG Document =

First of all it's important to note the class inheritance hierarchy being used 
here since several methods called from the JSVGCanvas class are actually 
implemented by some of the classes it inherits from.

[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/JSVGCanvas.html 
JSVGCanvas] : 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/JSVGComponent.html
 JSVGComponent] : 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/gvt/JGVTComponent.html
 JGVTComponent] : 
[http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComponent.html JComponent]

After creating a 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/JSVGCanvas.html 
JSVGCanvas] instance the setURI() method is called with a URI of the SVG 
document to load. If the URI is valid the loadSVGDocument() method of the 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/JSVGComponent.html
 JSVGComponent] class is called with the URI.

In the loadSVGDocument() method all document processing for the current 
document is stopped, and then a 
[http://xml.apache.org/batik/javadoc/org/apache/batik/bridge/DocumentLoader.html
 DocumentLoader] and 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/SVGDocumentLoader.html
 SVGDocumentLoader] are created. The 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/SVGDocumentLoader.html
 SVGDocumentLoader] handles the firing of document loading events and the 
[http://xml.apache.org/batik/javadoc/org/apache/batik/bridge/DocumentLoader.html
 DocumentLoader] uses a 
[http://xml.apache.org/batik/javadoc/org/apache/batik/dom/svg/SAXSVGDocumentFactory.html
 SAXSVGDocumentFactory] to create a 
[http://xml.apache.org/batik/javadoc/org/w3c/dom/svg/SVGDocument.html 
SVGDocument] instance. The 
[http://xml.apache.org/batik/javadoc/org/apache/batik/dom/svg/SAXSVGDocumentFactory.html
 SAXSVGDocumentFactory] in turn relies on a 
[http://xml.apache.org/batik/javadoc/org/apache/batik/dom/util/SAXDocumentFactory.html
 SAXDocumentFactory] to parse the SVG data referenced by the given URI.

The [http://xml.apache.org/batik/javadoc/org/apache/batik/swing/JSVGCanvas.html 
JSVGCanvas] relies on the 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/SVGDocumentLoaderListener.html
 SVGDocumentLoaderListener], 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/GVTTreeBuilderListener.html
 GVTTreeBuilderListener], and 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/SVGLoadEventDispatcherListener.html
 SVGLoadEventDispatcherListener] listeners that are added in the 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/JSVGComponent.html
 JSVGComponent] constructor in order to know what is going on with the loading, 
building, and rendering of the 
[http://xml.apache.org/batik/javadoc/org/w3c/dom/svg/SVGDocument.html 
SVGDocument]. The listeners are implemented in the JGVTComponent.Listener and 
JSVGComponent.SVGListener classes.

When the document has finished being loaded and parsed the setSVGDocument() 
method of the 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/JSVGComponent.html
 JSVGComponent] class is called, which then calls the installSVGDocument() 
method in the same class.

The installSVGDocument() method:

1. Gets rid of any resources from the previous document (if any)

2. Create a new 
[http://xml.apache.org/batik/javadoc/org/apache/batik/bridge/BridgeContext.html 
BridgeContext] to associate the SVG DOM and the GVT tree

3. Configures the component and 
[http://xml.apache.org/batik/javadoc/org/apache/batik/bridge/BridgeContext.html 
BridgeContext] instance based on the document state (ALWAYS_STATIC, 
ALWAYS_DYNAMIC, ALWAYS_INTERACTIVE, AUTODETECT)

4. Creates a 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/GVTTreeBuilder.html
 GVTTreeBuilder] with the 
[http://xml.apache.org/batik/javadoc/org/w3c/dom/svg/SVGDocument.html 
SVGDocument] and 
[http://xml.apache.org/batik/javadoc/org/apache/batik/bridge/BridgeContext.html 
BridgeContext]

5. Initializes event handling for mouse and keyboard events

When the 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/GVTTreeBuilder.html
 GVTTreeBuilder] is done building the GVT tree the 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/JSVGComponent.html
 JSVGComponent] performs some additional configuration so that dynamic 
documents work correctly, and then calls the scheduleGVTRendering() method of 
the 
[http://xml.apache.org/batik/javadoc/org/apache/batik/swing/gvt/JGVTComponent.html
 JGVTComponent] class.

The scheduleGVTRendering() method calls the renderGVTTree() method of the same 
class and:

1. Set

[XML Graphics - Batik Wiki] Updated: FrontPage

2005-03-02 Thread xml-batik-cvs
   Date: 2005-03-02T06:37:27
   Editor: StevenHuey
   Wiki: XML Graphics - Batik Wiki
   Page: FrontPage
   URL: http://wiki.apache.org/xmlgraphics-batik/FrontPage

   no comment

Change Log:

--
@@ -15,4 +15,4 @@
   *  HowTo - Solutions to common Batik problems
   *  UserContributions - See how others have used Batik
   *  ["SVG12Branch"] - How to get and work with the 'svg12' branch in CVS.
-  * BatikRenderingSummary - Learn how Batik renders SVG documents.
+  * BatikRenderingSummary - A Summary of Using the JSVGCanvas Class to Display 
a SVG Document

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