rebuilt [release 2.2.2-3mamba;Tue Oct 20 2009]
This commit is contained in:
parent
5092eac980
commit
060f4cf4a9
10
README.md
10
README.md
@ -1,2 +1,12 @@
|
|||||||
# jgoodies-looks
|
# jgoodies-looks
|
||||||
|
|
||||||
|
The JGoodies look&feels make your Swing applications and applets look better.
|
||||||
|
They have been optimized for readability, precise micro-design and usability.
|
||||||
|
|
||||||
|
Main Benefits:
|
||||||
|
|
||||||
|
* Improved readability, legibility and in turn usability.
|
||||||
|
* Improved aesthetics - looks good on the majority of desktops
|
||||||
|
* Simplified multi-platform support
|
||||||
|
* Precise micro-design
|
||||||
|
|
||||||
|
36
jgoodies-looks-2.2.1-build.patch
Normal file
36
jgoodies-looks-2.2.1-build.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
--- looks-2.2.1/build.xml 2009-01-05 20:58:06.000000000 +0100
|
||||||
|
+++ looks-2.2.1/build.xml-gil 2009-01-05 21:02:12.000000000 +0100
|
||||||
|
@@ -113,8 +113,7 @@
|
||||||
|
optimize ="${build.compile.optimize}"
|
||||||
|
source ="${build.compile.source}"
|
||||||
|
target ="${build.compile.target}"
|
||||||
|
- verbose ="${build.compile.verbose}"
|
||||||
|
- bootclasspath="${build.boot.classpath}" />
|
||||||
|
+ verbose ="${build.compile.verbose}"/>
|
||||||
|
|
||||||
|
<copy toDir="${build.core.dir}" >
|
||||||
|
<fileset dir="${src.core.dir}"
|
||||||
|
@@ -141,7 +140,6 @@
|
||||||
|
source ="${build.compile.source}"
|
||||||
|
target ="${build.compile.target}"
|
||||||
|
verbose ="${build.compile.verbose}"
|
||||||
|
- bootclasspath="${build.boot.classpath}"
|
||||||
|
classpathref ="classpath.demo" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
@@ -163,7 +161,6 @@
|
||||||
|
source ="${build.compile.source}"
|
||||||
|
target ="${build.compile.target}"
|
||||||
|
verbose ="${build.compile.verbose}"
|
||||||
|
- bootclasspath="${build.boot.classpath}"
|
||||||
|
classpathref ="classpath.tests" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
@@ -184,7 +181,6 @@
|
||||||
|
author="true"
|
||||||
|
version="true"
|
||||||
|
use="true"
|
||||||
|
- link="${javadoc.link}"
|
||||||
|
overview="${javadoc.overview}"
|
||||||
|
windowtitle="${Name} ${spec.version} API"
|
||||||
|
doctitle="${Name} ${spec.version} API"
|
91
jgoodies-looks-2.2.1-no-com-sun.patch
Normal file
91
jgoodies-looks-2.2.1-no-com-sun.patch
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
diff -Nru looks-2.2.1/src/core/com/jgoodies/looks/Options.java looks-2.2.1/src-gil/core/com/jgoodies/looks/Options.java
|
||||||
|
--- looks-2.2.1/src/core/com/jgoodies/looks/Options.java 2009-01-05 21:06:02.000000000 +0100
|
||||||
|
+++ looks-2.2.1/src-gil/core/com/jgoodies/looks/Options.java 2009-01-05 21:12:34.000000000 +0100
|
||||||
|
@@ -40,8 +40,6 @@
|
||||||
|
|
||||||
|
import com.jgoodies.looks.common.ShadowPopup;
|
||||||
|
import com.jgoodies.looks.plastic.PlasticLookAndFeel;
|
||||||
|
-import com.jgoodies.looks.windows.WindowsLookAndFeel;
|
||||||
|
-import com.sun.java.swing.plaf.windows.WindowsComboBoxUI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides access to optional features of the JGoodies L&Fs
|
||||||
|
@@ -895,12 +893,6 @@
|
||||||
|
putLookAndFeelReplacement(
|
||||||
|
"javax.swing.plaf.metal.MetalLookAndFeel",
|
||||||
|
PLASTIC3D_NAME);
|
||||||
|
- putLookAndFeelReplacement(
|
||||||
|
- "com.sun.java.swing.plaf.windows.WindowsLookAndFeel",
|
||||||
|
- JGOODIES_WINDOWS_NAME);
|
||||||
|
- putLookAndFeelReplacement(
|
||||||
|
- "com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel",
|
||||||
|
- NO_REPLACEMENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
diff -Nru looks-2.2.1/src/demo/com/jgoodies/looks/demo/DemoFrame.java looks-2.2.1/src-gil/demo/com/jgoodies/looks/demo/DemoFrame.java
|
||||||
|
--- looks-2.2.1/src/demo/com/jgoodies/looks/demo/DemoFrame.java 2009-01-05 21:06:02.000000000 +0100
|
||||||
|
+++ looks-2.2.1/src-gil/demo/com/jgoodies/looks/demo/DemoFrame.java 2009-01-05 21:15:10.000000000 +0100
|
||||||
|
@@ -46,7 +46,6 @@
|
||||||
|
import com.jgoodies.looks.LookUtils;
|
||||||
|
import com.jgoodies.looks.Options;
|
||||||
|
import com.jgoodies.looks.plastic.PlasticLookAndFeel;
|
||||||
|
-import com.jgoodies.looks.windows.WindowsLookAndFeel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds the main frame in the Simple Looks Demo.
|
||||||
|
@@ -218,9 +217,6 @@
|
||||||
|
PlasticLookAndFeel.BORDER_STYLE_KEY,
|
||||||
|
settings.getToolBarPlasticBorderStyle());
|
||||||
|
toolBar.putClientProperty(
|
||||||
|
- WindowsLookAndFeel.BORDER_STYLE_KEY,
|
||||||
|
- settings.getToolBarWindowsBorderStyle());
|
||||||
|
- toolBar.putClientProperty(
|
||||||
|
PlasticLookAndFeel.IS_3D_KEY,
|
||||||
|
settings.getToolBar3DHint());
|
||||||
|
|
||||||
|
diff -Nru looks-2.2.1/src/demo/com/jgoodies/looks/demo/MenuBarView.java looks-2.2.1/src-gil/demo/com/jgoodies/looks/demo/MenuBarView.java
|
||||||
|
--- looks-2.2.1/src/demo/com/jgoodies/looks/demo/MenuBarView.java 2009-01-05 21:06:02.000000000 +0100
|
||||||
|
+++ looks-2.2.1/src-gil/demo/com/jgoodies/looks/demo/MenuBarView.java 2009-01-05 21:17:00.000000000 +0100
|
||||||
|
@@ -39,7 +39,6 @@
|
||||||
|
|
||||||
|
import com.jgoodies.looks.Options;
|
||||||
|
import com.jgoodies.looks.plastic.PlasticLookAndFeel;
|
||||||
|
-import com.jgoodies.looks.windows.WindowsLookAndFeel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds the menu bar and pull-down menus in the Simple Looks Demo.
|
||||||
|
@@ -74,8 +73,6 @@
|
||||||
|
settings.getMenuBarHeaderStyle());
|
||||||
|
bar.putClientProperty(PlasticLookAndFeel.BORDER_STYLE_KEY,
|
||||||
|
settings.getMenuBarPlasticBorderStyle());
|
||||||
|
- bar.putClientProperty(WindowsLookAndFeel.BORDER_STYLE_KEY,
|
||||||
|
- settings.getMenuBarWindowsBorderStyle());
|
||||||
|
bar.putClientProperty(PlasticLookAndFeel.IS_3D_KEY,
|
||||||
|
settings.getMenuBar3DHint());
|
||||||
|
|
||||||
|
diff -Nru looks-2.2.1/src/demo/FontTest.java looks-2.2.1/src-gil/demo/FontTest.java
|
||||||
|
--- looks-2.2.1/src/demo/FontTest.java 2009-01-05 21:06:02.000000000 +0100
|
||||||
|
+++ looks-2.2.1/src-gil/demo/FontTest.java 2009-01-05 21:19:05.000000000 +0100
|
||||||
|
@@ -11,7 +11,6 @@
|
||||||
|
import com.jgoodies.looks.LookUtils;
|
||||||
|
import com.jgoodies.looks.plastic.PlasticLookAndFeel;
|
||||||
|
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel;
|
||||||
|
-import com.jgoodies.looks.windows.WindowsLookAndFeel;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -275,13 +274,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
private FontSet getWindowsFontSet() {
|
||||||
|
- try {
|
||||||
|
- UIManager.setLookAndFeel(new WindowsLookAndFeel());
|
||||||
|
- return WindowsLookAndFeel.getFontPolicy().getFontSet("Windows", UIManager.getDefaults());
|
||||||
|
- } catch (UnsupportedLookAndFeelException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
|
||||||
|
|
||||||
|
private FontSet getPlasticFontSet() {
|
341
jgoodies-looks-2.2.1-remove-jdk-stuff.patch
Normal file
341
jgoodies-looks-2.2.1-remove-jdk-stuff.patch
Normal file
@ -0,0 +1,341 @@
|
|||||||
|
diff -Nru looks-2.2.1/src/core/com/jgoodies/looks/plastic/PlasticSpinnerUI.java looks-2.2.1/src-gil/core/com/jgoodies/looks/plastic/PlasticSpinnerUI.java
|
||||||
|
--- looks-2.2.1/src/core/com/jgoodies/looks/plastic/PlasticSpinnerUI.java 2008-09-24 14:23:40.000000000 +0200
|
||||||
|
+++ looks-2.2.1/src-gil/core/com/jgoodies/looks/plastic/PlasticSpinnerUI.java 2009-01-05 21:36:17.000000000 +0100
|
||||||
|
@@ -35,11 +35,16 @@
|
||||||
|
import java.awt.LayoutManager;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
+import javax.swing.JComponent;
|
||||||
|
+import javax.swing.JPanel;
|
||||||
|
+import javax.swing.JSpinner;
|
||||||
|
+import javax.swing.JTextField;
|
||||||
|
+import javax.swing.SwingConstants;
|
||||||
|
+import javax.swing.UIManager;
|
||||||
|
import javax.swing.border.EmptyBorder;
|
||||||
|
import javax.swing.plaf.ComponentUI;
|
||||||
|
import javax.swing.plaf.basic.BasicSpinnerUI;
|
||||||
|
|
||||||
|
-import com.jgoodies.looks.common.ExtBasicArrowButtonHandler;
|
||||||
|
import com.jgoodies.looks.common.ExtBasicSpinnerLayout;
|
||||||
|
|
||||||
|
|
||||||
|
@@ -58,57 +63,6 @@
|
||||||
|
return new PlasticSpinnerUI();
|
||||||
|
}
|
||||||
|
|
||||||
|
-
|
||||||
|
- /**
|
||||||
|
- * The mouse/action listeners that are added to the spinner's
|
||||||
|
- * arrow buttons. These listeners are shared by all
|
||||||
|
- * spinner arrow buttons.
|
||||||
|
- *
|
||||||
|
- * @see #createNextButton
|
||||||
|
- * @see #createPreviousButton
|
||||||
|
- */
|
||||||
|
- private static final ExtBasicArrowButtonHandler nextButtonHandler
|
||||||
|
- = new ExtBasicArrowButtonHandler("increment", true);
|
||||||
|
- private static final ExtBasicArrowButtonHandler previousButtonHandler
|
||||||
|
- = new ExtBasicArrowButtonHandler("decrement", false);
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- /**
|
||||||
|
- * Create a component that will replace the spinner models value
|
||||||
|
- * with the object returned by <code>spinner.getPreviousValue</code>.
|
||||||
|
- * By default the <code>previousButton</code> is a JButton
|
||||||
|
- * who's <code>ActionListener</code> updates it's <code>JSpinner</code>
|
||||||
|
- * ancestors model. If a previousButton isn't needed (in a subclass)
|
||||||
|
- * then override this method to return null.
|
||||||
|
- *
|
||||||
|
- * @return a component that will replace the spinners model with the
|
||||||
|
- * next value in the sequence, or null
|
||||||
|
- * @see #installUI
|
||||||
|
- * @see #createNextButton
|
||||||
|
- */
|
||||||
|
- protected Component createPreviousButton() {
|
||||||
|
- return new SpinnerArrowButton(SwingConstants.SOUTH, previousButtonHandler);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- /**
|
||||||
|
- * Create a component that will replace the spinner models value
|
||||||
|
- * with the object returned by <code>spinner.getNextValue</code>.
|
||||||
|
- * By default the <code>nextButton</code> is a JButton
|
||||||
|
- * who's <code>ActionListener</code> updates it's <code>JSpinner</code>
|
||||||
|
- * ancestors model. If a nextButton isn't needed (in a subclass)
|
||||||
|
- * then override this method to return null.
|
||||||
|
- *
|
||||||
|
- * @return a component that will replace the spinners model with the
|
||||||
|
- * next value in the sequence, or null
|
||||||
|
- * @see #installUI
|
||||||
|
- * @see #createPreviousButton
|
||||||
|
- */
|
||||||
|
- protected Component createNextButton() {
|
||||||
|
- return new SpinnerArrowButton(SwingConstants.NORTH, nextButtonHandler);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
-
|
||||||
|
/**
|
||||||
|
* Create a <code>LayoutManager</code> that manages the <code>editor</code>,
|
||||||
|
* <code>nextButton</code>, and <code>previousButton</code> children
|
||||||
|
@@ -195,32 +149,4 @@
|
||||||
|
editorField.setBorder(new EmptyBorder(insets));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- /**
|
||||||
|
- * It differs from its superclass in that it uses the same formula as JDK
|
||||||
|
- * to calculate the arrow height.
|
||||||
|
- */
|
||||||
|
- private static final class SpinnerArrowButton extends PlasticArrowButton {
|
||||||
|
- private SpinnerArrowButton(int direction,
|
||||||
|
- ExtBasicArrowButtonHandler handler) {
|
||||||
|
- super(direction, UIManager.getInt("ScrollBar.width"), true);
|
||||||
|
- addActionListener(handler);
|
||||||
|
- addMouseListener(handler);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- protected int calculateArrowHeight(int height, int width) {
|
||||||
|
- int arrowHeight = Math.min((height - 4) / 3, (width - 4) / 3);
|
||||||
|
- return Math.max(arrowHeight, 3);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- protected int calculateArrowOffset() {
|
||||||
|
- return 1;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- protected boolean isPaintingNorthBottom() {
|
||||||
|
- return true;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
}
|
||||||
|
\ No newline at end of file
|
||||||
|
diff -Nru looks-2.2.1/src/core/com/jgoodies/looks/plastic/PlasticXPSpinnerUI.java looks-2.2.1/src-gil/core/com/jgoodies/looks/plastic/PlasticXPSpinnerUI.java
|
||||||
|
--- looks-2.2.1/src/core/com/jgoodies/looks/plastic/PlasticXPSpinnerUI.java 2008-09-24 14:23:40.000000000 +0200
|
||||||
|
+++ looks-2.2.1/src-gil/core/com/jgoodies/looks/plastic/PlasticXPSpinnerUI.java 2009-01-05 21:39:00.000000000 +0100
|
||||||
|
@@ -30,17 +30,8 @@
|
||||||
|
|
||||||
|
package com.jgoodies.looks.plastic;
|
||||||
|
|
||||||
|
-import java.awt.Color;
|
||||||
|
-import java.awt.Component;
|
||||||
|
-import java.awt.Graphics;
|
||||||
|
-
|
||||||
|
import javax.swing.JComponent;
|
||||||
|
-import javax.swing.SwingConstants;
|
||||||
|
-import javax.swing.UIManager;
|
||||||
|
import javax.swing.plaf.ComponentUI;
|
||||||
|
-import javax.swing.plaf.metal.MetalLookAndFeel;
|
||||||
|
-
|
||||||
|
-import com.jgoodies.looks.common.ExtBasicArrowButtonHandler;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -56,205 +47,4 @@
|
||||||
|
public static ComponentUI createUI(JComponent b) {
|
||||||
|
return new PlasticXPSpinnerUI();
|
||||||
|
}
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- /**
|
||||||
|
- * The mouse/action listeners that are added to the spinner's
|
||||||
|
- * arrow buttons. These listeners are shared by all
|
||||||
|
- * spinner arrow buttons.
|
||||||
|
- *
|
||||||
|
- * @see #createNextButton
|
||||||
|
- * @see #createPreviousButton
|
||||||
|
- */
|
||||||
|
- private static final ExtBasicArrowButtonHandler NEXT_BUTTON_HANDLER
|
||||||
|
- = new ExtBasicArrowButtonHandler("increment", true);
|
||||||
|
- private static final ExtBasicArrowButtonHandler PREVIOUS_BUTTON_HANDLER
|
||||||
|
- = new ExtBasicArrowButtonHandler("decrement", false);
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- /**
|
||||||
|
- * Create a component that will replace the spinner models value
|
||||||
|
- * with the object returned by <code>spinner.getPreviousValue</code>.
|
||||||
|
- * By default the <code>previousButton</code> is a JButton
|
||||||
|
- * who's <code>ActionListener</code> updates it's <code>JSpinner</code>
|
||||||
|
- * ancestors model. If a previousButton isn't needed (in a subclass)
|
||||||
|
- * then override this method to return null.
|
||||||
|
- *
|
||||||
|
- * @return a component that will replace the spinners model with the
|
||||||
|
- * next value in the sequence, or null
|
||||||
|
- * @see #installUI
|
||||||
|
- * @see #createNextButton
|
||||||
|
- */
|
||||||
|
- protected Component createPreviousButton() {
|
||||||
|
- return new SpinnerXPArrowButton(SwingConstants.SOUTH, PREVIOUS_BUTTON_HANDLER);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- /**
|
||||||
|
- * Create a component that will replace the spinner models value
|
||||||
|
- * with the object returned by <code>spinner.getNextValue</code>.
|
||||||
|
- * By default the <code>nextButton</code> is a JButton
|
||||||
|
- * who's <code>ActionListener</code> updates it's <code>JSpinner</code>
|
||||||
|
- * ancestors model. If a nextButton isn't needed (in a subclass)
|
||||||
|
- * then override this method to return null.
|
||||||
|
- *
|
||||||
|
- * @return a component that will replace the spinners model with the
|
||||||
|
- * next value in the sequence, or null
|
||||||
|
- * @see #installUI
|
||||||
|
- * @see #createPreviousButton
|
||||||
|
- */
|
||||||
|
- protected Component createNextButton() {
|
||||||
|
- return new SpinnerXPArrowButton(SwingConstants.NORTH, NEXT_BUTTON_HANDLER);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- /**
|
||||||
|
- * It differs from its superclass in that it uses the same formula as JDK
|
||||||
|
- * to calculate the arrow height.
|
||||||
|
- */
|
||||||
|
- private static final class SpinnerXPArrowButton extends PlasticArrowButton {
|
||||||
|
-
|
||||||
|
- SpinnerXPArrowButton(int direction, ExtBasicArrowButtonHandler handler) {
|
||||||
|
- // If you change the value of the button width, don't forget
|
||||||
|
- // to change it in PlasticXPBorders#XPSpinnerBorder too.
|
||||||
|
- super(direction, UIManager.getInt("ScrollBar.width") - 1, false);
|
||||||
|
- addActionListener(handler);
|
||||||
|
- addMouseListener(handler);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- protected int calculateArrowHeight(int height, int width) {
|
||||||
|
- int arrowHeight = Math.min((height - 4) / 3, (width - 4) / 3);
|
||||||
|
- return Math.max(arrowHeight, 3);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- protected boolean isPaintingNorthBottom() {
|
||||||
|
- return true;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- protected int calculateArrowOffset() {
|
||||||
|
- return 1;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- protected void paintNorth(Graphics g, boolean leftToRight, boolean isEnabled,
|
||||||
|
- Color arrowColor, boolean isPressed,
|
||||||
|
- int width, int height, int w, int h, int arrowHeight, int arrowOffset,
|
||||||
|
- boolean paintBottom) {
|
||||||
|
- if (!isFreeStanding) {
|
||||||
|
- height += 1;
|
||||||
|
- g.translate(0, -1);
|
||||||
|
- if (!leftToRight) {
|
||||||
|
- width += 1;
|
||||||
|
- g.translate(-1, 0);
|
||||||
|
- } else {
|
||||||
|
- width += 2;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- // Draw the arrow
|
||||||
|
- g.setColor(arrowColor);
|
||||||
|
- int startY = 1 + ((h + 1) - arrowHeight) / 2; // KL was (h + 1)
|
||||||
|
- int startX = w / 2;
|
||||||
|
- // System.out.println( "startX :" + startX + " startY :"+startY);
|
||||||
|
- for (int line = 0; line < arrowHeight; line++) {
|
||||||
|
- g.fillRect(startX - line - arrowOffset, startY + line,
|
||||||
|
- 2 * (line + 1), 1);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- paintNorthBorder(g, isEnabled, width, height, paintBottom);
|
||||||
|
-
|
||||||
|
- if (!isFreeStanding) {
|
||||||
|
- height -= 1;
|
||||||
|
- g.translate(0, 1);
|
||||||
|
- if (!leftToRight) {
|
||||||
|
- width -= 1;
|
||||||
|
- g.translate(1, 0);
|
||||||
|
- } else {
|
||||||
|
- width -= 2;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- private void paintNorthBorder(Graphics g, boolean isEnabled, int w, int h, boolean paintBottom) {
|
||||||
|
- if (isEnabled) {
|
||||||
|
- boolean isPressed = model.isPressed() && model.isArmed();
|
||||||
|
- if (isPressed) {
|
||||||
|
- PlasticXPUtils.drawPressedButtonBorder(g, 0, 1, w - 2, h);
|
||||||
|
- } else {
|
||||||
|
- PlasticXPUtils.drawPlainButtonBorder(g, 0, 1, w - 2, h);
|
||||||
|
- }
|
||||||
|
- } else {
|
||||||
|
- PlasticXPUtils.drawDisabledButtonBorder(g, 0, 1, w - 2, h + 1);
|
||||||
|
- }
|
||||||
|
- // Paint one pixel on the arrow button's left hand side.
|
||||||
|
- g.setColor(isEnabled
|
||||||
|
- ? PlasticLookAndFeel.getControlDarkShadow()
|
||||||
|
- : MetalLookAndFeel.getControlShadow());
|
||||||
|
- g.fillRect(0, 1, 1, 1);
|
||||||
|
-
|
||||||
|
- if (paintBottom) {
|
||||||
|
- g.fillRect(0, h - 1, w - 1, 1);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
-
|
||||||
|
- protected void paintSouth(Graphics g, boolean leftToRight, boolean isEnabled,
|
||||||
|
- Color arrowColor, boolean isPressed,
|
||||||
|
- int width, int height, int w, int h, int arrowHeight, int arrowOffset) {
|
||||||
|
-
|
||||||
|
- if (!isFreeStanding) {
|
||||||
|
- height += 1;
|
||||||
|
- if (!leftToRight) {
|
||||||
|
- width += 1;
|
||||||
|
- g.translate(-1, 0);
|
||||||
|
- } else {
|
||||||
|
- width += 2;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- // Draw the arrow
|
||||||
|
- g.setColor(arrowColor);
|
||||||
|
-
|
||||||
|
- int startY = (((h + 0) - arrowHeight) / 2) + arrowHeight - 2; // KL was h + 1
|
||||||
|
- int startX = w / 2;
|
||||||
|
-
|
||||||
|
- //System.out.println( "startX2 :" + startX + " startY2 :"+startY);
|
||||||
|
-
|
||||||
|
- for (int line = 0; line < arrowHeight; line++) {
|
||||||
|
- g.fillRect(startX - line - arrowOffset, startY - line,
|
||||||
|
- 2 * (line + 1), 1);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- paintSouthBorder(g, isEnabled, width, height);
|
||||||
|
-
|
||||||
|
- if (!isFreeStanding) {
|
||||||
|
- height -= 1;
|
||||||
|
- if (!leftToRight) {
|
||||||
|
- width -= 1;
|
||||||
|
- g.translate(1, 0);
|
||||||
|
- } else {
|
||||||
|
- width -= 2;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- private void paintSouthBorder(Graphics g, boolean isEnabled, int w, int h) {
|
||||||
|
- if (isEnabled) {
|
||||||
|
- boolean isPressed = model.isPressed() && model.isArmed();
|
||||||
|
- if (isPressed) {
|
||||||
|
- PlasticXPUtils.drawPressedButtonBorder(g, 0, -2, w - 2, h + 1);
|
||||||
|
- } else {
|
||||||
|
- PlasticXPUtils.drawPlainButtonBorder(g, 0, -2, w - 2, h + 1);
|
||||||
|
- }
|
||||||
|
- } else {
|
||||||
|
- PlasticXPUtils.drawDisabledButtonBorder(g, 0, -2, w-2, h + 1);
|
||||||
|
- }
|
||||||
|
- // Paint one pixel on the arrow button's left hand side.
|
||||||
|
- g.setColor(isEnabled
|
||||||
|
- ? PlasticLookAndFeel.getControlDarkShadow()
|
||||||
|
- : MetalLookAndFeel.getControlShadow());
|
||||||
|
- g.fillRect(0, h - 2, 1, 1);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
}
|
||||||
|
\ No newline at end of file
|
161
jgoodies-looks.spec
Normal file
161
jgoodies-looks.spec
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
%define pkgver 2_2_2
|
||||||
|
Name: jgoodies-looks
|
||||||
|
Version: 2.2.2
|
||||||
|
Release: 3mamba
|
||||||
|
Summary: Free high-fidelity Windows and multi-platform appearance
|
||||||
|
Group: Development/Libraries/Java
|
||||||
|
Vendor: openmamba
|
||||||
|
Distribution: openmamba
|
||||||
|
Packager: gil <puntogil@libero.it>
|
||||||
|
URL: http://www.jgoodies.com/freeware/looks/
|
||||||
|
Source0: http://www.jgoodies.com/download/libraries/looks/looks-%{pkgver}.zip
|
||||||
|
Source1: http://mirrors.ibiblio.org/pub/mirrors/maven2/com/jgoodies/looks/%{version}/looks-%{version}.pom
|
||||||
|
Patch0: jgoodies-looks-2.2.1-build.patch
|
||||||
|
Patch1: jgoodies-looks-2.2.1-no-com-sun.patch
|
||||||
|
Patch2: jgoodies-looks-2.2.1-remove-jdk-stuff.patch
|
||||||
|
License: BSD
|
||||||
|
BuildRequires: apache-ant
|
||||||
|
BuildRequires: jgoodies-forms13
|
||||||
|
BuildRequires: jgoodies-forms
|
||||||
|
BuildRequires: jpackage-utils
|
||||||
|
#Obsoletes: java-looks
|
||||||
|
#Provides: java-looks
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
|
|
||||||
|
%description
|
||||||
|
The JGoodies look&feels make your Swing applications and applets look better.
|
||||||
|
They have been optimized for readability, precise micro-design and usability.
|
||||||
|
|
||||||
|
Main Benefits:
|
||||||
|
|
||||||
|
* Improved readability, legibility and in turn usability.
|
||||||
|
* Improved aesthetics - looks good on the majority of desktops
|
||||||
|
* Simplified multi-platform support
|
||||||
|
* Precise micro-design
|
||||||
|
|
||||||
|
%package javadoc
|
||||||
|
Summary: Javadoc documentation for %{name}
|
||||||
|
Group: Documentation
|
||||||
|
|
||||||
|
%description javadoc
|
||||||
|
The JGoodies look&feels make your Swing applications and applets look better.
|
||||||
|
They have been optimized for readability, precise micro-design and usability.
|
||||||
|
|
||||||
|
This package contains the Javadoc documentation for JGoodies Looks.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
|
||||||
|
%setup -q -n looks-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
# unzip the look&feel settings from bundled jar before we delete it
|
||||||
|
# (taken from Gentoo ebuild)
|
||||||
|
unzip -j looks-%{version}.jar META-INF/services/javax.swing.LookAndFeel \
|
||||||
|
|| die "unzip of javax.swing.LookAndFeel failed"
|
||||||
|
|
||||||
|
mv javax.swing.LookAndFeel all.txt
|
||||||
|
|
||||||
|
for j in $(find . -name "*.jar"); do
|
||||||
|
mv $j $j.no
|
||||||
|
done
|
||||||
|
|
||||||
|
pushd lib
|
||||||
|
ln -sf $(build-classpath jgoodies-forms13) forms-1.3.0pre4.jar
|
||||||
|
ln -sf $(build-classpath jgoodies-forms) forms-1.2.1.jar
|
||||||
|
popd
|
||||||
|
rm -r docs/api
|
||||||
|
# Delete the whole Windows L&F because it depends on com.sun.java packages
|
||||||
|
# (Unless we're compiling with a Sun JVM)
|
||||||
|
#%patch1 -p1
|
||||||
|
#rm -r src/core/com/jgoodies/looks/windows
|
||||||
|
|
||||||
|
# Delete a file that's a copy of something distributed by Sun, and patch the files that
|
||||||
|
# use it so they don't.
|
||||||
|
#rm src/core/com/jgoodies/looks/common/ExtBasicArrowButtonHandler.java
|
||||||
|
#%patch2 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
ant -Ddescriptors.dir=. compile jar javadoc
|
||||||
|
|
||||||
|
%install
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_javadir}
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/maven2/poms
|
||||||
|
|
||||||
|
install -pm 644 %{SOURCE1} %{buildroot}%{_datadir}/maven2/poms/JPP-jgoodies-looks.pom
|
||||||
|
%add_to_maven_depmap com.jgoodies looks %{version} JPP jgoodies-looks
|
||||||
|
|
||||||
|
cp -p build/looks.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
|
||||||
|
cp -p build/looks-win.jar %{buildroot}%{_javadir}/%{name}-win-%{version}.jar
|
||||||
|
cp -p build/demo.jar %{buildroot}%{_javadir}/%{name}-demo-%{version}.jar
|
||||||
|
cp -p build/fonttest.jar %{buildroot}%{_javadir}/%{name}-fonttest-%{version}.jar
|
||||||
|
cp -p build/plastic.jar %{buildroot}%{_javadir}/%{name}-plastic-%{version}.jar
|
||||||
|
cp -p build/tiny.jar %{buildroot}%{_javadir}/%{name}-tiny-%{version}.jar
|
||||||
|
|
||||||
|
(
|
||||||
|
cd %{buildroot}%{_javadir}
|
||||||
|
for jar in *-%{version}.jar; do
|
||||||
|
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
|
||||||
|
done
|
||||||
|
)
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version}
|
||||||
|
cp -pr build/docs/api/* %{buildroot}%{_javadocdir}/%{name}-%{version}
|
||||||
|
|
||||||
|
for file in *.txt *.html docs/*.* docs/guide/*.*; do
|
||||||
|
sed -i 's/\r//' $file
|
||||||
|
done
|
||||||
|
|
||||||
|
(
|
||||||
|
cd %{buildroot}%{_javadocdir}
|
||||||
|
ln -s %{name}-%{version} %{name}
|
||||||
|
)
|
||||||
|
|
||||||
|
# FIXME gjc support
|
||||||
|
#{_bindir}/aot-compile-rpm
|
||||||
|
|
||||||
|
%clean
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%post
|
||||||
|
%update_maven_depmap
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%update_maven_depmap
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_javadir}/jgoodies-looks-%{version}.jar
|
||||||
|
%{_javadir}/jgoodies-looks.jar
|
||||||
|
%{_javadir}/jgoodies-looks-demo-%{version}.jar
|
||||||
|
%{_javadir}/jgoodies-looks-demo.jar
|
||||||
|
%{_javadir}/jgoodies-looks-fonttest-%{version}.jar
|
||||||
|
%{_javadir}/jgoodies-looks-fonttest.jar
|
||||||
|
%{_javadir}/jgoodies-looks-plastic-%{version}.jar
|
||||||
|
%{_javadir}/jgoodies-looks-plastic.jar
|
||||||
|
%{_javadir}/jgoodies-looks-tiny-%{version}.jar
|
||||||
|
%{_javadir}/jgoodies-looks-tiny.jar
|
||||||
|
%{_javadir}/jgoodies-looks-win-%{version}.jar
|
||||||
|
%{_javadir}/jgoodies-looks-win.jar
|
||||||
|
%{_datadir}/maven2/poms
|
||||||
|
%{_mavendepmapfragdir}
|
||||||
|
%doc RELEASE-NOTES.txt LICENSE.txt README.html docs/
|
||||||
|
|
||||||
|
%files javadoc
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_javadocdir}/%{name}-%{version}
|
||||||
|
%{_javadocdir}/%{name}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Oct 20 2009 gil <puntogil@libero.it> 2.2.2-3mamba
|
||||||
|
- rebuilt
|
||||||
|
|
||||||
|
* Thu Jul 23 2009 gil <puntogil@libero.it> 2.2.2-2mamba
|
||||||
|
- rebuilt
|
||||||
|
|
||||||
|
* Sun Jul 05 2009 gil <puntogil@libero.it> 2.2.2-1mamba
|
||||||
|
- update to 2.2.2
|
||||||
|
|
||||||
|
* Mon Jan 05 2009 gil <puntogil@libero.it> 2.2.1-1mamba
|
||||||
|
- package created by autospec
|
112
looks-2.2.2.pom
Normal file
112
looks-2.2.2.pom
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>com.jgoodies</groupId>
|
||||||
|
<artifactId>looks</artifactId>
|
||||||
|
<version>2.2.2</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>JGoodies Looks</name>
|
||||||
|
<url>https://looks.dev.java.net/</url>
|
||||||
|
<description>The JGoodies Looks make your Swing applications and
|
||||||
|
applets look better. They have been optimized for readability,
|
||||||
|
precise micro-design and usability. And they simplify
|
||||||
|
the multi-platform support by using similar widget dimensions.
|
||||||
|
In addition, many people have reviewed them as elegant.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>The BSD License</name>
|
||||||
|
<url>http://www.opensource.org/licenses/bsd-license.html</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>Karsten</id>
|
||||||
|
<name>Karsten Lentzsch</name>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
|
||||||
|
<!--project.build.sourceEncoding>UTF-8</project.build.sourceEncoding-->
|
||||||
|
<java.compiler.source>1.4</java.compiler.source>
|
||||||
|
<java.compiler.target>1.4</java.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<connection>scm:cvs:pserver:guest@cvs.dev.java.net:/cvs:looks</connection>
|
||||||
|
<tag>head</tag>
|
||||||
|
<url>https://looks.dev.java.net/source/browse/looks/</url>
|
||||||
|
</scm>
|
||||||
|
<dependencies>
|
||||||
|
<!-- This library doesn't depend on any other library. -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>3.8.2</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>mvnartifacts-sf.net</id>
|
||||||
|
<url>sftp://web.sourceforge.net/home/groups/m/mv/mvnartifacts/htdocs/m2-repo</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
<build>
|
||||||
|
<directory>${basedir}/build</directory>
|
||||||
|
<sourceDirectory>${basedir}/src/core</sourceDirectory>
|
||||||
|
<testSourceDirectory>${basedir}/src/test</testSourceDirectory>
|
||||||
|
<outputDirectory>${basedir}/build/classes</outputDirectory>
|
||||||
|
<testOutputDirectory>${basedir}/build/test-classes</testOutputDirectory>
|
||||||
|
<resources>
|
||||||
|
<resource>
|
||||||
|
<directory>.</directory>
|
||||||
|
<includes>
|
||||||
|
<include>LICENSE.txt</include>
|
||||||
|
<include>README.html</include>
|
||||||
|
<include>RELEASE-NOTES.txt</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
<resource>
|
||||||
|
<targetPath>META-INF/services</targetPath>
|
||||||
|
<filtering>false</filtering>
|
||||||
|
<directory>${basedir}/src</directory>
|
||||||
|
<includes>
|
||||||
|
<include>javax.swing.LookAndFeel</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
<resource>
|
||||||
|
<directory>${basedir}/src/core</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.png</include>
|
||||||
|
<include>**/*.gif</include>
|
||||||
|
<include>**/*.jpg</include>
|
||||||
|
</includes>
|
||||||
|
</resource>
|
||||||
|
</resources>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>${java.compiler.source}</source>
|
||||||
|
<target>${java.compiler.target}</target>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
<debug>true</debug>
|
||||||
|
<optimize>false</optimize>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<includes>
|
||||||
|
<include>**/*Test.java</include>
|
||||||
|
</includes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
Loading…
Reference in New Issue
Block a user