Skip to content
Commits on Source (11)
/target/
\ No newline at end of file
2019-02-15 Wenjie Qiao <wqiao2@gmail.com>
* JIDE Common Layer.iml,
src/com/jidesoft/plaf/office2007/Office2007Painter.java,
src/com/jidesoft/swing/CheckBoxListCellRenderer.java: 3.7.6 release
2019-01-25 Wenjie Qiao <wqiao2@gmail.com>
* src/com/jidesoft/swing/JideToggleSplitButton.java:
Common,B,JideToggleSplitButton,Fixed the SELECTED_KEY is not updated
correctly when the selection state changed in
JideToggleSplitButton,,no
2019-01-24 Wenjie Qiao <wqiao2@gmail.com>
* src/com/jidesoft/swing/JideToggleSplitButton.java:
Common,B,JideToggleSplitButton,Fixed the SELECTED_KEY is not updated
correctly when the selection state changed in
JideToggleSplitButton,,no
2019-01-10 jidesoft <support@jidesoft.com>
* : Merge pull request #36 from wishkres/feature/LegacyCheckBoxTree Added LegacyCheckBoxTree component that uses LegacyTristateCheckBox
i…
2018-12-15 jidesoft <anderson@jidesoft.com>
* src/com/jidesoft/plaf/LookAndFeelFactory.java:
Common,B,LookAndFeelFactory,Fixed NoClassDefFoundError on Linux in
LookAndFeelFactory,83622,no
2018-11-20 jidesoft <anderson@jidesoft.com>
* properties/com/jidesoft/swing/swing_da.properties,
src/com/jidesoft/plaf/basic/BasicJideButtonUI.java,
src/com/jidesoft/plaf/basic/BasicJideLabelUI.java,
src/com/jidesoft/plaf/basic/BasicJideSplitButtonUI.java,
src/com/jidesoft/plaf/basic/BasicJideTabbedPaneUI.java:
Common,B,JideButton,Fixed a bug that the text is clipped on JDK
11,,no
2018-10-24 jidesoft <anderson@jidesoft.com>
* JIDE Common Layer.iml: Grids,DualTable,Fixed a type in
addSelectionInterval etc. methods,,no Grids,ValueEditor,Set a
minimum size for the combobox in the ValueEditor,,no
2018-09-27 jidesoft <support@jidesoft.com>
* : Merge pull request #32 from bourgesl/fix_build Fix maven build on JDK 8 / 9+
2018-09-12 bourgesl <bourges.laurent@gmail.com>
* .gitignore, pom.xml, src-apple/README.txt,
src-apple/apple/laf/JRSUIConstants.java,
src-apple/com/apple/laf/AquaPopupMenuUI.java,
src-apple/com/apple/laf/AquaSliderUI.java,
src-apple/com/apple/laf/ScreenPopupFactory.java: Fixed JIDE-OSS
maven build: missing apple classes / use multi-release jar (8 / 9+)
2018-06-22 frank <frank@jidesoft.com>
* pom.xml, pom_compile.xml, pom_deploy.xml: update pom
2018-06-22 frank <frank@jidesoft.com>
 
