[Git][java-team/libjide-oss-java][master] 6 commits: Add java10.patch

Markus Koschany gitlab at salsa.debian.org
Sun Jul 29 00:48:03 BST 2018


Markus Koschany pushed to branch master at Debian Java Maintainers / libjide-oss-java


Commits:
6c97b404 by Markus Koschany at 2018-07-28T23:05:11Z
Add java10.patch

- - - - -
c15153a1 by Markus Koschany at 2018-07-28T23:07:32Z
Bump version in  libjide-oss-java.jlibs

- - - - -
1f1800f7 by Markus Koschany at 2018-07-28T23:11:32Z
Use return false instead of return true.

- - - - -
dcb3e1a3 by Markus Koschany at 2018-07-28T23:13:26Z
Declare compliance with Debian Policy 4.1.5.

- - - - -
159d582a by Markus Koschany at 2018-07-28T23:15:41Z
Update changelog

- - - - -
1b7968e0 by Markus Koschany at 2018-07-28T23:21:14Z
Add a comment in d/copyright and point to README.source.

- - - - -


6 changed files:

- debian/changelog
- debian/control
- debian/copyright
- debian/libjide-oss-java.jlibs
- + debian/patches/java10.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
-libjide-oss-java (3.7.4+dfsg-1) UNRELEASED; urgency=medium
+libjide-oss-java (3.7.4+dfsg-1) unstable; urgency=medium
 
-  * 
+  * New upstream version 3.7.4+dfsg.
+  * Add java10.patch. Remove Windows-specific classes that FTBFS with
+    OpenJDK 10. (Closes: #897491)
+  * Bump version in libjide-oss-java.jlibs.
+  * Declare compliance with Debian Policy 4.1.5.
 
- -- Markus Koschany <apo at debian.org>  Thu, 28 Jun 2018 21:55:51 +0200
+ -- Markus Koschany <apo at debian.org>  Sun, 29 Jul 2018 01:14:01 +0200
 
 libjide-oss-java (3.7.2+dfsg-2) unstable; urgency=medium
 


=====================================
debian/control
=====================================
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Build-Depends:
  default-jdk-doc,
  javahelper,
  maven-repo-helper (>= 1.6~)
-Standards-Version: 4.1.4
+Standards-Version: 4.1.5
 Homepage: http://www.jidesoft.com/products/oss.htm
 Vcs-Git: https://anonscm.debian.org/git/pkg-java/libjide-oss-java.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/libjide-oss-java.git


=====================================
debian/copyright
=====================================
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,6 +2,8 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: Jide Common Layer (Open Source Project)
 Upstream-Contact: JIDE Software, Inc.
 Source: https://github.com/jidesoft/jide-oss
+Comment:
+ Please see README.source why the upstream version was repacked.
 
 Files: *
 Copyright: 1995,2006, Oracle and/or its affiliates


=====================================
debian/libjide-oss-java.jlibs
=====================================
--- a/debian/libjide-oss-java.jlibs
+++ b/debian/libjide-oss-java.jlibs
@@ -1 +1 @@
-jide-oss-3.7.2.jar
+jide-oss-3.7.4.jar


=====================================
debian/patches/java10.patch
=====================================
--- /dev/null
+++ b/debian/patches/java10.patch
@@ -0,0 +1,1106 @@
+From: Markus Koschany <apo at debian.org>
+Date: Sat, 28 Jul 2018 09:32:46 +0200
+Subject: java10
+
+Bug-Debian: https://bugs.debian.org/897491
+Bug-Upstream: https://github.com/jidesoft/jide-oss/issues/30
+
+Remove Windows-specific class which FTBFS with OpenJDK 10.
+---
+ src-jdk9/com/jidesoft/plaf/windows/TMSchema.java   |  10 +-
+ src-jdk9/com/jidesoft/plaf/windows/XPStyle.java    |  75 +--
+ .../plaf/vsnet/VsnetWindowsProgressBarUI.java      | 227 ---------
+ .../plaf/windows/WindowsJidePopupMenuUI.java       |  28 --
+ .../plaf/windows/WindowsRangeSliderUI.java         | 546 ---------------------
+ src/com/jidesoft/plaf/xerto/XertoJideButtonUI.java |  45 --
+ 6 files changed, 14 insertions(+), 917 deletions(-)
+ delete mode 100644 src/com/jidesoft/plaf/vsnet/VsnetWindowsProgressBarUI.java
+ delete mode 100644 src/com/jidesoft/plaf/windows/WindowsJidePopupMenuUI.java
+ delete mode 100644 src/com/jidesoft/plaf/windows/WindowsRangeSliderUI.java
+ delete mode 100644 src/com/jidesoft/plaf/xerto/XertoJideButtonUI.java
+
+diff --git a/src-jdk9/com/jidesoft/plaf/windows/TMSchema.java b/src-jdk9/com/jidesoft/plaf/windows/TMSchema.java
+index 888839b..8ca3d36 100644
+--- a/src-jdk9/com/jidesoft/plaf/windows/TMSchema.java
++++ b/src-jdk9/com/jidesoft/plaf/windows/TMSchema.java
+@@ -9,7 +9,7 @@
+  */
+ package com.jidesoft.plaf.windows;
+ 
+-import sun.awt.windows.ThemeReader;
++//import sun.awt.windows.ThemeReader;
+ 
+ import javax.swing.*;
+ import java.awt.*;
+@@ -400,14 +400,6 @@ public class TMSchema {
+             //         is inactive. They are not defined in tmschema.h
+ 
+             // Fix for 6316538: Vista has five frame button states
+-            if (ThemeReader.getInt(Control.WINDOW.toString(),
+-                    Part.WP_CLOSEBUTTON.getValue(), 1,
+-                    Prop.IMAGECOUNT.getValue()) == 10) {
+-                frameButtonStates = new State[]{
+-                        NORMAL, HOT, PUSHED, DISABLED, null,
+-                        INACTIVENORMAL, INACTIVEHOT, INACTIVEPUSHED, INACTIVEDISABLED, null
+-                };
+-            }
+ 
+             stateMap.put(Part.WP_MINBUTTON, frameButtonStates);
+             stateMap.put(Part.WP_MAXBUTTON, frameButtonStates);
+diff --git a/src-jdk9/com/jidesoft/plaf/windows/XPStyle.java b/src-jdk9/com/jidesoft/plaf/windows/XPStyle.java
+index 0827d4b..15e185c 100644
+--- a/src-jdk9/com/jidesoft/plaf/windows/XPStyle.java
++++ b/src-jdk9/com/jidesoft/plaf/windows/XPStyle.java
+@@ -8,10 +8,7 @@ import com.jidesoft.plaf.windows.TMSchema.Prop;
+ import com.jidesoft.plaf.windows.TMSchema.State;
+ import com.jidesoft.plaf.windows.TMSchema.TypeEnum;
+ import com.jidesoft.utils.ReflectionUtils;
+-import com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel;
+-import com.sun.java.swing.plaf.windows.WindowsComboBoxUI;
+ import sun.awt.image.SunWritableRaster;
+-import sun.awt.windows.ThemeReader;
+ import sun.security.action.GetPropertyAction;
+ import sun.swing.CachedPainter;
+ 
+@@ -91,16 +88,9 @@ public class XPStyle {
+             if (themeActive.booleanValue()) {
+                 GetPropertyAction propertyAction =
+                         new GetPropertyAction("swing.noxp");
+-                if (AccessController.doPrivileged(propertyAction) == null &&
+-                        ThemeReader.isThemed() &&
+-                        !(UIManager.getLookAndFeel()
+-                                instanceof WindowsClassicLookAndFeel)) {
+-
+-                    xp = new XPStyle();
+-                }
+             }
+         }
+-        return xp;
++        return xp = null;
+     }
+ 
+     public static boolean isVista() {
+@@ -124,16 +114,12 @@ public class XPStyle {
+     }
+ 
+     public TypeEnum getTypeEnum(Component c, Part part, State state, Prop prop) {
+-        int enumValue = ThemeReader.getEnum(part.getControlName(c), part.getValue(),
+-                State.getValue(part, state),
+-                prop.getValue());
++        int enumValue = 0;
+         return TypeEnum.getTypeEnum(prop, enumValue);
+     }
+ 
+     private static String getTypeEnumName(Component c, Part part, State state, Prop prop) {
+-        int enumValue = ThemeReader.getEnum(part.getControlName(c), part.getValue(),
+-                State.getValue(part, state),
+-                prop.getValue());
++        int enumValue = 0;
+         if (enumValue == -1) {
+             return null;
+         }
+@@ -148,9 +134,7 @@ public class XPStyle {
+      * @return an <code>int</code> or null if key is not found in the current style
+      */
+     public int getInt(Component c, Part part, State state, Prop prop, int fallback) {
+-        return ThemeReader.getInt(part.getControlName(c), part.getValue(),
+-                State.getValue(part, state),
+-                prop.getValue());
++        return 0;
+     }
+ 
+     /**
+@@ -162,9 +146,7 @@ public class XPStyle {
+      * here.
+      */
+     public Dimension getDimension(Component c, Part part, State state, Prop prop) {
+-        return ThemeReader.getPosition(part.getControlName(c), part.getValue(),
+-                State.getValue(part, state),
+-                prop.getValue());
++        return null;
+     }
+ 
+     /**
+@@ -176,9 +158,7 @@ public class XPStyle {
+      * no longer needed
+      */
+     public Point getPoint(Component c, Part part, State state, Prop prop) {
+-        Dimension d = ThemeReader.getPosition(part.getControlName(c), part.getValue(),
+-                State.getValue(part, state),
+-                prop.getValue());
++        Dimension d = null;
+         if (d != null) {
+             return new Point(d.width, d.height);
+         }
+@@ -196,9 +176,7 @@ public class XPStyle {
+      * The return value is already cached in those places.
+      */
+     public Insets getMargin(Component c, Part part, State state, Prop prop) {
+-        return ThemeReader.getThemeMargins(part.getControlName(c), part.getValue(),
+-                State.getValue(part, state),
+-                prop.getValue());
++        return null;
+     }
+ 
+ 
+@@ -212,9 +190,7 @@ public class XPStyle {
+         Part part = skin.part;
+         Color color = colorMap.get(key);
+         if (color == null) {
+-            color = ThemeReader.getColor(part.getControlName(null), part.getValue(),
+-                    State.getValue(part, skin.state),
+-                    prop.getValue());
++            color = null;
+             if (color != null) {
+                 color = new ColorUIResource(color);
+                 colorMap.put(key, color);
+@@ -335,10 +311,7 @@ public class XPStyle {
+                 JComboBox cb = (JComboBox) c;
+                 // note. in the future this should be replaced with a call
+                 // to BasicLookAndFeel.getUIOfType()
+-                if (cb.getUI() instanceof WindowsComboBoxUI) {
+-                    WindowsComboBoxUI wcb = (WindowsComboBoxUI) cb.getUI();
+ //                    state = wcb.getXPComboBoxState(cb);
+-                }
+             }
+             lineColor = getColor(c, part, state, prop, Color.black);
+             super.paintBorder(c, g, x, y, width, height);
+@@ -429,9 +402,7 @@ public class XPStyle {
+     }
+ 
+     public boolean isSkinDefined(Component c, Part part) {
+-        return (part.getValue() == 0)
+-                || ThemeReader.isThemePartDefined(
+-                part.getControlName(c), part.getValue(), 0);
++        return false;
+     }
+ 
+ 
+@@ -449,11 +420,7 @@ public class XPStyle {
+ 
+     long getThemeTransitionDuration(Component c, Part part, State stateFrom,
+                                     State stateTo, Prop prop) {
+-        return ThemeReader.getThemeTransitionDuration(part.getControlName(c),
+-                part.getValue(),
+-                State.getValue(part, stateFrom),
+-                State.getValue(part, stateTo),
+-                (prop != null) ? prop.getValue() : 0);
++        return 0;
+     }
+ 
+ 
+@@ -641,19 +608,6 @@ public class XPStyle {
+             DataBufferInt dbi = (DataBufferInt) raster.getDataBuffer();
+             // Note that stealData() requires a markDirty() afterwards
+             // since we modify the data in it.
+-            try {
+-                ThemeReader.paintBackground(
+-                        (int[]) ReflectionUtils.callStatic(SunWritableRaster.class, "stealData", new Class[]{DataBufferInt.class, int.class}, new Object[]{dbi, 0}),
+-                            /*SunWritableRaster.stealData(dbi, 0),*/
+-                        part.getControlName(c), part.getValue(),
+-                        State.getValue(part, state),
+-                        0, 0, w, h, w);
+-                ReflectionUtils.callStatic(SunWritableRaster.class, "markDirty", new Class[]{DataBuffer.class}, new Object[]{dbi});
+-//                    SunWritableRaster.markDirty(dbi);
+-            }
+-            catch (Exception e) {
+-                e.printStackTrace();
+-            }
+         }
+ 
+         protected Image createImage(Component c, int w, int h,
+@@ -722,19 +676,16 @@ public class XPStyle {
+ 
+ 
+     private boolean getBoolean(Component c, Part part, State state, Prop prop) {
+-        return ThemeReader.getBoolean(part.getControlName(c), part.getValue(),
+-                State.getValue(part, state),
+-                prop.getValue());
++        return false;
+     }
+ 
+ 
+     static Dimension getPartSize(Part part, State state) {
+-        return ThemeReader.getPartSize(part.getControlName(null), part.getValue(),
+-                State.getValue(part, state));
++        return null;
+     }
+ 
+     private static boolean getSysBoolean(Prop prop) {
+         // We can use any widget name here, I guess.
+-        return ThemeReader.getSysBoolean("window", prop.getValue());
++        return false;
+     }
+ }
+diff --git a/src/com/jidesoft/plaf/vsnet/VsnetWindowsProgressBarUI.java b/src/com/jidesoft/plaf/vsnet/VsnetWindowsProgressBarUI.java
+deleted file mode 100644
+index c5c9bbf..0000000
+--- a/src/com/jidesoft/plaf/vsnet/VsnetWindowsProgressBarUI.java
++++ /dev/null
+@@ -1,227 +0,0 @@
+-/*
+- * @(#)VsnetWindowsProgressBarUI.java 6/21/2005
+- *
+- * Copyright 2002 - 2005 JIDE Software Inc. All rights reserved.
+- */
+-package com.jidesoft.plaf.vsnet;
+-
+-import com.jidesoft.plaf.UIDefaultsLookup;
+-import com.jidesoft.swing.JideSwingUtilities;
+-import com.sun.java.swing.plaf.windows.WindowsProgressBarUI;
+-
+-import javax.swing.*;
+-import javax.swing.plaf.ComponentUI;
+-import java.awt.*;
+-import java.awt.event.ActionEvent;
+-import java.awt.event.ActionListener;
+-import java.awt.geom.AffineTransform;
+-
+-/**
+- * A better ProgressBarUI for indeterminate progress bar.
+- * <p/>
+- * <b>Credit:</b> This implementation is based on work from Santhosh Kumar - santhosh at in.fiorano.com.
+- */
+-
+-public class VsnetWindowsProgressBarUI extends WindowsProgressBarUI implements ActionListener {
+-    /**
+-     * Interval (in ms) between repaints of the indeterminate progress bar.
+-     * The value of this method is set
+-     * (every time the progress bar changes to indeterminate mode)
+-     * using the
+-     * "ProgressBar.repaintInterval" key in the defaults table.
+-     */
+-    private int repaintInterval;
+-
+-    private int x = 0, y = 0, delta = +1;
+-    private Timer timer = null;
+-
+-
+-    public static ComponentUI createUI(JComponent x) {
+-        return new VsnetWindowsProgressBarUI();
+-    }
+-
+-    @Override
+-    protected void installDefaults() {
+-        super.installDefaults();
+-        initRepaintInterval(); //initialize repaint interval
+-    }
+-
+-    @Override
+-    protected void startAnimationTimer() {
+-        if (timer == null) {
+-            timer = new Timer(getRepaintInterval() / 20, this);
+-        }
+-        x = y = 0;
+-        delta = 1;
+-        timer.start();
+-    }
+-
+-    @Override
+-    protected void stopAnimationTimer() {
+-        if (timer != null) {
+-            timer.stop();
+-        }
+-    }
+-
+-    public void actionPerformed(ActionEvent ae) {
+-        // style1
+-        if (x == 0)
+-            delta = +1;
+-        else if (x == progressBar.getWidth())
+-            delta = -1;
+-        x += delta;
+-
+-        progressBar.repaint();
+-    }
+-
+-    /**
+-     * Returns the desired number of milliseconds between repaints.
+-     * This value is meaningful
+-     * only if the progress bar is in indeterminate mode.
+-     * The repaint interval determines how often the
+-     * default animation thread's timer is fired.
+-     * It's also used by the default indeterminate progress bar
+-     * painting code when determining
+-     * how far to move the bouncing box per frame.
+-     * The repaint interval is specified by
+-     * the "ProgressBar.repaintInterval" UI default.
+-     *
+-     * @return the repaint interval, in milliseconds
+-     */
+-    protected int getRepaintInterval() {
+-        return repaintInterval;
+-    }
+-
+-    private int initRepaintInterval() {
+-        repaintInterval = UIDefaultsLookup.getInt("ProgressBar.repaintInterval");
+-        return repaintInterval;
+-    }
+-
+-    private Rectangle boxRect;
+-
+-    @Override
+-    public void paintIndeterminate(Graphics g, JComponent c) {
+-        super.paintIndeterminate(g, c);
+-        Color startColor = progressBar.getForeground();
+-        Color endColor = VsnetUtils.getLighterColor(startColor, 0.9f);
+-
+-        if (!(g instanceof Graphics2D)) {
+-            return;
+-        }
+-
+-        boolean vertical = (progressBar.getOrientation() == JProgressBar.VERTICAL);
+-
+-        Insets b = progressBar.getInsets(); // area for border
+-        b.top = 2;
+-        b.left = 2;
+-        b.right = 2;
+-        b.bottom = 2;
+-        int barRectWidth = progressBar.getWidth() - (b.right + b.left);
+-        int barRectHeight = progressBar.getHeight() - (b.top + b.bottom);
+-        g.setColor(progressBar.getBackground());
+-        g.fillRect(b.left, b.top, barRectWidth, barRectHeight);
+-
+-        Graphics2D g2d = (Graphics2D) g;
+-
+-        // Paint the bouncing box.
+-        if (delta > 0) {
+-            boxRect = new Rectangle(b.left, b.top, x, barRectHeight);
+-            JideSwingUtilities.fillNormalGradient(g2d, boxRect, endColor, startColor, vertical);
+-        }
+-        else {
+-            boxRect = new Rectangle(x, b.top, barRectWidth - x, barRectHeight);
+-            JideSwingUtilities.fillNormalGradient(g2d, boxRect, startColor, endColor, vertical);
+-        }
+-
+-        // Deal with possible text painting
+-        if (progressBar.isStringPainted()) {
+-            if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {
+-                paintString(g2d, b.left, b.top,
+-                        barRectWidth, barRectHeight,
+-                        boxRect.x, boxRect.width, b);
+-            }
+-            else {
+-                paintString(g2d, b.left, b.top,
+-                        barRectWidth, barRectHeight,
+-                        boxRect.y, boxRect.height, b);
+-            }
+-        }
+-    }
+-
+-    /**
+-     * Paints the progress string.
+-     *
+-     * @param g          Graphics used for drawing.
+-     * @param x          x location of bounding box
+-     * @param y          y location of bounding box
+-     * @param width      width of bounding box
+-     * @param height     height of bounding box
+-     * @param fillStart  start location, in x or y depending on orientation,
+-     *                   of the filled portion of the progress bar.
+-     * @param amountFull size of the fill region, either width or height
+-     *                   depending upon orientation.
+-     * @param b          Insets of the progress bar.
+-     */
+-    private void paintString(Graphics g, int x, int y, int width, int height,
+-                             int fillStart, int amountFull, Insets b) {
+-        if (!(g instanceof Graphics2D)) {
+-            return;
+-        }
+-
+-        Graphics2D g2 = (Graphics2D) g;
+-        String progressString = progressBar.getString();
+-        g2.setFont(progressBar.getFont());
+-        Point renderLocation = getStringPlacement(g2, progressString,
+-                x, y, width, height);
+-        Rectangle oldClip = g2.getClipBounds();
+-
+-        if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {
+-            g2.setColor(getSelectionBackground());
+-            JideSwingUtilities.drawString(progressBar, g2, progressString,
+-                    renderLocation.x, renderLocation.y);
+-            g2.setColor(getSelectionForeground());
+-            g2.clipRect(fillStart, y, amountFull, height);
+-            JideSwingUtilities.drawString(progressBar, g2, progressString,
+-                    renderLocation.x, renderLocation.y);
+-        }
+-        else { // VERTICAL
+-            g2.setColor(getSelectionBackground());
+-            AffineTransform rotate =
+-                    AffineTransform.getRotateInstance(Math.PI / 2);
+-            g2.setFont(progressBar.getFont().deriveFont(rotate));
+-            renderLocation = getStringPlacement(g2, progressString,
+-                    x, y, width, height);
+-            JideSwingUtilities.drawString(progressBar, g2, progressString,
+-                    renderLocation.x, renderLocation.y);
+-            g2.setColor(getSelectionForeground());
+-            g2.clipRect(x, fillStart, width, amountFull);
+-            JideSwingUtilities.drawString(progressBar, g2, progressString,
+-                    renderLocation.x, renderLocation.y);
+-        }
+-        g2.setClip(oldClip);
+-    }
+-
+-
+-    public static void main(String[] args) {
+-        try {
+-            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+-        }
+-        catch (Exception e) {
+-            e.printStackTrace();
+-        }
+-        JProgressBar progressBar = new JProgressBar();
+-        JProgressBar myProgressBar = new JProgressBar();
+-        myProgressBar.setUI(new VsnetWindowsProgressBarUI());
+-        progressBar.setIndeterminate(true);
+-        progressBar.setString("Percent");
+-        progressBar.setStringPainted(true);
+-        myProgressBar.setIndeterminate(true);
+-        myProgressBar.setString("Percent");
+-        myProgressBar.setStringPainted(true);
+-        JPanel panel = new JPanel(new BorderLayout(5, 5));
+-        panel.add(progressBar, BorderLayout.NORTH);
+-        panel.add(myProgressBar, BorderLayout.SOUTH);
+-        JOptionPane.showMessageDialog(null, panel, "ProgressBars made intutive - santhosh at in.fiorano.com", JOptionPane.INFORMATION_MESSAGE);
+-        System.exit(0);
+-    }
+-}
+\ No newline at end of file
+diff --git a/src/com/jidesoft/plaf/windows/WindowsJidePopupMenuUI.java b/src/com/jidesoft/plaf/windows/WindowsJidePopupMenuUI.java
+deleted file mode 100644
+index b08fb23..0000000
+--- a/src/com/jidesoft/plaf/windows/WindowsJidePopupMenuUI.java
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/*
+- * @(#)WindowsJidePopupMenuUI.java 12/13/2006
+- *
+- * Copyright 2002 - 2006 JIDE Software Inc. All rights reserved.
+- */
+-
+-package com.jidesoft.plaf.windows;
+-
+-import com.jidesoft.plaf.basic.BasicJidePopupMenuUI;
+-import com.sun.java.swing.plaf.windows.WindowsPopupMenuUI;
+-
+-import javax.swing.*;
+-import javax.swing.plaf.ComponentUI;
+-
+-public class WindowsJidePopupMenuUI extends WindowsPopupMenuUI {
+-    public WindowsJidePopupMenuUI() {
+-    }
+-
+-    public static ComponentUI createUI(JComponent c) {
+-        return new WindowsJidePopupMenuUI();
+-    }
+-
+-    @Override
+-    public Popup getPopup(JPopupMenu popupMenu, int x, int y) {
+-        Popup popup = BasicJidePopupMenuUI.addScrollPaneIfNecessary(popupMenu, x, y);
+-        return popup == null ? super.getPopup(popupMenu, x, y) : popup;
+-    }
+-}
+diff --git a/src/com/jidesoft/plaf/windows/WindowsRangeSliderUI.java b/src/com/jidesoft/plaf/windows/WindowsRangeSliderUI.java
+deleted file mode 100644
+index 70df7ad..0000000
+--- a/src/com/jidesoft/plaf/windows/WindowsRangeSliderUI.java
++++ /dev/null
+@@ -1,546 +0,0 @@
+-/*
+- * @(#)WindowsRangeSliderUI.java 7/2/2010
+- *
+- * Copyright 2002 - 2010 JIDE Software Inc. All rights reserved.
+- */
+-
+-package com.jidesoft.plaf.windows;
+-
+-import com.jidesoft.swing.RangeSlider;
+-import com.sun.java.swing.plaf.windows.WindowsSliderUI;
+-
+-import javax.swing.*;
+-import javax.swing.plaf.ComponentUI;
+-import java.awt.*;
+-import java.awt.event.MouseEvent;
+-import java.lang.reflect.Field;
+-
+-/**
+- * WindowsRangeSliderUI implementation
+- */
+-public class WindowsRangeSliderUI extends WindowsSliderUI {
+-    public WindowsRangeSliderUI(JSlider slider) {
+-        super(slider);
+-    }
+-
+-    // ********************************
+-    //          Create PLAF
+-    // ********************************
+-
+-    public static ComponentUI createUI(JComponent slider) {
+-        return new WindowsRangeSliderUI((JSlider) slider);
+-    }
+-
+-    @Override
+-    public void paint(Graphics g, JComponent c) {
+-        second = false;
+-        super.paint(g, c);
+-
+-        Rectangle clip = g.getClipBounds();
+-
+-        second = true;
+-        Point p = adjustThumbForHighValue();
+-
+-        if (clip.intersects(thumbRect)) {
+-            paintThumb(g);
+-        }
+-
+-        restoreThumbForLowValue(p);
+-        second = false;
+-    }
+-
+-    protected void restoreThumbForLowValue(Point p) {
+-        thumbRect.x = p.x;
+-        thumbRect.y = p.y;
+-    }
+-
+-    protected Point adjustThumbForHighValue() {
+-        Point p = thumbRect.getLocation();
+-        if (slider.getOrientation() == JSlider.HORIZONTAL) {
+-            int valuePosition = xPositionForValue(((RangeSlider) slider).getHighValue());
+-            thumbRect.x = valuePosition - (thumbRect.width / 2);
+-        }
+-        else {
+-            int valuePosition = yPositionForValue(((RangeSlider) slider).getHighValue());
+-            thumbRect.y = valuePosition - (thumbRect.height / 2);
+-        }
+-        return p;
+-    }
+-
+-    protected void adjustSnapHighValue() {
+-        int sliderValue = ((RangeSlider) slider).getHighValue();
+-        int snappedValue = sliderValue;
+-        int majorTickSpacing = slider.getMajorTickSpacing();
+-        int minorTickSpacing = slider.getMinorTickSpacing();
+-        int tickSpacing = 0;
+-
+-        if (minorTickSpacing > 0) {
+-            tickSpacing = minorTickSpacing;
+-        }
+-        else if (majorTickSpacing > 0) {
+-            tickSpacing = majorTickSpacing;
+-        }
+-
+-        if (tickSpacing != 0) {
+-            // If it's not on a tick, change the value
+-            if ((sliderValue - slider.getMinimum()) % tickSpacing != 0) {
+-                float temp = (float) (sliderValue - slider.getMinimum())
+-                        / (float) tickSpacing;
+-                int whichTick = Math.round(temp);
+-                snappedValue =
+-                        slider.getMinimum() + (whichTick * tickSpacing);
+-            }
+-
+-            if (snappedValue != sliderValue) {
+-                ((RangeSlider) slider).setHighValue(snappedValue);
+-            }
+-        }
+-    }
+-
+-    @Override
+-    protected void calculateThumbLocation() {
+-        if (slider.getSnapToTicks()) {
+-            adjustSnapHighValue();
+-        }
+-        super.calculateThumbLocation();
+-    }
+-
+-    @Override
+-    protected TrackListener createTrackListener(JSlider slider) {
+-        return new RangeTrackListener(super.createTrackListener(slider));
+-    }
+-
+-    protected class RangeTrackListener extends TrackListener {
+-        int handle;
+-        int handleOffset;
+-        int mouseStartLocation;
+-        TrackListener _listener;
+-
+-        public RangeTrackListener(TrackListener listener) {
+-            _listener = listener;
+-        }
+-
+-        /**
+-         * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
+-         */
+-        @Override
+-        public void mousePressed(MouseEvent e) {
+-            if (!slider.isEnabled()) {
+-                return;
+-            }
+-
+-            if (slider.isRequestFocusEnabled()) {
+-                slider.requestFocus();
+-            }
+-
+-            handle = getMouseHandle(e.getX(), e.getY());
+-            setMousePressed(handle);
+-
+-            if (handle == MOUSE_HANDLE_MAX || handle == MOUSE_HANDLE_MIN || handle == MOUSE_HANDLE_MIDDLE || handle == MOUSE_HANDLE_BOTH) {
+-                handleOffset = (slider.getOrientation() == JSlider.VERTICAL) ?
+-                        e.getY() - yPositionForValue(((RangeSlider) slider).getLowValue()) :
+-                        e.getX() - xPositionForValue(((RangeSlider) slider).getLowValue());
+-
+-                mouseStartLocation = (slider.getOrientation() == JSlider.VERTICAL) ? e.getY() : e.getX();
+-
+-                slider.getModel().setValueIsAdjusting(true);
+-            }
+-            else if (handle == MOUSE_HANDLE_LOWER || handle == MOUSE_HANDLE_UPPER) {
+-                _listener.mousePressed(e);
+-                slider.putClientProperty(RangeSlider.CLIENT_PROPERTY_MOUSE_POSITION, null);
+-            }
+-        }
+-
+-        /**
+-         * @see java.awt.event.MouseMotionListener#mouseDragged(java.awt.event.MouseEvent)
+-         */
+-        @Override
+-        public void mouseDragged(MouseEvent e) {
+-            if (!slider.isEnabled()) {
+-                return;
+-            }
+-
+-            int newLocation = (slider.getOrientation() == JSlider.VERTICAL) ? e.getY() : e.getX();
+-
+-            int newValue = (slider.getOrientation() == JSlider.VERTICAL) ? valueForYPosition(newLocation) : valueForXPosition(newLocation);
+-
+-            if (newValue < slider.getModel().getMinimum()) {
+-                newValue = slider.getModel().getMinimum();
+-            }
+-
+-            if (newValue > slider.getModel().getMaximum()) {
+-                newValue = slider.getModel().getMaximum();
+-            }
+-
+-            if (handle == MOUSE_HANDLE_BOTH) {
+-                if ((newLocation - mouseStartLocation) >= 1) {
+-                    handle = MOUSE_HANDLE_MAX;
+-                }
+-                else if ((newLocation - mouseStartLocation) <= -1) {
+-                    handle = MOUSE_HANDLE_MIN;
+-                }
+-                else {
+-                    return;
+-                }
+-            }
+-
+-            RangeSlider rangeSlider = (RangeSlider) slider;
+-            switch (handle) {
+-                case MOUSE_HANDLE_MIN:
+-                    rangeSlider.setLowValue(Math.min(newValue, rangeSlider.getHighValue()));
+-                    break;
+-                case MOUSE_HANDLE_MAX:
+-                    rangeSlider.setHighValue(Math.max(rangeSlider.getLowValue(), newValue));
+-                    break;
+-                case MOUSE_HANDLE_MIDDLE:
+-                    if (((RangeSlider) slider).isRangeDraggable()) {
+-                        int delta = (slider.getOrientation() == JSlider.VERTICAL) ?
+-                                valueForYPosition(newLocation - handleOffset) - rangeSlider.getLowValue() :
+-                                valueForXPosition(newLocation - handleOffset) - rangeSlider.getLowValue();
+-                        if ((delta < 0) && ((rangeSlider.getLowValue() + delta) < rangeSlider.getMinimum())) {
+-                            delta = rangeSlider.getMinimum() - rangeSlider.getLowValue();
+-                        }
+-
+-                        if ((delta > 0) && ((rangeSlider.getHighValue() + delta) > rangeSlider.getMaximum())) {
+-                            delta = rangeSlider.getMaximum() - rangeSlider.getHighValue();
+-                        }
+-
+-                        if (delta != 0) {
+-                            rangeSlider.setLowValue(rangeSlider.getLowValue() + delta);
+-                            rangeSlider.setHighValue(rangeSlider.getHighValue() + delta);
+-                        }
+-                    }
+-                    break;
+-            }
+-        }
+-
+-        /**
+-         * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
+-         */
+-        @Override
+-        public void mouseReleased(MouseEvent e) {
+-            slider.getModel().setValueIsAdjusting(false);
+-            setMouseReleased(handle);
+-            _listener.mouseReleased(e);
+-        }
+-
+-        private void setCursor(int c) {
+-            Cursor cursor = Cursor.getPredefinedCursor(c);
+-
+-            if (slider.getCursor() != cursor) {
+-                slider.setCursor(cursor);
+-            }
+-        }
+-
+-        /**
+-         * @see java.awt.event.MouseMotionListener#mouseMoved(java.awt.event.MouseEvent)
+-         */
+-        @Override
+-        public void mouseMoved(MouseEvent e) {
+-            if (!slider.isEnabled()) {
+-                return;
+-            }
+-
+-            int handle = getMouseHandle(e.getX(), e.getY());
+-            setMouseRollover(handle);
+-            switch (handle) {
+-                case MOUSE_HANDLE_MIN:
+-                case MOUSE_HANDLE_MAX:
+-                case MOUSE_HANDLE_BOTH:
+-                    setCursor(Cursor.DEFAULT_CURSOR);
+-                    break;
+-                case MOUSE_HANDLE_MIDDLE:
+-                    if (slider instanceof RangeSlider && ((RangeSlider) slider).isRangeDraggable()) {
+-                        setCursor(Cursor.MOVE_CURSOR);
+-                    }
+-                    else {
+-                        setCursor(Cursor.DEFAULT_CURSOR);
+-                    }
+-                    break;
+-                case MOUSE_HANDLE_NONE:
+-                default:
+-                    setCursor(Cursor.DEFAULT_CURSOR);
+-                    break;
+-            }
+-        }
+-
+-        /**
+-         * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
+-         */
+-        @Override
+-        public void mouseClicked(MouseEvent e) {
+-            if (e.getClickCount() == 2) {
+-                slider.getModel().setValue(slider.getModel().getMinimum());
+-                slider.getModel().setExtent(slider.getModel().getMaximum() - slider.getModel().getMinimum());
+-                slider.repaint();
+-            }
+-        }
+-
+-        /**
+-         * @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent)
+-         */
+-        @Override
+-        public void mouseEntered(MouseEvent e) {
+-            hover = true;
+-            slider.repaint();
+-        }
+-
+-        /**
+-         * @see java.awt.event.MouseListener#mouseExited(java.awt.event.MouseEvent)
+-         */
+-        @Override
+-        public void mouseExited(MouseEvent e) {
+-            hover = false;
+-            slider.repaint();
+-            setCursor(Cursor.DEFAULT_CURSOR);
+-        }
+-    }
+-
+-    protected static final int MOUSE_HANDLE_NONE = 0;
+-
+-    protected static final int MOUSE_HANDLE_MIN = 1;
+-
+-    protected static final int MOUSE_HANDLE_MAX = 2;
+-
+-    protected static final int MOUSE_HANDLE_MIDDLE = 4;
+-
+-    protected static final int MOUSE_HANDLE_LOWER = 5;
+-
+-    protected static final int MOUSE_HANDLE_UPPER = 6;
+-
+-    protected static final int MOUSE_HANDLE_BOTH = 7;
+-
+-    protected int getMouseHandle(int x, int y) {
+-        Rectangle rect = trackRect;
+-
+-        slider.putClientProperty(RangeSlider.CLIENT_PROPERTY_MOUSE_POSITION, null);
+-
+-        boolean inMin = false;
+-        boolean inMax = false;
+-        if (thumbRect.contains(x, y)) {
+-            inMin = true;
+-        }
+-        Point p = adjustThumbForHighValue();
+-        if (thumbRect.contains(x, y)) {
+-            inMax = true;
+-        }
+-        restoreThumbForLowValue(p);
+-        if (inMin && inMax) {
+-            return MOUSE_HANDLE_BOTH;
+-        }
+-        else if (inMin) {
+-            return MOUSE_HANDLE_MIN;
+-        }
+-        else if (inMax) {
+-            return MOUSE_HANDLE_MAX;
+-        }
+-
+-        if (slider.getOrientation() == JSlider.VERTICAL) {
+-            int minY = yPositionForValue(((RangeSlider) slider).getLowValue());
+-            int maxY = yPositionForValue(((RangeSlider) slider).getHighValue());
+-            Rectangle midRect = new Rectangle(rect.x, Math.min(minY, maxY) + thumbRect.height / 2, rect.width, Math.abs(maxY - minY) - thumbRect.height);
+-            if (midRect.contains(x, y)) {
+-                return MOUSE_HANDLE_MIDDLE;
+-            }
+-            int sy = rect.y + Math.max(minY, maxY) + thumbRect.height / 2;
+-            Rectangle lowerRect = new Rectangle(rect.x, sy, rect.width, rect.y + rect.height - sy);
+-            if (lowerRect.contains(x, y)) {
+-                slider.putClientProperty(RangeSlider.CLIENT_PROPERTY_MOUSE_POSITION, true);
+-                return MOUSE_HANDLE_LOWER;
+-            }
+-            Rectangle upperRect = new Rectangle(rect.x, rect.y, rect.width, Math.min(maxY, minY) - thumbRect.height / 2);
+-            if (upperRect.contains(x, y)) {
+-                slider.putClientProperty(RangeSlider.CLIENT_PROPERTY_MOUSE_POSITION, false);
+-                return MOUSE_HANDLE_UPPER;
+-            }
+-
+-            return MOUSE_HANDLE_NONE;
+-        }
+-        else {
+-            int minX = xPositionForValue(((RangeSlider) slider).getLowValue());
+-            int maxX = xPositionForValue(((RangeSlider) slider).getHighValue());
+-
+-            Rectangle midRect = new Rectangle(Math.min(minX, maxX) + thumbRect.width / 2, rect.y, Math.abs(maxX - minX) - thumbRect.width, rect.height);
+-            if (midRect.contains(x, y)) {
+-                return MOUSE_HANDLE_MIDDLE;
+-            }
+-            Rectangle lowerRect = new Rectangle(rect.x, rect.y, Math.min(minX, maxX) - thumbRect.width / 2 - rect.x, rect.height);
+-            if (lowerRect.contains(x, y)) {
+-                slider.putClientProperty(RangeSlider.CLIENT_PROPERTY_MOUSE_POSITION, true);
+-                return MOUSE_HANDLE_LOWER;
+-            }
+-            int sx = rect.x + Math.abs(maxX - minX) + thumbRect.width / 2;
+-            Rectangle upperRect = new Rectangle(sx, rect.y, rect.width - sx, rect.height);
+-            if (upperRect.contains(x, y)) {
+-                slider.putClientProperty(RangeSlider.CLIENT_PROPERTY_MOUSE_POSITION, false);
+-                return MOUSE_HANDLE_UPPER;
+-            }
+-            return MOUSE_HANDLE_NONE;
+-        }
+-    }
+-
+-    protected boolean hover;
+-    protected boolean second;
+-    protected boolean rollover1;
+-    protected boolean pressed1;
+-    protected boolean rollover2;
+-    protected boolean pressed2;
+-
+-    @Override
+-    public void paintThumb(Graphics g) {
+-        try {
+-            Field field = getClass().getSuperclass().getDeclaredField("rollover");
+-            field.setAccessible(true);
+-            field.set(this, second ? rollover2 : rollover1);
+-
+-            field = getClass().getSuperclass().getDeclaredField("pressed");
+-            field.setAccessible(true);
+-            field.set(this, second ? pressed2 : pressed1);
+-        }
+-        catch (NoSuchFieldException e) {
+-//            e.printStackTrace();
+-        }
+-        catch (IllegalAccessException e) {
+-//            e.printStackTrace();
+-        }
+-
+-        super.paintThumb(g);
+-    }
+-
+-    protected void setMouseRollover(int handle) {
+-        switch (handle) {
+-            case MOUSE_HANDLE_MIN: {
+-                rollover1 = true;
+-                rollover2 = false;
+-            }
+-            break;
+-            case MOUSE_HANDLE_MAX: {
+-                rollover2 = true;
+-                rollover1 = false;
+-            }
+-            break;
+-            case MOUSE_HANDLE_MIDDLE:
+-            case MOUSE_HANDLE_BOTH: {
+-                rollover1 = true;
+-                rollover2 = true;
+-            }
+-            break;
+-            case MOUSE_HANDLE_NONE:
+-                rollover1 = false;
+-                rollover2 = false;
+-                break;
+-        }
+-        slider.repaint(thumbRect);
+-        Point p = adjustThumbForHighValue();
+-        slider.repaint(thumbRect);
+-        restoreThumbForLowValue(p);
+-    }
+-
+-    protected void setMousePressed(int handle) {
+-        switch (handle) {
+-            case MOUSE_HANDLE_MIN: {
+-                pressed1 = true;
+-                pressed2 = false;
+-            }
+-            break;
+-            case MOUSE_HANDLE_MAX: {
+-                pressed2 = true;
+-                pressed1 = false;
+-            }
+-            break;
+-            case MOUSE_HANDLE_MIDDLE:
+-            case MOUSE_HANDLE_BOTH: {
+-                pressed1 = true;
+-                pressed2 = true;
+-            }
+-            break;
+-            case MOUSE_HANDLE_NONE:
+-                pressed1 = false;
+-                pressed2 = false;
+-                break;
+-        }
+-        slider.repaint(thumbRect);
+-        Point p = adjustThumbForHighValue();
+-        slider.repaint(thumbRect);
+-        restoreThumbForLowValue(p);
+-    }
+-
+-    @SuppressWarnings({"UnusedDeclaration"})
+-    protected void setMouseReleased(int handle) {
+-        pressed1 = false;
+-        pressed2 = false;
+-        slider.repaint(thumbRect);
+-        Point p = adjustThumbForHighValue();
+-        slider.repaint(thumbRect);
+-        restoreThumbForLowValue(p);
+-    }
+-
+-    @Override
+-    public void scrollByBlock(int direction) {
+-        synchronized (slider) {
+-
+-            int oldValue;
+-            Object clientProperty = slider.getClientProperty(RangeSlider.CLIENT_PROPERTY_MOUSE_POSITION);
+-            if (clientProperty == null) {
+-                oldValue = slider.getValue();
+-            }
+-            else if (Boolean.TRUE.equals(clientProperty)) {
+-                oldValue = ((RangeSlider) slider).getLowValue();
+-            }
+-            else {
+-                oldValue = ((RangeSlider) slider).getHighValue();
+-            }
+-            int blockIncrement =
+-                    (slider.getMaximum() - slider.getMinimum()) / 10;
+-            if (blockIncrement <= 0 &&
+-                    slider.getMaximum() > slider.getMinimum()) {
+-
+-                blockIncrement = 1;
+-            }
+-
+-            slider.putClientProperty(RangeSlider.CLIENT_PROPERTY_ADJUST_ACTION, "scrollByBlock");
+-            int delta = blockIncrement * ((direction > 0) ? POSITIVE_SCROLL : NEGATIVE_SCROLL);
+-            if (clientProperty == null) {
+-                slider.setValue(Math.max(Math.min(oldValue + delta, slider.getMaximum()), slider.getMinimum()));
+-            }
+-            else if (Boolean.TRUE.equals(clientProperty)) {
+-                ((RangeSlider) slider).setLowValue(Math.max(Math.min(oldValue + delta, slider.getMaximum()), slider.getMinimum()));
+-            }
+-            else {
+-                ((RangeSlider) slider).setHighValue(Math.max(Math.min(oldValue + delta, slider.getMaximum()), slider.getMinimum()));
+-            }
+-            slider.putClientProperty(RangeSlider.CLIENT_PROPERTY_ADJUST_ACTION, null);
+-        }
+-    }
+-
+-    @Override
+-    public void scrollByUnit(int direction) {
+-        synchronized (slider) {
+-
+-            int oldValue;
+-            Object clientProperty = slider.getClientProperty(RangeSlider.CLIENT_PROPERTY_MOUSE_POSITION);
+-            if (clientProperty == null) {
+-                oldValue = slider.getValue();
+-            }
+-            else if (Boolean.TRUE.equals(clientProperty)) {
+-                oldValue = ((RangeSlider) slider).getLowValue();
+-            }
+-            else {
+-                oldValue = ((RangeSlider) slider).getHighValue();
+-            }
+-            int delta = 1 * ((direction > 0) ? POSITIVE_SCROLL : NEGATIVE_SCROLL);
+-
+-            slider.putClientProperty(RangeSlider.CLIENT_PROPERTY_ADJUST_ACTION, "scrollByUnit");
+-            if (clientProperty == null) {
+-                slider.setValue(Math.max(Math.min(oldValue + delta, slider.getMaximum()), slider.getMinimum()));
+-            }
+-            else if (Boolean.TRUE.equals(clientProperty)) {
+-                ((RangeSlider) slider).setLowValue(Math.max(Math.min(oldValue + delta, slider.getMaximum()), slider.getMinimum()));
+-            }
+-            else {
+-                ((RangeSlider) slider).setHighValue(Math.max(Math.min(oldValue + delta, slider.getMaximum()), slider.getMinimum()));
+-            }
+-            slider.putClientProperty(RangeSlider.CLIENT_PROPERTY_ADJUST_ACTION, null);
+-        }
+-    }
+-}
+\ No newline at end of file
+diff --git a/src/com/jidesoft/plaf/xerto/XertoJideButtonUI.java b/src/com/jidesoft/plaf/xerto/XertoJideButtonUI.java
+deleted file mode 100644
+index 5448735..0000000
+--- a/src/com/jidesoft/plaf/xerto/XertoJideButtonUI.java
++++ /dev/null
+@@ -1,45 +0,0 @@
+-/*
+- * @(#)XertoJideButtonUI.java 5/6/2005
+- *
+- * Copyright 2002 - 2005 JIDE Software Inc. All rights reserved.
+- */
+-package com.jidesoft.plaf.xerto;
+-
+-import com.jidesoft.plaf.basic.BasicJideButtonUI;
+-import com.sun.java.swing.plaf.windows.WindowsButtonUI;
+-
+-import javax.swing.*;
+-import javax.swing.plaf.ComponentUI;
+-import java.awt.*;
+-
+-/**
+- */
+-public class XertoJideButtonUI extends BasicJideButtonUI {
+-    private static WindowsButtonUI _buttonUI = new WindowsButtonUI();
+-
+-    public static ComponentUI createUI(JComponent c) {
+-        return new XertoJideButtonUI();
+-    }
+-
+-    // ********************************
+-    //          Install PLAF
+-    // ********************************
+-    @Override
+-    public void installUI(JComponent c) {
+-        _buttonUI.installUI(c);
+-        if (c instanceof JButton) {
+-            c.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
+-            ((JButton) c).setRolloverEnabled(true);
+-        }
+-    }
+-
+-    @Override
+-    public void uninstallUI(JComponent c) {
+-        _buttonUI.uninstallUI(c);
+-    }
+-
+-    @Override
+-    public void paint(Graphics g, JComponent c) {
+-        _buttonUI.paint(g, c);
+-    }
+-}


=====================================
debian/patches/series
=====================================
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 AquaJidePopupMenuUI.java.patch
 java9-add-exports.patch
+java10.patch



View it on GitLab: https://salsa.debian.org/java-team/libjide-oss-java/compare/60eb7d8a6daeae44543380e0129bb62a7df3edfc...1b7968e062781e0ead747544cd34139c7ed6ea1e

-- 
View it on GitLab: https://salsa.debian.org/java-team/libjide-oss-java/compare/60eb7d8a6daeae44543380e0129bb62a7df3edfc...1b7968e062781e0ead747544cd34139c7ed6ea1e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20180728/9bcc2327/attachment.html>


More information about the pkg-java-commits mailing list