Changeset 1467 in osm for utils/josm/plugins/plastic_laf


Ignore:
Timestamp:
2006-10-13T21:50:23+02:00 (18 years ago)
Author:
imi
Message:

added josm translation plugins and annotation-tester plugin

Location:
utils/josm/plugins/plastic_laf
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • utils/josm/plugins/plastic_laf/.classpath

    r1439 r1467  
    33        <classpathentry kind="src" path="src"/>
    44        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    5         <classpathentry combineaccessrules="false" kind="src" path="/josm"/>
    65        <classpathentry kind="lib" path="lib/looks-2.0.4.jar"/>
    76        <classpathentry kind="output" path="bin"/>
  • utils/josm/plugins/plastic_laf/build.xml

    r1439 r1467  
    1 <project name="plastic_laf" default="build" basedir=".">
     1<project name="plastic_laf" default="install" basedir=".">
    22
    3         <path id="classpath">
    4                 <fileset file="../../../../editors/josm/dist/josm-custom.jar" />
    5                 <fileset dir="lib" />
    6         </path>
    7 
    8 
    9         <target name="compile">
    10                 <mkdir dir="build"></mkdir>
    11                 <mkdir dir="dist"></mkdir>
    12                 <javac srcdir="src" classpathref="classpath" debug="true" destdir="build">
    13                         <include name="**/*.java" />
    14                 </javac>
    15         </target>
    16 
    17         <target name="build" depends="compile">
    18                 <unjar dest="build" src="lib/looks-2.0.4.jar" />
    19                 <jar destfile="dist/plastic_laf.jar" basedir="build">
     3        <target name="install">
     4                <unjar dest="bin" src="lib/looks-2.0.4.jar" />
     5                <jar destfile="${user.home}/.josm/plugins/plastic_laf.jar" basedir="bin">
    206                        <manifest>
    217                                <attribute name="Plugin-Class" value="plastic_laf.Plugin" />
    228                                <attribute name="Plugin-Description" value="The great JGoodies Plastic Look and Feel" />
     9                                <attribute name="Plugin-Early" value="true" />
    2310                        </manifest>
    2411                </jar>
    2512        </target>
    2613
    27         <target name="clean">
    28                 <delete dir="build" />
    29                 <delete dir="dist" />
    30         </target>
    31 
    32         <target name="install" depends="build">
    33                 <copy file="dist/plastic_laf.jar" todir="${user.home}/.josm/plugins"/>
    34         </target>
    35 
    3614</project>
  • utils/josm/plugins/plastic_laf/src/plastic_laf/Plugin.java

    r1439 r1467  
    11package plastic_laf;
    22
    3 import javax.swing.SwingUtilities;
    43import javax.swing.UIManager;
    5 
    6 import org.openstreetmap.josm.Main;
    7 import org.openstreetmap.josm.actions.DownloadAction.DownloadTask;
     4import javax.swing.UnsupportedLookAndFeelException;
    85
    96import com.jgoodies.looks.plastic.PlasticLookAndFeel;
    107
    118public class Plugin {
    12 
    13         public Plugin() {
    14                 try {
    15                         UIManager.getDefaults().put("ClassLoader", getClass().getClassLoader());
    16                         UIManager.setLookAndFeel(new PlasticLookAndFeel());
    17 
    18                         SwingUtilities.updateComponentTreeUI(Main.parent);
    19                         SwingUtilities.updateComponentTreeUI(Main.pleaseWaitDlg);
    20                         for (DownloadTask task : Main.main.downloadAction.downloadTasks)
    21                                 SwingUtilities.updateComponentTreeUI(task.getCheckBox());
    22                 } catch (Exception e) {
    23                         if (e instanceof RuntimeException)
    24                                 throw (RuntimeException)e;
    25                         throw new RuntimeException(e);
    26                 }
     9        public Plugin() throws UnsupportedLookAndFeelException {
     10                UIManager.getDefaults().put("ClassLoader", getClass().getClassLoader());
     11                UIManager.setLookAndFeel(new PlasticLookAndFeel());
    2712        }
    2813}
Note: See TracChangeset for help on using the changeset viewer.