* README.txt: update README.txt
......@@ -6,9 +6,8 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/properties" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/properties" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src-jdk9" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/classes" />
<excludeFolder url="file://$MODULE_DIR$/javadoc" />
......
DSTAMP=19991231
TSTAMP=2359
source=1.8
target=1.8
libjide-oss-java (3.7.6+dfsg-1) unstable; urgency=medium
* New upstream version 3.7.6+dfsg.
* Switch to debhelper-compat = 12.
* Declare compliance with Debian Policy 4.4.0.
* Use canonical VCS URI.
-- Markus Koschany <apo@debian.org> Sat, 20 Jul 2019 04:39:33 +0200
libjide-oss-java (3.7.4+dfsg-1) unstable; urgency=medium
* New upstream version 3.7.4+dfsg.
......
......@@ -6,15 +6,15 @@ Uploaders:
Markus Koschany <apo@debian.org>
Build-Depends:
ant,
debhelper (>= 11),
debhelper-compat (= 12),
default-jdk,
default-jdk-doc,
javahelper,
maven-repo-helper (>= 1.6~)
Standards-Version: 4.1.5
Standards-Version: 4.4.0
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
Vcs-Git: https://salsa.debian.org/java-team/libjide-oss-java.git
Vcs-Browser: https://salsa.debian.org/java-team/libjide-oss-java
Package: libjide-oss-java
Architecture: all
......
......@@ -49,7 +49,7 @@ License: LGPL-2.1+
can be found in "/usr/share/common-licenses/LGPL-2.1".
Files: debian/*
Copyright: 2013-2017, Markus Koschany <apo@debian.org>
Copyright: 2013-2019, Markus Koschany <apo@debian.org>
License: GPL-2-with-classpath-exception
License: GPL-2-with-classpath-exception
......
jide-oss-3.7.4.jar
jide-oss-3.7.6.jar
......@@ -48,7 +48,7 @@ index 888839b..8ca3d36 100644
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
index 0827d4b..14799f2 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;
......
AquaJidePopupMenuUI.java.patch
java9-add-exports.patch
java10.patch
version.patch
From: Markus Koschany <apo@debian.org>
Date: Sat, 20 Jul 2019 05:22:24 +0200
Subject: version
Apparently upstream forgot to set the correct version.
Forwarded: not-needed
---
build.properties | 2 +-
pom.xml | 2 +-
pom_compile.xml | 2 +-
pom_deploy.xml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/build.properties b/build.properties
index 154aff8..a2a8e00 100644
--- a/build.properties
+++ b/build.properties
@@ -2,7 +2,7 @@
# USER DEFINED VALUES
#
company_name=JIDE Software, Inc.
-jide_version=3.7.4
+jide_version=3.7.6
base_dir=.
output_dir=${basedir}/classes
diff --git a/pom.xml b/pom.xml
index 79d10b8..ed89933 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,7 +17,7 @@
<groupId>com.jidesoft</groupId>
<artifactId>jide-oss</artifactId>
<name>JIDE Common Layer</name>
- <version>3.7.4</version>
+ <version>3.7.6</version>
<packaging>jar</packaging>
<description>JIDE Common Layer (Professional Swing Components)</description>
diff --git a/pom_compile.xml b/pom_compile.xml
index bdbc685..fa2cdfb 100644
--- a/pom_compile.xml
+++ b/pom_compile.xml
@@ -16,7 +16,7 @@
<groupId>com.jidesoft</groupId>
<artifactId>jide-oss</artifactId>
<name>JIDE Common Layer</name>
- <version>3.7.4</version>
+ <version>3.7.6</version>
<packaging>jar</packaging>
<description>JIDE Common Layer (Professional Swing Components)</description>
<url>https://github.com/jidesoft/jide-oss</url>
diff --git a/pom_deploy.xml b/pom_deploy.xml
index 50e8f7c..cc35c86 100644
--- a/pom_deploy.xml
+++ b/pom_deploy.xml
@@ -16,7 +16,7 @@
<groupId>com.jidesoft</groupId>
<artifactId>jide-oss</artifactId>
<name>JIDE Common Layer</name>
- <version>3.7.4</version>
+ <version>3.7.6</version>
<packaging>jar</packaging>
<description>JIDE Common Layer (Professional Swing Components)</description>
<url>https://github.com/jidesoft/jide-oss</url>
......@@ -12,14 +12,17 @@
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.jidesoft</groupId>
<artifactId>jide-oss</artifactId>
<name>JIDE Common Layer</name>
<version>3.7.4</version>
<packaging>jar</packaging>
<description>JIDE Common Layer (Professional Swing Components)</description>
<url>https://github.com/jidesoft/jide-oss</url>
<licenses>
<license>
<name>GPL with classpath exception</name>
......@@ -32,6 +35,7 @@
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>jidesoft</id>
......@@ -39,8 +43,19 @@
<email>support@jidesoft.com</email>
</developer>
</developers>
<properties>
<!-- path to JDK9+ -->
<java9.jdk>/home/bourgesl/apps/jdk-9/</java9.jdk>
<java9.sourceDirectory>${project.basedir}/src-jdk9</java9.sourceDirectory>
<java9.build.outputDirectory>${project.build.directory}/classes-jdk9</java9.build.outputDirectory>
<!-- enable release tasks (javadoc, sources, release) -->
<skipRelease>true</skipRelease>
</properties>
<build>
<sourceDirectory>src,src-jdk6</sourceDirectory>
<!-- define base src folder (common) -->
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
......@@ -52,16 +67,136 @@
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<!-- add src-jdk8 and src-apple for JDK8 build -->
<sources>
<source>src-jdk8</source>
<source>src-apple</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>compile-java9</id>
<phase>compile</phase>
<configuration>
<tasks>
<!-- build JDK9+ specific classes -->
<mkdir dir="${java9.build.outputDirectory}" />
<javac srcdir="${java9.sourceDirectory}"
destdir="${java9.build.outputDirectory}"
classpath="${project.build.outputDirectory}"
includeantruntime="false"
executable="${java9.jdk}/bin/javac" fork="true">
<compilerarg value="--add-exports"/>
<compilerarg value="java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED"/>
<compilerarg value="--add-exports"/>
<compilerarg value="java.desktop/sun.swing=ALL-UNNAMED"/>
<compilerarg value="--add-exports"/>
<compilerarg value="java.desktop/sun.awt.image=ALL-UNNAMED"/>
<compilerarg value="--add-exports"/>
<compilerarg value="java.desktop/sun.awt.windows=ALL-UNNAMED"/>
<compilerarg value="--add-exports"/>
<compilerarg value="java.base/sun.security.action=ALL-UNNAMED"/>
<!-- useless extra arguments (see Readme JDK9.txt) -->
<!--
-add-exports java.desktop/javax.swing.plaf.synth=ALL-UNNAMED
-add-exports java.desktop/sun.awt=ALL-UNNAMED
-add-exports java.desktop/sun.awt.shell=ALL-UNNAMED
-add-exports java.desktop/sun.awt.dnd=ALL-UNNAMED
-->
</javac>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<!-- copy JDK9+ specific classes into main classes (version 9+)-->
<outputDirectory>${project.build.outputDirectory}/META-INF/versions/9</outputDirectory>
<resources>
<resource>
<directory>${java9.build.outputDirectory}</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<excludes>
<exclude>apple/**</exclude>
<exclude>com/apple/**</exclude>
</excludes>
<archive>
<!-- enable Multi-Release Jar file -->
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
</configuration>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<skipSource>${skipRelease}</skipSource>
</configuration>
<executions>
<execution>
<goals>
......@@ -72,6 +207,10 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<skip>${skipRelease}</skip>
</configuration>
<executions>
<execution>
<goals>
......@@ -89,11 +228,12 @@
</extension>
</extensions>
</build>
<profiles>
<profile>
<id>aqua</id>
<activation>
<activeByDefault>true</activeByDefault>
<activeByDefault>!${skipRelease}</activeByDefault>
<property>
<name>performRelease</name>
<value>true</value>
......@@ -123,12 +263,14 @@
</build>
</profile>
</profiles>
<distributionManagement>
<repository>
<id>sonatype-nexus-staging</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
</distributionManagement>
<scm>
<connection>scm:git:git://github.com/jidesoft/jide-oss.git</connection>
<developerConnection>scm:git:https://jidesoft@github.com/jidesoft/jide-oss.git</developerConnection>
......
<?xml version="1.0"?>
<!--
~ @(#)pom.xml 5/16/2012
~
~ Copyright 2002 - 2012 JIDE Software Inc. All rights reserved.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.jidesoft</groupId>
<artifactId>jide-oss</artifactId>
<name>JIDE Common Layer</name>
<version>3.7.4</version>
<packaging>jar</packaging>
<description>JIDE Common Layer (Professional Swing Components)</description>
<url>https://github.com/jidesoft/jide-oss</url>
<licenses>
<license>
<name>GPL with classpath exception</name>
<url>http://www.gnu.org/licenses/gpl.txt</url>
<distribution>repo</distribution>
</license>
<license>
<name>Free commercial license</name>
<url>http://www.jidesoft.com/purchase/SLA.htm</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>jidesoft</id>
<name>jidesoft</name>
<email>support@jidesoft.com</email>
</developer>
</developers>
<build>
<sourceDirectory>src,src-jdk6</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.gif</include>
<include>**/*.jpg</include>
<include>**/*.png</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.0</version>
</extension>
</extensions>
</build>
<profiles>
<profile>
<id>aqua</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>aqua_ui</groupId>
<artifactId>ui</artifactId>
<version>5.0</version>
<scope>system</scope>
<systemPath>${basedir}/libs/ui.jar</systemPath>
</dependency>
<dependency>
<groupId>aqua_ui</groupId>
<artifactId>jrs</artifactId>
<version>5.0</version>
<scope>system</scope>
<systemPath>${basedir}/libs/ui.jar</systemPath>
</dependency>
</dependencies>
<properties>
<gpg.keyname>7929F719</gpg.keyname>
<release.username>jidesoft</release.username>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.0-alpha-4</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<distributionManagement>
<repository>
<id>sonatype-nexus-staging</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
</distributionManagement>
<scm>
<connection>scm:git:git://github.com/jidesoft/jide-oss.git</connection>
<developerConnection>scm:git:https://jidesoft@github.com/jidesoft/jide-oss.git</developerConnection>
<url>https://github.com/jidesoft/jide-oss</url>
</scm>
</project>
<?xml version="1.0"?>
<!--
~ @(#)pom.xml 5/16/2012
~
~ Copyright 2002 - 2012 JIDE Software Inc. All rights reserved.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.jidesoft</groupId>
<artifactId>jide-oss</artifactId>
<name>JIDE Common Layer</name>
<version>3.7.4</version>
<packaging>jar</packaging>
<description>JIDE Common Layer (Professional Swing Components)</description>
<url>https://github.com/jidesoft/jide-oss</url>
<licenses>
<license>
<name>GPL with classpath exception</name>
<url>http://www.gnu.org/licenses/gpl.txt</url>
<distribution>repo</distribution>
</license>
<license>
<name>Free commercial license</name>
<url>http://www.jidesoft.com/purchase/SLA.htm</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>jidesoft</id>
<name>jidesoft</name>
<email>support@jidesoft.com</email>
</developer>
</developers>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.gif</include>
<include>**/*.jpg</include>
<include>**/*.png</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.0</version>
</extension>
</extensions>
</build>
<profiles>
<profile>
<id>aqua</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<properties>
<gpg.keyname>7929F719</gpg.keyname>
<release.username>jidesoft</release.username>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.0-alpha-4</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<distributionManagement>
<repository>
<id>sonatype-nexus-staging</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
</distributionManagement>
<scm>
<connection>scm:git:git://github.com/jidesoft/jide-oss.git</connection>
<developerConnection>scm:git:https://jidesoft@github.com/jidesoft/jide-oss.git</developerConnection>
<url>https://github.com/jidesoft/jide-oss</url>
</scm>
</project>
......@@ -11,7 +11,7 @@ SearchableBar.find=Find:
SearchableBar.find.mnemonic=F
SearchableBar.findNext=Find N\u00E6ste
SearchableBar.findNext.mnemonic=N
SearchableBar.findNext.tooltip=Find n\u00E6ste forekost af frasen
SearchableBar.findNext.tooltip=Find n\u00E6ste forekomst af frasen
SearchableBar.findPrevious=Find Tidligere
SearchableBar.findPrevious.mnemonic=P
SearchableBar.findPrevious.tooltip=Find tidligere forekomster af frasen
......
#
# Fake apple / com.apple source code (from openjdk) to let jide-oss build on jdk8
#
# these classes are not packaged in jide-oss-x.y.jar
This diff is collapsed.
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.laf;
import java.awt.*;
import java.awt.event.MouseEvent;
import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicPopupMenuUI;
public class AquaPopupMenuUI extends BasicPopupMenuUI {
public static ComponentUI createUI(final JComponent x) {
return new AquaPopupMenuUI();
}
public boolean isPopupTrigger(final MouseEvent e) {
// Use the awt popup trigger code since this only runs on our OS!
return e.isPopupTrigger();
}
@Override
public void paint(final Graphics g, final JComponent c) {
if (!(g instanceof Graphics2D)) {
super.paint(g, c);
return;
}
if (!(PopupFactory.getSharedInstance() instanceof ScreenPopupFactory)) {
super.paint(g, c);
return;
}
// round off and put back edges in a new Graphics
final Graphics2D g2d = (Graphics2D)g.create();
final Rectangle popupBounds = popupMenu.getBounds(); // NB: origin is still at 0,0
paintRoundRect(g2d, popupBounds);
clipEdges(g2d, popupBounds);
g2d.dispose();
// if any subsequent drawing occurs over these corners, the window is square again
super.paint(g, c);
}
protected void paintRoundRect(final Graphics2D g2d, final Rectangle popupBounds) {
// setup the graphics context to blast alpha for every primitive we draw
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setComposite(AlphaComposite.Clear);
// draw the 3px round-rect line around the outer bounds of the window,
// this gives the appearance of rounded corners
g2d.setStroke(new BasicStroke(3.0f));
g2d.drawRoundRect(-2, -2, popupBounds.width + 3, popupBounds.height + 3, 12, 12);
}
static final int OVERLAP_SLACK = 10;
protected void clipEdges(final Graphics2D g2d, final Rectangle popupBounds) {
final Component invoker = popupMenu.getInvoker();
if (!(invoker instanceof JMenu)) return; // only point corners originating from menu items
final Rectangle invokerBounds = invoker.getBounds();
// only get location on screen when necessary
invokerBounds.setLocation(invoker.getLocationOnScreen());
popupBounds.setLocation(popupMenu.getLocationOnScreen());
final Point invokerCenter = new Point((int)invokerBounds.getCenterX(), (int)invokerBounds.getCenterY());
if (popupBounds.contains(invokerCenter)) {
// invoker is "behind" the popup, no corners should be pointed
return;
}
// blast opaque background over the corners we want to "put back"
g2d.setComposite(AlphaComposite.SrcOver);
g2d.setColor(popupMenu.getBackground());
final Point popupCenter = new Point((int)popupBounds.getCenterX(), (int)popupBounds.getCenterY());
final boolean invokerMidpointAbovePopupMidpoint = invokerCenter.y <= popupCenter.y;
if (invokerBounds.x + invokerBounds.width < popupBounds.x + OVERLAP_SLACK) {
// popup is far right of invoker
if (invokerMidpointAbovePopupMidpoint) {
// point upper left corner, most common case
g2d.fillRect(-2, -2, 8, 8);
return;
}
// point lower left corner
g2d.fillRect(-2, popupBounds.height - 6, 8, 8);
return;
}
if (popupBounds.x + popupBounds.width < invokerBounds.x + OVERLAP_SLACK) {
// popup is far left of invoker
if (invokerMidpointAbovePopupMidpoint) {
// point upper right corner
g2d.fillRect(popupBounds.width - 6, -2, 8, 8);
return;
}
// point lower right corner
g2d.fillRect(popupBounds.width - 6, popupBounds.height - 6, 8, 8);
return;
}
// popup is neither "far right" or "far left" of it's invoker
if (invokerBounds.y + invokerBounds.height < popupBounds.y + OVERLAP_SLACK) {
// popup is "middle" below it's invoker,
// this is probably the "connected" case where both upper corners should touch
g2d.fillRect(-2, -2, popupBounds.width + 4, 8);
return;
}
// if none of these cases match...don't make any corners pointed
}
}
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.apple.laf;
import java.awt.*;
import javax.swing.*;
import javax.swing.plaf.basic.BasicSliderUI;
public class AquaSliderUI extends BasicSliderUI {
/*
* EMPTY implementation to make build pass
*/
protected transient boolean fIsDragging = false;
public AquaSliderUI(final JSlider b) {
super(b);
}
public void paintThumb(Graphics g, JComponent cg, apple.laf.JRSUIConstants.Orientation orientation, apple.laf.JRSUIConstants.State state) {
}
}