You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by ch...@apache.org on 2003/01/04 11:31:09 UTC
cvs commit: jakarta-ant-antidote/src/java/org/apache/tools/ant/gui/resources antidote.properties
chrisw 2003/01/04 02:31:09
Modified: src/java/org/apache/tools/ant/gui Main.java About.java
src/java/org/apache/tools/ant/gui/resources
antidote.properties
Log:
Added Ant Version/Build to AboutDlg and 2002 -> 2003
Revision Changes Path
1.5 +9 -3 jakarta-ant-antidote/src/java/org/apache/tools/ant/gui/Main.java
Index: Main.java
===================================================================
RCS file: /home/cvs/jakarta-ant-antidote/src/java/org/apache/tools/ant/gui/Main.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Main.java 26 Jul 2001 07:07:40 -0000 1.4
+++ Main.java 4 Jan 2003 10:31:08 -0000 1.5
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999, 2000 The Apache Software Foundation. All rights
+ * Copyright (c) 2��� - 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -63,6 +63,7 @@
import org.apache.tools.ant.gui.event.AppShutdownEvent;
import org.apache.tools.ant.gui.acs.ACSFactory;
+import javax.swing.JFrame;
import javax.swing.ImageIcon;
import javax.swing.JMenuBar;
@@ -86,10 +87,15 @@
Args settings = new Args(args);
+ try {
+ javax.swing.UIManager.setLookAndFeel("net.sourceforge.mlf.metouia.MetouiaLookAndFeel");
+ }
+ catch (Exception e) {}
try {
+
MainFrame f = new MainFrame("Antidote");
- f.setDefaultCloseOperation(3 /*JFrame.EXIT_ON_CLOSE*/);
+ f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
AppContext context = new AppContext(f);
f.setContext(context);
1.4 +26 -26 jakarta-ant-antidote/src/java/org/apache/tools/ant/gui/About.java
Index: About.java
===================================================================
RCS file: /home/cvs/jakarta-ant-antidote/src/java/org/apache/tools/ant/gui/About.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- About.java 18 Dec 2002 20:44:23 -0000 1.3
+++ About.java 4 Jan 2003 10:31:08 -0000 1.4
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000 - 2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000 - 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -152,22 +152,18 @@
private JPanel getClientInfoPanel() {
JPanel infoPanel = new JPanel(new GridBagLayout());
- String version = null;
- String date = null;
-
Properties props = new Properties();
+ Properties antProps = new Properties();
try {
props.load(getClass().getResourceAsStream("version.txt"));
+ antProps.load(getClass().getResourceAsStream("/org/apache/tools/ant/version.txt"));
}
catch(IOException ex) {
// XXX log me.
ex.printStackTrace();
}
- version = props.getProperty("VERSION", "??");
- date = props.getProperty("DATE", "??");
-
JLabel iaLogoLabel = new JLabel();
iaLogoLabel.setIcon(new ImageIcon(getClass().getResource("/org/apache/tools/ant/gui/resources/ant_small.gif")));
infoPanel.add(iaLogoLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 6, 0, 0), 0, 0));
@@ -190,26 +186,30 @@
clientTable.getColumnModel().addColumn(col);
String [] dummy = {"",""};
- String[][] data = new String[9][2];
+ String[][] data = new String[11][2];
data[0][0] = (_context!=null?_context.getResources().getString(getClass(), "version"):"Version");
- data[0][1] = version;
+ data[0][1] = props.getProperty("VERSION", "??");
data[1][0] = (_context!=null?_context.getResources().getString(getClass(), "date"):"Date");
- data[1][1] = date;
- data[2][0] = (_context!=null?_context.getResources().getString(getClass(), "operatingSystem"):"Operating System");
- data[2][1] = System.getProperty("os.name")+" version "+System.getProperty("os.version")+" running on "+System.getProperty("os.arch");
- data[3][0] = "Java";
- data[3][1] = System.getProperty("java.version");
- data[4][0] = "VM";
- data[4][1] = System.getProperty("java.vm.name")+" "+System.getProperty("java.vm.version");
- data[5][0] = "Java Home";
- data[5][1] = System.getProperty("java.home");
- data[6][0] = "System Locale";
- data[6][1] = System.getProperty("user.language")+"_"+System.getProperty("user.region");
- data[7][0] = (_context!=null?_context.getResources().getString(getClass(), "freeMemory"):"Free Memory");
- data[7][1] = (Runtime.getRuntime().freeMemory()/1024)+" kByte";
- data[8][0] = (_context!=null?_context.getResources().getString(getClass(), "totalMemory"):"Total Memory");
- data[8][1] = (Runtime.getRuntime().totalMemory()/1024)+" kByte";
-
+ data[1][1] = props.getProperty("DATE", "??");
+ data[2][0] = (_context!=null?_context.getResources().getString(getClass(), "antVersion"):"Ant Version");
+ data[2][1] = antProps.getProperty("VERSION", "??");
+ data[3][0] = (_context!=null?_context.getResources().getString(getClass(), "antDate"):"Ant Build Date");
+ data[3][1] = antProps.getProperty("DATE", "??");
+ data[4][0] = (_context!=null?_context.getResources().getString(getClass(), "operatingSystem"):"Operating System");
+ data[4][1] = System.getProperty("os.name")+" version "+System.getProperty("os.version")+" running on "+System.getProperty("os.arch");
+ data[5][0] = "Java";
+ data[5][1] = System.getProperty("java.version");
+ data[6][0] = "VM";
+ data[6][1] = System.getProperty("java.vm.name")+" "+System.getProperty("java.vm.version");
+ data[7][0] = "Java Home";
+ data[7][1] = System.getProperty("java.home");
+ data[8][0] = "System Locale";
+ data[8][1] = System.getProperty("user.language")+"_"+System.getProperty("user.region");
+ data[9][0] = (_context!=null?_context.getResources().getString(getClass(), "freeMemory"):"Free Memory");
+ data[9][1] = (Runtime.getRuntime().freeMemory()/1024)+" kByte";
+ data[10][0] = (_context!=null?_context.getResources().getString(getClass(), "totalMemory"):"Total Memory");
+ data[10][1] = (Runtime.getRuntime().totalMemory()/1024)+" kByte";
+
clientTable.setModel(new DefaultTableModel(data, dummy) {
public boolean isCellEditable(int r, int c) {
return false;
1.6 +4 -2 jakarta-ant-antidote/src/java/org/apache/tools/ant/gui/resources/antidote.properties
Index: antidote.properties
===================================================================
RCS file: /home/cvs/jakarta-ant-antidote/src/java/org/apache/tools/ant/gui/resources/antidote.properties,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- antidote.properties 18 Dec 2002 20:44:23 -0000 1.5
+++ antidote.properties 4 Jan 2003 10:31:09 -0000 1.6
@@ -138,9 +138,11 @@
org.apache.tools.ant.gui.About.title=About
org.apache.tools.ant.gui.About.version=Version
+org.apache.tools.ant.gui.About.date=Build Date
+org.apache.tools.ant.gui.About.antVersion=Ant Version
+org.apache.tools.ant.gui.About.antDate=Ant Build Date
org.apache.tools.ant.gui.About.message=\
- <html><font face=Arial size=1 color=#000000>Copyright © 2002 The Apache Software Foundation. All rights reserved.<br>For more informations visit <b>ant.apache.org</b></font></html>
-org.apache.tools.ant.gui.About.date=Date
+ <html><font face=Arial size=1 color=#000000>Copyright © 2003 The Apache Software Foundation. All rights reserved.<br>For more informations visit <b>ant.apache.org</b></font></html>
org.apache.tools.ant.gui.About.operatingSystem=Operating System
org.apache.tools.ant.gui.About.freeMemory=Free Memory
org.apache.tools.ant.gui.About.totalMemory=Total Memory
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>