forked from agonzalez8/swingset2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Albert Flaig
authored and
Albert Flaig
committed
Jul 31, 2013
0 parents
commit cecbee5
Showing
224 changed files
with
11,924 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.class | ||
*.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions | ||
are met: | ||
|
||
|
||
- Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
|
||
- Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
|
||
- Neither the name of Oracle nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
SwingSet2 demonstrates some of the abilities of the Swing User Interface | ||
Toolkit by displaying many of the components in a single showcase application. | ||
Use it to try out different components and features provided by Swing. | ||
|
||
|
||
================================== | ||
TO RUN SWINGSET2 AS AN APPLICATION | ||
================================== | ||
|
||
java -jar SwingSet2.jar | ||
|
||
|
||
============================= | ||
TO RUN SWINGSET2 AS AN APPLET | ||
============================= | ||
|
||
appletviewer SwingSet2.html | ||
|
||
========================= | ||
TO MODIFY/BUILD SWINGSET2 | ||
========================= | ||
|
||
The full source for the SwingSet2 demo can be found in the "src" | ||
subdirectory. If you wish to play with the source code and try | ||
out your changes, you can compile and run in this "src" directory: | ||
|
||
javac *.java | ||
|
||
java SwingSet2 | ||
|
||
You may notice a difference when running SwingSet from your compiled source | ||
(versus running from the packaged JAR file), in that it won't show the | ||
splash screen. This is expected, as the splash screen is shown using the | ||
java.awt.SplashScreen support, which allows specifying a splash screen | ||
image as an attribute in the JAR's manifest file. If you'd like to see the | ||
splash screen with your own compiled version, you can package your classes | ||
into a JAR and specify the splash screen (as outlined in the java.awt.SplashScreen | ||
documentation) or you can specify the splash screen image on the command line: | ||
|
||
java -splash:resources/images/splash.png SwingSet2 | ||
|
||
|
||
Note: These instructions assume that this installation's versions of the java, | ||
appletviewer, and javac commands are in your path. If they aren't, then you should | ||
either specify the complete path to the commands or update your PATH environment | ||
variable as described in the installation instructions for the | ||
Java(TM) SE Development Kit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* | ||
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* | ||
* - Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* | ||
* - Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* | ||
* - Neither the name of Oracle nor the names of its | ||
* contributors may be used to endorse or promote products derived | ||
* from this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
|
||
import javax.swing.plaf.*; | ||
import javax.swing.plaf.metal.*; | ||
import javax.swing.*; | ||
import javax.swing.border.*; | ||
import java.awt.*; | ||
|
||
/** | ||
* This class describes a theme using "blue-green" colors. | ||
* | ||
* @author Steve Wilson | ||
*/ | ||
public class AquaTheme extends DefaultMetalTheme { | ||
|
||
public String getName() { return "Aqua"; } | ||
|
||
private final ColorUIResource primary1 = new ColorUIResource(102, 153, 153); | ||
private final ColorUIResource primary2 = new ColorUIResource(128, 192, 192); | ||
private final ColorUIResource primary3 = new ColorUIResource(159, 235, 235); | ||
|
||
protected ColorUIResource getPrimary1() { return primary1; } | ||
protected ColorUIResource getPrimary2() { return primary2; } | ||
protected ColorUIResource getPrimary3() { return primary3; } | ||
|
||
} |
Oops, something went wrong.