You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by tw...@apache.org on 2007/01/10 17:46:01 UTC
svn commit: r494888 -
/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/Gladis.java
Author: twgoetz
Date: Wed Jan 10 08:46:00 2007
New Revision: 494888
URL: http://svn.apache.org/viewvc?view=rev&rev=494888
Log:
Jira UIMA-171
https://issues.apache.org/jira/browse/UIMA-171
Modified:
incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/Gladis.java
Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/Gladis.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/Gladis.java?view=diff&rev=494888&r1=494887&r2=494888
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/Gladis.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/Gladis.java Wed Jan 10 08:46:00 2007
@@ -44,15 +44,14 @@
private static final String EXECUTE_SWITCH = "-exec";
private static final String DATA_PATH_PARAM = "-datapath";
+
+ private static final String LOOK_AND_FEEL_PARAM = "-lookandfeel";
private Gladis() {
super();
}
- public static MainFrame createMainFrame() throws ClassNotFoundException, InstantiationException,
- IllegalAccessException, UnsupportedLookAndFeelException {
- // Set look-and-feel.
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ public static MainFrame createMainFrame() {
final MainFrame frame = new MainFrame();
// Set icon.
ImageIcon icon = Images.getImageIcon(Images.MICROSCOPE);
@@ -74,6 +73,7 @@
parser.addParameter(TEXT_FILE_PARAM, true);
parser.addParameter(DESC_FILE_PARAM, true);
parser.addParameter(DATA_PATH_PARAM, true);
+ parser.addParameter(LOOK_AND_FEEL_PARAM, true);
parser.addParameter(EXECUTE_SWITCH);
return parser;
}
@@ -81,6 +81,8 @@
private static final void printUsage() {
System.out
.println("Usage: java org.apache.uima.annot_view.Gladis [-text <TextFile>] [-desc <XmlDescriptor>] [-datapath <DataPath>] [-exec]");
+ System.out.println("Additional optional parameters:");
+ System.out.println(" -lookandfeel <LookAndFeelClassName>");
}
private static final boolean checkCmdLineSyntax(CommandLineParser clp) {
@@ -111,6 +113,15 @@
}
SplashScreen splashScreen = new SplashScreen(new JWindow());
splashScreen.start();
+ String lookAndFeel = null;
+ if (clp.isInArgsList(LOOK_AND_FEEL_PARAM)) {
+ lookAndFeel = clp.getParamArgument(LOOK_AND_FEEL_PARAM);
+ try {
+ UIManager.setLookAndFeel(lookAndFeel);
+ } catch (UnsupportedLookAndFeelException e) {
+ System.err.println(e.getMessage());
+ }
+ }
MainFrame frame = createMainFrame();
splashScreen.close();
splashScreen.join();