1
<?xml version="1.0" encoding="UTF-8"?>
3
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
5
Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
8
The contents of this file are subject to the terms of either the GNU
9
General Public License Version 2 only ("GPL") or the Common
10
Development and Distribution License("CDDL") (collectively, the
11
"License"). You may not use this file except in compliance with the
12
License. You can obtain a copy of the License at
13
http://www.netbeans.org/cddl-gplv2.html
14
or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
15
specific language governing permissions and limitations under the
16
License. When distributing the software, include this License Header
17
Notice in each file and include the License file at
18
nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
19
particular file as subject to the "Classpath" exception as provided
20
by Sun in the GPL Version 2 section of the License file that
21
accompanied this code. If applicable, add the following below the
22
License Header, with the fields enclosed by brackets [] replaced by
23
your own identifying information:
24
"Portions Copyrighted [year] [name of copyright owner]"
28
The Original Software is NetBeans. The Initial Developer of the Original
29
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
30
Microsystems, Inc. All Rights Reserved.
32
If you wish your version of this file to be governed by only the CDDL
33
or only the GPL Version 2, indicate your decision by adding
34
"[Contributor] elects to include this software in this distribution
35
under the [CDDL or GPL Version 2] license." If you do not indicate a
36
single choice of license, a recipient has the option to distribute
37
your version of this file under either the CDDL, the GPL Version 2 or
38
to extend the choice of license to its licensees as provided above.
39
However, if you add GPL Version 2 code and therefore, elected the GPL
40
Version 2 license, then the option applies only if the new code is
41
made subject to such option by the copyright holder.
43
<project name="core/swing/tabcontrol" default="test-beanjar" basedir=".">
45
<!-- Stuff here is only used when compiling a standalone jar
46
of the tab control for use outside netbeans. What you need:
47
- A complete checkout of this module
48
- A checkout of at least the dir src/org/openide/awt from the cvs
52
- Copy the current version of the NetBeans fast HTML renderer into
54
- Compile it, along with a stub version of org.openide.ErrorManager
55
which just prints to the console
56
- Create a jar consisting of the tab control, the ErrorManager stub
57
and the three classes that make up the HTML renderer
60
<available type="file" file="../../../openide/src/org/openide/awt/HtmlRenderer.java" property="found-openide"/>
62
<target name="check-openide" unless="found-openide">
63
<property name="dont-do-checkout" value="true"/>
64
<fail message="You need a checkout of openide to build this jar. Only three needed classes from it will be compiled and included in the resulting jar from this build."/>
67
<target name="set-openide-dir" if="found-openide">
68
<property value="../../../openide/src" name="openide-source-dir"/>
69
<echo message="Openide src dir set to ${openide-source-dir}"/>
72
<target name="prepare-beanjar" depends="check-openide,set-openide-dir">
73
<mkdir dir="beanstubs/org/openide/awt"/>
74
<copy file="../../../openide/src/org/openide/awt/HtmlRenderer.java" todir="beanstubs/org/openide/awt" failonerror="true"/>
75
<copy file="../../../openide/src/org/openide/awt/HtmlLabelUI.java" todir="beanstubs/org/openide/awt" failonerror="true"/>
76
<copy file="../../../openide/src/org/openide/awt/HtmlRendererImpl.java" todir="beanstubs/org/openide/awt" failonerror="true"/>
79
<target name="compile-bean" depends="prepare-beanjar">
80
<mkdir dir="beanclasses"/>
81
<javac debug="true" destdir="beanclasses" source="1.4">
82
<src path="beanstubs"/>
87
<target name="beanjar" description="Compiles the tabbed control as a standalone library" depends="compile-bean">
88
<jar basedir="beanclasses" jarfile="tabbedcontainer.jar"/>
91
<target name="rebuild-beanjar" depends="clean-bean,beanjar"/>
93
<target name="clean-bean" description="Clean build products from creating the bean jar">
94
<delete dir="beanstubs/org/openide/awt"/>
95
<delete dir="beanclasses"/>
96
<delete file="tabbedcontainer.jar"/>
99
<target name="test-beanjar" depends="rebuild-beanjar,compile-beanjar-demo" description="Runs the demo based on a build of the bean jar rather than class files">
100
<echo message="Demo args: ${application.args}"/>
101
<java fork="true" classname="org.netbeans.swing.tabcontrol.demo.TestFrame" args="${application.args}">
102
<classpath refid="beanjar-demo.cp"/>
106
<target name="beanjar-demo-init">
107
<path id="beanjar-demo.cp">
108
<pathelement location="build/democlasses"/>
109
<fileset file="tabbedcontainer.jar"/>
113
<target name="compile-beanjar-demo" depends="beanjar-demo-init,beanjar">
114
<mkdir dir="build/democlasses"/>
115
<javac srcdir="demosrc" destdir="build/democlasses" debug="true" source="1.4" deprecation="false" includeantruntime="false">
116
<classpath refid="beanjar-demo.cp"/>