diff options
author | Victor Häggqvist <[email protected]> | 2014-05-11 20:35:02 +0200 |
---|---|---|
committer | Victor Häggqvist <[email protected]> | 2014-05-11 20:35:02 +0200 |
commit | 5b1303abd341cc6f1ddfd14c2099c60e99794274 (patch) | |
tree | e815bcb62f79bb36172f9826af80454d1070ce1f | |
parent | 35f9e5a273e1bbdde4a4e26d250f79ea229cb90b (diff) |
maven move
-rw-r--r-- | src/META-INF/MANIFEST.MF | 3 | ||||
-rw-r--r-- | src/com/snilius/xquery/AboutDialog.java | 129 | ||||
-rw-r--r-- | src/main/java/com/snilius/xquery/FrameDisplayer.java (renamed from src/com/snilius/xquery/FrameDisplayer.java) | 2 | ||||
-rw-r--r-- | src/main/java/com/snilius/xquery/MacOSHandler.java (renamed from src/com/snilius/xquery/MacOSHandler.java) | 11 | ||||
-rw-r--r-- | src/main/java/com/snilius/xquery/Messages.java (renamed from src/com/snilius/xquery/Messages.java) | 13 | ||||
-rw-r--r-- | src/main/java/com/snilius/xquery/QueryFrame.java (renamed from src/com/snilius/xquery/QueryFrame.java) | 8 | ||||
-rw-r--r-- | src/main/java/com/snilius/xquery/XQuisitor.java (renamed from src/com/snilius/xquery/XQuisitor.java) | 20 | ||||
-rw-r--r-- | src/main/resources/QueryFrame.properties (renamed from src/com/snilius/xquery/QueryFrame.properties) | 3 | ||||
-rw-r--r-- | src/packaging/Info.plist | 45 | ||||
-rw-r--r-- | src/packaging/JavaApplicationStub | bin | 27280 -> 0 bytes | |||
-rw-r--r-- | src/packaging/PkgInfo | 1 |
11 files changed, 36 insertions, 199 deletions
diff --git a/src/META-INF/MANIFEST.MF b/src/META-INF/MANIFEST.MF deleted file mode 100644 index b4a3011..0000000 --- a/src/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Main-Class: com.snilius.xquery.XQuisitor - diff --git a/src/com/snilius/xquery/AboutDialog.java b/src/com/snilius/xquery/AboutDialog.java deleted file mode 100644 index 98fea2a..0000000 --- a/src/com/snilius/xquery/AboutDialog.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2003-2005 Elliotte Rusty Harold -// -// This file is part of XQuisitor. -// -// XQuisitor is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published -// by the Free Software Foundation; either version 2 of the License, -// or (at your option) any later version. -// -// XQuisitor is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with XQuisitor; if not, write to the - -// Free Software Foundation, Inc. -// 59 Temple Place, Suite 330 -// Boston, MA 02111-1307 -// USA -// -// In addition, as a special exception, Elliotte Rusty Harold gives -// permission to link the code of this program with the Saxon-B library (or -// with modified versions of Saxon-B that use the same license as Saxon-B), -// and distribute linked combinations including the two. You must obey the -// GNU General Public License in all respects for all of the code used other -// than Saxon-B. If you modify this file, you may extend this exception to -// your version of the file, but you are not obligated to do so. If you do -// not wish to do so, delete this exception statement from your version. - -package com.snilius.xquery; - -import java.awt.BorderLayout; -import java.awt.FlowLayout; -import java.awt.Font; -import java.awt.GridLayout; -import java.awt.LayoutManager; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JTextArea; -import javax.swing.text.JTextComponent; - -/** - * @author Elliotte Rusty Harold - * @version 1.0a5 - */ -class AboutDialog extends JDialog { - - AboutDialog(JFrame parent) { - super(parent, Messages.getString("About_XQuisitor_49")); - - this.getContentPane().setLayout(new BorderLayout()); - this.getContentPane().add(BorderLayout.CENTER, makeMainPane()); - this.getContentPane().add(BorderLayout.WEST, new JPanel()); - this.getContentPane().add(BorderLayout.EAST, new JPanel()); - - this.pack(); - this.setResizable(false); - this.setLocationRelativeTo(null); - } - - private static Font font = new Font("Dialog", Font.PLAIN, 12); - - - private JPanel makeMainPane() { - JPanel panel = new JPanel(); - panel.setLayout(new BorderLayout()); - panel.add( - BorderLayout.NORTH, - makeTopPane() - ); - JTextComponent information = new JTextArea(); - information.setText(Messages.getString("gpl")); - information.setEditable(false); - information.setBackground(this.getBackground()); - panel.add(BorderLayout.CENTER, information); - JPanel okPanel = new JPanel(); - okPanel.setLayout(new FlowLayout(FlowLayout.RIGHT)); - JButton ok = new JButton(Messages.getString("OK")); - ok.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent evt) { - hide(); - dispose(); - } - }); - okPanel.add(ok); - getRootPane().setDefaultButton(ok); - panel.add(BorderLayout.SOUTH, okPanel); - - return panel; - } - - private JPanel makeTopPane() { - JPanel panel = new JPanel(); - LayoutManager layout = new GridLayout(8, 1); - panel.setLayout(layout); - panel.add(new JLabel()); - JLabel title = new JLabel("XQuisitor"); - panel.add(title); - - JLabel copyright = new JLabel("Copyright 2003-2005 Elliotte Rusty Harold"); - copyright.setFont(font); - panel.add(copyright); - - JLabel version = new JLabel("Version: 1.0a5"); - version.setFont(font); - panel.add(version); - - panel.add(new JLabel()); - - JLabel credits = new JLabel("Contains the Saxon-B XSLT Processor from Michael Kay"); - credits.setFont(font); - panel.add(credits); - - JLabel credits2 = new JLabel("http://saxon.sourceforge.net/"); - credits2.setFont(font); - panel.add(credits2); - - return panel; - } - -} diff --git a/src/com/snilius/xquery/FrameDisplayer.java b/src/main/java/com/snilius/xquery/FrameDisplayer.java index 6874b4f..cd9da75 100644 --- a/src/com/snilius/xquery/FrameDisplayer.java +++ b/src/main/java/com/snilius/xquery/FrameDisplayer.java @@ -1,5 +1,5 @@ // Copyright 2003 Elliotte Rusty Harold -// +// Copyright 2013-2014 Victor Häggqvist // This file is part of XQuisitor. // // XQuisitor is free software; you can redistribute it and/or modify diff --git a/src/com/snilius/xquery/MacOSHandler.java b/src/main/java/com/snilius/xquery/MacOSHandler.java index 07bf757..2332c46 100644 --- a/src/com/snilius/xquery/MacOSHandler.java +++ b/src/main/java/com/snilius/xquery/MacOSHandler.java @@ -1,4 +1,5 @@ // Copyright 2004 Elliotte Rusty Harold +// Copyright 2013-2014 Victor Häggqvist // // This file is part of XQuisitor. // @@ -38,21 +39,27 @@ import com.apple.eawt.ApplicationAdapter; import com.apple.eawt.ApplicationEvent; import com.apple.eawt.Application; +import javax.swing.*; + /** * @author Elliotte Rusty Harold * @version 1.0a5 + * + * @author Victor Häggqvist + * @since 2013-12-18 + * @version 2.0 */ public class MacOSHandler extends Application { private QueryFrame frame; - private Dialog about; + private JFrame about; // can I add a hiddenFrame of some kind to keep the // menu bar onscreen???? public MacOSHandler(QueryFrame frame) { this.frame = frame; - about = new AboutDialog(frame); + about = new AboutDialog(); addApplicationListener(new AboutBoxHandler()); } diff --git a/src/com/snilius/xquery/Messages.java b/src/main/java/com/snilius/xquery/Messages.java index 6a6891e..02ade7f 100644 --- a/src/com/snilius/xquery/Messages.java +++ b/src/main/java/com/snilius/xquery/Messages.java @@ -1,4 +1,5 @@ // Copyright 2003 Elliotte Rusty Harold +// Copyright 2013-2014 Victor Häggqvist // // This file is part of XQuisitor. // @@ -28,21 +29,25 @@ package com.snilius.xquery; +import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; /** * @author Elliotte Rusty Harold * @version 1.0a5 + * + * @author Victor Häggqvist + * @since 2013-12-18 + * @version 2.0 */ class Messages { - private static final String BUNDLE_NAME = "com.snilius.xquery.QueryFrame"; + private static final String BUNDLE_NAME = "QueryFrame"; - private static final ResourceBundle RESOURCE_BUNDLE = - ResourceBundle.getBundle(BUNDLE_NAME); + private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME,Locale.ENGLISH); - private Messages() {} + private Messages() { } public static String getString(String key) { try { diff --git a/src/com/snilius/xquery/QueryFrame.java b/src/main/java/com/snilius/xquery/QueryFrame.java index f1e6d17..eb02396 100644 --- a/src/com/snilius/xquery/QueryFrame.java +++ b/src/main/java/com/snilius/xquery/QueryFrame.java @@ -1,4 +1,5 @@ // Copyright 2003-2005 Elliotte Rusty Harold +// Copyright 2013-2014 Victor Häggqvist // // This file is part of XQuisitor. // @@ -84,6 +85,9 @@ import java.util.prefs.Preferences; * @author Elliotte Rusty Harold * @version 1.0a5 * + * @author Victor Häggqvist + * @since 2013-12-18 + * @version 2.0 */ final class QueryFrame extends JFrame { @@ -928,8 +932,8 @@ final class QueryFrame extends JFrame { private class AboutListener implements ActionListener { public void actionPerformed(ActionEvent evt) { - JDialog dialog = new AboutDialog(QueryFrame.this); - dialog.show(); + JFrame about = new AboutDialog(); + about.show(); } } diff --git a/src/com/snilius/xquery/XQuisitor.java b/src/main/java/com/snilius/xquery/XQuisitor.java index f56a41d..2ce00d7 100644 --- a/src/com/snilius/xquery/XQuisitor.java +++ b/src/main/java/com/snilius/xquery/XQuisitor.java @@ -1,4 +1,5 @@ // Copyright 2003, 2004 Elliotte Rusty Harold +// Copyright 2013-2014 Victor Häggqvist // // This file is part of XQuisitor. // @@ -42,20 +43,19 @@ import javax.swing.UIManager; * * @author Elliotte Rusty Harold * @version 1.0a5 + * + * @author Victor Häggqvist + * @since 2013-12-18 + * @version 2.0 */ class XQuisitor { - // write a shell script to launch it???? - public static void main(String[] args) { - initAppleProperties(); try { - UIManager.setLookAndFeel( - UIManager.getSystemLookAndFeelClassName()); - } - catch (Exception ex) { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + }catch (Exception ex) { // no big deal; just use Metal } @@ -64,14 +64,12 @@ class XQuisitor { QueryFrame frame = new QueryFrame(); Runnable runner = new FrameDisplayer(frame); EventQueue.invokeLater(runner); - } - catch (NoClassDefFoundError ex) { + }catch (NoClassDefFoundError ex) { if (ex.getMessage().indexOf("saxon") != -1) { JOptionPane.showMessageDialog(null, "Saxon 8 is not in the CLASSPATH. (Try using -Xbootclasspath/p:)" ); - } - else { + }else { ex.printStackTrace(); } System.exit(1); diff --git a/src/com/snilius/xquery/QueryFrame.properties b/src/main/resources/QueryFrame.properties index 9d3025f..9ce6d46 100644 --- a/src/com/snilius/xquery/QueryFrame.properties +++ b/src/main/resources/QueryFrame.properties @@ -51,4 +51,5 @@ Printing_error_57=Printing error Could_not_locate_a_printer._58=Could not locate a printer. gpl=XQuisitor2 is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published \nby the Free Software Foundation; either version 2 of the License, \nor (at your option) any later version.\n\nXQuisitor is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with XQuisitor; if not, write to the\n\nFree Software Foundation, Inc. \n59 Temple Place, Suite 330\nBoston, MA 02111-1307\nUSA Error_on_line=Error on line -column=column
\ No newline at end of file +column=column +copyright_credits=<html>XQuisitor2<br>Version: 2.0<br><br>Copyright 2003-2005 Elliotte Rusty Harold<br>Copyright 2013-2014 Victor Häggqvist<br><br>Saxon-HE XSLT Processor http://www.saxonica.com/ Mozilla Public License Version 2.0<br>RSyntaxTextArea http://www.fifesoft.com/rsyntaxtextarea/ <a href="http://fifesoft.com/rsyntaxtextarea/RSyntaxTextArea.License.txt">Modified BSD License</a><br><br></html>
\ No newline at end of file diff --git a/src/packaging/Info.plist b/src/packaging/Info.plist deleted file mode 100644 index a82f64d..0000000 --- a/src/packaging/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>English</string> - <key>CFBundleExecutable</key> - <string>Run-Java-10.1</string> - <key>CFBundleIconFile</key> - <string>GenericJavaApp.icns</string> - <key>CFBundleIdentifier</key> - <string>com.macfaq.xquery.XQuisitor</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>XQuisitor</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleVersion</key> - <string>2.0</string> -<key>Java</key> - <dict> - <key>JVMVersion</key> - <string>1.4*</string> - <key>ClassPath</key> - <array> - <string>$JAVAROOT/xquisitor-1.0a3.jar</string> - <string>$JAVAROOT/saxon7.jar</string> - </array> - <key>MainClass</key> - <string>com.macfaq.xquery.XQuisitor</string> - <key>Properties</key> - <dict> - <key>com.apple.mrj.application.apple.menu.about.name</key> - <string>XQuisitor</string> - <key>apple.laf.useScreenMenuBar</key> - <string>true</string> - <key>apple.awt.showGrowBox</key> - <string>true</string> - </dict> - </dict> -</dict> -</plist>
\ No newline at end of file diff --git a/src/packaging/JavaApplicationStub b/src/packaging/JavaApplicationStub Binary files differdeleted file mode 100644 index 345fffa..0000000 --- a/src/packaging/JavaApplicationStub +++ /dev/null diff --git a/src/packaging/PkgInfo b/src/packaging/PkgInfo deleted file mode 100644 index 1283317..0000000 --- a/src/packaging/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -AAPL????
\ No newline at end of file |