01: /**
02: * Caption: Zaval Java Resource Editor
03: * $Revision: 0.37 $
04: * $Date: 2002/03/28 9:24:42 $
05: *
06: * @author: Victor Krapivin
07: * @version: 2.0
08: *
09: * Zaval JRC Editor is a visual editor which allows you to manipulate
10: * localization strings for all Java based software with appropriate
11: * support embedded.
12: *
13: * For more info on this product read Zaval Java Resource Editor User's Guide
14: * (It comes within this package).
15: * The latest product version is always available from the product's homepage:
16: * http://www.zaval.org/products/jrc-editor/
17: * and from the SourceForge:
18: * http://sourceforge.net/projects/zaval0002/
19: *
20: * Contacts:
21: * Support : support@zaval.org
22: * Change Requests : change-request@zaval.org
23: * Feedback : feedback@zaval.org
24: * Other : info@zaval.org
25: *
26: * Copyright (C) 2001-2002 Zaval Creative Engineering Group (http://www.zaval.org)
27: *
28: * This program is free software; you can redistribute it and/or
29: * modify it under the terms of the GNU General Public License
30: * (version 2) as published by the Free Software Foundation.
31: *
32: * This program is distributed in the hope that it will be useful,
33: * but WITHOUT ANY WARRANTY; without even the implied warranty of
34: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35: * GNU General Public License for more details.
36: *
37: * You should have received a copy of the GNU General Public License
38: * along with this program; if not, write to the Free Software
39: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40: *
41: */package org.zaval.tools.i18n.translator;
42:
43: import java.io.*;
44: import java.awt.*;
45: import java.util.*;
46: import org.zaval.util.SafeResourceBundle;
47:
48: public class Main {
49: public static void main(String arg[]) throws Exception {
50: String altDir = System.getProperty("my.root.dir");
51: File f = new File(altDir != null ? altDir : ".");
52: String path = f.getAbsolutePath();
53: if (path.endsWith("."))
54: path = path.substring(0, path.length() - 1);
55: path += "/images/";
56:
57: Translator t = null;
58: if (arg.length > 0) {
59: t = new Translator(path, new SafeResourceBundle(
60: "jrc-editor", Locale.getDefault()), arg[0]);
61: } else
62: t = new Translator(path, new SafeResourceBundle(
63: "jrc-editor", Locale.getDefault()));
64:
65: Dimension gdz = Toolkit.getDefaultToolkit().getScreenSize();
66: int optimalX = gdz.width / 4 * 3;
67: int optimalY = gdz.height / 4 * 3;
68: t.move((gdz.width - optimalX) / 2, (gdz.height - optimalY) / 2);
69: t.resize(optimalX, optimalY);
70: t.show();
71: }
72: }
|