Update upstream source from tag 'upstream/1.0.0'
Update to upstream version '1.0.0'
with Debian dir d6bc3f949d3bcbcc1cfc93d3f0a2cf38cfdf3eea
Emmanuel Bourg
5 years ago
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <classpath> | |
2 | <classpathentry kind="src" path="src"/> | |
3 | <classpathentry kind="lib" path="dist/FontChooser.jar"/> | |
4 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | |
5 | <classpathentry kind="output" path="build/classes"/> | |
6 | </classpath> |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <projectDescription> | |
2 | <name>FontChooser</name> | |
3 | <comment></comment> | |
4 | <projects> | |
5 | </projects> | |
6 | <buildSpec> | |
7 | <buildCommand> | |
8 | <name>org.eclipse.jdt.core.javabuilder</name> | |
9 | <arguments> | |
10 | </arguments> | |
11 | </buildCommand> | |
12 | </buildSpec> | |
13 | <natures> | |
14 | <nature>org.eclipse.jdt.core.javanature</nature> | |
15 | </natures> | |
16 | </projectDescription> |
+6
-0
0 | # English | |
1 | action.ok=OK | |
2 | action.cancel=Cancel | |
3 | action.ok.mnemonic=O | |
4 | action.cancel.mnemonic=C | |
5 | window.title=Font⏎ |
+6
-0
0 | # German | |
1 | action.ok=OK | |
2 | action.cancel=Abbrechen | |
3 | action.ok.mnemonic=O | |
4 | action.cancel.mnemonic=A | |
5 | window.title=Schriftart⏎ |
+6
-0
0 | # Greek | |
1 | action.ok=\u0395\u03BD\u03C4\u03AC\u03BE\u03B5\u03B9 | |
2 | action.cancel=\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7 | |
3 | action.ok.mnemonic=\u0395 | |
4 | action.cancel.mnemonic=\u0391 | |
5 | window.title=\u0393\u03C1\u03B1\u03BC\u03BC\u03B1\u03C4\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC |
+6
-0
0 | # Spanish | |
1 | action.ok=Aceptar | |
2 | action.cancel=Cancelar | |
3 | action.ok.mnemonic=T | |
4 | action.cancel.mnemonic=C | |
5 | window.title=Tipo de letra⏎ |
+6
-0
0 | # French | |
1 | action.ok=OK | |
2 | action.cancel=Annuler | |
3 | action.ok.mnemonic=O | |
4 | action.cancel.mnemonic=L | |
5 | window.title=Police⏎ |
+14
-0
0 | # English | |
1 | style.plain=Regular | |
2 | style.bold=Bold | |
3 | style.italic=Italic | |
4 | font.family=Family | |
5 | font.style=Style | |
6 | font.size=Size | |
7 | font.preview=Preview | |
8 | font.family.mnemonic=F | |
9 | font.style.mnemonic=S | |
10 | font.size.mnemonic=Z | |
11 | font.preview.mnemonic=P | |
12 | font.preview.text=Aa Bb Yy Zz | |
13 | style.bolditalic=Bold Italic |
+14
-0
0 | # German | |
1 | style.plain=Normal | |
2 | style.bold=Fett | |
3 | style.italic=Kursiv | |
4 | font.family=Familie | |
5 | font.style=Stil | |
6 | font.size=Gr\u00F6\u00DFe | |
7 | font.preview=Vorschau | |
8 | font.family.mnemonic=F | |
9 | font.style.mnemonic=S | |
10 | font.size.mnemonic=G | |
11 | font.preview.mnemonic=V | |
12 | font.preview.text=Aa Bb Yy Zz | |
13 | style.bolditalic=Fett Kursiv |
+14
-0
0 | # Greek | |
1 | style.plain=\u039A\u03B1\u03BD\u03BF\u03BD\u03B9\u03BA\u03AC | |
2 | style.bold=\u0388\u03BD\u03C4\u03BF\u03BD\u03B1 | |
3 | style.italic=\u03A0\u03BB\u03AC\u03B3\u03B9\u03B1 | |
4 | font.family=\u039F\u03B9\u03BA\u03BF\u03B3\u03AD\u03BD\u03B5\u03B9\u03B1 | |
5 | font.style=\u03A3\u03C4\u03CD\u03BB | |
6 | font.size=\u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 | |
7 | font.preview=\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03C3\u03BA\u03CC\u03C0\u03B7\u03C3\u03B7 | |
8 | font.family.mnemonic=\u039F | |
9 | font.style.mnemonic=\u03A3 | |
10 | font.size.mnemonic=\u039C | |
11 | font.preview.mnemonic=\u03A0 | |
12 | font.preview.text=Aa Bb Yy Zz | |
13 | style.bolditalic=\u0388\u03BD\u03C4\u03BF\u03BD\u03B1 \u03A0\u03BB\u03AC\u03B3\u03B9\u03B1 |
+14
-0
0 | # Spanish | |
1 | style.plain=Regular | |
2 | style.bold=Negrita | |
3 | style.italic=Italica | |
4 | font.family=Familia | |
5 | font.style=Estilo | |
6 | font.size=Tama\u00F1o | |
7 | font.preview=Previsualizaci\u00F3n | |
8 | font.family.mnemonic=F | |
9 | font.style.mnemonic=E | |
10 | font.size.mnemonic=T | |
11 | font.preview.mnemonic=P | |
12 | font.preview.text=Aa Bb Yy Zz | |
13 | style.bolditalic=Negrita Italica |
+14
-0
0 | # French | |
1 | style.plain=Normal | |
2 | style.bold=Gras | |
3 | style.italic=Italique | |
4 | font.family=Famille | |
5 | font.style=Style | |
6 | font.size=Taille | |
7 | font.preview=Aper\u00E7u | |
8 | font.family.mnemonic=F | |
9 | font.style.mnemonic=S | |
10 | font.size.mnemonic=T | |
11 | font.preview.mnemonic=P | |
12 | font.preview.text=Aa Bb Yy Zz | |
13 | style.bolditalic=Gras Italique |
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <!-- You may freely edit this file. See commented blocks below for --> | |
2 | <!-- some examples of how to customize the build. --> | |
3 | <!-- (If you delete it and reopen the project it will be recreated.) --> | |
4 | <!-- By default, only the Clean and Build commands use this build script. --> | |
5 | <!-- Commands such as Run, Debug, and Test only use this build script if --> | |
6 | <!-- the Compile on Save feature is turned off for the project. --> | |
7 | <!-- You can turn off the Compile on Save (or Deploy on Save) setting --> | |
8 | <!-- in the project's Project Properties dialog box.--> | |
9 | <project name="FontChooser" default="default" basedir="."> | |
10 | <description>Builds, tests, and runs the project FontChooser.</description> | |
11 | <import file="nbproject/build-impl.xml"/> | |
12 | <!-- | |
13 | ||
14 | There exist several targets which are by default empty and which can be | |
15 | used for execution of your tasks. These targets are usually executed | |
16 | before and after some main targets. They are: | |
17 | ||
18 | -pre-init: called before initialization of project properties | |
19 | -post-init: called after initialization of project properties | |
20 | -pre-compile: called before javac compilation | |
21 | -post-compile: called after javac compilation | |
22 | -pre-compile-single: called before javac compilation of single file | |
23 | -post-compile-single: called after javac compilation of single file | |
24 | -pre-compile-test: called before javac compilation of JUnit tests | |
25 | -post-compile-test: called after javac compilation of JUnit tests | |
26 | -pre-compile-test-single: called before javac compilation of single JUnit test | |
27 | -post-compile-test-single: called after javac compilation of single JUunit test | |
28 | -pre-jar: called before JAR building | |
29 | -post-jar: called after JAR building | |
30 | -post-clean: called after cleaning build products | |
31 | ||
32 | (Targets beginning with '-' are not intended to be called on their own.) | |
33 | ||
34 | Example of inserting an obfuscator after compilation could look like this: | |
35 | ||
36 | <target name="-post-compile"> | |
37 | <obfuscate> | |
38 | <fileset dir="${build.classes.dir}"/> | |
39 | </obfuscate> | |
40 | </target> | |
41 | ||
42 | For list of available properties check the imported | |
43 | nbproject/build-impl.xml file. | |
44 | ||
45 | ||
46 | Another way to customize the build is by overriding existing main targets. | |
47 | The targets of interest are: | |
48 | ||
49 | -init-macrodef-javac: defines macro for javac compilation | |
50 | -init-macrodef-junit: defines macro for junit execution | |
51 | -init-macrodef-debug: defines macro for class debugging | |
52 | -init-macrodef-java: defines macro for class execution | |
53 | -do-jar-with-manifest: JAR building (if you are using a manifest) | |
54 | -do-jar-without-manifest: JAR building (if you are not using a manifest) | |
55 | run: execution of project | |
56 | -javadoc-build: Javadoc generation | |
57 | test-report: JUnit report generation | |
58 | ||
59 | An example of overriding the target for project execution could look like this: | |
60 | ||
61 | <target name="run" depends="FontChooser-impl.jar"> | |
62 | <exec dir="bin" executable="launcher.exe"> | |
63 | <arg file="${dist.jar}"/> | |
64 | </exec> | |
65 | </target> | |
66 | ||
67 | Notice that the overridden target depends on the jar target and not only on | |
68 | the compile target as the regular run target does. Again, for a list of available | |
69 | properties which you can use, check the target you are overriding in the | |
70 | nbproject/build-impl.xml file. | |
71 | ||
72 | --> | |
73 | </project> |
0 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
1 | <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system"> | |
2 | <nextCatalog catalog="nbproject/private/cache/retriever/catalog.xml"/> | |
3 | </catalog>⏎ |
0 | ======================== | |
1 | BUILD OUTPUT DESCRIPTION | |
2 | ======================== | |
3 | ||
4 | When you build an Java application project that has a main class, the IDE | |
5 | automatically copies all of the JAR | |
6 | files on the projects classpath to your projects dist/lib folder. The IDE | |
7 | also adds each of the JAR files to the Class-Path element in the application | |
8 | JAR files manifest file (MANIFEST.MF). | |
9 | ||
10 | To run the project from the command line, go to the dist folder and | |
11 | type the following: | |
12 | ||
13 | java -jar "FontChooser.jar" | |
14 | ||
15 | To distribute this project, zip up the dist folder (including the lib folder) | |
16 | and distribute the ZIP file. | |
17 | ||
18 | Notes: | |
19 | ||
20 | * If two JAR files on the project classpath have the same name, only the first | |
21 | JAR file is copied to the lib folder. | |
22 | * Only JAR files are copied to the lib folder. | |
23 | If the classpath contains other types of files or folders, none of the | |
24 | classpath elements are copied to the lib folder. In such a case, | |
25 | you need to copy the classpath elements to the lib folder manually after the build. | |
26 | * If a library on the projects classpath also has a Class-Path element | |
27 | specified in the manifest,the content of the Class-Path element has to be on | |
28 | the projects runtime path. | |
29 | * To set a main class in a standard Java project, right-click the project node | |
30 | in the Projects window and choose Properties. Then click Run and enter the | |
31 | class name in the Main Class field. Alternatively, you can manually type the | |
32 | class name in the manifest Main-Class element. |
0 | GNU LESSER GENERAL PUBLIC LICENSE | |
1 | Version 3, 29 June 2007 | |
2 | ||
3 | Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> | |
4 | Everyone is permitted to copy and distribute verbatim copies | |
5 | of this license document, but changing it is not allowed. | |
6 | ||
7 | ||
8 | This version of the GNU Lesser General Public License incorporates | |
9 | the terms and conditions of version 3 of the GNU General Public | |
10 | License, supplemented by the additional permissions listed below. | |
11 | ||
12 | 0. Additional Definitions. | |
13 | ||
14 | As used herein, "this License" refers to version 3 of the GNU Lesser | |
15 | General Public License, and the "GNU GPL" refers to version 3 of the GNU | |
16 | General Public License. | |
17 | ||
18 | "The Library" refers to a covered work governed by this License, | |
19 | other than an Application or a Combined Work as defined below. | |
20 | ||
21 | An "Application" is any work that makes use of an interface provided | |
22 | by the Library, but which is not otherwise based on the Library. | |
23 | Defining a subclass of a class defined by the Library is deemed a mode | |
24 | of using an interface provided by the Library. | |
25 | ||
26 | A "Combined Work" is a work produced by combining or linking an | |
27 | Application with the Library. The particular version of the Library | |
28 | with which the Combined Work was made is also called the "Linked | |
29 | Version". | |
30 | ||
31 | The "Minimal Corresponding Source" for a Combined Work means the | |
32 | Corresponding Source for the Combined Work, excluding any source code | |
33 | for portions of the Combined Work that, considered in isolation, are | |
34 | based on the Application, and not on the Linked Version. | |
35 | ||
36 | The "Corresponding Application Code" for a Combined Work means the | |
37 | object code and/or source code for the Application, including any data | |
38 | and utility programs needed for reproducing the Combined Work from the | |
39 | Application, but excluding the System Libraries of the Combined Work. | |
40 | ||
41 | 1. Exception to Section 3 of the GNU GPL. | |
42 | ||
43 | You may convey a covered work under sections 3 and 4 of this License | |
44 | without being bound by section 3 of the GNU GPL. | |
45 | ||
46 | 2. Conveying Modified Versions. | |
47 | ||
48 | If you modify a copy of the Library, and, in your modifications, a | |
49 | facility refers to a function or data to be supplied by an Application | |
50 | that uses the facility (other than as an argument passed when the | |
51 | facility is invoked), then you may convey a copy of the modified | |
52 | version: | |
53 | ||
54 | a) under this License, provided that you make a good faith effort to | |
55 | ensure that, in the event an Application does not supply the | |
56 | function or data, the facility still operates, and performs | |
57 | whatever part of its purpose remains meaningful, or | |
58 | ||
59 | b) under the GNU GPL, with none of the additional permissions of | |
60 | this License applicable to that copy. | |
61 | ||
62 | 3. Object Code Incorporating Material from Library Header Files. | |
63 | ||
64 | The object code form of an Application may incorporate material from | |
65 | a header file that is part of the Library. You may convey such object | |
66 | code under terms of your choice, provided that, if the incorporated | |
67 | material is not limited to numerical parameters, data structure | |
68 | layouts and accessors, or small macros, inline functions and templates | |
69 | (ten or fewer lines in length), you do both of the following: | |
70 | ||
71 | a) Give prominent notice with each copy of the object code that the | |
72 | Library is used in it and that the Library and its use are | |
73 | covered by this License. | |
74 | ||
75 | b) Accompany the object code with a copy of the GNU GPL and this license | |
76 | document. | |
77 | ||
78 | 4. Combined Works. | |
79 | ||
80 | You may convey a Combined Work under terms of your choice that, | |
81 | taken together, effectively do not restrict modification of the | |
82 | portions of the Library contained in the Combined Work and reverse | |
83 | engineering for debugging such modifications, if you also do each of | |
84 | the following: | |
85 | ||
86 | a) Give prominent notice with each copy of the Combined Work that | |
87 | the Library is used in it and that the Library and its use are | |
88 | covered by this License. | |
89 | ||
90 | b) Accompany the Combined Work with a copy of the GNU GPL and this license | |
91 | document. | |
92 | ||
93 | c) For a Combined Work that displays copyright notices during | |
94 | execution, include the copyright notice for the Library among | |
95 | these notices, as well as a reference directing the user to the | |
96 | copies of the GNU GPL and this license document. | |
97 | ||
98 | d) Do one of the following: | |
99 | ||
100 | 0) Convey the Minimal Corresponding Source under the terms of this | |
101 | License, and the Corresponding Application Code in a form | |
102 | suitable for, and under terms that permit, the user to | |
103 | recombine or relink the Application with a modified version of | |
104 | the Linked Version to produce a modified Combined Work, in the | |
105 | manner specified by section 6 of the GNU GPL for conveying | |
106 | Corresponding Source. | |
107 | ||
108 | 1) Use a suitable shared library mechanism for linking with the | |
109 | Library. A suitable mechanism is one that (a) uses at run time | |
110 | a copy of the Library already present on the user's computer | |
111 | system, and (b) will operate properly with a modified version | |
112 | of the Library that is interface-compatible with the Linked | |
113 | Version. | |
114 | ||
115 | e) Provide Installation Information, but only if you would otherwise | |
116 | be required to provide such information under section 6 of the | |
117 | GNU GPL, and only to the extent that such information is | |
118 | necessary to install and execute a modified version of the | |
119 | Combined Work produced by recombining or relinking the | |
120 | Application with a modified version of the Linked Version. (If | |
121 | you use option 4d0, the Installation Information must accompany | |
122 | the Minimal Corresponding Source and Corresponding Application | |
123 | Code. If you use option 4d1, you must provide the Installation | |
124 | Information in the manner specified by section 6 of the GNU GPL | |
125 | for conveying Corresponding Source.) | |
126 | ||
127 | 5. Combined Libraries. | |
128 | ||
129 | You may place library facilities that are a work based on the | |
130 | Library side by side in a single library together with other library | |
131 | facilities that are not Applications and are not covered by this | |
132 | License, and convey such a combined library under terms of your | |
133 | choice, if you do both of the following: | |
134 | ||
135 | a) Accompany the combined library with a copy of the same work based | |
136 | on the Library, uncombined with any other library facilities, | |
137 | conveyed under the terms of this License. | |
138 | ||
139 | b) Give prominent notice with the combined library that part of it | |
140 | is a work based on the Library, and explaining where to find the | |
141 | accompanying uncombined form of the same work. | |
142 | ||
143 | 6. Revised Versions of the GNU Lesser General Public License. | |
144 | ||
145 | The Free Software Foundation may publish revised and/or new versions | |
146 | of the GNU Lesser General Public License from time to time. Such new | |
147 | versions will be similar in spirit to the present version, but may | |
148 | differ in detail to address new problems or concerns. | |
149 | ||
150 | Each version is given a distinguishing version number. If the | |
151 | Library as you received it specifies that a certain numbered version | |
152 | of the GNU Lesser General Public License "or any later version" | |
153 | applies to it, you have the option of following the terms and | |
154 | conditions either of that published version or of any later version | |
155 | published by the Free Software Foundation. If the Library as you | |
156 | received it does not specify a version number of the GNU Lesser | |
157 | General Public License, you may choose any version of the GNU Lesser | |
158 | General Public License ever published by the Free Software Foundation. | |
159 | ||
160 | If the Library as you received it specifies that a proxy can decide | |
161 | whether future versions of the GNU Lesser General Public License shall | |
162 | apply, that proxy's public statement of acceptance of any version is | |
163 | permanent authorization for you to choose that version for the | |
164 | Library. |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <!-- | |
2 | *** GENERATED FROM project.xml - DO NOT EDIT *** | |
3 | *** EDIT ../build.xml INSTEAD *** | |
4 | ||
5 | For the purpose of easier reading the script | |
6 | is divided into following sections: | |
7 | ||
8 | - initialization | |
9 | - compilation | |
10 | - jar | |
11 | - execution | |
12 | - debugging | |
13 | - javadoc | |
14 | - junit compilation | |
15 | - junit execution | |
16 | - junit debugging | |
17 | - applet | |
18 | - cleanup | |
19 | ||
20 | --> | |
21 | <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="FontChooser-impl"> | |
22 | <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> | |
23 | <!-- | |
24 | ====================== | |
25 | INITIALIZATION SECTION | |
26 | ====================== | |
27 | --> | |
28 | <target name="-pre-init"> | |
29 | <!-- Empty placeholder for easier customization. --> | |
30 | <!-- You can override this target in the ../build.xml file. --> | |
31 | </target> | |
32 | <target depends="-pre-init" name="-init-private"> | |
33 | <property file="nbproject/private/config.properties"/> | |
34 | <property file="nbproject/private/configs/${config}.properties"/> | |
35 | <property file="nbproject/private/private.properties"/> | |
36 | </target> | |
37 | <target depends="-pre-init,-init-private" name="-init-user"> | |
38 | <property file="${user.properties.file}"/> | |
39 | <!-- The two properties below are usually overridden --> | |
40 | <!-- by the active platform. Just a fallback. --> | |
41 | <property name="default.javac.source" value="1.4"/> | |
42 | <property name="default.javac.target" value="1.4"/> | |
43 | </target> | |
44 | <target depends="-pre-init,-init-private,-init-user" name="-init-project"> | |
45 | <property file="nbproject/configs/${config}.properties"/> | |
46 | <property file="nbproject/project.properties"/> | |
47 | </target> | |
48 | <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> | |
49 | <available file="${manifest.file}" property="manifest.available"/> | |
50 | <condition property="manifest.available+main.class"> | |
51 | <and> | |
52 | <isset property="manifest.available"/> | |
53 | <isset property="main.class"/> | |
54 | <not> | |
55 | <equals arg1="${main.class}" arg2="" trim="true"/> | |
56 | </not> | |
57 | </and> | |
58 | </condition> | |
59 | <condition property="manifest.available+main.class+mkdist.available"> | |
60 | <and> | |
61 | <istrue value="${manifest.available+main.class}"/> | |
62 | <isset property="libs.CopyLibs.classpath"/> | |
63 | </and> | |
64 | </condition> | |
65 | <condition property="have.tests"> | |
66 | <or> | |
67 | <available file="${test.src.dir}"/> | |
68 | </or> | |
69 | </condition> | |
70 | <condition property="have.sources"> | |
71 | <or> | |
72 | <available file="${src.dir}"/> | |
73 | </or> | |
74 | </condition> | |
75 | <condition property="netbeans.home+have.tests"> | |
76 | <and> | |
77 | <isset property="netbeans.home"/> | |
78 | <isset property="have.tests"/> | |
79 | </and> | |
80 | </condition> | |
81 | <condition property="no.javadoc.preview"> | |
82 | <and> | |
83 | <isset property="javadoc.preview"/> | |
84 | <isfalse value="${javadoc.preview}"/> | |
85 | </and> | |
86 | </condition> | |
87 | <property name="run.jvmargs" value=""/> | |
88 | <property name="javac.compilerargs" value=""/> | |
89 | <property name="work.dir" value="${basedir}"/> | |
90 | <condition property="no.deps"> | |
91 | <and> | |
92 | <istrue value="${no.dependencies}"/> | |
93 | </and> | |
94 | </condition> | |
95 | <property name="javac.debug" value="true"/> | |
96 | <property name="javadoc.preview" value="true"/> | |
97 | <property name="application.args" value=""/> | |
98 | <property name="source.encoding" value="${file.encoding}"/> | |
99 | <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> | |
100 | <and> | |
101 | <isset property="javadoc.encoding"/> | |
102 | <not> | |
103 | <equals arg1="${javadoc.encoding}" arg2=""/> | |
104 | </not> | |
105 | </and> | |
106 | </condition> | |
107 | <property name="javadoc.encoding.used" value="${source.encoding}"/> | |
108 | <property name="includes" value="**"/> | |
109 | <property name="excludes" value=""/> | |
110 | <property name="do.depend" value="false"/> | |
111 | <condition property="do.depend.true"> | |
112 | <istrue value="${do.depend}"/> | |
113 | </condition> | |
114 | <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'"> | |
115 | <and> | |
116 | <isset property="jaxws.endorsed.dir"/> | |
117 | <available file="nbproject/jaxws-build.xml"/> | |
118 | </and> | |
119 | </condition> | |
120 | </target> | |
121 | <target name="-post-init"> | |
122 | <!-- Empty placeholder for easier customization. --> | |
123 | <!-- You can override this target in the ../build.xml file. --> | |
124 | </target> | |
125 | <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> | |
126 | <fail unless="src.dir">Must set src.dir</fail> | |
127 | <fail unless="test.src.dir">Must set test.src.dir</fail> | |
128 | <fail unless="build.dir">Must set build.dir</fail> | |
129 | <fail unless="dist.dir">Must set dist.dir</fail> | |
130 | <fail unless="build.classes.dir">Must set build.classes.dir</fail> | |
131 | <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> | |
132 | <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> | |
133 | <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> | |
134 | <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> | |
135 | <fail unless="dist.jar">Must set dist.jar</fail> | |
136 | </target> | |
137 | <target name="-init-macrodef-property"> | |
138 | <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> | |
139 | <attribute name="name"/> | |
140 | <attribute name="value"/> | |
141 | <sequential> | |
142 | <property name="@{name}" value="${@{value}}"/> | |
143 | </sequential> | |
144 | </macrodef> | |
145 | </target> | |
146 | <target name="-init-macrodef-javac"> | |
147 | <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> | |
148 | <attribute default="${src.dir}" name="srcdir"/> | |
149 | <attribute default="${build.classes.dir}" name="destdir"/> | |
150 | <attribute default="${javac.classpath}" name="classpath"/> | |
151 | <attribute default="${includes}" name="includes"/> | |
152 | <attribute default="${excludes}" name="excludes"/> | |
153 | <attribute default="${javac.debug}" name="debug"/> | |
154 | <attribute default="/does/not/exist" name="sourcepath"/> | |
155 | <element name="customize" optional="true"/> | |
156 | <sequential> | |
157 | <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}"> | |
158 | <classpath> | |
159 | <path path="@{classpath}"/> | |
160 | </classpath> | |
161 | <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/> | |
162 | <customize/> | |
163 | </javac> | |
164 | </sequential> | |
165 | </macrodef> | |
166 | <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> | |
167 | <attribute default="${src.dir}" name="srcdir"/> | |
168 | <attribute default="${build.classes.dir}" name="destdir"/> | |
169 | <attribute default="${javac.classpath}" name="classpath"/> | |
170 | <sequential> | |
171 | <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> | |
172 | <classpath> | |
173 | <path path="@{classpath}"/> | |
174 | </classpath> | |
175 | </depend> | |
176 | </sequential> | |
177 | </macrodef> | |
178 | <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> | |
179 | <attribute default="${build.classes.dir}" name="destdir"/> | |
180 | <sequential> | |
181 | <fail unless="javac.includes">Must set javac.includes</fail> | |
182 | <pathconvert pathsep="," property="javac.includes.binary"> | |
183 | <path> | |
184 | <filelist dir="@{destdir}" files="${javac.includes}"/> | |
185 | </path> | |
186 | <globmapper from="*.java" to="*.class"/> | |
187 | </pathconvert> | |
188 | <delete> | |
189 | <files includes="${javac.includes.binary}"/> | |
190 | </delete> | |
191 | </sequential> | |
192 | </macrodef> | |
193 | </target> | |
194 | <target name="-init-macrodef-junit"> | |
195 | <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> | |
196 | <attribute default="${includes}" name="includes"/> | |
197 | <attribute default="${excludes}" name="excludes"/> | |
198 | <attribute default="**" name="testincludes"/> | |
199 | <sequential> | |
200 | <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true"> | |
201 | <batchtest todir="${build.test.results.dir}"> | |
202 | <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> | |
203 | <filename name="@{testincludes}"/> | |
204 | </fileset> | |
205 | </batchtest> | |
206 | <classpath> | |
207 | <path path="${run.test.classpath}"/> | |
208 | </classpath> | |
209 | <syspropertyset> | |
210 | <propertyref prefix="test-sys-prop."/> | |
211 | <mapper from="test-sys-prop.*" to="*" type="glob"/> | |
212 | </syspropertyset> | |
213 | <formatter type="brief" usefile="false"/> | |
214 | <formatter type="xml"/> | |
215 | <jvmarg line="${run.jvmargs}"/> | |
216 | </junit> | |
217 | </sequential> | |
218 | </macrodef> | |
219 | </target> | |
220 | <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> | |
221 | <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> | |
222 | <attribute default="${main.class}" name="name"/> | |
223 | <attribute default="${debug.classpath}" name="classpath"/> | |
224 | <attribute default="" name="stopclassname"/> | |
225 | <sequential> | |
226 | <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> | |
227 | <classpath> | |
228 | <path path="@{classpath}"/> | |
229 | </classpath> | |
230 | </nbjpdastart> | |
231 | </sequential> | |
232 | </macrodef> | |
233 | <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> | |
234 | <attribute default="${build.classes.dir}" name="dir"/> | |
235 | <sequential> | |
236 | <nbjpdareload> | |
237 | <fileset dir="@{dir}" includes="${fix.classes}"> | |
238 | <include name="${fix.includes}*.class"/> | |
239 | </fileset> | |
240 | </nbjpdareload> | |
241 | </sequential> | |
242 | </macrodef> | |
243 | </target> | |
244 | <target name="-init-debug-args"> | |
245 | <property name="version-output" value="java version "${ant.java.version}"/> | |
246 | <condition property="have-jdk-older-than-1.4"> | |
247 | <or> | |
248 | <contains string="${version-output}" substring="java version "1.0"/> | |
249 | <contains string="${version-output}" substring="java version "1.1"/> | |
250 | <contains string="${version-output}" substring="java version "1.2"/> | |
251 | <contains string="${version-output}" substring="java version "1.3"/> | |
252 | </or> | |
253 | </condition> | |
254 | <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> | |
255 | <istrue value="${have-jdk-older-than-1.4}"/> | |
256 | </condition> | |
257 | <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> | |
258 | <os family="windows"/> | |
259 | </condition> | |
260 | <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> | |
261 | <isset property="debug.transport"/> | |
262 | </condition> | |
263 | </target> | |
264 | <target depends="-init-debug-args" name="-init-macrodef-debug"> | |
265 | <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> | |
266 | <attribute default="${main.class}" name="classname"/> | |
267 | <attribute default="${debug.classpath}" name="classpath"/> | |
268 | <element name="customize" optional="true"/> | |
269 | <sequential> | |
270 | <java classname="@{classname}" dir="${work.dir}" fork="true"> | |
271 | <jvmarg line="${debug-args-line}"/> | |
272 | <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> | |
273 | <jvmarg line="${run.jvmargs}"/> | |
274 | <classpath> | |
275 | <path path="@{classpath}"/> | |
276 | </classpath> | |
277 | <syspropertyset> | |
278 | <propertyref prefix="run-sys-prop."/> | |
279 | <mapper from="run-sys-prop.*" to="*" type="glob"/> | |
280 | </syspropertyset> | |
281 | <customize/> | |
282 | </java> | |
283 | </sequential> | |
284 | </macrodef> | |
285 | </target> | |
286 | <target name="-init-macrodef-java"> | |
287 | <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> | |
288 | <attribute default="${main.class}" name="classname"/> | |
289 | <element name="customize" optional="true"/> | |
290 | <sequential> | |
291 | <java classname="@{classname}" dir="${work.dir}" fork="true"> | |
292 | <jvmarg line="${run.jvmargs}"/> | |
293 | <classpath> | |
294 | <path path="${run.classpath}"/> | |
295 | </classpath> | |
296 | <syspropertyset> | |
297 | <propertyref prefix="run-sys-prop."/> | |
298 | <mapper from="run-sys-prop.*" to="*" type="glob"/> | |
299 | </syspropertyset> | |
300 | <customize/> | |
301 | </java> | |
302 | </sequential> | |
303 | </macrodef> | |
304 | </target> | |
305 | <target name="-init-presetdef-jar"> | |
306 | <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> | |
307 | <jar compress="${jar.compress}" jarfile="${dist.jar}"> | |
308 | <j2seproject1:fileset dir="${build.classes.dir}"/> | |
309 | </jar> | |
310 | </presetdef> | |
311 | </target> | |
312 | <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/> | |
313 | <!-- | |
314 | =================== | |
315 | COMPILATION SECTION | |
316 | =================== | |
317 | --> | |
318 | <target depends="init" name="deps-jar" unless="no.deps"/> | |
319 | <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> | |
320 | <target depends="init" name="-check-automatic-build"> | |
321 | <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> | |
322 | </target> | |
323 | <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> | |
324 | <antcall target="clean"/> | |
325 | </target> | |
326 | <target depends="init,deps-jar" name="-pre-pre-compile"> | |
327 | <mkdir dir="${build.classes.dir}"/> | |
328 | </target> | |
329 | <target name="-pre-compile"> | |
330 | <!-- Empty placeholder for easier customization. --> | |
331 | <!-- You can override this target in the ../build.xml file. --> | |
332 | </target> | |
333 | <target if="do.depend.true" name="-compile-depend"> | |
334 | <j2seproject3:depend/> | |
335 | </target> | |
336 | <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile"> | |
337 | <j2seproject3:javac/> | |
338 | <copy todir="${build.classes.dir}"> | |
339 | <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> | |
340 | </copy> | |
341 | </target> | |
342 | <target name="-post-compile"> | |
343 | <!-- Empty placeholder for easier customization. --> | |
344 | <!-- You can override this target in the ../build.xml file. --> | |
345 | </target> | |
346 | <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> | |
347 | <target name="-pre-compile-single"> | |
348 | <!-- Empty placeholder for easier customization. --> | |
349 | <!-- You can override this target in the ../build.xml file. --> | |
350 | </target> | |
351 | <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> | |
352 | <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> | |
353 | <j2seproject3:force-recompile/> | |
354 | <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/> | |
355 | </target> | |
356 | <target name="-post-compile-single"> | |
357 | <!-- Empty placeholder for easier customization. --> | |
358 | <!-- You can override this target in the ../build.xml file. --> | |
359 | </target> | |
360 | <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> | |
361 | <!-- | |
362 | ==================== | |
363 | JAR BUILDING SECTION | |
364 | ==================== | |
365 | --> | |
366 | <target depends="init" name="-pre-pre-jar"> | |
367 | <dirname file="${dist.jar}" property="dist.jar.dir"/> | |
368 | <mkdir dir="${dist.jar.dir}"/> | |
369 | </target> | |
370 | <target name="-pre-jar"> | |
371 | <!-- Empty placeholder for easier customization. --> | |
372 | <!-- You can override this target in the ../build.xml file. --> | |
373 | </target> | |
374 | <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available"> | |
375 | <j2seproject1:jar/> | |
376 | </target> | |
377 | <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class"> | |
378 | <j2seproject1:jar manifest="${manifest.file}"/> | |
379 | </target> | |
380 | <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available"> | |
381 | <j2seproject1:jar manifest="${manifest.file}"> | |
382 | <j2seproject1:manifest> | |
383 | <j2seproject1:attribute name="Main-Class" value="${main.class}"/> | |
384 | </j2seproject1:manifest> | |
385 | </j2seproject1:jar> | |
386 | <echo>To run this application from the command line without Ant, try:</echo> | |
387 | <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> | |
388 | <property location="${dist.jar}" name="dist.jar.resolved"/> | |
389 | <pathconvert property="run.classpath.with.dist.jar"> | |
390 | <path path="${run.classpath}"/> | |
391 | <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> | |
392 | </pathconvert> | |
393 | <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> | |
394 | </target> | |
395 | <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries"> | |
396 | <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> | |
397 | <pathconvert property="run.classpath.without.build.classes.dir"> | |
398 | <path path="${run.classpath}"/> | |
399 | <map from="${build.classes.dir.resolved}" to=""/> | |
400 | </pathconvert> | |
401 | <pathconvert pathsep=" " property="jar.classpath"> | |
402 | <path path="${run.classpath.without.build.classes.dir}"/> | |
403 | <chainedmapper> | |
404 | <flattenmapper/> | |
405 | <globmapper from="*" to="lib/*"/> | |
406 | </chainedmapper> | |
407 | </pathconvert> | |
408 | <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> | |
409 | <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> | |
410 | <fileset dir="${build.classes.dir}"/> | |
411 | <manifest> | |
412 | <attribute name="Main-Class" value="${main.class}"/> | |
413 | <attribute name="Class-Path" value="${jar.classpath}"/> | |
414 | </manifest> | |
415 | </copylibs> | |
416 | <echo>To run this application from the command line without Ant, try:</echo> | |
417 | <property location="${dist.jar}" name="dist.jar.resolved"/> | |
418 | <echo>java -jar "${dist.jar.resolved}"</echo> | |
419 | </target> | |
420 | <target name="-post-jar"> | |
421 | <!-- Empty placeholder for easier customization. --> | |
422 | <!-- You can override this target in the ../build.xml file. --> | |
423 | </target> | |
424 | <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/> | |
425 | <!-- | |
426 | ================= | |
427 | EXECUTION SECTION | |
428 | ================= | |
429 | --> | |
430 | <target depends="init,compile" description="Run a main class." name="run"> | |
431 | <j2seproject1:java> | |
432 | <customize> | |
433 | <arg line="${application.args}"/> | |
434 | </customize> | |
435 | </j2seproject1:java> | |
436 | </target> | |
437 | <target name="-do-not-recompile"> | |
438 | <property name="javac.includes.binary" value=""/> | |
439 | </target> | |
440 | <target depends="init,-do-not-recompile,compile-single" name="run-single"> | |
441 | <fail unless="run.class">Must select one file in the IDE or set run.class</fail> | |
442 | <j2seproject1:java classname="${run.class}"/> | |
443 | </target> | |
444 | <!-- | |
445 | ================= | |
446 | DEBUGGING SECTION | |
447 | ================= | |
448 | --> | |
449 | <target depends="init" if="netbeans.home" name="-debug-start-debugger"> | |
450 | <j2seproject1:nbjpdastart name="${debug.class}"/> | |
451 | </target> | |
452 | <target depends="init,compile" name="-debug-start-debuggee"> | |
453 | <j2seproject3:debug> | |
454 | <customize> | |
455 | <arg line="${application.args}"/> | |
456 | </customize> | |
457 | </j2seproject3:debug> | |
458 | </target> | |
459 | <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> | |
460 | <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> | |
461 | <j2seproject1:nbjpdastart stopclassname="${main.class}"/> | |
462 | </target> | |
463 | <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> | |
464 | <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> | |
465 | <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> | |
466 | <j2seproject3:debug classname="${debug.class}"/> | |
467 | </target> | |
468 | <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> | |
469 | <target depends="init" name="-pre-debug-fix"> | |
470 | <fail unless="fix.includes">Must set fix.includes</fail> | |
471 | <property name="javac.includes" value="${fix.includes}.java"/> | |
472 | </target> | |
473 | <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> | |
474 | <j2seproject1:nbjpdareload/> | |
475 | </target> | |
476 | <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> | |
477 | <!-- | |
478 | =============== | |
479 | JAVADOC SECTION | |
480 | =============== | |
481 | --> | |
482 | <target depends="init" name="-javadoc-build"> | |
483 | <mkdir dir="${dist.javadoc.dir}"/> | |
484 | <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> | |
485 | <classpath> | |
486 | <path path="${javac.classpath}"/> | |
487 | </classpath> | |
488 | <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> | |
489 | <filename name="**/*.java"/> | |
490 | </fileset> | |
491 | </javadoc> | |
492 | </target> | |
493 | <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> | |
494 | <nbbrowse file="${dist.javadoc.dir}/index.html"/> | |
495 | </target> | |
496 | <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> | |
497 | <!-- | |
498 | ========================= | |
499 | JUNIT COMPILATION SECTION | |
500 | ========================= | |
501 | --> | |
502 | <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> | |
503 | <mkdir dir="${build.test.classes.dir}"/> | |
504 | </target> | |
505 | <target name="-pre-compile-test"> | |
506 | <!-- Empty placeholder for easier customization. --> | |
507 | <!-- You can override this target in the ../build.xml file. --> | |
508 | </target> | |
509 | <target if="do.depend.true" name="-compile-test-depend"> | |
510 | <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> | |
511 | </target> | |
512 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> | |
513 | <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> | |
514 | <copy todir="${build.test.classes.dir}"> | |
515 | <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> | |
516 | </copy> | |
517 | </target> | |
518 | <target name="-post-compile-test"> | |
519 | <!-- Empty placeholder for easier customization. --> | |
520 | <!-- You can override this target in the ../build.xml file. --> | |
521 | </target> | |
522 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> | |
523 | <target name="-pre-compile-test-single"> | |
524 | <!-- Empty placeholder for easier customization. --> | |
525 | <!-- You can override this target in the ../build.xml file. --> | |
526 | </target> | |
527 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> | |
528 | <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> | |
529 | <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> | |
530 | <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> | |
531 | <copy todir="${build.test.classes.dir}"> | |
532 | <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> | |
533 | </copy> | |
534 | </target> | |
535 | <target name="-post-compile-test-single"> | |
536 | <!-- Empty placeholder for easier customization. --> | |
537 | <!-- You can override this target in the ../build.xml file. --> | |
538 | </target> | |
539 | <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> | |
540 | <!-- | |
541 | ======================= | |
542 | JUNIT EXECUTION SECTION | |
543 | ======================= | |
544 | --> | |
545 | <target depends="init" if="have.tests" name="-pre-test-run"> | |
546 | <mkdir dir="${build.test.results.dir}"/> | |
547 | </target> | |
548 | <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> | |
549 | <j2seproject3:junit testincludes="**/*Test.java"/> | |
550 | </target> | |
551 | <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> | |
552 | <fail if="tests.failed">Some tests failed; see details above.</fail> | |
553 | </target> | |
554 | <target depends="init" if="have.tests" name="test-report"/> | |
555 | <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> | |
556 | <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> | |
557 | <target depends="init" if="have.tests" name="-pre-test-run-single"> | |
558 | <mkdir dir="${build.test.results.dir}"/> | |
559 | </target> | |
560 | <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> | |
561 | <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> | |
562 | <j2seproject3:junit excludes="" includes="${test.includes}"/> | |
563 | </target> | |
564 | <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> | |
565 | <fail if="tests.failed">Some tests failed; see details above.</fail> | |
566 | </target> | |
567 | <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> | |
568 | <!-- | |
569 | ======================= | |
570 | JUNIT DEBUGGING SECTION | |
571 | ======================= | |
572 | --> | |
573 | <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> | |
574 | <fail unless="test.class">Must select one file in the IDE or set test.class</fail> | |
575 | <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/> | |
576 | <delete file="${test.report.file}"/> | |
577 | <mkdir dir="${build.test.results.dir}"/> | |
578 | <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}"> | |
579 | <customize> | |
580 | <syspropertyset> | |
581 | <propertyref prefix="test-sys-prop."/> | |
582 | <mapper from="test-sys-prop.*" to="*" type="glob"/> | |
583 | </syspropertyset> | |
584 | <arg value="${test.class}"/> | |
585 | <arg value="showoutput=true"/> | |
586 | <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/> | |
587 | <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/> | |
588 | </customize> | |
589 | </j2seproject3:debug> | |
590 | </target> | |
591 | <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> | |
592 | <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> | |
593 | </target> | |
594 | <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> | |
595 | <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> | |
596 | <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> | |
597 | </target> | |
598 | <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> | |
599 | <!-- | |
600 | ========================= | |
601 | APPLET EXECUTION SECTION | |
602 | ========================= | |
603 | --> | |
604 | <target depends="init,compile-single" name="run-applet"> | |
605 | <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> | |
606 | <j2seproject1:java classname="sun.applet.AppletViewer"> | |
607 | <customize> | |
608 | <arg value="${applet.url}"/> | |
609 | </customize> | |
610 | </j2seproject1:java> | |
611 | </target> | |
612 | <!-- | |
613 | ========================= | |
614 | APPLET DEBUGGING SECTION | |
615 | ========================= | |
616 | --> | |
617 | <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> | |
618 | <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> | |
619 | <j2seproject3:debug classname="sun.applet.AppletViewer"> | |
620 | <customize> | |
621 | <arg value="${applet.url}"/> | |
622 | </customize> | |
623 | </j2seproject3:debug> | |
624 | </target> | |
625 | <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> | |
626 | <!-- | |
627 | =============== | |
628 | CLEANUP SECTION | |
629 | =============== | |
630 | --> | |
631 | <target depends="init" name="deps-clean" unless="no.deps"/> | |
632 | <target depends="init" name="-do-clean"> | |
633 | <delete dir="${build.dir}"/> | |
634 | <delete dir="${dist.dir}"/> | |
635 | </target> | |
636 | <target name="-post-clean"> | |
637 | <!-- Empty placeholder for easier customization. --> | |
638 | <!-- You can override this target in the ../build.xml file. --> | |
639 | </target> | |
640 | <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> | |
641 | </project> |
0 | build.xml.data.CRC32=e72e33dc | |
1 | build.xml.script.CRC32=a2473fce | |
2 | build.xml.stylesheet.CRC32=958a1d3e | |
3 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. | |
4 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. | |
5 | nbproject/build-impl.xml.data.CRC32=e72e33dc | |
6 | nbproject/build-impl.xml.script.CRC32=743dfa87 | |
7 | nbproject/build-impl.xml.stylesheet.CRC32=65b8de21 |
0 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
1 | <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system"> | |
2 | <system systemId="http://pear.php.net/dtd/tasks-1.0.xsd" uri="pear.php.net/dtd/tasks-1.0.xsd"/> | |
3 | <system systemId="http://pear.php.net/dtd/package-2.0.xsd" uri="pear.php.net/dtd/package-2.0.xsd"/> | |
4 | </catalog>⏎ |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Gregory Beaver (The Chiara String Quartet) --> | |
2 | <!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Greg Beaver (The Chiara String Quartet) --> | |
3 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" targetNamespace="http://pear.php.net/dtd/package-2.0" elementFormDefault="qualified" attributeFormDefault="unqualified" xml:lang="EN"> | |
4 | <xs:element name="package"> | |
5 | <xs:complexType> | |
6 | <xs:sequence> | |
7 | <xs:element ref="name"/> | |
8 | <xs:choice> | |
9 | <xs:element ref="channel"/> | |
10 | <xs:element ref="uri"/> | |
11 | </xs:choice> | |
12 | <xs:element ref="extends" minOccurs="0"/> | |
13 | <xs:element ref="summary"/> | |
14 | <xs:element ref="description"/> | |
15 | <xs:element ref="lead" maxOccurs="unbounded"/> | |
16 | <xs:element ref="developer" minOccurs="0" maxOccurs="unbounded"/> | |
17 | <xs:element ref="contributor" minOccurs="0" maxOccurs="unbounded"/> | |
18 | <xs:element ref="helper" minOccurs="0" maxOccurs="unbounded"/> | |
19 | <xs:element ref="date"/> | |
20 | <xs:element ref="time" minOccurs="0"/> | |
21 | <xs:element ref="version"/> | |
22 | <xs:element ref="stability"/> | |
23 | <xs:element ref="license"/> | |
24 | <xs:element ref="notes"/> | |
25 | <xs:element ref="contents"/> | |
26 | <xs:element ref="compatible" minOccurs="0" maxOccurs="unbounded"/> | |
27 | <xs:element ref="dependencies"/> | |
28 | <xs:element ref="providesextension" minOccurs="0" maxOccurs="unbounded"/> | |
29 | <xs:element ref="usesrole" minOccurs="0" maxOccurs="unbounded"/> | |
30 | <xs:element ref="usestask" minOccurs="0" maxOccurs="unbounded"/> | |
31 | <xs:choice minOccurs="0"> | |
32 | <xs:element ref="srcpackage"/> | |
33 | <xs:element name="srcuri" type="xs:anyURI"> | |
34 | <xs:annotation> | |
35 | <xs:documentation>uri of the package that contains the source of this extension</xs:documentation> | |
36 | </xs:annotation> | |
37 | </xs:element> | |
38 | </xs:choice> | |
39 | <xs:choice> | |
40 | <xs:element ref="phprelease" maxOccurs="unbounded"/> | |
41 | <xs:element ref="extsrcrelease" maxOccurs="unbounded"/> | |
42 | <xs:element ref="extbinrelease" maxOccurs="unbounded"/> | |
43 | <xs:element ref="bundle"/> | |
44 | </xs:choice> | |
45 | <xs:element ref="changelog" minOccurs="0"/> | |
46 | </xs:sequence> | |
47 | <xs:attribute name="version" type="xs:string" fixed="2.0"/> | |
48 | <xs:attribute name="packagerversion" type="version"/> | |
49 | </xs:complexType> | |
50 | </xs:element> | |
51 | <xs:element name="name" type="xs:string"> | |
52 | <xs:annotation> | |
53 | <xs:documentation>this is ignored if the release type is bundle</xs:documentation> | |
54 | </xs:annotation> | |
55 | </xs:element> | |
56 | <xs:element name="summary" type="xs:string"/> | |
57 | <xs:element name="description" type="xs:string"/> | |
58 | <xs:element name="lead"> | |
59 | <xs:complexType> | |
60 | <xs:sequence> | |
61 | <xs:element ref="name"/> | |
62 | <xs:element ref="user"/> | |
63 | <xs:element ref="email"/> | |
64 | <xs:element ref="active"/> | |
65 | </xs:sequence> | |
66 | </xs:complexType> | |
67 | </xs:element> | |
68 | <xs:element name="developer"> | |
69 | <xs:complexType> | |
70 | <xs:sequence> | |
71 | <xs:element ref="name"/> | |
72 | <xs:element ref="user"/> | |
73 | <xs:element ref="email"/> | |
74 | <xs:element ref="active"/> | |
75 | </xs:sequence> | |
76 | </xs:complexType> | |
77 | </xs:element> | |
78 | <xs:element name="contributor"> | |
79 | <xs:complexType> | |
80 | <xs:sequence> | |
81 | <xs:element ref="name"/> | |
82 | <xs:element ref="user"/> | |
83 | <xs:element ref="email"/> | |
84 | <xs:element ref="active"/> | |
85 | </xs:sequence> | |
86 | </xs:complexType> | |
87 | </xs:element> | |
88 | <xs:element name="helper"> | |
89 | <xs:complexType> | |
90 | <xs:sequence> | |
91 | <xs:element ref="name"/> | |
92 | <xs:element ref="user"/> | |
93 | <xs:element ref="email"/> | |
94 | <xs:element ref="active"/> | |
95 | </xs:sequence> | |
96 | </xs:complexType> | |
97 | </xs:element> | |
98 | <xs:element name="date" type="xs:date"/> | |
99 | <xs:element name="version"> | |
100 | <xs:complexType> | |
101 | <xs:sequence> | |
102 | <xs:element name="release" type="version"/> | |
103 | <xs:element name="api" type="version"/> | |
104 | </xs:sequence> | |
105 | </xs:complexType> | |
106 | </xs:element> | |
107 | <xs:element name="license"> | |
108 | <xs:complexType> | |
109 | <xs:simpleContent> | |
110 | <xs:extension base="xs:string"> | |
111 | <xs:attribute name="uri" type="xs:anyURI"/> | |
112 | <xs:attribute name="filesource" type="xs:string"/> | |
113 | </xs:extension> | |
114 | </xs:simpleContent> | |
115 | </xs:complexType> | |
116 | </xs:element> | |
117 | <xs:element name="stability"> | |
118 | <xs:complexType> | |
119 | <xs:sequence> | |
120 | <xs:element name="release"> | |
121 | <xs:simpleType> | |
122 | <xs:restriction base="xs:string"> | |
123 | <xs:enumeration value="snapshot"/> | |
124 | <xs:enumeration value="devel"/> | |
125 | <xs:enumeration value="alpha"/> | |
126 | <xs:enumeration value="beta"/> | |
127 | <xs:enumeration value="stable"/> | |
128 | </xs:restriction> | |
129 | </xs:simpleType> | |
130 | </xs:element> | |
131 | <xs:element name="api"> | |
132 | <xs:simpleType> | |
133 | <xs:restriction base="xs:string"> | |
134 | <xs:enumeration value="devel"/> | |
135 | <xs:enumeration value="alpha"/> | |
136 | <xs:enumeration value="beta"/> | |
137 | <xs:enumeration value="stable"/> | |
138 | </xs:restriction> | |
139 | </xs:simpleType> | |
140 | </xs:element> | |
141 | </xs:sequence> | |
142 | </xs:complexType> | |
143 | </xs:element> | |
144 | <xs:element name="notes" type="xs:string"/> | |
145 | <xs:element name="contents"> | |
146 | <xs:complexType> | |
147 | <xs:choice> | |
148 | <xs:element ref="dir" maxOccurs="unbounded"/> | |
149 | <xs:element ref="bundledpackage" maxOccurs="unbounded"/> | |
150 | </xs:choice> | |
151 | </xs:complexType> | |
152 | </xs:element> | |
153 | <xs:element name="dir"> | |
154 | <xs:complexType> | |
155 | <xs:choice> | |
156 | <xs:sequence maxOccurs="unbounded"> | |
157 | <xs:element ref="dir" maxOccurs="unbounded"/> | |
158 | <xs:element ref="file" maxOccurs="unbounded"/> | |
159 | </xs:sequence> | |
160 | <xs:sequence maxOccurs="unbounded"> | |
161 | <xs:element ref="file" maxOccurs="unbounded"/> | |
162 | <xs:element ref="dir" minOccurs="0" maxOccurs="unbounded"/> | |
163 | </xs:sequence> | |
164 | </xs:choice> | |
165 | <xs:attribute name="baseinstalldir" type="xs:string"/> | |
166 | <xs:attribute name="name" type="xs:string" use="required"/> | |
167 | </xs:complexType> | |
168 | </xs:element> | |
169 | <xs:element name="file"> | |
170 | <xs:complexType> | |
171 | <xs:choice> | |
172 | <xs:any namespace="http://pear.php.net/dtd/tasks-1.0" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> | |
173 | </xs:choice> | |
174 | <xs:attribute name="name" type="xs:string" use="required"/> | |
175 | <xs:attribute name="role" type="xs:string" use="required"/> | |
176 | <xs:attribute name="baseinstalldir" type="xs:string"/> | |
177 | <xs:attribute name="md5sum" type="xs:string"/> | |
178 | </xs:complexType> | |
179 | </xs:element> | |
180 | <xs:element name="install"> | |
181 | <xs:complexType> | |
182 | <xs:attribute name="name" type="xs:string" use="required"/> | |
183 | <xs:attribute name="as" type="xs:string" use="required"/> | |
184 | </xs:complexType> | |
185 | </xs:element> | |
186 | <xs:element name="ignore"> | |
187 | <xs:complexType> | |
188 | <xs:attribute name="name" type="xs:string"/> | |
189 | </xs:complexType> | |
190 | </xs:element> | |
191 | <xs:element name="phprelease"> | |
192 | <xs:annotation> | |
193 | <xs:documentation>for php script releases</xs:documentation> | |
194 | </xs:annotation> | |
195 | <xs:complexType> | |
196 | <xs:sequence> | |
197 | <xs:element ref="installconditions" minOccurs="0"/> | |
198 | <xs:element ref="filelist" minOccurs="0"/> | |
199 | </xs:sequence> | |
200 | </xs:complexType> | |
201 | </xs:element> | |
202 | <xs:element name="extsrcrelease"> | |
203 | <xs:annotation> | |
204 | <xs:documentation>for extension source releases</xs:documentation> | |
205 | </xs:annotation> | |
206 | <xs:complexType> | |
207 | <xs:sequence> | |
208 | <xs:element ref="installconditions" minOccurs="0"/> | |
209 | <xs:element ref="configureoption" minOccurs="0" maxOccurs="unbounded"/> | |
210 | <xs:element name="binarypackage" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> | |
211 | <xs:element ref="filelist" minOccurs="0"/> | |
212 | </xs:sequence> | |
213 | </xs:complexType> | |
214 | </xs:element> | |
215 | <xs:element name="extbinrelease"> | |
216 | <xs:annotation> | |
217 | <xs:documentation>for compiled extension source releases</xs:documentation> | |
218 | </xs:annotation> | |
219 | <xs:complexType> | |
220 | <xs:sequence> | |
221 | <xs:element ref="installconditions" minOccurs="0"/> | |
222 | <xs:element ref="filelist" minOccurs="0"/> | |
223 | </xs:sequence> | |
224 | </xs:complexType> | |
225 | </xs:element> | |
226 | <xs:element name="bundle"> | |
227 | <xs:annotation> | |
228 | <xs:documentation>for bundling several releases together in one release</xs:documentation> | |
229 | </xs:annotation> | |
230 | <xs:complexType/> | |
231 | </xs:element> | |
232 | <xs:element name="filelist"> | |
233 | <xs:complexType> | |
234 | <xs:sequence> | |
235 | <xs:element ref="install" minOccurs="0" maxOccurs="unbounded"/> | |
236 | <xs:element ref="ignore" minOccurs="0" maxOccurs="unbounded"/> | |
237 | </xs:sequence> | |
238 | </xs:complexType> | |
239 | </xs:element> | |
240 | <xs:element name="dependencies"> | |
241 | <xs:complexType> | |
242 | <xs:sequence> | |
243 | <xs:element ref="required"/> | |
244 | <xs:element ref="optional" minOccurs="0"/> | |
245 | <xs:element ref="group" minOccurs="0" maxOccurs="unbounded"/> | |
246 | </xs:sequence> | |
247 | </xs:complexType> | |
248 | </xs:element> | |
249 | <xs:element name="nodefault"> | |
250 | <xs:annotation> | |
251 | <xs:documentation>tells the installer not to install the default dependency group</xs:documentation> | |
252 | </xs:annotation> | |
253 | </xs:element> | |
254 | <xs:element name="required"> | |
255 | <xs:annotation> | |
256 | <xs:documentation>absolute required dependencies</xs:documentation> | |
257 | </xs:annotation> | |
258 | <xs:complexType> | |
259 | <xs:sequence> | |
260 | <xs:element ref="php"/> | |
261 | <xs:element ref="pearinstaller"/> | |
262 | <xs:element name="package" minOccurs="0" maxOccurs="unbounded"> | |
263 | <xs:complexType> | |
264 | <xs:sequence> | |
265 | <xs:element ref="name"/> | |
266 | <xs:choice> | |
267 | <xs:sequence> | |
268 | <xs:element ref="channel"/> | |
269 | <xs:element ref="min" minOccurs="0"/> | |
270 | <xs:element ref="max" minOccurs="0"/> | |
271 | <xs:element ref="recommended" minOccurs="0"/> | |
272 | <xs:element ref="exclude" minOccurs="0" maxOccurs="unbounded"/> | |
273 | <xs:element ref="nodefault" minOccurs="0"/> | |
274 | </xs:sequence> | |
275 | <xs:element ref="uri"/> | |
276 | </xs:choice> | |
277 | <xs:element ref="conflicts" minOccurs="0"/> | |
278 | <xs:element ref="providesextension" minOccurs="0" maxOccurs="unbounded"/> | |
279 | </xs:sequence> | |
280 | </xs:complexType> | |
281 | </xs:element> | |
282 | <xs:element name="subpackage" minOccurs="0" maxOccurs="unbounded"> | |
283 | <xs:complexType> | |
284 | <xs:sequence> | |
285 | <xs:element ref="name"/> | |
286 | <xs:choice> | |
287 | <xs:sequence> | |
288 | <xs:element ref="channel"/> | |
289 | <xs:element ref="min" minOccurs="0"/> | |
290 | <xs:element ref="max" minOccurs="0"/> | |
291 | <xs:element ref="recommended" minOccurs="0"/> | |
292 | <xs:element ref="exclude" minOccurs="0" maxOccurs="unbounded"/> | |
293 | <xs:element ref="nodefault" minOccurs="0"/> | |
294 | </xs:sequence> | |
295 | <xs:element ref="uri"/> | |
296 | </xs:choice> | |
297 | <xs:element ref="conflicts" minOccurs="0"/> | |
298 | <xs:element ref="providesextension" minOccurs="0" maxOccurs="unbounded"/> | |
299 | </xs:sequence> | |
300 | </xs:complexType> | |
301 | </xs:element> | |
302 | <xs:element ref="extension" minOccurs="0" maxOccurs="unbounded"/> | |
303 | <xs:element ref="os" minOccurs="0" maxOccurs="unbounded"/> | |
304 | <xs:element ref="arch" minOccurs="0" maxOccurs="unbounded"/> | |
305 | </xs:sequence> | |
306 | </xs:complexType> | |
307 | </xs:element> | |
308 | <xs:element name="group"> | |
309 | <xs:annotation> | |
310 | <xs:documentation>all other optional dependency groups</xs:documentation> | |
311 | </xs:annotation> | |
312 | <xs:complexType> | |
313 | <xs:sequence> | |
314 | <xs:element name="package" minOccurs="0" maxOccurs="unbounded"> | |
315 | <xs:complexType> | |
316 | <xs:sequence> | |
317 | <xs:element ref="name"/> | |
318 | <xs:choice> | |
319 | <xs:sequence> | |
320 | <xs:element ref="channel"/> | |
321 | <xs:element ref="min" minOccurs="0"/> | |
322 | <xs:element ref="max" minOccurs="0"/> | |
323 | <xs:element ref="recommended" minOccurs="0"/> | |
324 | <xs:element ref="exclude" minOccurs="0" maxOccurs="unbounded"/> | |
325 | <xs:element ref="nodefault" minOccurs="0"/> | |
326 | </xs:sequence> | |
327 | <xs:element ref="uri"/> | |
328 | </xs:choice> | |
329 | <xs:element ref="providesextension" minOccurs="0" maxOccurs="unbounded"/> | |
330 | </xs:sequence> | |
331 | </xs:complexType> | |
332 | </xs:element> | |
333 | <xs:element name="subpackage" minOccurs="0" maxOccurs="unbounded"> | |
334 | <xs:complexType> | |
335 | <xs:sequence> | |
336 | <xs:element ref="name"/> | |
337 | <xs:choice> | |
338 | <xs:sequence> | |
339 | <xs:element ref="channel"/> | |
340 | <xs:element ref="min" minOccurs="0"/> | |
341 | <xs:element ref="max" minOccurs="0"/> | |
342 | <xs:element ref="recommended" minOccurs="0"/> | |
343 | <xs:element ref="exclude" minOccurs="0" maxOccurs="unbounded"/> | |
344 | <xs:element ref="nodefault" minOccurs="0"/> | |
345 | </xs:sequence> | |
346 | <xs:element ref="uri"/> | |
347 | </xs:choice> | |
348 | <xs:element ref="providesextension" minOccurs="0" maxOccurs="unbounded"/> | |
349 | </xs:sequence> | |
350 | </xs:complexType> | |
351 | </xs:element> | |
352 | <xs:element ref="extension" minOccurs="0" maxOccurs="unbounded"/> | |
353 | </xs:sequence> | |
354 | <xs:attribute name="name" type="xs:string" use="required"/> | |
355 | <xs:attribute name="hint" type="xs:string" use="required"/> | |
356 | </xs:complexType> | |
357 | </xs:element> | |
358 | <xs:element name="optional"> | |
359 | <xs:annotation> | |
360 | <xs:documentation>simple optional dependencies</xs:documentation> | |
361 | </xs:annotation> | |
362 | <xs:complexType> | |
363 | <xs:sequence> | |
364 | <xs:element name="package" minOccurs="0" maxOccurs="unbounded"> | |
365 | <xs:complexType> | |
366 | <xs:sequence> | |
367 | <xs:element ref="name"/> | |
368 | <xs:choice> | |
369 | <xs:sequence> | |
370 | <xs:element ref="channel"/> | |
371 | <xs:element ref="min" minOccurs="0"/> | |
372 | <xs:element ref="max" minOccurs="0"/> | |
373 | <xs:element ref="recommended" minOccurs="0"/> | |
374 | <xs:element ref="exclude" minOccurs="0" maxOccurs="unbounded"/> | |
375 | <xs:element ref="nodefault" minOccurs="0"/> | |
376 | </xs:sequence> | |
377 | <xs:element ref="uri"/> | |
378 | </xs:choice> | |
379 | <xs:element ref="providesextension" minOccurs="0" maxOccurs="unbounded"/> | |
380 | </xs:sequence> | |
381 | </xs:complexType> | |
382 | </xs:element> | |
383 | <xs:element name="subpackage" minOccurs="0" maxOccurs="unbounded"> | |
384 | <xs:complexType> | |
385 | <xs:sequence> | |
386 | <xs:element ref="name"/> | |
387 | <xs:choice> | |
388 | <xs:sequence> | |
389 | <xs:element ref="channel"/> | |
390 | <xs:element ref="min" minOccurs="0"/> | |
391 | <xs:element ref="max" minOccurs="0"/> | |
392 | <xs:element ref="recommended" minOccurs="0"/> | |
393 | <xs:element ref="exclude" minOccurs="0" maxOccurs="unbounded"/> | |
394 | <xs:element ref="nodefault" minOccurs="0"/> | |
395 | </xs:sequence> | |
396 | <xs:element ref="uri"/> | |
397 | </xs:choice> | |
398 | <xs:element ref="conflicts" minOccurs="0"/> | |
399 | </xs:sequence> | |
400 | </xs:complexType> | |
401 | </xs:element> | |
402 | <xs:element ref="extension" minOccurs="0" maxOccurs="unbounded"/> | |
403 | </xs:sequence> | |
404 | </xs:complexType> | |
405 | </xs:element> | |
406 | <xs:element name="changelog"> | |
407 | <xs:complexType> | |
408 | <xs:sequence> | |
409 | <xs:element name="release" minOccurs="1" maxOccurs="unbounded"> | |
410 | <xs:complexType> | |
411 | <xs:sequence> | |
412 | <xs:element ref="lead" minOccurs="0" maxOccurs="unbounded"/> | |
413 | <xs:element ref="developer" minOccurs="0" maxOccurs="unbounded"/> | |
414 | <xs:element ref="version"/> | |
415 | <xs:element ref="stability"/> | |
416 | <xs:element ref="date"/> | |
417 | <xs:element ref="license"/> | |
418 | <xs:element ref="notes"/> | |
419 | </xs:sequence> | |
420 | </xs:complexType> | |
421 | </xs:element> | |
422 | </xs:sequence> | |
423 | </xs:complexType> | |
424 | </xs:element> | |
425 | <xs:simpleType name="version"> | |
426 | <xs:annotation> | |
427 | <xs:documentation>version string regex</xs:documentation> | |
428 | </xs:annotation> | |
429 | <xs:restriction base="xs:string"> | |
430 | <xs:pattern value="[0-9]+(\.[0-9]+)*([a-zA-Z]+[0-9]*)?"/> | |
431 | </xs:restriction> | |
432 | </xs:simpleType> | |
433 | <xs:element name="extension"> | |
434 | <xs:complexType> | |
435 | <xs:sequence> | |
436 | <xs:element ref="name"/> | |
437 | <xs:element ref="min" minOccurs="0"/> | |
438 | <xs:element ref="max" minOccurs="0"/> | |
439 | <xs:element ref="recommended" minOccurs="0"/> | |
440 | <xs:element ref="exclude" minOccurs="0" maxOccurs="unbounded"/> | |
441 | <xs:element ref="conflicts" minOccurs="0"/> | |
442 | </xs:sequence> | |
443 | </xs:complexType> | |
444 | </xs:element> | |
445 | <xs:element name="pearinstaller"> | |
446 | <xs:complexType> | |
447 | <xs:sequence> | |
448 | <xs:element ref="min"/> | |
449 | <xs:element ref="max" minOccurs="0"/> | |
450 | <xs:element ref="recommended" minOccurs="0"/> | |
451 | <xs:element ref="exclude" minOccurs="0" maxOccurs="unbounded"/> | |
452 | </xs:sequence> | |
453 | </xs:complexType> | |
454 | </xs:element> | |
455 | <xs:element name="php"> | |
456 | <xs:complexType> | |
457 | <xs:sequence> | |
458 | <xs:element ref="min"/> | |
459 | <xs:element ref="max" minOccurs="0"/> | |
460 | <xs:element ref="exclude" minOccurs="0" maxOccurs="unbounded"/> | |
461 | </xs:sequence> | |
462 | </xs:complexType> | |
463 | </xs:element> | |
464 | <xs:element name="installconditions"> | |
465 | <xs:complexType> | |
466 | <xs:sequence> | |
467 | <xs:element ref="php" minOccurs="0"/> | |
468 | <xs:element ref="extension" minOccurs="0" maxOccurs="unbounded"/> | |
469 | <xs:element ref="os" minOccurs="0"/> | |
470 | <xs:element ref="arch" minOccurs="0"/> | |
471 | </xs:sequence> | |
472 | </xs:complexType> | |
473 | </xs:element> | |
474 | <xs:element name="exclude" type="version"/> | |
475 | <xs:element name="configureoption"> | |
476 | <xs:complexType> | |
477 | <xs:attribute name="name" type="xs:string" use="required"/> | |
478 | <xs:attribute name="default" type="xs:string"/> | |
479 | <xs:attribute name="prompt" type="xs:string" use="required"/> | |
480 | </xs:complexType> | |
481 | </xs:element> | |
482 | <xs:element name="arch"> | |
483 | <xs:complexType> | |
484 | <xs:sequence> | |
485 | <xs:element ref="pattern"/> | |
486 | <xs:element ref="conflicts" minOccurs="0"/> | |
487 | </xs:sequence> | |
488 | </xs:complexType> | |
489 | </xs:element> | |
490 | <xs:element name="extends" type="xs:string"/> | |
491 | <xs:element name="time" type="xs:time"/> | |
492 | <xs:element name="compatible"> | |
493 | <xs:complexType> | |
494 | <xs:sequence> | |
495 | <xs:element name="name"/> | |
496 | <xs:element name="channel"/> | |
497 | <xs:element ref="min"/> | |
498 | <xs:element ref="max"/> | |
499 | <xs:element ref="exclude" minOccurs="0" maxOccurs="unbounded"/> | |
500 | </xs:sequence> | |
501 | </xs:complexType> | |
502 | </xs:element> | |
503 | <xs:element name="min" type="version"/> | |
504 | <xs:element name="max" type="version"/> | |
505 | <xs:element name="user" type="xs:string"/> | |
506 | <xs:element name="email" type="xs:string"/> | |
507 | <xs:element name="active"> | |
508 | <xs:simpleType> | |
509 | <xs:restriction base="xs:string"> | |
510 | <xs:enumeration value="yes"/> | |
511 | <xs:enumeration value="no"/> | |
512 | </xs:restriction> | |
513 | </xs:simpleType> | |
514 | </xs:element> | |
515 | <xs:element name="recommended" type="version"/> | |
516 | <xs:element name="channel"> | |
517 | <xs:simpleType> | |
518 | <xs:restriction base="xs:string"> | |
519 | <xs:pattern value="[A-Za-z][a-zA-Z0-9_.]+"/> | |
520 | </xs:restriction> | |
521 | </xs:simpleType> | |
522 | </xs:element> | |
523 | <xs:element name="uri" type="xs:anyURI"/> | |
524 | <xs:element name="pattern" type="xs:string"/> | |
525 | <xs:element name="conflicts"/> | |
526 | <xs:element name="os"> | |
527 | <xs:complexType> | |
528 | <xs:sequence> | |
529 | <xs:element ref="name"/> | |
530 | <xs:element ref="conflicts" minOccurs="0"/> | |
531 | </xs:sequence> | |
532 | </xs:complexType> | |
533 | </xs:element> | |
534 | <xs:element name="srcpackage" type="xs:string"> | |
535 | <xs:annotation> | |
536 | <xs:documentation>name of the package that contains the source of this extension (can be the same if the source and binaries are in the same package)</xs:documentation> | |
537 | </xs:annotation> | |
538 | </xs:element> | |
539 | <xs:element name="srcchannel" type="xs:string"/> | |
540 | <xs:element name="bundledpackage" type="xs:string"/> | |
541 | <xs:element name="filename" type="xs:string"/> | |
542 | <xs:element name="providesextension" type="xs:string"> | |
543 | <xs:annotation> | |
544 | <xs:documentation>if a package can provide one or more compatible extensions (dblib/sybase/mssql for instance)</xs:documentation> | |
545 | </xs:annotation> | |
546 | </xs:element> | |
547 | <xs:element name="usesrole"> | |
548 | <xs:complexType> | |
549 | <xs:sequence> | |
550 | <xs:element ref="role"/> | |
551 | <xs:choice> | |
552 | <xs:sequence> | |
553 | <xs:element name="package" type="xs:string"/> | |
554 | <xs:element ref="channel"/> | |
555 | </xs:sequence> | |
556 | <xs:element ref="uri"/> | |
557 | </xs:choice> | |
558 | </xs:sequence> | |
559 | </xs:complexType> | |
560 | </xs:element> | |
561 | <xs:element name="usestask"> | |
562 | <xs:complexType> | |
563 | <xs:sequence> | |
564 | <xs:element ref="task"/> | |
565 | <xs:choice> | |
566 | <xs:sequence> | |
567 | <xs:element name="package" type="xs:string"/> | |
568 | <xs:element ref="channel"/> | |
569 | </xs:sequence> | |
570 | <xs:element ref="uri"/> | |
571 | </xs:choice> | |
572 | </xs:sequence> | |
573 | </xs:complexType> | |
574 | </xs:element> | |
575 | <xs:element name="role" type="xs:string"/> | |
576 | <xs:element name="task" type="xs:string"/> | |
577 | </xs:schema> |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Gregory Beaver (The Chiara String Quartet) --> | |
2 | <!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Greg Beaver (The Chiara String Quartet) --> | |
3 | <xs:schema xmlns="http://pear.php.net/dtd/tasks-1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://pear.php.net/dtd/tasks-1.0" elementFormDefault="qualified" attributeFormDefault="unqualified"> | |
4 | <xs:element name="replace"> | |
5 | <xs:annotation> | |
6 | <xs:documentation>standard PEAR str_replace() in-file replacement</xs:documentation> | |
7 | </xs:annotation> | |
8 | <xs:complexType> | |
9 | <xs:attribute name="from" type="xs:string" use="required"/> | |
10 | <xs:attribute name="to" type="xs:string" use="required"/> | |
11 | <xs:attribute name="type" use="required"> | |
12 | <xs:simpleType> | |
13 | <xs:restriction base="xs:string"> | |
14 | <xs:enumeration value="package-info"/> | |
15 | <xs:enumeration value="php-const"/> | |
16 | <xs:enumeration value="pear-config"/> | |
17 | </xs:restriction> | |
18 | </xs:simpleType> | |
19 | </xs:attribute> | |
20 | </xs:complexType> | |
21 | </xs:element> | |
22 | <xs:element name="postinstallscript"> | |
23 | <xs:annotation> | |
24 | <xs:documentation>standard PEAR post-installation script - must be used in a role="php" file</xs:documentation> | |
25 | </xs:annotation> | |
26 | <xs:complexType> | |
27 | <xs:sequence> | |
28 | <xs:element name="paramgroup" minOccurs="0" maxOccurs="unbounded"> | |
29 | <xs:complexType> | |
30 | <xs:sequence> | |
31 | <xs:element name="id" type="xs:string"> | |
32 | <xs:annotation> | |
33 | <xs:documentation>parameter condition name, passed to install script</xs:documentation> | |
34 | </xs:annotation> | |
35 | </xs:element> | |
36 | <xs:element name="instructions" minOccurs="0"/> | |
37 | <xs:sequence minOccurs="0"> | |
38 | <xs:element name="name" type="xs:string"/> | |
39 | <xs:element name="conditiontype"> | |
40 | <xs:simpleType> | |
41 | <xs:restriction base="xs:string"> | |
42 | <xs:enumeration value="="/> | |
43 | <xs:enumeration value="!="/> | |
44 | <xs:enumeration value="preg_match"/> | |
45 | </xs:restriction> | |
46 | </xs:simpleType> | |
47 | </xs:element> | |
48 | <xs:element name="value" type="xs:string"/> | |
49 | </xs:sequence> | |
50 | <xs:element name="param" maxOccurs="unbounded"> | |
51 | <xs:complexType> | |
52 | <xs:sequence> | |
53 | <xs:element name="name"> | |
54 | <xs:simpleType> | |
55 | <xs:restriction base="xs:string"> | |
56 | <xs:pattern value="[a-zA-Z0-9]+"/> | |
57 | </xs:restriction> | |
58 | </xs:simpleType> | |
59 | </xs:element> | |
60 | <xs:element name="prompt" type="xs:string"/> | |
61 | <xs:element name="type"> | |
62 | <xs:simpleType> | |
63 | <xs:restriction base="xs:string"> | |
64 | <xs:enumeration value="string"/> | |
65 | </xs:restriction> | |
66 | </xs:simpleType> | |
67 | </xs:element> | |
68 | <xs:element name="default" type="xs:string" minOccurs="0"/> | |
69 | </xs:sequence> | |
70 | </xs:complexType> | |
71 | </xs:element> | |
72 | </xs:sequence> | |
73 | </xs:complexType> | |
74 | </xs:element> | |
75 | </xs:sequence> | |
76 | </xs:complexType> | |
77 | </xs:element> | |
78 | <xs:element name="unixeol"> | |
79 | <xs:annotation> | |
80 | <xs:documentation>standard PEAR unix line endings package-time replacement</xs:documentation> | |
81 | </xs:annotation> | |
82 | </xs:element> | |
83 | <xs:element name="windowseol"> | |
84 | <xs:annotation> | |
85 | <xs:documentation>standard PEAR windows line ending package-time replacement</xs:documentation> | |
86 | </xs:annotation> | |
87 | </xs:element> | |
88 | </xs:schema> |
0 | compile.on.save=true | |
1 | jaxws.endorsed.dir=/opt/netbeans/java2/modules/ext/jaxws21/api:/opt/netbeans/ide10/modules/ext/jaxb/api | |
2 | user.properties.file=/home/sirius/.netbeans/6.5/build.properties |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <project-private xmlns="http://www.netbeans.org/ns/project-private/1"> | |
2 | <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/> | |
3 | </project-private> |
0 | application.title=FontChooser | |
1 | application.vendor=bohoris | |
2 | build.classes.dir=${build.dir}/classes | |
3 | build.classes.excludes=**/*.java,**/*.form | |
4 | # This directory is removed when the project is cleaned: | |
5 | build.dir=build | |
6 | build.generated.dir=${build.dir}/generated | |
7 | # Only compile against the classpath explicitly listed here: | |
8 | build.sysclasspath=ignore | |
9 | build.test.classes.dir=${build.dir}/test/classes | |
10 | build.test.results.dir=${build.dir}/test/results | |
11 | # Uncomment to specify the preferred debugger connection transport: | |
12 | #debug.transport=dt_socket | |
13 | debug.classpath=\ | |
14 | ${run.classpath} | |
15 | debug.test.classpath=\ | |
16 | ${run.test.classpath} | |
17 | # This directory is removed when the project is cleaned: | |
18 | dist.dir=dist | |
19 | dist.jar=${dist.dir}/FontChooser.jar | |
20 | dist.javadoc.dir=${dist.dir}/javadoc | |
21 | excludes= | |
22 | includes=** | |
23 | jar.compress=false | |
24 | javac.classpath= | |
25 | # Space-separated list of extra javac options | |
26 | javac.compilerargs= | |
27 | javac.deprecation=false | |
28 | javac.source=1.5 | |
29 | javac.target=1.5 | |
30 | javac.test.classpath=\ | |
31 | ${javac.classpath}:\ | |
32 | ${build.classes.dir}:\ | |
33 | ${libs.junit.classpath}:\ | |
34 | ${libs.junit_4.classpath} | |
35 | javadoc.additionalparam= | |
36 | javadoc.author=false | |
37 | javadoc.encoding=${source.encoding} | |
38 | javadoc.noindex=false | |
39 | javadoc.nonavbar=false | |
40 | javadoc.notree=false | |
41 | javadoc.private=false | |
42 | javadoc.splitindex=true | |
43 | javadoc.use=true | |
44 | javadoc.version=false | |
45 | javadoc.windowtitle= | |
46 | main.class=com.connectina.swing.fontchooser.Main | |
47 | manifest.file=manifest.mf | |
48 | meta.inf.dir=${src.dir}/META-INF | |
49 | platform.active=default_platform | |
50 | run.classpath=\ | |
51 | ${javac.classpath}:\ | |
52 | ${build.classes.dir} | |
53 | # Space-separated list of JVM arguments used when running the project | |
54 | # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value | |
55 | # or test-sys-prop.name=value to set system properties for unit tests): | |
56 | run.jvmargs= | |
57 | run.test.classpath=\ | |
58 | ${javac.test.classpath}:\ | |
59 | ${build.test.classes.dir} | |
60 | source.encoding=UTF-8 | |
61 | src.dir=src | |
62 | test.src.dir=test |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <project xmlns="http://www.netbeans.org/ns/project/1"> | |
2 | <type>org.netbeans.modules.java.j2seproject</type> | |
3 | <configuration> | |
4 | <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> | |
5 | <name>FontChooser</name> | |
6 | <minimum-ant-version>1.6.5</minimum-ant-version> | |
7 | <source-roots> | |
8 | <root id="src.dir"/> | |
9 | </source-roots> | |
10 | <test-roots> | |
11 | <root id="test.src.dir"/> | |
12 | </test-roots> | |
13 | </data> | |
14 | </configuration> | |
15 | </project> |
0 | /* | |
1 | * A font chooser JavaBean component. | |
2 | * Copyright (C) 2009 Dr Christos Bohoris | |
3 | * | |
4 | * This library is free software; you can redistribute it and/or | |
5 | * modify it under the terms of the GNU Lesser General Public | |
6 | * License version 3 as published by the Free Software Foundation; | |
7 | * | |
8 | * This library is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
11 | * Lesser General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU Lesser General Public | |
14 | * License along with this library; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
16 | * | |
17 | * swing@connectina.com | |
18 | */ | |
19 | package com.connectina.swing.fontchooser; | |
20 | ||
21 | import java.awt.Font; | |
22 | import java.awt.GraphicsEnvironment; | |
23 | import java.util.ArrayList; | |
24 | import java.util.Collections; | |
25 | import java.util.List; | |
26 | import javax.swing.event.ChangeEvent; | |
27 | import javax.swing.event.ChangeListener; | |
28 | import javax.swing.event.EventListenerList; | |
29 | ||
30 | /** | |
31 | * A generic implementation of <code>FontSelectionModel</code>. | |
32 | * | |
33 | * @author Christos Bohoris | |
34 | * @see java.awt.Font | |
35 | */ | |
36 | public class DefaultFontSelectionModel implements FontSelectionModel { | |
37 | ||
38 | /** | |
39 | * Only one <code>ChangeEvent</code> is needed per model instance | |
40 | * since the event's only (read-only) state is the source property. | |
41 | * The source of events generated here is always "this". | |
42 | */ | |
43 | protected transient ChangeEvent changeEvent = null; | |
44 | ||
45 | /** | |
46 | * A list of registered event listeners. | |
47 | */ | |
48 | protected EventListenerList listenerList = new EventListenerList(); | |
49 | ||
50 | private Font selectedFont; | |
51 | ||
52 | private List<String> availableFontNames = new ArrayList<String>(); | |
53 | ||
54 | /** | |
55 | * Creates a <code>DefaultFontSelectionModel</code> with the | |
56 | * current font set to <code>new Font(Font.SANS_SERIF, Font.PLAIN, 12) | |
57 | * </code>. This is the default constructor. | |
58 | */ | |
59 | public DefaultFontSelectionModel() { | |
60 | this(new Font(Font.SANS_SERIF, Font.PLAIN, 12)); | |
61 | } | |
62 | ||
63 | /** | |
64 | * Creates a <code>DefaultFontSelectionModel</code> with the | |
65 | * current font set to <code>font</code>, which should be | |
66 | * non-<code>null</code>. Note that setting the font to | |
67 | * <code>null</code> is undefined and may have unpredictable | |
68 | * results. | |
69 | * | |
70 | * @param font the new <code>Font</code> | |
71 | */ | |
72 | public DefaultFontSelectionModel(Font font) { | |
73 | selectedFont = font; | |
74 | GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); | |
75 | Collections.addAll(availableFontNames, ge.getAvailableFontFamilyNames()); | |
76 | } | |
77 | ||
78 | /** | |
79 | * Returns the selected <code>Font</code> which should be | |
80 | * non-<code>null</code>. | |
81 | * | |
82 | * @return the selected <code>Font</code> | |
83 | */ | |
84 | public Font getSelectedFont() { | |
85 | return selectedFont; | |
86 | } | |
87 | ||
88 | /** | |
89 | * Sets the selected font to <code>font</code>. | |
90 | * Note that setting the font to <code>null</code> | |
91 | * is undefined and may have unpredictable results. | |
92 | * This method fires a state changed event if it sets the | |
93 | * current font to a new non-<code>null</code> font; | |
94 | * if the new font is the same as the current font, | |
95 | * no event is fired. | |
96 | * | |
97 | * @param font the new <code>Font</code> | |
98 | */ | |
99 | public void setSelectedFont(Font font) { | |
100 | if (font != null && !selectedFont.equals(font)) { | |
101 | selectedFont = font; | |
102 | fireStateChanged(); | |
103 | } | |
104 | } | |
105 | ||
106 | /** | |
107 | * Gets the available font names. | |
108 | * Returns a list containing the names of all font families in this | |
109 | * <code>GraphicsEnvironment</code> localized for the default locale, | |
110 | * as returned by <code>Locale.getDefault()</code>. | |
111 | * | |
112 | * @return a list of String containing font family names localized for the | |
113 | * default locale, or a suitable alternative name if no name exists | |
114 | * for this locale | |
115 | */ | |
116 | public List<String> getAvailableFontNames() { | |
117 | return availableFontNames; | |
118 | } | |
119 | ||
120 | /** | |
121 | * Adds a <code>ChangeListener</code> to the model. | |
122 | * | |
123 | * @param l the <code>ChangeListener</code> to be added | |
124 | */ | |
125 | public void addChangeListener(ChangeListener l) { | |
126 | listenerList.add(ChangeListener.class, l); | |
127 | } | |
128 | ||
129 | /** | |
130 | * Removes a <code>ChangeListener</code> from the model. | |
131 | * @param l the <code>ChangeListener</code> to be removed | |
132 | */ | |
133 | public void removeChangeListener(ChangeListener l) { | |
134 | listenerList.remove(ChangeListener.class, l); | |
135 | } | |
136 | ||
137 | /** | |
138 | * Returns an array of all the <code>ChangeListener</code>s added | |
139 | * to this <code>DefaultFontSelectionModel</code> with | |
140 | * <code>addChangeListener</code>. | |
141 | * | |
142 | * @return all of the <code>ChangeListener</code>s added, or an empty | |
143 | * array if no listeners have been added | |
144 | */ | |
145 | public ChangeListener[] getChangeListeners() { | |
146 | return (ChangeListener[]) listenerList.getListeners( | |
147 | ChangeListener.class); | |
148 | } | |
149 | ||
150 | /** | |
151 | * Runs each <code>ChangeListener</code>'s | |
152 | * <code>stateChanged</code> method. | |
153 | */ | |
154 | protected void fireStateChanged() { | |
155 | Object[] listeners = listenerList.getListenerList(); | |
156 | for (int i = listeners.length - 2; i >= 0; i -= 2) { | |
157 | if (listeners[i] == ChangeListener.class) { | |
158 | if (changeEvent == null) { | |
159 | changeEvent = new ChangeEvent(this); | |
160 | } | |
161 | ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent); | |
162 | } | |
163 | } | |
164 | } | |
165 | ||
166 | } |
0 | <?xml version="1.0" encoding="UTF-8" ?> | |
1 | ||
2 | <Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo"> | |
3 | <Properties> | |
4 | <Property name="defaultCloseOperation" type="int" value="0"/> | |
5 | <Property name="title" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> | |
6 | <ResourceString bundle="" key="window.title" replaceFormat="bundle.getString("{key}")"/> | |
7 | </Property> | |
8 | </Properties> | |
9 | <SyntheticProperties> | |
10 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> | |
11 | </SyntheticProperties> | |
12 | <AuxValues> | |
13 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> | |
14 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> | |
15 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> | |
16 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> | |
17 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> | |
18 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> | |
19 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> | |
20 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> | |
21 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> | |
22 | <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/> | |
23 | </AuxValues> | |
24 | ||
25 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/> | |
26 | <SubComponents> | |
27 | <Container class="javax.swing.JPanel" name="basePanel"> | |
28 | <Constraints> | |
29 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> | |
30 | <BorderConstraints direction="Center"/> | |
31 | </Constraint> | |
32 | </Constraints> | |
33 | ||
34 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/> | |
35 | <SubComponents> | |
36 | <Container class="javax.swing.JPanel" name="chooserPanel"> | |
37 | <Properties> | |
38 | <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> | |
39 | <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> | |
40 | <EmptyBorder bottom="0" left="12" right="11" top="12"/> | |
41 | </Border> | |
42 | </Property> | |
43 | </Properties> | |
44 | <AuxValues> | |
45 | <AuxValue name="JavaCodeGenerator_AddingCodePost" type="java.lang.String" value="chooserPanel.add(chooserPane, java.awt.BorderLayout.CENTER);"/> | |
46 | </AuxValues> | |
47 | <Constraints> | |
48 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> | |
49 | <BorderConstraints direction="Center"/> | |
50 | </Constraint> | |
51 | </Constraints> | |
52 | ||
53 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"> | |
54 | <Property name="verticalGap" type="int" value="12"/> | |
55 | </Layout> | |
56 | <SubComponents> | |
57 | <Component class="javax.swing.JSeparator" name="chooserSeparator"> | |
58 | <Constraints> | |
59 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> | |
60 | <BorderConstraints direction="Last"/> | |
61 | </Constraint> | |
62 | </Constraints> | |
63 | </Component> | |
64 | </SubComponents> | |
65 | </Container> | |
66 | <Container class="javax.swing.JPanel" name="controlPanel"> | |
67 | <Properties> | |
68 | <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> | |
69 | <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo"> | |
70 | <EmptyBorder bottom="6" left="7" right="6" top="7"/> | |
71 | </Border> | |
72 | </Property> | |
73 | </Properties> | |
74 | <Constraints> | |
75 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> | |
76 | <BorderConstraints direction="South"/> | |
77 | </Constraint> | |
78 | </Constraints> | |
79 | ||
80 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"> | |
81 | <Property name="alignment" type="int" value="2"/> | |
82 | </Layout> | |
83 | <SubComponents> | |
84 | <Component class="javax.swing.JButton" name="okButton"> | |
85 | <Properties> | |
86 | <Property name="mnemonic" type="int" editor="org.netbeans.modules.i18n.form.FormI18nMnemonicEditor"> | |
87 | <ResourceString bundle="" key="" replaceFormat="bundle.getString("{key}")"/> | |
88 | </Property> | |
89 | <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> | |
90 | <ResourceString bundle="" key="action.ok" replaceFormat="bundle.getString("{key}")"/> | |
91 | </Property> | |
92 | </Properties> | |
93 | </Component> | |
94 | <Component class="javax.swing.JButton" name="cancelButton"> | |
95 | <Properties> | |
96 | <Property name="mnemonic" type="int" editor="org.netbeans.modules.i18n.form.FormI18nMnemonicEditor"> | |
97 | <ResourceString bundle="" key="" replaceFormat="bundle.getString("{key}")"/> | |
98 | </Property> | |
99 | <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> | |
100 | <ResourceString bundle="" key="action.cancel" replaceFormat="bundle.getString("{key}")"/> | |
101 | </Property> | |
102 | </Properties> | |
103 | </Component> | |
104 | </SubComponents> | |
105 | </Container> | |
106 | </SubComponents> | |
107 | </Container> | |
108 | </SubComponents> | |
109 | </Form> |
0 | /* | |
1 | * A font chooser JavaBean component. | |
2 | * Copyright (C) 2009 Dr Christos Bohoris | |
3 | * | |
4 | * This library is free software; you can redistribute it and/or | |
5 | * modify it under the terms of the GNU Lesser General Public | |
6 | * License version 3 as published by the Free Software Foundation; | |
7 | * | |
8 | * This library is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
11 | * Lesser General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU Lesser General Public | |
14 | * License along with this library; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
16 | * | |
17 | * swing@connectina.com | |
18 | */ | |
19 | package com.connectina.swing.fontchooser; | |
20 | ||
21 | import java.awt.HeadlessException; | |
22 | import java.awt.event.ActionEvent; | |
23 | import java.awt.event.ActionListener; | |
24 | import java.awt.event.WindowAdapter; | |
25 | import java.awt.event.WindowEvent; | |
26 | import java.util.ResourceBundle; | |
27 | import javax.swing.JDialog; | |
28 | import javax.swing.JFrame; | |
29 | ||
30 | /** | |
31 | * A dialog containing a <code>JFontChooser</code> as well as OK and | |
32 | * Cancel buttons. | |
33 | * | |
34 | * @author Christos Bohoris | |
35 | */ | |
36 | class FontChooserDialog extends javax.swing.JDialog { | |
37 | ||
38 | private static final long serialVersionUID = -953666562985797384L; | |
39 | private ResourceBundle bundle = ResourceBundle.getBundle("com/connectina/swing/fontchooser/resources/i18n/FontChooserDialog"); | |
40 | private JFontChooser chooserPane; | |
41 | ||
42 | FontChooserDialog(JFrame owner, boolean modal, | |
43 | JFontChooser chooserPane, ActionListener selectionListener) | |
44 | throws HeadlessException { | |
45 | super(owner, modal); | |
46 | initDialog(chooserPane, selectionListener); | |
47 | } | |
48 | ||
49 | FontChooserDialog(JDialog owner, boolean modal, | |
50 | JFontChooser chooserPane, ActionListener selectionListener) | |
51 | throws HeadlessException { | |
52 | super(owner, modal); | |
53 | initDialog(chooserPane, selectionListener); | |
54 | } | |
55 | ||
56 | private void initDialog(JFontChooser chooserPane, ActionListener selectionListener) { | |
57 | this.chooserPane = chooserPane; | |
58 | initComponents(); | |
59 | okButton.addActionListener(selectionListener); | |
60 | okButton.addActionListener(new OKActionListener()); | |
61 | cancelButton.addActionListener(new CancelActionListener()); | |
62 | addWindowListener(new FontChooserDialogAdapter()); | |
63 | getRootPane().setDefaultButton(okButton); | |
64 | okButton.requestFocusInWindow(); | |
65 | } | |
66 | ||
67 | private class FontChooserDialogAdapter extends WindowAdapter { | |
68 | ||
69 | @Override | |
70 | public void windowClosing(WindowEvent event) { | |
71 | dispose(); | |
72 | } | |
73 | ||
74 | } | |
75 | ||
76 | private class OKActionListener implements ActionListener { | |
77 | ||
78 | public void actionPerformed(ActionEvent e) { | |
79 | dispose(); | |
80 | } | |
81 | ||
82 | } | |
83 | ||
84 | private class CancelActionListener implements ActionListener { | |
85 | ||
86 | public void actionPerformed(ActionEvent e) { | |
87 | dispose(); | |
88 | } | |
89 | ||
90 | } | |
91 | ||
92 | /** This method is called from within the constructor to | |
93 | * initialize the form. | |
94 | * WARNING: Do NOT modify this code. The content of this method is | |
95 | * always regenerated by the Form Editor. | |
96 | */ | |
97 | @SuppressWarnings("unchecked") | |
98 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents | |
99 | private void initComponents() { | |
100 | ||
101 | basePanel = new javax.swing.JPanel(); | |
102 | chooserPanel = new javax.swing.JPanel(); | |
103 | chooserSeparator = new javax.swing.JSeparator(); | |
104 | controlPanel = new javax.swing.JPanel(); | |
105 | okButton = new javax.swing.JButton(); | |
106 | cancelButton = new javax.swing.JButton(); | |
107 | ||
108 | setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); | |
109 | setTitle(bundle.getString("window.title")); | |
110 | ||
111 | basePanel.setLayout(new java.awt.BorderLayout()); | |
112 | ||
113 | chooserPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(12, 12, 0, 11)); | |
114 | chooserPanel.setLayout(new java.awt.BorderLayout(0, 12)); | |
115 | chooserPanel.add(chooserSeparator, java.awt.BorderLayout.PAGE_END); | |
116 | ||
117 | basePanel.add(chooserPanel, java.awt.BorderLayout.CENTER); | |
118 | chooserPanel.add(chooserPane, java.awt.BorderLayout.CENTER); | |
119 | ||
120 | controlPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(7, 7, 6, 6)); | |
121 | controlPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT)); | |
122 | ||
123 | okButton.setMnemonic(bundle.getString("action.ok.mnemonic").charAt(0)); | |
124 | okButton.setText(bundle.getString("action.ok")); | |
125 | controlPanel.add(okButton); | |
126 | ||
127 | cancelButton.setMnemonic(bundle.getString("action.cancel.mnemonic").charAt(0)); | |
128 | cancelButton.setText(bundle.getString("action.cancel")); | |
129 | controlPanel.add(cancelButton); | |
130 | ||
131 | basePanel.add(controlPanel, java.awt.BorderLayout.SOUTH); | |
132 | ||
133 | getContentPane().add(basePanel, java.awt.BorderLayout.CENTER); | |
134 | ||
135 | pack(); | |
136 | }// </editor-fold>//GEN-END:initComponents | |
137 | ||
138 | // Variables declaration - do not modify//GEN-BEGIN:variables | |
139 | private javax.swing.JPanel basePanel; | |
140 | private javax.swing.JButton cancelButton; | |
141 | private javax.swing.JPanel chooserPanel; | |
142 | private javax.swing.JSeparator chooserSeparator; | |
143 | private javax.swing.JPanel controlPanel; | |
144 | private javax.swing.JButton okButton; | |
145 | // End of variables declaration//GEN-END:variables | |
146 | } |
0 | /* | |
1 | * A font chooser JavaBean component. | |
2 | * Copyright (C) 2009 Dr Christos Bohoris | |
3 | * | |
4 | * This library is free software; you can redistribute it and/or | |
5 | * modify it under the terms of the GNU Lesser General Public | |
6 | * License version 3 as published by the Free Software Foundation; | |
7 | * | |
8 | * This library is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
11 | * Lesser General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU Lesser General Public | |
14 | * License along with this library; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
16 | * | |
17 | * swing@connectina.com | |
18 | */ | |
19 | package com.connectina.swing.fontchooser; | |
20 | ||
21 | import java.awt.Font; | |
22 | import java.util.List; | |
23 | import javax.swing.event.ChangeListener; | |
24 | ||
25 | /** | |
26 | * A model that supports selecting a <code>Font</code>. | |
27 | * | |
28 | * @author Christos Bohoris | |
29 | * @see java.awt.Font | |
30 | */ | |
31 | public interface FontSelectionModel { | |
32 | ||
33 | /** | |
34 | * Returns the selected <code>Font</code> which should be | |
35 | * non-<code>null</code>. | |
36 | * | |
37 | * @return the selected <code>Font</code> | |
38 | * @see #setSelectedFont | |
39 | */ | |
40 | Font getSelectedFont(); | |
41 | ||
42 | /** | |
43 | * Sets the selected font to <code>font</code>. | |
44 | * Note that setting the font to <code>null</code> | |
45 | * is undefined and may have unpredictable results. | |
46 | * This method fires a state changed event if it sets the | |
47 | * current font to a new non-<code>null</code> font. | |
48 | * | |
49 | * @param font the new <code>Font</code> | |
50 | * @see #getSelectedFont | |
51 | * @see #addChangeListener | |
52 | */ | |
53 | void setSelectedFont(Font font); | |
54 | ||
55 | /** | |
56 | * Gets the available font names. | |
57 | * Returns a list containing the names of all font families in this | |
58 | * <code>GraphicsEnvironment</code> localized for the default locale, | |
59 | * as returned by <code>Locale.getDefault()</code>. | |
60 | * | |
61 | * @return a list of String containing font family names localized for the | |
62 | * default locale, or a suitable alternative name if no name exists | |
63 | * for this locale | |
64 | */ | |
65 | List<String> getAvailableFontNames(); | |
66 | ||
67 | /** | |
68 | * Adds <code>listener</code> as a listener to changes in the model. | |
69 | * | |
70 | * @param listener the <code>ChangeListener</code> to be added | |
71 | */ | |
72 | void addChangeListener(ChangeListener listener); | |
73 | ||
74 | /** | |
75 | * Removes <code>listener</code> as a listener to changes in the model. | |
76 | * | |
77 | * @param listener the <code>ChangeListener</code> to be removed | |
78 | */ | |
79 | void removeChangeListener(ChangeListener listener); | |
80 | ||
81 | } |
0 | <?xml version="1.0" encoding="UTF-8" ?> | |
1 | ||
2 | <Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> | |
3 | <AuxValues> | |
4 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> | |
5 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> | |
6 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> | |
7 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> | |
8 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> | |
9 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> | |
10 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> | |
11 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> | |
12 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> | |
13 | <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/> | |
14 | </AuxValues> | |
15 | ||
16 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/> | |
17 | <SubComponents> | |
18 | <Container class="javax.swing.JPanel" name="fontPanel"> | |
19 | <AuxValues> | |
20 | <AuxValue name="JavaCodeGenerator_AddingCodePost" type="java.lang.String" value="familyLabel.setDisplayedMnemonic(bundle.getString("font.family.mnemonic").charAt(0));
familyLabel.setText(bundle.getString("font.family"));
styleLabel.setDisplayedMnemonic(bundle.getString("font.style.mnemonic").charAt(0));
styleLabel.setText(bundle.getString("font.style"));
sizeLabel.setDisplayedMnemonic(bundle.getString("font.size.mnemonic").charAt(0));
sizeLabel.setText(bundle.getString("font.size"));
previewLabel.setDisplayedMnemonic(bundle.getString("font.preview.mnemonic").charAt(0));
previewLabel.setText(bundle.getString("font.preview"));"/> | |
21 | </AuxValues> | |
22 | <Constraints> | |
23 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> | |
24 | <BorderConstraints direction="Center"/> | |
25 | </Constraint> | |
26 | </Constraints> | |
27 | ||
28 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> | |
29 | <SubComponents> | |
30 | <Component class="javax.swing.JLabel" name="familyLabel"> | |
31 | <Properties> | |
32 | <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor"> | |
33 | <ComponentRef name="familyList"/> | |
34 | </Property> | |
35 | </Properties> | |
36 | <Constraints> | |
37 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> | |
38 | <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="5" insetsRight="11" anchor="17" weightX="0.0" weightY="0.0"/> | |
39 | </Constraint> | |
40 | </Constraints> | |
41 | </Component> | |
42 | <Component class="javax.swing.JLabel" name="styleLabel"> | |
43 | <Properties> | |
44 | <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor"> | |
45 | <ComponentRef name="styleList"/> | |
46 | </Property> | |
47 | </Properties> | |
48 | <Constraints> | |
49 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> | |
50 | <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="5" insetsRight="11" anchor="17" weightX="0.0" weightY="0.0"/> | |
51 | </Constraint> | |
52 | </Constraints> | |
53 | </Component> | |
54 | <Component class="javax.swing.JLabel" name="sizeLabel"> | |
55 | <Properties> | |
56 | <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor"> | |
57 | <ComponentRef name="sizeList"/> | |
58 | </Property> | |
59 | </Properties> | |
60 | <Constraints> | |
61 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> | |
62 | <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="5" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/> | |
63 | </Constraint> | |
64 | </Constraints> | |
65 | </Component> | |
66 | <Container class="javax.swing.JScrollPane" name="familyScrollPane"> | |
67 | <Properties> | |
68 | <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> | |
69 | <Dimension value="[80, 50]"/> | |
70 | </Property> | |
71 | <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> | |
72 | <Dimension value="[240, 150]"/> | |
73 | </Property> | |
74 | </Properties> | |
75 | <AuxValues> | |
76 | <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> | |
77 | </AuxValues> | |
78 | <Constraints> | |
79 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> | |
80 | <GridBagConstraints gridX="-1" gridY="1" gridWidth="1" gridHeight="2" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="11" insetsRight="11" anchor="17" weightX="1.0" weightY="1.0"/> | |
81 | </Constraint> | |
82 | </Constraints> | |
83 | ||
84 | <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> | |
85 | <SubComponents> | |
86 | <Component class="javax.swing.JList" name="familyList"> | |
87 | </Component> | |
88 | </SubComponents> | |
89 | </Container> | |
90 | <Container class="javax.swing.JScrollPane" name="styleScrollPane"> | |
91 | <Properties> | |
92 | <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> | |
93 | <Dimension value="[60, 120]"/> | |
94 | </Property> | |
95 | <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> | |
96 | <Dimension value="[80, 150]"/> | |
97 | </Property> | |
98 | </Properties> | |
99 | <AuxValues> | |
100 | <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> | |
101 | </AuxValues> | |
102 | <Constraints> | |
103 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> | |
104 | <GridBagConstraints gridX="-1" gridY="1" gridWidth="1" gridHeight="2" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="11" insetsRight="11" anchor="17" weightX="0.0" weightY="1.0"/> | |
105 | </Constraint> | |
106 | </Constraints> | |
107 | ||
108 | <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> | |
109 | <SubComponents> | |
110 | <Component class="javax.swing.JList" name="styleList"> | |
111 | </Component> | |
112 | </SubComponents> | |
113 | </Container> | |
114 | <Component class="javax.swing.JSpinner" name="sizeSpinner"> | |
115 | <Properties> | |
116 | <Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor"> | |
117 | <SpinnerModel initial="12" maximum="128" minimum="6" numberType="java.lang.Integer" stepSize="1" type="number"/> | |
118 | </Property> | |
119 | </Properties> | |
120 | <AuxValues> | |
121 | <AuxValue name="JavaCodeGenerator_CreateCodePost" type="java.lang.String" value="int spinnerHeight = (int)sizeSpinner.getPreferredSize().getHeight();
sizeSpinner.setPreferredSize(new Dimension(60, spinnerHeight));"/> | |
122 | </AuxValues> | |
123 | <Constraints> | |
124 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> | |
125 | <GridBagConstraints gridX="2" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="5" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/> | |
126 | </Constraint> | |
127 | </Constraints> | |
128 | </Component> | |
129 | <Container class="javax.swing.JScrollPane" name="sizeScrollPane"> | |
130 | <Properties> | |
131 | <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> | |
132 | <Dimension value="[50, 120]"/> | |
133 | </Property> | |
134 | <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> | |
135 | <Dimension value="[60, 150]"/> | |
136 | </Property> | |
137 | </Properties> | |
138 | <AuxValues> | |
139 | <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> | |
140 | </AuxValues> | |
141 | <Constraints> | |
142 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> | |
143 | <GridBagConstraints gridX="-1" gridY="2" gridWidth="1" gridHeight="1" fill="3" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="11" insetsRight="0" anchor="17" weightX="0.0" weightY="1.0"/> | |
144 | </Constraint> | |
145 | </Constraints> | |
146 | ||
147 | <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> | |
148 | <SubComponents> | |
149 | <Component class="javax.swing.JList" name="sizeList"> | |
150 | </Component> | |
151 | </SubComponents> | |
152 | </Container> | |
153 | </SubComponents> | |
154 | </Container> | |
155 | <Container class="javax.swing.JPanel" name="previewPanel"> | |
156 | <Constraints> | |
157 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> | |
158 | <BorderConstraints direction="South"/> | |
159 | </Constraint> | |
160 | </Constraints> | |
161 | ||
162 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/> | |
163 | <SubComponents> | |
164 | <Component class="javax.swing.JLabel" name="previewLabel"> | |
165 | <Constraints> | |
166 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> | |
167 | <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="5" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/> | |
168 | </Constraint> | |
169 | </Constraints> | |
170 | </Component> | |
171 | <Container class="javax.swing.JPanel" name="previewAreaPanel"> | |
172 | <Properties> | |
173 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> | |
174 | <Color blue="ff" green="ff" red="ff" type="rgb"/> | |
175 | </Property> | |
176 | <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> | |
177 | <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> | |
178 | <EtchetBorder/> | |
179 | </Border> | |
180 | </Property> | |
181 | <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> | |
182 | <Dimension value="[200, 80]"/> | |
183 | </Property> | |
184 | </Properties> | |
185 | <Constraints> | |
186 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> | |
187 | <GridBagConstraints gridX="-1" gridY="1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/> | |
188 | </Constraint> | |
189 | </Constraints> | |
190 | ||
191 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/> | |
192 | <SubComponents> | |
193 | <Component class="javax.swing.JLabel" name="previewAreaLabel"> | |
194 | <Properties> | |
195 | <Property name="horizontalAlignment" type="int" value="0"/> | |
196 | </Properties> | |
197 | <Constraints> | |
198 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription"> | |
199 | <BorderConstraints direction="Center"/> | |
200 | </Constraint> | |
201 | </Constraints> | |
202 | </Component> | |
203 | </SubComponents> | |
204 | </Container> | |
205 | </SubComponents> | |
206 | </Container> | |
207 | </SubComponents> | |
208 | </Form> |
0 | /* | |
1 | * A font chooser JavaBean component. | |
2 | * Copyright (C) 2009 Dr Christos Bohoris | |
3 | * | |
4 | * This library is free software; you can redistribute it and/or | |
5 | * modify it under the terms of the GNU Lesser General Public | |
6 | * License version 3 as published by the Free Software Foundation; | |
7 | * | |
8 | * This library is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
11 | * Lesser General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU Lesser General Public | |
14 | * License along with this library; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
16 | * | |
17 | * swing@connectina.com | |
18 | */ | |
19 | package com.connectina.swing.fontchooser; | |
20 | ||
21 | import java.awt.Dimension; | |
22 | import java.awt.Font; | |
23 | import java.awt.HeadlessException; | |
24 | import java.awt.Window; | |
25 | import java.awt.event.ActionEvent; | |
26 | import java.awt.event.ActionListener; | |
27 | import java.io.Serializable; | |
28 | import java.util.ResourceBundle; | |
29 | import javax.swing.DefaultListModel; | |
30 | import javax.swing.JComponent; | |
31 | import javax.swing.JDialog; | |
32 | import javax.swing.JFrame; | |
33 | import javax.swing.JPanel; | |
34 | import javax.swing.ListSelectionModel; | |
35 | import javax.swing.event.ChangeEvent; | |
36 | import javax.swing.event.ChangeListener; | |
37 | import javax.swing.event.ListSelectionEvent; | |
38 | import javax.swing.event.ListSelectionListener; | |
39 | ||
40 | /** | |
41 | * Provides a pane of controls designed to allow a user to | |
42 | * select a <code>Font</code>. | |
43 | * | |
44 | * @author Christos Bohoris | |
45 | * @see java.awt.Font | |
46 | */ | |
47 | public class JFontChooser extends JPanel { | |
48 | ||
49 | private static final long serialVersionUID = 5157499702004637097L; | |
50 | private final static ResourceBundle bundle = ResourceBundle.getBundle("com/connectina/swing/fontchooser/resources/i18n/JFontChooser"); | |
51 | private FontSelectionModel selectionModel; | |
52 | /** | |
53 | * The selection model property name. | |
54 | */ | |
55 | public static final String SELECTION_MODEL_PROPERTY = "selectionModel"; | |
56 | ||
57 | /** | |
58 | * Creates a FontChooser pane with an initial default Font | |
59 | * (Sans Serif, Plain, 12). | |
60 | */ | |
61 | public JFontChooser() { | |
62 | this(new Font(Font.SANS_SERIF, Font.PLAIN, 12)); | |
63 | } | |
64 | ||
65 | /** | |
66 | * Creates a FontChooser pane with the specified initial Font. | |
67 | * | |
68 | * @param initialFont the initial Font set in the chooser | |
69 | */ | |
70 | public JFontChooser(Font initialFont) { | |
71 | this(new DefaultFontSelectionModel(initialFont)); | |
72 | } | |
73 | ||
74 | /** | |
75 | * Creates a FontChooser pane with the specified | |
76 | * <code>FontSelectionModel</code>. | |
77 | * | |
78 | * @param model the <code>FontSelectionModel</code> to be used | |
79 | */ | |
80 | public JFontChooser(FontSelectionModel model) { | |
81 | this.selectionModel = model; | |
82 | initComponents(); | |
83 | initPanel(); | |
84 | } | |
85 | ||
86 | /** | |
87 | * Gets the current Font value from the FontChooser. | |
88 | * By default, this delegates to the model. | |
89 | * | |
90 | * @return the current Font value of the FontChooser | |
91 | */ | |
92 | public Font getSelectedFont() { | |
93 | return selectionModel.getSelectedFont(); | |
94 | } | |
95 | ||
96 | /** | |
97 | * Sets the current Font of the FontChooser to the specified Font. | |
98 | * The <code>FontSelectionModel</code> will fire a <code>ChangeEvent</code> | |
99 | * @param Font the Font to be set in the Font chooser | |
100 | * @see JComponent#addPropertyChangeListener | |
101 | */ | |
102 | public void setSelectedFont(Font Font) { | |
103 | selectionModel.setSelectedFont(Font); | |
104 | } | |
105 | ||
106 | /** | |
107 | * Returns the data model that handles Font selections. | |
108 | * | |
109 | * @return a <code>FontSelectionModel</code> object | |
110 | */ | |
111 | public FontSelectionModel getSelectionModel() { | |
112 | return selectionModel; | |
113 | } | |
114 | ||
115 | /** | |
116 | * Sets the model containing the selected Font. | |
117 | * | |
118 | * @param newModel the new <code>FontSelectionModel</code> object | |
119 | */ | |
120 | public void setSelectionModel(FontSelectionModel newModel) { | |
121 | FontSelectionModel oldModel = selectionModel; | |
122 | selectionModel = newModel; | |
123 | firePropertyChange(JFontChooser.SELECTION_MODEL_PROPERTY, oldModel, newModel); | |
124 | } | |
125 | ||
126 | /** | |
127 | * Shows a modal FontChooser dialog and blocks until the | |
128 | * dialog is hidden. If the user presses the "OK" button, then | |
129 | * this method hides/disposes the dialog and returns the selected Font. | |
130 | * If the user presses the "Cancel" button or closes the dialog without | |
131 | * pressing "OK", then this method hides/disposes the dialog and returns | |
132 | * <code>null</code>. | |
133 | * | |
134 | * @param parent the parent <code>JFrame</code> for the dialog | |
135 | * @param initialFont the initial Font set when the FontChooser is shown | |
136 | * @return the selected Font or <code>null</code> if the user opted out | |
137 | * @exception HeadlessException if GraphicsEnvironment.isHeadless() | |
138 | * returns true. | |
139 | * @see java.awt.GraphicsEnvironment#isHeadless | |
140 | */ | |
141 | public static Font showDialog(Window parent, Font initialFont) throws HeadlessException { | |
142 | final JFontChooser pane = new JFontChooser(initialFont != null ? initialFont : new Font(Font.SANS_SERIF, Font.PLAIN, 12)); | |
143 | ||
144 | FontSelectionActionListener selectionListener = new FontSelectionActionListener(pane); | |
145 | JDialog dialog = createDialog(parent, true, pane, selectionListener); | |
146 | ||
147 | dialog.setLocationRelativeTo(parent); | |
148 | dialog.setVisible(true); | |
149 | ||
150 | return selectionListener.getFont(); | |
151 | } | |
152 | ||
153 | /** | |
154 | * Shows a modal FontChooser dialog and blocks until the | |
155 | * dialog is hidden. If the user presses the "OK" button, then | |
156 | * this method hides/disposes the dialog and returns the selected Font. | |
157 | * If the user presses the "Cancel" button or closes the dialog without | |
158 | * pressing "OK", then this method hides/disposes the dialog and returns | |
159 | * <code>null</code>. | |
160 | * | |
161 | * @param parent the parent <code>JFrame</code> for the dialog | |
162 | * @param fontChooser the FontChooser to be use in this dialog | |
163 | * @param initialFont the initial Font set when the FontChooser is shown | |
164 | * @return the selected Font or <code>null</code> if the user opted out | |
165 | * @exception HeadlessException if GraphicsEnvironment.isHeadless() | |
166 | * returns true. | |
167 | * @see java.awt.GraphicsEnvironment#isHeadless | |
168 | */ | |
169 | public static Font showDialog(Window parent, JFontChooser fontChooser, Font initialFont) throws HeadlessException { | |
170 | fontChooser.setSelectedFont(initialFont != null ? initialFont : new Font(Font.SANS_SERIF, Font.PLAIN, 12)); | |
171 | ||
172 | FontSelectionActionListener selectionListener = new FontSelectionActionListener(fontChooser); | |
173 | JDialog dialog = createDialog(parent, true, fontChooser, selectionListener); | |
174 | ||
175 | dialog.setLocationRelativeTo(parent); | |
176 | dialog.setVisible(true); | |
177 | ||
178 | return selectionListener.getFont(); | |
179 | } | |
180 | ||
181 | /** | |
182 | * Creates and returns a new dialog containing the specified | |
183 | * <code>FontChooser</code> pane along with "OK" and "Cancel" | |
184 | * buttons. If the "OK" or "Cancel" buttons are pressed, the dialog is | |
185 | * automatically hidden (but not disposed). | |
186 | * | |
187 | * @param parent the parent component for the dialog | |
188 | * @param modal a boolean. When true, the remainder of the program | |
189 | * is inactive until the dialog is closed. | |
190 | * @param chooserPane the Font-chooser to be placed inside the dialog | |
191 | * @param okListener the ActionListener invoked when "OK" is pressed | |
192 | * @return a new dialog containing the FontChooser pane | |
193 | * @exception HeadlessException if GraphicsEnvironment.isHeadless() | |
194 | * returns true. | |
195 | * @see java.awt.GraphicsEnvironment#isHeadless | |
196 | */ | |
197 | public static JDialog createDialog(Window parent, boolean modal, | |
198 | JFontChooser chooserPane, ActionListener okListener) throws HeadlessException { | |
199 | if (parent instanceof JDialog) { | |
200 | return new FontChooserDialog((JDialog) parent, modal, chooserPane, | |
201 | okListener); | |
202 | } else if (parent instanceof JFrame) { | |
203 | return new FontChooserDialog((JFrame) parent, modal, chooserPane, | |
204 | okListener); | |
205 | } else { | |
206 | throw new IllegalArgumentException("JFrame or JDialog parent is required."); | |
207 | } | |
208 | } | |
209 | ||
210 | /** | |
211 | * Adds a <code>ChangeListener</code> to the model. | |
212 | * | |
213 | * @param l the <code>ChangeListener</code> to be added | |
214 | */ | |
215 | public void addChangeListener(ChangeListener l) { | |
216 | selectionModel.addChangeListener(l); | |
217 | } | |
218 | ||
219 | /** | |
220 | * Removes a <code>ChangeListener</code> from the model. | |
221 | * @param l the <code>ChangeListener</code> to be removed | |
222 | */ | |
223 | public void removeChangeListener(ChangeListener l) { | |
224 | selectionModel.removeChangeListener(l); | |
225 | } | |
226 | ||
227 | private void initPanel() { | |
228 | // Set the font family names | |
229 | DefaultListModel listModel = new DefaultListModel(); | |
230 | for (String fontName : selectionModel.getAvailableFontNames()) { | |
231 | listModel.addElement(fontName); | |
232 | } | |
233 | familyList.setModel(listModel); | |
234 | familyList.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); | |
235 | familyList.setSelectedValue(selectionModel.getSelectedFont().getName(), true); | |
236 | familyList.addListSelectionListener(new FamilyListSelectionListener()); | |
237 | ||
238 | // Set the font styles | |
239 | listModel = new DefaultListModel(); | |
240 | ||
241 | listModel.addElement(getFontStyleName(Font.PLAIN)); | |
242 | listModel.addElement(getFontStyleName(Font.BOLD)); | |
243 | listModel.addElement(getFontStyleName(Font.ITALIC)); | |
244 | listModel.addElement(getFontStyleName(Font.BOLD + Font.ITALIC)); | |
245 | styleList.setModel(listModel); | |
246 | styleList.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); | |
247 | styleList.setSelectedIndex(selectionModel.getSelectedFont().getStyle()); | |
248 | styleList.addListSelectionListener(new StyleListSelectionListener()); | |
249 | ||
250 | // Set the font sizes | |
251 | listModel = new DefaultListModel(); | |
252 | int size = 6; | |
253 | int step = 1; | |
254 | int ceil = 14; | |
255 | do { | |
256 | listModel.addElement(size); | |
257 | if (size == ceil) { | |
258 | ceil += ceil; | |
259 | step += step; | |
260 | } | |
261 | size = size + step; | |
262 | } while (size <= 128); | |
263 | ||
264 | sizeList.setModel(listModel); | |
265 | sizeList.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); | |
266 | if (listModel.contains(selectionModel.getSelectedFont().getSize())) { | |
267 | sizeList.setSelectedValue(selectionModel.getSelectedFont().getSize(), true); | |
268 | } | |
269 | sizeList.addListSelectionListener(new SizeListSelectionListener()); | |
270 | sizeSpinner.addChangeListener(new SizeSpinnerListener()); | |
271 | sizeSpinner.setValue(selectionModel.getSelectedFont().getSize()); | |
272 | previewAreaLabel.setFont(selectionModel.getSelectedFont()); | |
273 | previewAreaLabel.setText(bundle.getString("font.preview.text")); | |
274 | } | |
275 | ||
276 | private String getFontStyleName(int index) { | |
277 | String result = null; | |
278 | switch (index) { | |
279 | case 0: | |
280 | result = bundle.getString("style.plain"); | |
281 | break; | |
282 | case 1: | |
283 | result = bundle.getString("style.bold"); | |
284 | break; | |
285 | case 2: | |
286 | result = bundle.getString("style.italic"); | |
287 | break; | |
288 | case 3: | |
289 | result = bundle.getString("style.bolditalic"); | |
290 | break; | |
291 | default: | |
292 | result = bundle.getString("style.plain"); | |
293 | } | |
294 | ||
295 | return result; | |
296 | } | |
297 | ||
298 | private class FamilyListSelectionListener implements ListSelectionListener { | |
299 | ||
300 | public void valueChanged(ListSelectionEvent e) { | |
301 | if (!e.getValueIsAdjusting()) { | |
302 | selectionModel.setSelectedFont(new Font(familyList.getSelectedValue().toString(), styleList.getSelectedIndex(), Integer.valueOf(sizeSpinner.getValue().toString()))); | |
303 | previewAreaLabel.setFont(selectionModel.getSelectedFont()); | |
304 | } | |
305 | } | |
306 | } | |
307 | ||
308 | private class StyleListSelectionListener implements ListSelectionListener { | |
309 | ||
310 | public void valueChanged(ListSelectionEvent e) { | |
311 | if (!e.getValueIsAdjusting()) { | |
312 | selectionModel.setSelectedFont(selectionModel.getSelectedFont().deriveFont(styleList.getSelectedIndex())); | |
313 | ||
314 | previewAreaLabel.setFont(selectionModel.getSelectedFont()); | |
315 | } | |
316 | } | |
317 | } | |
318 | ||
319 | private class SizeListSelectionListener implements ListSelectionListener { | |
320 | ||
321 | public void valueChanged(ListSelectionEvent e) { | |
322 | if (!e.getValueIsAdjusting()) { | |
323 | int index = ((DefaultListModel) sizeList.getModel()).indexOf(sizeList.getSelectedValue()); | |
324 | if (index > -1) { | |
325 | sizeSpinner.setValue((Integer) sizeList.getSelectedValue()); | |
326 | } | |
327 | selectionModel.setSelectedFont(selectionModel.getSelectedFont().deriveFont(Float.valueOf(sizeSpinner.getValue().toString()))); | |
328 | ||
329 | previewAreaLabel.setFont(selectionModel.getSelectedFont()); | |
330 | } | |
331 | } | |
332 | } | |
333 | ||
334 | private class SizeSpinnerListener implements ChangeListener { | |
335 | ||
336 | public void stateChanged(ChangeEvent e) { | |
337 | int value = (Integer) sizeSpinner.getValue(); | |
338 | int index = ((DefaultListModel) sizeList.getModel()).indexOf(value); | |
339 | if (index > -1) { | |
340 | sizeList.setSelectedValue(value, true); | |
341 | } else { | |
342 | sizeList.clearSelection(); | |
343 | } | |
344 | } | |
345 | } | |
346 | ||
347 | private static class FontSelectionActionListener implements ActionListener, Serializable { | |
348 | ||
349 | private static final long serialVersionUID = 8141913945783951693L; | |
350 | private JFontChooser chooser; | |
351 | private Font font; | |
352 | ||
353 | public FontSelectionActionListener(JFontChooser c) { | |
354 | chooser = c; | |
355 | } | |
356 | ||
357 | public void actionPerformed(ActionEvent e) { | |
358 | font = chooser.getSelectedFont(); | |
359 | } | |
360 | ||
361 | public Font getFont() { | |
362 | return font; | |
363 | } | |
364 | } | |
365 | ||
366 | /** This method is called from within the constructor to | |
367 | * initialize the form. | |
368 | * WARNING: Do NOT modify this code. The content of this method is | |
369 | * always regenerated by the Form Editor. | |
370 | */ | |
371 | @SuppressWarnings("unchecked") | |
372 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents | |
373 | private void initComponents() { | |
374 | java.awt.GridBagConstraints gridBagConstraints; | |
375 | ||
376 | fontPanel = new javax.swing.JPanel(); | |
377 | familyLabel = new javax.swing.JLabel(); | |
378 | styleLabel = new javax.swing.JLabel(); | |
379 | sizeLabel = new javax.swing.JLabel(); | |
380 | familyScrollPane = new javax.swing.JScrollPane(); | |
381 | familyList = new javax.swing.JList(); | |
382 | styleScrollPane = new javax.swing.JScrollPane(); | |
383 | styleList = new javax.swing.JList(); | |
384 | sizeSpinner = new javax.swing.JSpinner(); | |
385 | int spinnerHeight = (int)sizeSpinner.getPreferredSize().getHeight(); | |
386 | sizeSpinner.setPreferredSize(new Dimension(60, spinnerHeight)); | |
387 | sizeScrollPane = new javax.swing.JScrollPane(); | |
388 | sizeList = new javax.swing.JList(); | |
389 | previewPanel = new javax.swing.JPanel(); | |
390 | previewLabel = new javax.swing.JLabel(); | |
391 | previewAreaPanel = new javax.swing.JPanel(); | |
392 | previewAreaLabel = new javax.swing.JLabel(); | |
393 | ||
394 | setLayout(new java.awt.BorderLayout()); | |
395 | ||
396 | fontPanel.setLayout(new java.awt.GridBagLayout()); | |
397 | ||
398 | familyLabel.setLabelFor(familyList); | |
399 | gridBagConstraints = new java.awt.GridBagConstraints(); | |
400 | gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; | |
401 | gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 11); | |
402 | fontPanel.add(familyLabel, gridBagConstraints); | |
403 | ||
404 | styleLabel.setLabelFor(styleList); | |
405 | gridBagConstraints = new java.awt.GridBagConstraints(); | |
406 | gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; | |
407 | gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 11); | |
408 | fontPanel.add(styleLabel, gridBagConstraints); | |
409 | ||
410 | sizeLabel.setLabelFor(sizeList); | |
411 | gridBagConstraints = new java.awt.GridBagConstraints(); | |
412 | gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; | |
413 | gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0); | |
414 | fontPanel.add(sizeLabel, gridBagConstraints); | |
415 | ||
416 | familyScrollPane.setMinimumSize(new java.awt.Dimension(80, 50)); | |
417 | familyScrollPane.setPreferredSize(new java.awt.Dimension(240, 150)); | |
418 | familyScrollPane.setViewportView(familyList); | |
419 | ||
420 | gridBagConstraints = new java.awt.GridBagConstraints(); | |
421 | gridBagConstraints.gridy = 1; | |
422 | gridBagConstraints.gridheight = 2; | |
423 | gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; | |
424 | gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; | |
425 | gridBagConstraints.weightx = 1.0; | |
426 | gridBagConstraints.weighty = 1.0; | |
427 | gridBagConstraints.insets = new java.awt.Insets(0, 0, 11, 11); | |
428 | fontPanel.add(familyScrollPane, gridBagConstraints); | |
429 | ||
430 | styleScrollPane.setMinimumSize(new java.awt.Dimension(60, 120)); | |
431 | styleScrollPane.setPreferredSize(new java.awt.Dimension(80, 150)); | |
432 | styleScrollPane.setViewportView(styleList); | |
433 | ||
434 | gridBagConstraints = new java.awt.GridBagConstraints(); | |
435 | gridBagConstraints.gridy = 1; | |
436 | gridBagConstraints.gridheight = 2; | |
437 | gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; | |
438 | gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; | |
439 | gridBagConstraints.weighty = 1.0; | |
440 | gridBagConstraints.insets = new java.awt.Insets(0, 0, 11, 11); | |
441 | fontPanel.add(styleScrollPane, gridBagConstraints); | |
442 | ||
443 | sizeSpinner.setModel(new javax.swing.SpinnerNumberModel(12, 6, 128, 1)); | |
444 | gridBagConstraints = new java.awt.GridBagConstraints(); | |
445 | gridBagConstraints.gridx = 2; | |
446 | gridBagConstraints.gridy = 1; | |
447 | gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; | |
448 | gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0); | |
449 | fontPanel.add(sizeSpinner, gridBagConstraints); | |
450 | ||
451 | sizeScrollPane.setMinimumSize(new java.awt.Dimension(50, 120)); | |
452 | sizeScrollPane.setPreferredSize(new java.awt.Dimension(60, 150)); | |
453 | sizeScrollPane.setViewportView(sizeList); | |
454 | ||
455 | gridBagConstraints = new java.awt.GridBagConstraints(); | |
456 | gridBagConstraints.gridy = 2; | |
457 | gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; | |
458 | gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; | |
459 | gridBagConstraints.weighty = 1.0; | |
460 | gridBagConstraints.insets = new java.awt.Insets(0, 0, 11, 0); | |
461 | fontPanel.add(sizeScrollPane, gridBagConstraints); | |
462 | ||
463 | add(fontPanel, java.awt.BorderLayout.CENTER); | |
464 | familyLabel.setDisplayedMnemonic(bundle.getString("font.family.mnemonic").charAt(0)); | |
465 | familyLabel.setText(bundle.getString("font.family")); | |
466 | styleLabel.setDisplayedMnemonic(bundle.getString("font.style.mnemonic").charAt(0)); | |
467 | styleLabel.setText(bundle.getString("font.style")); | |
468 | sizeLabel.setDisplayedMnemonic(bundle.getString("font.size.mnemonic").charAt(0)); | |
469 | sizeLabel.setText(bundle.getString("font.size")); | |
470 | previewLabel.setDisplayedMnemonic(bundle.getString("font.preview.mnemonic").charAt(0)); | |
471 | previewLabel.setText(bundle.getString("font.preview")); | |
472 | ||
473 | previewPanel.setLayout(new java.awt.GridBagLayout()); | |
474 | ||
475 | gridBagConstraints = new java.awt.GridBagConstraints(); | |
476 | gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; | |
477 | gridBagConstraints.insets = new java.awt.Insets(0, 0, 5, 0); | |
478 | previewPanel.add(previewLabel, gridBagConstraints); | |
479 | ||
480 | previewAreaPanel.setBackground(new java.awt.Color(255, 255, 255)); | |
481 | previewAreaPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); | |
482 | previewAreaPanel.setPreferredSize(new java.awt.Dimension(200, 80)); | |
483 | previewAreaPanel.setLayout(new java.awt.BorderLayout()); | |
484 | ||
485 | previewAreaLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); | |
486 | previewAreaPanel.add(previewAreaLabel, java.awt.BorderLayout.CENTER); | |
487 | ||
488 | gridBagConstraints = new java.awt.GridBagConstraints(); | |
489 | gridBagConstraints.gridy = 1; | |
490 | gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; | |
491 | gridBagConstraints.weightx = 1.0; | |
492 | previewPanel.add(previewAreaPanel, gridBagConstraints); | |
493 | ||
494 | add(previewPanel, java.awt.BorderLayout.SOUTH); | |
495 | }// </editor-fold>//GEN-END:initComponents | |
496 | // Variables declaration - do not modify//GEN-BEGIN:variables | |
497 | private javax.swing.JLabel familyLabel; | |
498 | private javax.swing.JList familyList; | |
499 | private javax.swing.JScrollPane familyScrollPane; | |
500 | private javax.swing.JPanel fontPanel; | |
501 | private javax.swing.JLabel previewAreaLabel; | |
502 | private javax.swing.JPanel previewAreaPanel; | |
503 | private javax.swing.JLabel previewLabel; | |
504 | private javax.swing.JPanel previewPanel; | |
505 | private javax.swing.JLabel sizeLabel; | |
506 | private javax.swing.JList sizeList; | |
507 | private javax.swing.JScrollPane sizeScrollPane; | |
508 | private javax.swing.JSpinner sizeSpinner; | |
509 | private javax.swing.JLabel styleLabel; | |
510 | private javax.swing.JList styleList; | |
511 | private javax.swing.JScrollPane styleScrollPane; | |
512 | // End of variables declaration//GEN-END:variables | |
513 | } |
0 | /* | |
1 | * A font chooser JavaBean component. | |
2 | * Copyright (C) 2009 Dr Christos Bohoris | |
3 | * | |
4 | * This library is free software; you can redistribute it and/or | |
5 | * modify it under the terms of the GNU Lesser General Public | |
6 | * License version 3 as published by the Free Software Foundation; | |
7 | * | |
8 | * This library is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
11 | * Lesser General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU Lesser General Public | |
14 | * License along with this library; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
16 | * | |
17 | * swing@connectina.com | |
18 | */ | |
19 | package com.connectina.swing.fontchooser; | |
20 | ||
21 | import java.beans.BeanDescriptor; | |
22 | ||
23 | /** | |
24 | * The bean descriptor for the <code>JFontChooser</code> JavaBean. | |
25 | * | |
26 | * @author Christos Bohoris | |
27 | * @see JFontChooser | |
28 | */ | |
29 | public class JFontChooserBeanDescriptor extends BeanDescriptor { | |
30 | ||
31 | public JFontChooserBeanDescriptor() { | |
32 | super(JFontChooser.class); | |
33 | setShortDescription("<html>com.connectina.fontchooser.JFontChooser<br>A font selection pane.</html>"); | |
34 | setDisplayName("Font Chooser"); | |
35 | setPreferred(true); | |
36 | } | |
37 | ||
38 | } |
0 | /* | |
1 | * A font chooser JavaBean component. | |
2 | * Copyright (C) 2009 Dr Christos Bohoris | |
3 | * | |
4 | * This library is free software; you can redistribute it and/or | |
5 | * modify it under the terms of the GNU Lesser General Public | |
6 | * License version 3 as published by the Free Software Foundation; | |
7 | * | |
8 | * This library is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
11 | * Lesser General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU Lesser General Public | |
14 | * License along with this library; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
16 | * | |
17 | * swing@connectina.com | |
18 | */ | |
19 | package com.connectina.swing.fontchooser; | |
20 | ||
21 | import java.awt.Image; | |
22 | import java.beans.*; | |
23 | ||
24 | /** | |
25 | * The bean information for the <code>JFontChooser</code> JavaBean. | |
26 | * | |
27 | * @author Christos Bohoris | |
28 | * @see JFontChooser | |
29 | */ | |
30 | public class JFontChooserBeanInfo extends SimpleBeanInfo { | |
31 | ||
32 | /* 16x16 color icon. */ | |
33 | private final Image iconColor16 = loadImage("resources/image/FontChooser16Color.png"); | |
34 | /* 32x32 color icon. */ | |
35 | private final Image iconColor32 = loadImage("resources/image/FontChooser32Color.png"); | |
36 | /* 16x16 mono icon. */ | |
37 | private final Image iconMono16 = loadImage("resources/image/FontChooser16Mono.png"); | |
38 | /* 32x32 mono icon. */ | |
39 | private final Image iconMono32 = loadImage("resources/image/FontChooser32Mono.png"); | |
40 | /* The bean descriptor. */ | |
41 | private JFontChooserBeanDescriptor descriptor = new JFontChooserBeanDescriptor(); | |
42 | ||
43 | /** | |
44 | * Get the bean descriptor. | |
45 | * | |
46 | * @return the bean descriptor | |
47 | */ | |
48 | @Override | |
49 | public BeanDescriptor getBeanDescriptor() { | |
50 | return descriptor; | |
51 | } | |
52 | ||
53 | /** | |
54 | * Get the appropriate icon. | |
55 | * | |
56 | * @param iconKind the icon kind | |
57 | * @return the image | |
58 | */ | |
59 | @Override | |
60 | public Image getIcon(int iconKind) { | |
61 | switch (iconKind) { | |
62 | case ICON_COLOR_16x16: | |
63 | return iconColor16; | |
64 | case ICON_COLOR_32x32: | |
65 | return iconColor32; | |
66 | case ICON_MONO_16x16: | |
67 | return iconMono16; | |
68 | case ICON_MONO_32x32: | |
69 | return iconMono32; | |
70 | } | |
71 | ||
72 | return null; | |
73 | } | |
74 | ||
75 | }⏎ |
0 | /** | |
1 | * <pre> Provides a Swing font chooser JavaBean component. | |
2 | * | |
3 | * Copyright (C) 2009 Dr Christos Bohoris | |
4 | * | |
5 | * This library is free software; you can redistribute it and/or | |
6 | * modify it under the terms of the GNU Lesser General Public | |
7 | * License version 3 as published by the Free Software Foundation; | |
8 | * | |
9 | * This library is distributed in the hope that it will be useful, | |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
12 | * Lesser General Public License for more details. | |
13 | * | |
14 | * You should have received a copy of the GNU Lesser General Public | |
15 | * License along with this library; if not, write to the Free Software | |
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
17 | * | |
18 | * swing@connectina.com</pre> | |
19 | */ | |
20 | package com.connectina.swing.fontchooser; | |
21 |
0 | # English | |
1 | action.ok=OK | |
2 | action.cancel=Cancel | |
3 | action.ok.mnemonic=O | |
4 | action.cancel.mnemonic=C | |
5 | window.title=Font⏎ |
0 | # German | |
1 | action.ok=OK | |
2 | action.cancel=Abbrechen | |
3 | action.ok.mnemonic=O | |
4 | action.cancel.mnemonic=A | |
5 | window.title=Schriftart⏎ |
0 | # Greek | |
1 | action.ok=\u0395\u03BD\u03C4\u03AC\u03BE\u03B5\u03B9 | |
2 | action.cancel=\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7 | |
3 | action.ok.mnemonic=\u0395 | |
4 | action.cancel.mnemonic=\u0391 | |
5 | window.title=\u0393\u03C1\u03B1\u03BC\u03BC\u03B1\u03C4\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC |
0 | # Spanish | |
1 | action.ok=Aceptar | |
2 | action.cancel=Cancelar | |
3 | action.ok.mnemonic=T | |
4 | action.cancel.mnemonic=C | |
5 | window.title=Tipo de letra⏎ |
0 | # French | |
1 | action.ok=OK | |
2 | action.cancel=Annuler | |
3 | action.ok.mnemonic=O | |
4 | action.cancel.mnemonic=L | |
5 | window.title=Police⏎ |
0 | # English | |
1 | action.ok=OK | |
2 | action.cancel=\u041e\u0442\u043c\u0435\u043d\u0430 | |
3 | action.ok.mnemonic=O | |
4 | action.cancel.mnemonic=\u0422 | |
5 | window.title=\u0428\u0440\u0438\u0444\u0442⏎ |
0 | # English | |
1 | style.plain=Regular | |
2 | style.bold=Bold | |
3 | style.italic=Italic | |
4 | font.family=Family | |
5 | font.style=Style | |
6 | font.size=Size | |
7 | font.preview=Preview | |
8 | font.family.mnemonic=F | |
9 | font.style.mnemonic=S | |
10 | font.size.mnemonic=Z | |
11 | font.preview.mnemonic=P | |
12 | font.preview.text=Aa Bb Yy Zz | |
13 | style.bolditalic=Bold Italic |
0 | # German | |
1 | style.plain=Normal | |
2 | style.bold=Fett | |
3 | style.italic=Kursiv | |
4 | font.family=Familie | |
5 | font.style=Stil | |
6 | font.size=Gr\u00F6\u00DFe | |
7 | font.preview=Vorschau | |
8 | font.family.mnemonic=F | |
9 | font.style.mnemonic=S | |
10 | font.size.mnemonic=G | |
11 | font.preview.mnemonic=V | |
12 | font.preview.text=Aa Bb Yy Zz | |
13 | style.bolditalic=Fett Kursiv |
0 | # Greek | |
1 | style.plain=\u039A\u03B1\u03BD\u03BF\u03BD\u03B9\u03BA\u03AC | |
2 | style.bold=\u0388\u03BD\u03C4\u03BF\u03BD\u03B1 | |
3 | style.italic=\u03A0\u03BB\u03AC\u03B3\u03B9\u03B1 | |
4 | font.family=\u039F\u03B9\u03BA\u03BF\u03B3\u03AD\u03BD\u03B5\u03B9\u03B1 | |
5 | font.style=\u03A3\u03C4\u03CD\u03BB | |
6 | font.size=\u039C\u03AD\u03B3\u03B5\u03B8\u03BF\u03C2 | |
7 | font.preview=\u03A0\u03C1\u03BF\u03B5\u03C0\u03B9\u03C3\u03BA\u03CC\u03C0\u03B7\u03C3\u03B7 | |
8 | font.family.mnemonic=\u039F | |
9 | font.style.mnemonic=\u03A3 | |
10 | font.size.mnemonic=\u039C | |
11 | font.preview.mnemonic=\u03A0 | |
12 | font.preview.text=Aa Bb Yy Zz | |
13 | style.bolditalic=\u0388\u03BD\u03C4\u03BF\u03BD\u03B1 \u03A0\u03BB\u03AC\u03B3\u03B9\u03B1 |
0 | # Spanish | |
1 | style.plain=Regular | |
2 | style.bold=Negrita | |
3 | style.italic=Italica | |
4 | font.family=Familia | |
5 | font.style=Estilo | |
6 | font.size=Tama\u00F1o | |
7 | font.preview=Previsualizaci\u00F3n | |
8 | font.family.mnemonic=F | |
9 | font.style.mnemonic=E | |
10 | font.size.mnemonic=T | |
11 | font.preview.mnemonic=P | |
12 | font.preview.text=Aa Bb Yy Zz | |
13 | style.bolditalic=Negrita Italica |
0 | # French | |
1 | style.plain=Normal | |
2 | style.bold=Gras | |
3 | style.italic=Italique | |
4 | font.family=Famille | |
5 | font.style=Style | |
6 | font.size=Taille | |
7 | font.preview=Aper\u00E7u | |
8 | font.family.mnemonic=F | |
9 | font.style.mnemonic=S | |
10 | font.size.mnemonic=T | |
11 | font.preview.mnemonic=P | |
12 | font.preview.text=Aa Bb Yy Zz | |
13 | style.bolditalic=Gras Italique |
0 | # English | |
1 | style.plain=\u041e\u0431\u044b\u0447\u043d\u044b\u0439 | |
2 | style.bold=\u041f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u0439 | |
3 | style.italic=\u041a\u0443\u0440\u0441\u0438\u0432 | |
4 | font.family=\u0413\u0430\u0440\u043d\u0438\u0442\u0443\u0440\u0430 | |
5 | font.style=\u041d\u0430\u0447\u0435\u0440\u0442\u0430\u043d\u0438\u0435 | |
6 | font.size=\u0420\u0430\u0437\u043c\u0435\u0440 | |
7 | font.preview=\u041f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 | |
8 | font.family.mnemonic=\u0413 | |
9 | font.style.mnemonic=\u0421 | |
10 | font.size.mnemonic=\u0420 | |
11 | font.preview.mnemonic=\u041f | |
12 | font.preview.text=\u0410\u0430 \u0411\u0431 \u0423\u0443 \u042f\u044f | |
13 | style.bolditalic=\u041f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u0439 \u043a\u0443\u0440\u0441\u0438\u0432 |
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown