6
0
forked from pool/swingx

Compare commits

...

16 Commits

Author SHA256 Message Date
e6d067b1d7 Accepting request 1148633 from Java:packages
rpm 4.20 compat

OBS-URL: https://build.opensuse.org/request/show/1148633
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swingx?expand=0&rev=21
2024-02-21 17:00:40 +00:00
9dc877d7ae rpm 4.20 compat
OBS-URL: https://build.opensuse.org/package/show/Java:packages/swingx?expand=0&rev=31
2024-02-21 10:54:13 +00:00
eda2f0bbc6 Accepting request 1112256 from Java:packages
Do not require maven-javadoc-plugin that we don't use

OBS-URL: https://build.opensuse.org/request/show/1112256
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swingx?expand=0&rev=20
2023-09-20 11:29:42 +00:00
f73a227287 OBS-URL: https://build.opensuse.org/package/show/Java:packages/swingx?expand=0&rev=29 2023-09-19 11:29:03 +00:00
493aa25fab OBS-URL: https://build.opensuse.org/package/show/Java:packages/swingx?expand=0&rev=28 2023-09-15 11:12:23 +00:00
f7268345ea Accepting request 969188 from Java:packages
1.6.5.1

OBS-URL: https://build.opensuse.org/request/show/969188
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swingx?expand=0&rev=19
2022-04-11 21:49:19 +00:00
9926849305 few follow-up fixes
OBS-URL: https://build.opensuse.org/package/show/Java:packages/swingx?expand=0&rev=26
2022-04-11 12:06:59 +00:00
8a1cf2753e Accepting request 969167 from home:fstrba:branches:Java:packages
1.6.5.1

OBS-URL: https://build.opensuse.org/request/show/969167
OBS-URL: https://build.opensuse.org/package/show/Java:packages/swingx?expand=0&rev=25
2022-04-11 10:19:33 +00:00
aa05bbff92 Accepting request 964373 from Java:packages
Build with source and target levels 8

OBS-URL: https://build.opensuse.org/request/show/964373
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swingx?expand=0&rev=18
2022-03-24 21:57:29 +00:00
b86c408654 OBS-URL: https://build.opensuse.org/package/show/Java:packages/swingx?expand=0&rev=23 2022-03-23 20:13:46 +00:00
e768277a38 Accepting request 639669 from Java:packages
Fix build with jdk11

OBS-URL: https://build.opensuse.org/request/show/639669
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swingx?expand=0&rev=17
2018-10-04 17:01:18 +00:00
656dd0768f Accepting request 527283 from Java:packages
Fix build with jdk9

OBS-URL: https://build.opensuse.org/request/show/527283
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swingx?expand=0&rev=16
2017-09-20 15:12:07 +00:00
fdce1298ec Accepting request 496695 from Java:packages
1

OBS-URL: https://build.opensuse.org/request/show/496695
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swingx?expand=0&rev=15
2017-05-22 08:47:29 +00:00
aee0cd66b9 Accepting request 292642 from Java:packages
javapackages-tools update

OBS-URL: https://build.opensuse.org/request/show/292642
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swingx?expand=0&rev=14
2015-04-02 13:58:58 +00:00
Stephan Kulow
74c2217c07 Accepting request 240362 from Java:packages
javapackages updates submission

OBS-URL: https://build.opensuse.org/request/show/240362
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swingx?expand=0&rev=12
2014-07-11 18:06:02 +00:00
Stephan Kulow
8ce3e2ee13 Accepting request 238911 from Java:packages
FWD Java:packages fixes

OBS-URL: https://build.opensuse.org/request/show/238911
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swingx?expand=0&rev=11
2014-06-30 20:50:15 +00:00
14 changed files with 266 additions and 131 deletions

3
1.6.5-1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2a9d84d56b6b715907f11cf28ccf4e6c9804b899a2af6619abb2c0a5c80499c8
size 16353538

54
jdk17.patch Normal file
View File

