You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ca...@apache.org on 2007/11/15 06:26:40 UTC

svn commit: r595209 - in /xmlgraphics/batik/trunk/sources/org/apache/batik: apps/svgbrowser/DOMViewer.java util/gui/DropDownComponent.java

Author: cam
Date: Wed Nov 14 21:26:33 2007
New Revision: 595209

URL: http://svn.apache.org/viewvc?rev=595209&view=rev
Log:
Make drop down buttons in DOM Viewer window hide their borders like the other
buttons there.

Modified:
    xmlgraphics/batik/trunk/sources/org/apache/batik/apps/svgbrowser/DOMViewer.java
    xmlgraphics/batik/trunk/sources/org/apache/batik/util/gui/DropDownComponent.java

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=595209&r1=595208&r2=595209&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 21:26:33 2007
@@ -842,7 +842,7 @@
             tb.setFloatable(false);
 
             // Undo
-            JButton undoButton = getButtonFactory().createJButton("UndoButton");
+            JButton undoButton = getButtonFactory().createJToolbarButton("UndoButton");
             undoButton.setDisabledIcon
                 (new ImageIcon
                     (getClass().getResource(resources.getString("UndoButton.disabledIcon"))));
@@ -856,7 +856,7 @@
             undoDD.getPopupMenu().setModel(undoModel);
 
             // Redo
-            JButton redoButton = getButtonFactory().createJButton("RedoButton");
+            JButton redoButton = getButtonFactory().createJToolbarButton("RedoButton");
             redoButton.setDisabledIcon
                 (new ImageIcon
                     (getClass().getResource(resources.getString("RedoButton.disabledIcon"))));

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/util/gui/DropDownComponent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/util/gui/DropDownComponent.java?rev=595209&r1=595208&r2=595209&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/util/gui/DropDownComponent.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/util/gui/DropDownComponent.java Wed Nov 14 21:26:33 2007
@@ -108,6 +108,7 @@
         enabledDownArrow = new SmallDownArrow();
         disabledDownArrow = new SmallDisabledDownArrow();
         dropDownButton = new JButton(disabledDownArrow);
+        dropDownButton.setBorderPainted(false);
         dropDownButton.setDisabledIcon(disabledDownArrow);
         dropDownButton.addMouseListener(new DropDownListener());
         dropDownButton.setMaximumSize(new Dimension(18, 24));
@@ -187,6 +188,12 @@
                 popupMenu.showMenu
                     ((Component) e.getSource(), DropDownComponent.this);
             }
+        }
+        public void mouseEntered(MouseEvent ev) {
+            dropDownButton.setBorderPainted(true);
+        }
+        public void mouseExited(MouseEvent ev) {
+            dropDownButton.setBorderPainted(false);
         }
     }