vhardy 2003/07/09 11:01:12 Modified: sources/org/apache/batik/apps/svgbrowser AboutDialog.java Added: sources/org/apache/batik Version.java Log: Added Version class as requested in Bug #17863 Revision Changes Path 1.1 xml-batik/sources/org/apache/batik/Version.java Index: Version.java =================================================================== /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * version 1.1, a copy of which has been included with this distribution in * * the LICENSE file. * *****************************************************************************/ package org.apache.batik; /** * This class defines the Batik version number. * * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Hardy</a> * @version $Id: Version.java,v 1.1 2003/07/09 18:01:12 vhardy Exp $ */ public final class Version { public static final String LABEL_DEVELOPMENT_BUILD = "development.build"; /** * @return the Batik version. This is based on the CVS tag. * If this Version is not part of a tagged release, then * the returned value is a constant reflecting a development * build. */ public static String getVersion() { String tagName = "$Name: $"; if (tagName.startsWith("$Name:")) { tagName = tagName.substring(6, tagName.length()-1); } else { tagName = ""; } if(tagName.trim().intern().equals("")){ tagName = LABEL_DEVELOPMENT_BUILD; } return tagName; } } 1.11 +4 -14 xml-batik/sources/org/apache/batik/apps/svgbrowser/AboutDialog.java Index: AboutDialog.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/apps/svgbrowser/AboutDialog.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- AboutDialog.java 11 Apr 2003 13:54:35 -0000 1.10 +++ AboutDialog.java 9 Jul 2003 18:01:12 -0000 1.11 @@ -30,6 +30,8 @@ import javax.swing.SwingConstants; import javax.swing.border.BevelBorder; +import org.apache.batik.Version; + /** * A dialog showing the revision of the Batik viewer as well * as the list of contributors. @@ -52,9 +54,6 @@ public static final String LABEL_CONTRIBUTORS = "AboutDialog.label.contributors"; - public static final String LABEL_DEVELOPMENT_BUILD - = "AboutDialog.label.development.build"; - /** * Default constructor */ @@ -136,16 +135,7 @@ // // Add exact revision information // - String tagName = "$Name$"; - if (tagName.startsWith("$Name:")) { - tagName = tagName.substring(6, tagName.length()-1); - } else { - tagName = ""; - } - - if(tagName.trim().intern().equals("")){ - tagName = Resources.getString(LABEL_DEVELOPMENT_BUILD); - } + String tagName = Version.getVersion(); panel.add(BorderLayout.SOUTH, new JLabel(tagName, SwingConstants.RIGHT));
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]