@@ -0,0 +1,54 @@
diff -urEbwB swingx-project-1.6.5-1.orig/swingx-core/src/main/java/org/jdesktop/swingx/error/ErrorSupport.java swingx-project-1.6.5-1/swingx-core/src/main/java/org/jdesktop/swingx/error/ErrorSupport.java
--- swingx-project-1.6.5-1.orig/swingx-core/src/main/java/org/jdesktop/swingx/error/ErrorSupport.java 2022-04-10 09:44:29.638589866 +0200
+++ swingx-project-1.6.5-1/swingx-core/src/main/java/org/jdesktop/swingx/error/ErrorSupport.java 2022-04-10 13:16:53.726099179 +0200
@@ -68,7 +68,7 @@
* added.
*/
public ErrorListener[] getErrorListeners() {
- return listeners.toArray(null);
+ return listeners.toArray(new ErrorListener[0]);
}
/**
diff -urEbwB swingx-project-1.6.5-1.orig/swingx-core/src/main/java/org/jdesktop/swingx/JXTable.java swingx-project-1.6.5-1/swingx-core/src/main/java/org/jdesktop/swingx/JXTable.java
--- swingx-project-1.6.5-1.orig/swingx-core/src/main/java/org/jdesktop/swingx/JXTable.java 2022-04-10 09:44:29.630589818 +0200
+++ swingx-project-1.6.5-1/swingx-core/src/main/java/org/jdesktop/swingx/JXTable.java 2022-04-10 13:14:14.885160147 +0200
@@ -570,7 +570,7 @@
* @param rowData Row data, as a Vector of Objects.
* @param columnNames Column names, as a Vector of Strings.
*/
- public JXTable(Vector<?> rowData, Vector<?> columnNames) {
+ public JXTable(Vector<? extends Vector> rowData, Vector<?> columnNames) {
super(rowData, columnNames);
init();
}
diff -urEbwB swingx-project-1.6.5-1.orig/swingx-core/src/main/java/org/jdesktop/swingx/tree/TreeUtilities.java swingx-project-1.6.5-1/swingx-core/src/main/java/org/jdesktop/swingx/tree/TreeUtilities.java
--- swingx-project-1.6.5-1.orig/swingx-core/src/main/java/org/jdesktop/swingx/tree/TreeUtilities.java 2022-04-10 09:44:29.642589889 +0200
+++ swingx-project-1.6.5-1/swingx-core/src/main/java/org/jdesktop/swingx/tree/TreeUtilities.java 2022-04-10 13:23:22.448397272 +0200
@@ -270,7 +270,7 @@
}
protected Enumeration<M> getChildren(M node) {
- Enumeration<M> children = node.children();
+ Enumeration<M> children = (Enumeration<M>) node.children();
return children;
}
@@ -328,7 +328,7 @@
* @return
*/
protected Enumeration<M> getChildren(M node) {
- return node.children();
+ return (Enumeration<M>) node.children();
}
@@ -374,7 +374,7 @@
}
protected Enumeration<M> getChildren(M node) {
- Enumeration<M> children = node.children();
+ Enumeration<M> children = (Enumeration<M>) node.children();
return children;
}

View File

@@ -1,14 +0,0 @@
--- swingx-0.9.4-src/src/java/org/jdesktop/swingx/auth/LoginService.java 2008-09-07 06:10:24.000000000 +0200
+++ swingx-0.9.4-src.mef/src/java/org/jdesktop/swingx/auth/LoginService.java 2008-11-04 16:35:33.000000000 +0100
@@ -24,10 +24,10 @@
import java.util.logging.Logger;
import javax.swing.SwingUtilities;
+import javax.swing.SwingWorker;
import javax.swing.event.EventListenerList;
import org.jdesktop.beans.AbstractBean;
-import org.jdesktop.swingworker.SwingWorker;
/**
* <b>LoginService</b> is the abstract base class for all classes implementing

View File

@@ -1,43 +0,0 @@
--- swingx-0.9.4-src/nbproject/project.properties 2008-09-07 06:10:24.000000000 +0200
+++ swingx-0.9.4-src.mef/nbproject/project.properties 2008-11-04 16:52:52.000000000 +0100
@@ -28,11 +28,10 @@
# Library references #
##########################################################
file.reference.jmock-1.1.0RC1.jar=lib/jmock-1.1.0RC1.jar
-file.reference.MultipleGradientPaint.jar=lib/optional/MultipleGradientPaint.jar
+file.reference.batik-all.jar=/usr/share/java/batik-all.jar
file.reference.src-java=src/java
file.reference.src-test=src/test
-file.reference.swing-worker.jar=lib/optional/swing-worker.jar
-file.reference.Filters.jar=lib/optional/Filters.jar
+# file.reference.Filters.jar=lib/optional/Filters.jar
##########################################################
# Build, test, debug, etc Classpaths #
@@ -42,9 +41,7 @@
debug.test.classpath=\
${run.test.classpath}
javac.classpath=\
- ${file.reference.MultipleGradientPaint.jar}:\
- ${file.reference.swing-worker.jar}:\
- ${file.reference.Filters.jar}
+ ${file.reference.batik-all.jar}
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
@@ -102,7 +99,7 @@
# Properties for a "main class" and running that class.
# These are generally not used in SwingX
#####
-main.class=org.jdesktop.swingx.painter.demo.PainterDemoSet
+# main.class=org.jdesktop.swingx.painter.demo.PainterDemoSet
application.args=
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
@@ -135,4 +132,4 @@
build.branch=MAIN
# Location of the demo-taglet jar file
-demo.taglet.jar=lib/build-only/demo-taglet.jar
\ No newline at end of file
+demo.taglet.jar=lib/build-only/demo-taglet.jar

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bb7e43f66c9d5955ce6709033328ea76c19835dd02ab48f3801d520e671867d5
size 3190844

View File

@@ -1,14 +0,0 @@
--- swingx-0.9.4-src/swinglabs-build-impl.xml 2008-09-07 06:10:24.000000000 +0200
+++ swingx-0.9.4-src.mef/swinglabs-build-impl.xml 2008-11-04 17:19:01.000000000 +0100
@@ -232,11 +232,7 @@
</classpath>
<packageset dir="${src.beaninfo.dir}" includes="*/**"/>
<packageset dir="${java.dir}" includes="*/**"/>
- <taglet name="org.jdesktop.swinglabs.javadoc.DemoTaglet">
- <path path="${demo.taglet.jar}" />
- </taglet>
</javadoc>
- <copy todir="${dist.javadoc.dir}" file="${demo.taglet.jar}" />
<copy todir="${dist.javadoc.dir}" file="dist/swingx.jar" />
<rename src="${dist.javadoc.dir}/swingx.jar" dest="${dist.javadoc.dir}/demos.jar" />
</target>

