import java.awt.event.*;
import jalview.analysis.*;
+import jalview.bin.JalviewLite;
import jalview.commands.*;
import jalview.datamodel.*;
import jalview.io.*;
class AboutPanel extends Canvas
{
String version;
-
- public AboutPanel(String version)
+ String builddate;
+ public AboutPanel(String version, String builddate)
{
this.version = version;
+ this.builddate = builddate;
}
public void paint(Graphics g)
// lite and application
g.setFont(new Font("Helvetica", Font.BOLD, 14));
g.drawString("JalviewLite - Release " + version, x, y += fh);
+ g.setFont(new Font("Helvetica", Font.BOLD, 12));
+ g.drawString("Build date: "+builddate, x, y += fh);
g.setFont(new Font("Helvetica", Font.PLAIN, 12));
g
.drawString(
}
}
- String version = "test";
- java.net.URL url = getClass().getResource("/.build_properties");
- if (url != null)
- {
- try
- {
- BufferedReader reader = new BufferedReader(new InputStreamReader(
- url.openStream()));
- String line;
- while ((line = reader.readLine()) != null)
- {
- if (line.indexOf("VERSION") > -1)
- {
- version = line.substring(line.indexOf("=") + 1);
- }
- }
- } catch (Exception ex)
- {
- ex.printStackTrace();
- }
- }
-
Frame frame = new Frame();
- frame.add(new AboutPanel(version));
+ frame.add(new AboutPanel(JalviewLite.getVersion(), JalviewLite.getBuildDate()));
jalview.bin.JalviewLite.addFrame(frame, "Jalview", 580, 220);
}