[SCM] libjide-oss-java packaging branch, master, updated. debian/3.5.3+dfsg-1-16-g526be16

Markus Koschany apo at gambaru.de
Sun May 19 11:19:21 UTC 2013


The following commit has been merged in the master branch:
commit 7422cc873c806e07d38b7d102a3add75c08a0e98
Author: Markus Koschany <apo at gambaru.de>
Date:   Sun May 19 11:58:56 2013 +0200

    Imported Upstream version 3.5.5+dfsg

diff --git a/ChangeLog b/ChangeLog
index a309f07..ec8529e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,73 @@
+2013-05-17  yangxiaoze <yangxiaoze at gmail.com>
+
+	* build.properties, pom.xml,
+	src/com/jidesoft/swing/DefaultOverlayable.java: common layer 3.5.5
+
+2013-05-15  frankxu <frank at jidesoft.com>
+
+	* src/com/jidesoft/plaf/LookAndFeelFactory.java: 
+	Common,B,LookAndFeelFactory,Removed the system property setting to
+	avoid the security issue on applets,71822,no
+
+2013-05-15  frankxu <frank at jidesoft.com>
+
+	* src/com/jidesoft/plaf/xerto/VerticalLabelUI.java: 
+	Component,E,CollapsiblePane,Added CollapsiblePane#setRotateIcon() to
+	control the behavior about how the icon could be rotated or not in
+	west/east scenarios,,no
+
+2013-05-14  frankxu <frank at jidesoft.com>
+
+	* src/com/jidesoft/plaf/basic/BasicJideTabbedPaneUI.java: 
+	Common,B,BasicJideTabbedPaneUI,Fixed so that
+	JideTabbedPane#setShowTabArea(false) will disable the mouse event
+	handler correctly,,no
+
+2013-05-14  frankxu <frank at jidesoft.com>
+
+	* : Merge remote-tracking branch 'origin/master'
+
+2013-05-08  jidesoft <support at jidesoft.com>
+
+	* src/com/jidesoft/plaf/vsnet/VsnetMenuItemUI.java: 
+	Common,B,VsnetMenuItemUI,Fixed the CheckBox MenuItem selection box
+	is too small if the icon is large,,no
+
+2013-05-06  frankxu <frank at jidesoft.com>
+
+	* src/com/jidesoft/swing/TristateCheckBox.java: 
+	Common,B,TristateCheckBox,Fixed the issue that invoking
+	TristateCheckBox#setState() could not update the UI immediately,,no
+
+2013-05-03  frankxu <frank at jidesoft.com>
+
+	* src/com/jidesoft/converter/EnumConverter.java: 
+	Common,B,EnumConverter,Fixed the NPE issue while the first entry of
+	the valueList is null,71709,no
+
+2013-04-30  frankxu <frank at jidesoft.com>
+
+	* : Merge remote-tracking branch 'origin/master'
+
+2013-04-28  jidesoft <support at jidesoft.com>
+
+	* src/com/jidesoft/plaf/UIDefaultsLookup.java: 
+	Common,B,UIDefaultsLookup,Fixed NoSuchMethodError in JDK8
+	b87,71624,no
+
+2013-04-17  frankxu <frank at jidesoft.com>
+
+	* src/com/jidesoft/swing/JideTabbedPane.java: 
+	Common,B,JideTabbedPane,Fixed so that the method
+	JideTabbedPane#setClosableAt() could be respected after
+	JideTabbedPane#moveSelectedTabTo() is invoked,71489,no
+
+2013-04-16  jidesoft <support at jidesoft.com>
+
+	* src/com/jidesoft/swing/AutoScroll.java: 
+	Grids,B,TableColumnResizer,Fixed so that resizing column does not
+	cause flickering,71264
+
 2013-04-12  yangxiaoze <yangxiaoze at gmail.com>
 
 	* JIDE Common Layer.iml, README.txt, build.properties, pom.xml: 
diff --git a/build.properties b/build.properties
index 2667ea6..a6e34a3 100644
--- a/build.properties
+++ b/build.properties
@@ -2,7 +2,7 @@
 # USER DEFINED VALUES
 #
 company_name=JIDE Software, Inc.