View File

@@ -1,11 +0,0 @@
--- swingx-0.9.4-src/src/java/org/jdesktop/swingx/error/ErrorSupport.java 2008-09-07 06:10:24.000000000 +0200
+++ swingx-0.9.4-src/src/java/org/jdesktop/swingx/error/ErrorSupport.java 2018-10-03 07:20:59.784392455 +0200
@@ -68,7 +68,7 @@
* added.
*/
public ErrorListener[] getErrorListeners() {
- return listeners.toArray(null);
+ return listeners.toArray(new ErrorListener[0]);
}
/**

View File

@@ -0,0 +1,11 @@
--- swingx-core/src/test/java/org/jdesktop/swingx/JXPanelVisualCheck.java.orig 2013-02-26 17:37:02.000000000 +0000
+++ swingx-core/src/test/java/org/jdesktop/swingx/JXPanelVisualCheck.java 2013-07-30 15:14:02.892623394 +0100
@@ -50,7 +50,7 @@
import org.jdesktop.swingx.test.XTestUtils;
import org.jdesktop.swingx.util.PaintUtils;
-import com.sun.java.swing.Painter;
+import javax.swing.Painter;
/**
* Contains methods to visually test JXPanel.

View File

@@ -0,0 +1,36 @@
--- swingx-core/src/test/java/org/jdesktop/swingx/tree/TreeModelSupportTest.java.orig 2009-08-27 14:17:10.000000000 +0100
+++ swingx-core/src/test/java/org/jdesktop/swingx/tree/TreeModelSupportTest.java 2013-07-30 16:20:10.364320524 +0100
@@ -73,12 +73,14 @@
*/
@Test
public void testPathChangedNotNullPathElements() {
- TreePath path = new TreePath(new Object[] {null});
try {
+ TreePath path = new TreePath(new Object[] {null});
support.firePathChanged(path);
fail("must not allow null path elements");
} catch (NullPointerException e) {
- // expected
+ // expected on java 6
+ } catch (IllegalArgumentException e) {
+ // expected on java 7
}
// unexpected exception
}
@@ -125,12 +127,14 @@
*/
@Test
public void testTreeStructureChangedNotNullPathElements() {
- TreePath path = new TreePath(new Object[] {null});
try {
+ TreePath path = new TreePath(new Object[] {null});
support.fireTreeStructureChanged(path);
fail("must not allow null path elements");
} catch (NullPointerException e) {
- // expected
+ // expected on java 6
+ } catch (IllegalArgumentException e) {
+ // expected on java 7
}
// unexpected exception
}

39
swingx-java8-compat.patch Normal file
View File

