Ignore:
Timestamp:
2014-10-19T18:50:58+02:00 (10 years ago)
Author:
donvip
Message:

[josm_plastic_laf] fix plugin, update to latest version of look and feel

Location:
applications/editors/josm/plugins/plastic_laf
Files:
5 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/plastic_laf/.classpath

    r30416 r30749  
    44        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
    55        <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
    6         <classpathentry kind="lib" path="lib/looks-2.2.1.jar"/>
     6        <classpathentry kind="lib" path="lib/jgoodies-common-1.8.0.jar"/>
     7        <classpathentry kind="lib" path="lib/jgoodies-looks-2.6.0.jar"/>
    78        <classpathentry kind="output" path="bin"/>
    89</classpath>
  • applications/editors/josm/plugins/plastic_laf/.settings/org.eclipse.jdt.core.prefs

    r30736 r30749  
    77org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
    88org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
     9org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
    910org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
     11org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
    1012org.eclipse.jdt.core.compiler.compliance=1.7
     13org.eclipse.jdt.core.compiler.debug.lineNumber=generate
     14org.eclipse.jdt.core.compiler.debug.localVariable=generate
     15org.eclipse.jdt.core.compiler.debug.sourceFile=generate
     16org.eclipse.jdt.core.compiler.doc.comment.support=enabled
    1117org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
    1218org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
     
    3238org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
    3339org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
     40org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
     41org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
     42org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
     43org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
     44org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
    3445org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
    3546org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
     
    3849org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
    3950org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
     51org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
     52org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
     53org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
     54org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
     55org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
     56org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
     57org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
     58org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
    4059org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
    4160org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
  • applications/editors/josm/plugins/plastic_laf/build.xml

    r30530 r30749  
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    66    <property name="plugin.main.version" value="7001"/>
    7     <property name="josm" location="../../core/dist/josm-custom.jar"/>
    8     <property name="plugin.dist.dir" value="../../dist"/>
    9     <property name="plugin.build.dir" value="build"/>
    10     <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
    11     <property name="ant.build.javac.target" value="1.7"/>
    12     <property name="looks" value="lib/looks-2.2.1.jar"/>
    13     <target name="init">
    14         <mkdir dir="${plugin.build.dir}"/>
    15     </target>
    16     <target name="compile" depends="init">
    17         <echo message="creating ${plugin.jar}"/>
    18         <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}" includeantruntime="false">
    19             <compilerarg value="-Xlint:deprecation"/>
    20             <compilerarg value="-Xlint:unchecked"/>
    21             <classpath>
    22                 <pathelement location="${josm}"/>
    23                 <pathelement location="${looks}"/>
    24             </classpath>
    25         </javac>
    26     </target>
    27     <target name="dist" depends="compile,revision">
    28         <unjar dest="${plugin.build.dir}" src="${looks}"/>
    29         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
    30             <manifest>
    31                 <attribute name="Author" value="Imi"/>
    32                 <attribute name="Plugin-Class" value="plastic_laf.Plugin"/>
    33                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    34                 <attribute name="Plugin-Description" value="The great JGoodies Plastic Look and Feel."/>
    35                 <attribute name="Plugin-Early" value="true"/>
    36                 <attribute name="Plugin-Link" value="http://www.jgoodies.com/"/>
    37                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    38                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    39             </manifest>
    40         </jar>
    41     </target>
    42     <target name="revision">
    43         <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    44             <env key="LANG" value="C"/>
    45             <arg value="info"/>
    46             <arg value="--xml"/>
    47             <arg value="."/>
    48         </exec>
    49         <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
    50         <delete file="REVISION"/>
    51     </target>
    52     <target name="clean">
    53         <delete dir="${plugin.build.dir}"/>
    54         <delete file="${plugin.jar}"/>
    55     </target>
    56     <target name="install" depends="dist">
    57         <property environment="env"/>
    58         <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
    59             <and>
    60                 <os family="windows"/>
    61             </and>
    62         </condition>
    63         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
    64     </target>
    65     <!--
    66     ************************** Publishing the plugin ***********************************
     7       
     8        <!-- Configure these properties (replace "..." accordingly).
     9         See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
    6710    -->
    68     <!--
    69         ** extracts the JOSM release for the JOSM version in ../core and saves it in the
    70         ** property ${coreversion.info.entry.revision}
    71         **
    72         -->
    73     <target name="core-info">
    74         <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
    75             <env key="LANG" value="C"/>
    76             <arg value="info"/>
    77             <arg value="--xml"/>
    78             <arg value="../../core"/>
    79         </exec>
    80         <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
    81         <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
    82         <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
    83         <delete file="core.info.xml"/>
    84     </target>
    85     <!--
    86         ** commits the source tree for this plugin
    87         -->
    88     <target name="commit-current">
    89         <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
    90         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    91             <env key="LANG" value="C"/>
    92             <arg value="commit"/>
    93             <arg value="-m '${commit.message}'"/>
    94             <arg value="."/>
    95         </exec>
    96     </target>
    97     <!--
    98         ** updates (svn up) the source tree for this plugin
    99         -->
    100     <target name="update-current">
    101         <echo>Updating plugin source ...</echo>
    102         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    103             <env key="LANG" value="C"/>
    104             <arg value="up"/>
    105             <arg value="."/>
    106         </exec>
    107         <echo>Updating ${plugin.jar} ...</echo>
    108         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    109             <env key="LANG" value="C"/>
    110             <arg value="up"/>
    111             <arg value="../dist/${plugin.jar}"/>
    112         </exec>
    113     </target>
    114     <!--
    115         ** commits the plugin.jar
    116         -->
    117     <target name="commit-dist">
    118         <echo>
    119     ***** Properties of published ${plugin.jar} *****
    120     Commit message    : '${commit.message}'                 
    121     Plugin-Mainversion: ${plugin.main.version}
    122     JOSM build version: ${coreversion.info.entry.revision}
    123     Plugin-Version    : ${version.entry.commit.revision}
    124     ***** / Properties of published ${plugin.jar} *****                 
    125                        
    126     Now commiting ${plugin.jar} ...
    127     </echo>
    128         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
    129             <env key="LANG" value="C"/>
    130             <arg value="-m '${commit.message}'"/>
    131             <arg value="commit"/>
    132             <arg value="${plugin.jar}"/>
    133         </exec>
    134     </target>
    135     <!-- ** make sure svn is present as a command line tool ** -->
    136     <target name="ensure-svn-present">
    137         <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
    138             <env key="LANG" value="C"/>
    139             <arg value="--version"/>
    140         </exec>
    141         <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
    142             <!-- return code not set at all? Most likely svn isn't installed -->
    143             <condition>
    144                 <not>
    145                     <isset property="svn.exit.code"/>
    146                 </not>
    147             </condition>
    148         </fail>
    149         <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
    150             <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
    151             <condition>
    152                 <isfailure code="${svn.exit.code}"/>
    153             </condition>
    154         </fail>
    155     </target>
    156     <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
    157     </target>
     11        <property name="plugin.author" value="Imi" />
     12        <property name="plugin.class" value="plastic_laf.Plugin" />
     13        <property name="plugin.description" value="The great JGoodies Plastic Look and Feel." />
     14        <!--<property name="plugin.icon" value="" />-->
     15        <property name="plugin.early" value="true" />
     16        <property name="plugin.link" value="http://www.jgoodies.com/freeware/libraries/looks"/>
     17
     18        <property name="josm" location="../../core/dist/josm-custom.jar" />
     19        <property name="plugin.dist.dir" value="../../dist" />
     20
     21        <!-- ** include targets that all plugins have in common ** -->
     22        <import file="../build-common.xml" />
    15823</project>
  • applications/editors/josm/plugins/plastic_laf/src/plastic_laf/Plugin.java

    r19469 r30749  
     1//License: GPL
    12package plastic_laf;
    23
     
    67import org.openstreetmap.josm.plugins.PluginInformation;
    78
     9import com.jgoodies.looks.plastic.Plastic3DLookAndFeel;
    810import com.jgoodies.looks.plastic.PlasticLookAndFeel;
     11import com.jgoodies.looks.plastic.PlasticXPLookAndFeel;
    912
     13/**
     14 * Plugin that brings JGoodies Plastic Look and Feel to JOSM.
     15 */
    1016public class Plugin {
     17
     18        /**
     19         * Constructs a new {@code Plugin}.
     20         * @param info plugin info
     21         * @throws UnsupportedLookAndFeelException if look and feel cannot be set
     22         */
    1123    public Plugin(PluginInformation info) throws UnsupportedLookAndFeelException {
    1224        UIManager.getDefaults().put("ClassLoader", getClass().getClassLoader());
    13         UIManager.setLookAndFeel(new PlasticLookAndFeel());
     25        UIManager.installLookAndFeel("Plastic", PlasticLookAndFeel.class.getName());
     26        UIManager.installLookAndFeel("Plastic3D", Plastic3DLookAndFeel.class.getName());
     27        UIManager.installLookAndFeel("PlasticXP", PlasticXPLookAndFeel.class.getName());
    1428    }
    1529}
Note: See TracChangeset for help on using the changeset viewer.