xmlgraphics-batik-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r595169 - in /xmlgraphics/batik/trunk: resources/org/apache/batik/apps/svgbrowser/resources/ sources/org/apache/batik/apps/svgbrowser/
Date Thu, 15 Nov 2007 01:06:20 GMT
Author: cam
Date: Wed Nov 14 17:06:19 2007
New Revision: 595169

URL: http://svn.apache.org/viewvc?rev=595169&view=rev
Log:
1. Default DOM Viewer element highlighting to "off".
2. Fix namespace attribute handling bug in DOM Viewer.
3. Make disabled undo/redo button images in the DOM Viewer have a
   transparent background.

Modified:
    xmlgraphics/batik/trunk/resources/org/apache/batik/apps/svgbrowser/resources/disabledRedo.png
    xmlgraphics/batik/trunk/resources/org/apache/batik/apps/svgbrowser/resources/disabledUndo.png
    xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/DOMViewer.java
    xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/NodePickerPanel.java

Modified: xmlgraphics/batik/trunk/resources/org/apache/batik/apps/svgbrowser/resources/disabledRedo.png
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/resources/org/apache/batik/apps/svgbrowser/resources/disabledRedo.png?rev=595169&r1=595168&r2=595169&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/batik/trunk/resources/org/apache/batik/apps/svgbrowser/resources/disabledUndo.png
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/resources/org/apache/batik/apps/svgbrowser/resources/disabledUndo.png?rev=595169&r1=595168&r2=595169&view=diff
==============================================================================
Binary files - no diff available.

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/DOMViewer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/DOMViewer.java?rev=595169&r1=595168&r2=595169&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/DOMViewer.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/DOMViewer.java Wed Nov
14 17:06:19 2007
@@ -183,7 +183,7 @@
     /**
      * Whether painting the overlay on the canvas is enabled.
      */
-    protected boolean isElementOverlayEnabled = true;
+    protected boolean isElementOverlayEnabled;
 
     /**
      * The history browsing manager. Manages undo / redo.
@@ -435,8 +435,8 @@
         }
 
         public boolean canEdit(Element el) {
-            if (panel == null || panel.document == null
-                    || panel.document.getDocumentElement() != el) {
+            if (panel == null || panel.document == null || true
+                    /*|| panel.document.getDocumentElement() != el*/) {
                 return true;
             }
             return false;
@@ -839,6 +839,7 @@
 
             JToolBar tb =
                 new JToolBar(resources.getString("DOMViewerToolbar.name"));
+            tb.setFloatable(false);
 
             // Undo
             JButton undoButton = getButtonFactory().createJButton("UndoButton");
@@ -881,7 +882,6 @@
             overlayButton.setEnabled(true);
             overlayButton.setPreferredSize(new Dimension(32, 25));
             tb.add(overlayButton);
-            overlayButton.doClick();
 
             // Add toolbar
             add(tb, BorderLayout.NORTH);
@@ -1220,10 +1220,11 @@
          */
         protected void registerNodeInserted(MutationEvent mevt) {
             Node targetNode = (Node) mevt.getTarget();
-            historyBrowserInterface.addToCurrentCompoundCommand(
-                historyBrowserInterface.createNodeInsertedCommand(
-                        targetNode.getParentNode(),
-                            targetNode.getNextSibling(),targetNode));
+            historyBrowserInterface.addToCurrentCompoundCommand
+                (historyBrowserInterface.createNodeInsertedCommand
+                    (targetNode.getParentNode(),
+                     targetNode.getNextSibling(),
+                     targetNode));
         }
 
         /**
@@ -1250,7 +1251,6 @@
          * @param mevt
          *            The Mutation Event
          */
-
         protected void registerAttributeAdded(MutationEvent mevt) {
             Element targetElement = (Element) mevt.getTarget();
             historyBrowserInterface.addToCurrentCompoundCommand

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/NodePickerPanel.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/NodePickerPanel.java?rev=595169&r1=595168&r2=595169&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/NodePickerPanel.java
(original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/NodePickerPanel.java
Wed Nov 14 17:06:19 2007
@@ -66,6 +66,7 @@
 import org.apache.batik.util.gui.resource.ActionMap;
 import org.apache.batik.util.gui.resource.ButtonFactory;
 import org.apache.batik.util.gui.resource.MissingListenerException;
+import org.apache.batik.util.XMLConstants;
 import org.apache.batik.util.resources.ResourceManager;
 
 import org.gjt.sp.jedit.textarea.TextAreaDefaults;
@@ -579,8 +580,13 @@
             String newAttrName = (String) tableModel.getAttrNameAt(i);
             String newAttrValue = (String) tableModel.getAttrValueAt(i);
             if (newAttrName != null && newAttrName.length() > 0) {
-                String prefix = DOMUtilities.getPrefix(newAttrName);
-                String namespaceURI = getNamespaceURI(prefix);
+                String namespaceURI;
+                if (newAttrName.equals(XMLConstants.XMLNS_PREFIX)) {
+                    namespaceURI = XMLConstants.XMLNS_NAMESPACE_URI;
+                } else {
+                    String prefix = DOMUtilities.getPrefix(newAttrName);
+                    namespaceURI = getNamespaceURI(prefix);
+                }
                 if (newAttrValue != null) {
                     element.setAttributeNS
                         (namespaceURI, newAttrName, newAttrValue);



Mime
View raw message