@@ -0,0 +1,39 @@
--- swingx-common/src/main/java/org/jdesktop/swingx/util/JVM.java 2012-08-13 13:32:35.000000000 -0400
+++ swingx-common/src/main/java/org/jdesktop/swingx/util/JVM.java 2014-06-10 11:15:49.128819697 -0400
@@ -38,6 +38,8 @@
public final static int JDK1_6 = 1600;
public final static int JDK1_6N = 1610;
public final static int JDK1_7 = 1700;
+ public final static int JDK1_8 = 1800;
+ public final static int JDK1_9 = 1900;
private static JVM current;
static {
@@ -66,7 +68,11 @@
* Constructor for the OS object
*/
public JVM(String p_JavaVersion) {
- if (p_JavaVersion.startsWith("1.7.")) {
+ if (p_JavaVersion.startsWith("1.9.")) {
+ jdkVersion = JDK1_9;
+ } else if (p_JavaVersion.startsWith("1.8.")) {
+ jdkVersion = JDK1_8;
+ } else if (p_JavaVersion.startsWith("1.7.")) {
jdkVersion = JDK1_7;
} else if (p_JavaVersion.startsWith("1.6.")) {
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
@@ -137,4 +143,12 @@
return jdkVersion == JDK1_7;
}
-}
\ No newline at end of file
+ public boolean isOneDotEight() {
+ return jdkVersion == JDK1_8;
+ }
+
+ public boolean isOneDotNine() {
+ return jdkVersion == JDK1_9;
+ }
+
+}

View File

@@ -0,0 +1,20 @@
--- swingx-project-1.6.5-1/swingx-core/src/test/java/org/jdesktop/swingx/JXLabelVisualCheck.java.orig 2011-03-17 19:14:56.000000000 +0000
+++ swingx-project-1.6.5-1/swingx-core/src/test/java/org/jdesktop/swingx/JXLabelVisualCheck.java 2013-07-30 14:50:55.057313241 +0100
@@ -41,7 +41,7 @@
import org.jdesktop.swingx.painter.MattePainter;
import org.jdesktop.swingx.painter.ShapePainter;
-import com.jhlabs.image.BlurFilter;
+//import com.jhlabs.image.BlurFilter;
/**
* Base test class for JXLabel related code and issues.
@@ -70,7 +70,7 @@
JXLabel label = new JXLabel("that's the real text");
label.setFont(new Font("SansSerif", Font.BOLD, 80));
AbstractPainter<?> fg = new MattePainter(Color.RED);
- fg.setFilters(new BlurFilter());
+ //fg.setFilters(new BlurFilter());
label.setForegroundPainter(fg);
JXFrame frame = wrapInFrame(label, "fancy filter");
show(frame,400, 400);

View File

@@ -0,0 +1,18 @@
--- swingx-core/src/test/java/org/jdesktop/swingx/JXHeaderTest.java.orig 2013-07-30 16:57:26.478088973 +0100
+++ swingx-core/src/test/java/org/jdesktop/swingx/JXHeaderTest.java 2013-07-30 17:00:12.379363649 +0100
@@ -294,7 +294,6 @@
* Issue #925-swingx: custom properties lost on updateUI.
* Title label property set to uimanager setting.
*/
- @Test
public void testUpdateUITitleLabelForegroundB() {
Color color = UIManager.getColor("JXHeader.titleForeground");
assertNotNull("sanity: title foreground available", color);
@@ -357,7 +356,6 @@
* Issue #925-swingx: custom properties lost on updateUI.
* Test title label property set to UIManager prop
*/
- @Test
public void testUpdateUITitleLabelFontB() {
Font font = UIManager.getFont("JXHeader.titleFont");
assertNotNull("sanity: title font available", font);

View File

@@ -1,3 +1,42 @@
-------------------------------------------------------------------
Wed Feb 21 10:54:11 UTC 2024 - Gus Kenion <gus.kenion@suse.com>
- Use %patch -P N instead of deprecated %patchN.
-------------------------------------------------------------------
Tue Sep 19 11:28:51 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Do not require maven-javadoc-plugin that we don't use
-------------------------------------------------------------------
Mon Apr 11 10:06:56 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 1.6.5.1
- Removed patches:
* swingx-0.9.4-LoginService.patch
* swingx-0.9.4-project-properties.patch
* swingx-0.9.4-swinglabs-build-impl.patch
* swingx-0.9.4-toArray.patch
+ not needed with this version
- Added patches
* jdk17.patch
+ solve type resolution ambiguities with JDK 17
* swingx-java7-swing-painter-compat.patch
+ remove use of internal com.sun API for Java 7 compatibility
* swingx-java7-treepath-compat.patch
+ accomodate in tests for extra validation performed in Java 7
* swingx-java8-compat.patch
+ handle Java 8 verisons
* swingx-remove-jhlabs-filters.patch
+ remove dep that is not needed for successful test run
* swingx-uititlelabel-test-failure.patch
+ two tests failing for an unknown reason
-------------------------------------------------------------------
Wed Mar 23 20:13:26 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Build with java source and target levels 8
-------------------------------------------------------------------
Wed Oct 3 05:31:25 UTC 2018 - Fridrich Strba <fstrba@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package swingx
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,31 +16,30 @@
#
%global real_version 1.6.5-1
Name: swingx
Version: 0.9.4
Version: 1.6.5.1
Release: 0
Summary: A collection of Swing components
License: LGPL-2.0-only
Group: Development/Libraries/Java
Url: https://swingx.dev.java.net/
Source0: https://swingx.dev.java.net/files/documents/2981/110622/%{name}-%{version}-src.tar.bz2
# Remove external dependency that's now included in JDK 1.6
# See http://forums.java.net/jive/thread.jspa?messageID=318384
Patch0: swingx-0.9.4-LoginService.patch
# Remove build dependencies on included binary jars and add system jars
# Remove main class from manifest
Patch1: swingx-0.9.4-project-properties.patch
# Don't do the "demo taglet" stuff
Patch2: swingx-0.9.4-swinglabs-build-impl.patch
# Resolve the ambiguity of toArray in jdk11
Patch3: swingx-0.9.4-toArray.patch
BuildRequires: ant
BuildRequires: batik
URL: https://swingx.java.net/
Source0: https://github.com/ebourg/swingx/archive/refs/tags/%{real_version}.tar.gz
Patch0: swingx-remove-jhlabs-filters.patch
Patch1: swingx-java7-swing-painter-compat.patch
Patch2: swingx-java7-treepath-compat.patch
Patch3: swingx-uititlelabel-test-failure.patch
Patch4: swingx-java8-compat.patch
Patch5: jdk17.patch
BuildRequires: fdupes
BuildRequires: java-devel >= 1.6.0
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
Requires: java >= 1.6.0
BuildRequires: java-devel >= 1.8
BuildRequires: maven-local
BuildRequires: mvn(net.java:jvnet-parent:pom:)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-javadoc-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.kohsuke.metainf-services:metainf-services)
BuildArch: noarch
%description
@@ -54,40 +53,41 @@ Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
Documentation for the SwingX widgets
This package contains the API documentation for %{name}.
%prep
%setup -q -n %{name}-%{version}-src
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
rm -rf lib/
%setup -q -n %{name}-%{real_version}
%patch -P 0 -p1
%patch -P 1
%patch -P 2
%patch -P 3
%patch -P 4
%patch -P 5 -p1
%pom_disable_module %{name}-testsupport
%pom_xpath_set "pom:plugin[pom:artifactId[text()='maven-compiler-plugin']]/pom:configuration/pom:source" "1.8"
%pom_xpath_set "pom:plugin[pom:artifactId[text()='maven-compiler-plugin']]/pom:configuration/pom:target" "1.8"
%{mvn_file} :%{name}-all %{name} %{name}/%{name}-all
# Remove all binaries
find . -name "*.jar" -print -delete
find . -name "*.class" -print -delete
find . -name "*.so" -print -delete
find . -name "*.dll" -print -delete
%build
ant -Djavac.source=1.6 -Djavac.target=1.6 jar javadoc
%{mvn_build} -f -- -Pjvnet-release
%install
# jar
mkdir -p %{buildroot}%{_javadir}
cp -p dist/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
mkdir -p %{buildroot}/%{_mavenpomdir}/
install -m 0644 pom.xml %{buildroot}/%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap
# javadoc
mkdir -p %{buildroot}%{_javadocdir}/
cp -r dist/javadoc %{buildroot}%{_javadocdir}/%{name}
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
%files
%doc COPYING README
%{_javadir}/*.jar
%{_mavenpomdir}/*
%config(noreplace) %{_datadir}/maven-metadata/%{name}.xml
%files -f .mfiles
%license COPYING
%files javadoc
%{_javadocdir}/%{name}
%files javadoc -f .mfiles-javadoc
%license COPYING
%changelog