-jide_version=3.5.4
+jide_version=3.5.5
 base_dir=.
 output_dir=${basedir}/classes
 
diff --git a/pom.xml b/pom.xml
index 2483bd7..5c8f069 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,7 +16,7 @@
     <groupId>com.jidesoft</groupId>
     <artifactId>jide-oss</artifactId>
     <name>JIDE Common Layer</name>
-    <version>3.5.4</version>
+    <version>3.5.5</version>
     <packaging>jar</packaging>
     <description>JIDE Common Layer (Professional Swing Components)</description>
     <url>https://github.com/jidesoft/jide-oss</url>
diff --git a/src/com/jidesoft/converter/EnumConverter.java b/src/com/jidesoft/converter/EnumConverter.java
index 960f05c..58bfaaa 100644
--- a/src/com/jidesoft/converter/EnumConverter.java
+++ b/src/com/jidesoft/converter/EnumConverter.java
@@ -83,7 +83,7 @@ public class EnumConverter implements ObjectConverter {
     }
 
     public EnumConverter(String name, Object[] values, String[] strings) {
-        this(name, values[0].getClass(), values, strings);
+        this(name, values[0] == null ? (values.length > 1 ? values[1].getClass() : Object.class) : values[0].getClass(), values, strings);
     }
 
     public EnumConverter(String name, Class<?> type, Object[] values, String[] strings) {
diff --git a/src/com/jidesoft/plaf/LookAndFeelFactory.java b/src/com/jidesoft/plaf/LookAndFeelFactory.java
index cbdde82..a3da184 100644
--- a/src/com/jidesoft/plaf/LookAndFeelFactory.java
+++ b/src/com/jidesoft/plaf/LookAndFeelFactory.java
@@ -1079,9 +1079,6 @@ public class LookAndFeelFactory implements ProductNames {
     }
 
     private static void workAroundSwingIssues() {
-        if (SystemInfo.isJdk7Above() && !SystemInfo.isJdk8Above()) {
-            System.setProperty("java.util.Arrays.useLegacyMergeSort", "true");
-        }
         Object o = UIManager.get("PopupMenu.selectedWindowInputMapBindings.RightToLeft");
         if (o instanceof Object[]) {
             Object[] mapArray = (Object[]) o;
diff --git a/src/com/jidesoft/plaf/UIDefaultsLookup.java b/src/com/jidesoft/plaf/UIDefaultsLookup.java
index 205242c..e6666bc 100644
--- a/src/com/jidesoft/plaf/UIDefaultsLookup.java
+++ b/src/com/jidesoft/plaf/UIDefaultsLookup.java
@@ -7,7 +7,6 @@
 package com.jidesoft.plaf;
 
 import com.jidesoft.converter.ObjectConverterManager;
-import sun.reflect.Reflection;
 
 import javax.swing.*;
 import javax.swing.border.Border;
@@ -65,6 +64,7 @@ public class UIDefaultsLookup {
         ((Map) v).put(cl, value);
     }
 
+/*  This is the old method used before JDk8 b87. The getCallerClass(int) is removed in b87 so we can't use it any longer.
     // Returns the invoker's class loader, or null if none.
     // NOTE: This must always be invoked when there is exactly one intervening
     // frame from the core libraries on the stack between this method's
@@ -84,6 +84,23 @@ public class UIDefaultsLookup {
         // Circumvent security check since this is package-private
         return caller.getClassLoader();
     }
+*/
+
+
+    static ClassLoader getCallerClassLoader() {
+        Object cl = UIManager.get("ClassLoader");
+        if (cl instanceof ClassLoader) {
+            return (ClassLoader) cl;
+        }
+
+        String className = Thread.currentThread().getStackTrace()[3].getClassName();
+        try {
+            return Class.forName(className).getClassLoader();
+        }
+        catch (ClassNotFoundException e) {
+            return null;
+        }
+    }
 
     public static Object get(Object key) {
         Object value = UIManager.get(key);
@@ -178,7 +195,6 @@ public class UIDefaultsLookup {
      * @param l   the desired locale
      * @return if the value for <code>key</code> and <code>Locale</code> is a <code>Font</code>, return the
      *         <code>Font</code> object; otherwise return <code>null</code>
-     *
      * @since 1.9.5.04
      */
     public static Font getFont(Object key, Locale l) {
@@ -207,7 +223,6 @@ public class UIDefaultsLookup {
      * @param l   the desired locale
      * @return if the value for <code>key</code> and <code>Locale</code> is a <code>Color</code>, return the
      *         <code>Color</code> object; otherwise return <code>null</code>
-     *
      * @since 1.9.5.04
      */
     public static Color getColor(Object key, Locale l) {
@@ -237,7 +252,6 @@ public class UIDefaultsLookup {
      * @param l   the desired locale
      * @return if the value for <code>key</code> and <code>Locale</code> is an <code>Icon</code>, return the
      *         <code>Icon</code> object; otherwise return <code>null</code>
-     *
      * @since 1.9.5.04
      */
     public static Icon getIcon(Object key, Locale l) {
@@ -267,7 +281,6 @@ public class UIDefaultsLookup {
      * @param l   the desired locale
      * @return if the value for <code>key</code> and <code>Locale</code> is a <code>Border</code>, return the
      *         <code>Border</code> object; otherwise return <code>null</code>
-     *
      * @since 1.9.5.04
      */
     public static Border getBorder(Object key, Locale l) {
@@ -296,7 +309,6 @@ public class UIDefaultsLookup {
      * @param l   the desired <code>Locale</code>
      * @return if the value for <code>key</code> for the given <code>Locale</code> is a <code>String</code>, return the
      *         <code>String</code> object; otherwise return <code>null</code>
-     *
      * @since 1.9.5.04
      */
     public static String getString(Object key, Locale l) {
@@ -324,7 +336,6 @@ public class UIDefaultsLookup {
      * @param l   the desired locale
      * @return if the value for <code>key</code> and <code>Locale</code> is an <code>Integer</code>, return its value,
      *         otherwise return 0
-     *
      * @since 1.9.5.04
      */
     public static int getInt(Object key, Locale l) {
@@ -338,7 +349,6 @@ public class UIDefaultsLookup {
      *
      * @param key an <code>Object</code> specifying the key for the desired boolean value
      * @return if the value of <code>key</code> is boolean, return the boolean value, otherwise return false.
-     *
      * @since 1.9.5.04
      */
     public static boolean getBoolean(Object key) {
@@ -367,7 +377,6 @@ public class UIDefaultsLookup {
      * @param l   the desired locale
      * @return if the value for <code>key</code> and <code>Locale</code> is boolean, return the boolean value, otherwise
      *         return false.
-     *
      * @since 1.9.5.04
      */
     public static boolean getBoolean(Object key, Locale l) {
@@ -397,7 +406,6 @@ public class UIDefaultsLookup {
      * @param l   the desired locale
      * @return if the value for <code>key</code> and <code>Locale</code> is an <code>Insets</code>, return the
      *         <code>Insets</code> object; otherwise return <code>null</code>
-     *
      * @since 1.9.5.04
      */
     public static Insets getInsets(Object key, Locale l) {
@@ -427,7 +435,6 @@ public class UIDefaultsLookup {
      * @param l   the desired locale
      * @return if the value for <code>key</code> and <code>Locale</code> is a <code>Dimension</code>, return the
      *         <code>Dimension</code> object; otherwise return <code>null</code>
-     *
      * @since 1.9.5.04
      */
     public static Dimension getDimension(Object key, Locale l) {
diff --git a/src/com/jidesoft/plaf/basic/BasicJideTabbedPaneUI.java b/src/com/jidesoft/plaf/basic/BasicJideTabbedPaneUI.java
index 0d12810..dbea181 100644
--- a/src/com/jidesoft/plaf/basic/BasicJideTabbedPaneUI.java
+++ b/src/com/jidesoft/plaf/basic/BasicJideTabbedPaneUI.java
@@ -4521,6 +4521,9 @@ public class BasicJideTabbedPaneUI extends JideTabbedPaneUI implements SwingCons
     public int tabForCoordinate(JTabbedPane pane, int x, int y) {
         ensureCurrentLayout();
         Point p = new Point(x, y);
+        if (!_tabPane.isShowTabArea()) {
+            return -1;
+        }
 
         if (scrollableTabLayoutEnabled()) {
             translatePointToTabPanel(x, y, p);
diff --git a/src/com/jidesoft/plaf/vsnet/VsnetMenuItemUI.java b/src/com/jidesoft/plaf/vsnet/VsnetMenuItemUI.java
index aab5246..f8c92af 100644
--- a/src/com/jidesoft/plaf/vsnet/VsnetMenuItemUI.java
+++ b/src/com/jidesoft/plaf/vsnet/VsnetMenuItemUI.java
@@ -1013,8 +1013,8 @@ public class VsnetMenuItemUI extends MenuItemUI {
         }
         else {
             try {
-                checkIconRect.width = checkIcon.getIconWidth();
-                checkIconRect.height = checkIcon.getIconHeight();
+                checkIconRect.width = icon != null ? icon.getIconWidth() : checkIcon.getIconWidth();
+                checkIconRect.height = icon != null ? icon.getIconHeight() : checkIcon.getIconHeight();
             }
             catch (Exception e) {
                 checkIconRect.width = checkIconRect.height = 0;
diff --git a/src/com/jidesoft/plaf/xerto/VerticalLabelUI.java b/src/com/jidesoft/plaf/xerto/VerticalLabelUI.java
index deb3a22..d57c3d8 100644
--- a/src/com/jidesoft/plaf/xerto/VerticalLabelUI.java
+++ b/src/com/jidesoft/plaf/xerto/VerticalLabelUI.java
@@ -17,6 +17,7 @@ public class VerticalLabelUI extends BasicLabelUI {
     }
 
     protected boolean clockwise;
+    private boolean _rotateIcon = true;
 
     public VerticalLabelUI(boolean clockwise) {
         super();
@@ -63,6 +64,12 @@ public class VerticalLabelUI extends BasicLabelUI {
 
         Graphics2D g2 = (Graphics2D) i_oGraphics;
         AffineTransform oTransform = g2.getTransform();
+        if (!isRotateIcon()) {
+            if (oIcon != null) {
+                oIcon.paintIcon(i_oComponent, i_oGraphics, s_oPaintIconRectangle.x, s_oPaintIconRectangle.y);
+            }
+        }
+
         if (clockwise) {
             g2.rotate(Math.PI / 2);
             g2.translate(0, -i_oComponent.getWidth());
@@ -72,8 +79,10 @@ public class VerticalLabelUI extends BasicLabelUI {
             g2.translate(-i_oComponent.getHeight(), 0);
         }
 
-        if (oIcon != null) {
-            oIcon.paintIcon(i_oComponent, i_oGraphics, s_oPaintIconRectangle.x, s_oPaintIconRectangle.y);
+        if (isRotateIcon()) {
+            if (oIcon != null) {
+                oIcon.paintIcon(i_oComponent, i_oGraphics, s_oPaintIconRectangle.x, s_oPaintIconRectangle.y);
+            }
         }
 
         if (oText != null) {
@@ -90,4 +99,26 @@ public class VerticalLabelUI extends BasicLabelUI {
 
         g2.setTransform(oTransform);
     }
+
+    /**
+     * Gets the flag indicating if the icon should be rotated.
+     *
+     * @return true if the icon should be rotated with the text. Otherwise false.
+     * @since 3.5.5
+     */
+    public boolean isRotateIcon() {
+        return _rotateIcon;
+    }
+
+    /**
+     * Sets the flag indicating if the icon should be rotated.
+     * <p/>
+     * By default the value is true.
+     *
+     * @param rotateIcon the flag
+     * @since 3.5.5
+     */
+    public void setRotateIcon(boolean rotateIcon) {
+        _rotateIcon = rotateIcon;
+    }
 }
\ No newline at end of file
diff --git a/src/com/jidesoft/swing/AutoScroll.java b/src/com/jidesoft/swing/AutoScroll.java
index 96409ee..b170a32 100644
--- a/src/com/jidesoft/swing/AutoScroll.java
+++ b/src/com/jidesoft/swing/AutoScroll.java
@@ -18,6 +18,7 @@ import java.awt.event.MouseEvent;
  * code won't compile after upgrading to a new JIDE release.
  */
 abstract public class AutoScroll {
+    public static final String CLIENT_PROPERTY_AUTO_SCROLL = "AutoScroll";
     protected Timer _timer;
     protected boolean _autoScrolling = false;
     protected int _scrollDirection = SCROLL_UP;
@@ -34,13 +35,17 @@ abstract public class AutoScroll {
     protected int _autoScrollInterval = 100;
     private boolean _componentSelfScrollable = true;
 
+    private boolean _enabled = true;
+
     protected AutoScroll(Component component) {
         _component = component;
+        updateClientProperty(component, this);
     }
 
     protected AutoScroll(Component component, boolean vertical) {
         _component = component;
         _vertical = vertical;
+        updateClientProperty(component, this);
     }
 
     public int getAutoScrollInterval() {
@@ -51,6 +56,24 @@ abstract public class AutoScroll {
         _autoScrollInterval = autoScrollInterval;
     }
 
+    /**
+     * Checks if the AutoScroll is enabled.
+     *
+     * @return true if enabled. Otherwise false.
+     */
+    public boolean isEnabled() {
+        return _enabled;
+    }
+
+    /**
+     * Enables or disables the AutoScroll feature.
+     *
+     * @param enabled true or false.
+     */
+    public void setEnabled(boolean enabled) {
+        _enabled = enabled;
+    }
+
     private class AutoScrollActionHandler implements ActionListener {
         private int _direction;
 
@@ -124,15 +147,24 @@ abstract public class AutoScroll {
 
 
     public void mouseReleased(MouseEvent e) {
+        if (!isEnabled()) {
+            return;
+        }
         _hasEntered = false;
         stopAutoScrolling();
     }
 
     public void mousePressed(MouseEvent e) {
+        if (!isEnabled()) {
+            return;
+        }
         stopAutoScrolling();
     }
 
     public void mouseDragged(MouseEvent e) {
+        if (!isEnabled()) {
+            return;
+        }
         if (_componentSelfScrollable && e.getSource() == _component) {
             return;
         }
@@ -185,6 +217,9 @@ abstract public class AutoScroll {
     }
 
     public void mouseMoved(MouseEvent e) {
+        if (!isEnabled()) {
+            return;
+        }
         if (e.getSource() == _component) {
             Point location = e.getPoint();
             Rectangle r = new Rectangle();
@@ -209,4 +244,32 @@ abstract public class AutoScroll {
     abstract public void autoScrolling(int direction);
 
     abstract public void updateSelectionForEvent(MouseEvent e, boolean shouldScroll);
+
+    /**
+     * Gets the AutoScroll installed on the component. Null is no AutoScroll was installed.
+     *
+     * @param component the component
+     * @return the AutoScroll installed. Null is no AutoScroll was installed.
+     */
+    public static AutoScroll getAutoScroll(Component component) {
+        Object clientProperty = component instanceof JComponent ? ((JComponent) component).getClientProperty(CLIENT_PROPERTY_AUTO_SCROLL) : null;
+        if (clientProperty instanceof AutoScroll) {
+            return ((AutoScroll) clientProperty);
+        }
+        else {
+            return null;
+        }
+    }
+
+    private void updateClientProperty(Component component, AutoScroll autoScroll) {
+        if (component != null) {
+            Object clientProperty = ((JComponent) _component).getClientProperty(CLIENT_PROPERTY_AUTO_SCROLL);
+            if (clientProperty instanceof AutoScroll) {
+                ((AutoScroll) clientProperty).stopAutoScrolling();
+            }
+            if (component instanceof JComponent) {
+                ((JComponent) component).putClientProperty(CLIENT_PROPERTY_AUTO_SCROLL, autoScroll);
+            }
+        }
+    }
 }
diff --git a/src/com/jidesoft/swing/CheckBoxListSelectionModel.java b/src/com/jidesoft/swing/CheckBoxListSelectionModel.java
index 80d323c..e9e9411 100644
--- a/src/com/jidesoft/swing/CheckBoxListSelectionModel.java
+++ b/src/com/jidesoft/swing/CheckBoxListSelectionModel.java
@@ -119,6 +119,9 @@ public class CheckBoxListSelectionModel extends DefaultListSelectionModel implem
      */
     @Override
     public void insertIndexInterval(int index, int length, boolean before) {
+        if (index < 0) {
+            return;
+        }
         if (before) {
             boolean old = isSelectedIndex(index);
             boolean adjusting = getValueIsAdjusting();
diff --git a/src/com/jidesoft/swing/CheckBoxTree.java b/src/com/jidesoft/swing/CheckBoxTree.java
index 2e397a4..b6564f0 100644
--- a/src/com/jidesoft/swing/CheckBoxTree.java
+++ b/src/com/jidesoft/swing/CheckBoxTree.java
@@ -266,7 +266,7 @@ public class CheckBoxTree extends JTree {
      * @see #setSelectPartialOnToggling(boolean)
      */
     public boolean isSelectPartialOnToggling() {
-        return _selectPartialOnToggling;
+        return _selectPartialOnToggling || selectionModel.getClass().getName().contains("Filter");
     }
 
     /**
diff --git a/src/com/jidesoft/swing/DefaultOverlayable.java b/src/com/jidesoft/swing/DefaultOverlayable.java
index cfa3f9d..68f783f 100644
--- a/src/com/jidesoft/swing/DefaultOverlayable.java
+++ b/src/com/jidesoft/swing/DefaultOverlayable.java
@@ -298,7 +298,6 @@ public class DefaultOverlayable extends JPanel implements Overlayable, Component
         }
     }
 
-
     public Insets getOverlayLocationInsets() {
         return _overlayLocationInsets;
     }
diff --git a/src/com/jidesoft/swing/JideTabbedPane.java b/src/com/jidesoft/swing/JideTabbedPane.java
index f24cfea..1a60b6e 100644
--- a/src/com/jidesoft/swing/JideTabbedPane.java
+++ b/src/com/jidesoft/swing/JideTabbedPane.java
@@ -577,12 +577,19 @@ public class JideTabbedPane extends JTabbedPane {
                 String tooltip = getToolTipTextAt(tabIndex);
                 Icon icon = getIconAt(tabIndex);
                 _suppressSetSelectedIndex = true;
+                Object closable = null;
+                if (_closableMap != null) {
+                    closable = _closableMap.get(title);
+                }
                 try {
                     if (tabIndex > selectedIndex)
                         insertTab(title, icon, frame, tooltip, selectedIndex);
                     else {
                         insertTab(title, icon, frame, tooltip, selectedIndex + 1);
                     }
+                    if (closable != null) {
+                        _closableMap.put(title, closable);
+                    }
                 }
                 finally {
                     _suppressSetSelectedIndex = false;
@@ -594,12 +601,19 @@ public class JideTabbedPane extends JTabbedPane {
                 String tooltip = getToolTipTextAt(selectedIndex);
                 Icon icon = getIconAt(selectedIndex);
                 _suppressSetSelectedIndex = true;
+                Object closable = null;
+                if (_closableMap != null) {
+                    closable = _closableMap.get(title);
+                }
                 try {
                     if (tabIndex > selectedIndex)
                         insertTab(title, icon, frame, tooltip, tabIndex + 1);
                     else {
                         insertTab(title, icon, frame, tooltip, tabIndex);
                     }
+                    if (closable != null) {
+                        _closableMap.put(title, closable);
+                    }
                 }
                 finally {
                     _suppressSetSelectedIndex = false;
diff --git a/src/com/jidesoft/swing/TristateCheckBox.java b/src/com/jidesoft/swing/TristateCheckBox.java
index c66f883..d513a38 100644
--- a/src/com/jidesoft/swing/TristateCheckBox.java
+++ b/src/com/jidesoft/swing/TristateCheckBox.java
@@ -131,6 +131,16 @@ public class TristateCheckBox extends JCheckBox implements ActionListener {
         }
     }
 
+    @Override
+    public void setSelected(boolean b) {
+        if (b) {
+            setState(STATE_SELECTED);
+        }
+        else {
+            setState(STATE_UNSELECTED);
+        }
+    }
+
     /**
      * Sets the selection state. It could be one of the three states as defined - {@link #STATE_SELECTED}, {@link
      * #STATE_UNSELECTED} and {@link #STATE_MIXED}.

-- 
libjide-oss-java packaging



More information about the pkg-java-commits mailing list