Commit 07c2a799 authored by tcarver's avatar tcarver
Browse files

Merge pull request #124 from tcarver/master

misc
parents 41834e60 5c43cba1
......@@ -102,6 +102,8 @@ OPTIONS
-Duserplot=FILE[,FILE2] Open one or more userplots
-Dloguserplot=FILE[,FILE2] Open one or more userplots, take log(data)
-Dbam=FILE[,FILE2,...] Open one or more BAM, VCF or BCF files
-DbamClone=n Open all BAMs in multiple (n > 1) panels
-Dbam[1,2,..]=FILE[,FILE2,..] Open BAMs in separate panels
-Dshow_forward_lines=? Hide/show forward frame lines [true,false]
-Dshow_reverse_lines=? Hide/show reverse frame lines [true,false]
-Dchado="h:p/d?u" Get Artemis to open this CHADO database
......
Artemis Release 14.3.1
ACT Release 11.3.1
Artemis Release 14.3.2
ACT Release 11.3.2
DNAPlotter Release 1.10
BamView 1.2.8
......@@ -248,7 +248,7 @@ public class BasePlotGroup extends JPanel
JOptionPane.showMessageDialog(this,
closingPlots.toString()+
"\nAs the sequence is changing the above user plot(s) are closing as they are\n"+
"not indexed with multiple sequences. You can load in the correponding plot\n"+
"not indexed with multiple sequences. You can load in the corresponding plot\n"+
"for the new sequence.",
"Closing Userplot", JOptionPane.INFORMATION_MESSAGE);
}
......
......@@ -2011,7 +2011,7 @@ public class EntryEdit extends JFrame
private void printMenu()
{
JMenuItem printImage = new JMenuItem("Save As Image Files (png/jpeg)...");
JMenuItem printImage = new JMenuItem("Save As Image Files (png/svg)...");
printImage.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
......
......@@ -621,13 +621,10 @@ public class MultiComparator extends JFrame
/*final JMenu write_menu = new JMenu("Write");
write_menu.setMnemonic(KeyEvent.VK_W);
menu_bar.add(write_menu);*/
JMenu run_menu = null;
if(Options.isUnixHost())
{
run_menu = new JMenu("Run");
JMenu run_menu = new JMenu("Run");
run_menu.setMnemonic(KeyEvent.VK_R);
menu_bar.add(run_menu);
}
final JMenu graph_menu = new JMenu("Graph");
graph_menu.setMnemonic(KeyEvent.VK_G);
menu_bar.add(graph_menu);
......@@ -705,15 +702,11 @@ public class MultiComparator extends JFrame
sub_menu_name);
create_menu.add(this_create_menu);
if(Options.isUnixHost())
{
final RunMenu this_run_menu =
new RunMenu(this,
getSelectionArray()[i],
new RunMenu(this, getSelectionArray()[i],
sub_menu_name);
run_menu.add(this_run_menu);
}
}
final GraphMenu this_graph_menu =
new GraphMenu(this,
......@@ -768,7 +761,7 @@ public class MultiComparator extends JFrame
**/
private void printMenu()
{
JMenuItem printImage = new JMenuItem("Save As Image Files (png/jpeg)...");
JMenuItem printImage = new JMenuItem("Save As Image Files (png/svg)...");
printImage.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
......
......@@ -324,7 +324,8 @@ abstract public class Splash extends JFrame
private boolean isMac()
{
return System.getProperty("mrj.version") != null;
return System.getProperty("mrj.version") != null ||
System.getProperty("os.name").toLowerCase().indexOf("mac") >= 0;
}
private boolean isWindows()
......
......@@ -69,6 +69,7 @@ import javax.swing.JOptionPane;
protected static boolean isMac()
{
return System.getProperty("mrj.version") != null;
return System.getProperty("mrj.version") != null ||
System.getProperty("os.name").toLowerCase().indexOf("mac") >= 0;
}
}
......@@ -40,22 +40,16 @@ import java.io.IOException;
public class BrowserControl
{
// The default system browser under windows.
private static final String WIN_PATH = "rundll32";
// The flag to display a url.
private static final String WIN_FLAG = "url.dll,FileProtocolHandler";
// The default browser under unix.
private static final String UNIX_PATH = "netscape";
// The flag to display a url.
private static final String UNIX_FLAG = "-remote openURL";
private static final String MAC_PATH = "/usr/bin/open";
/**
* Display a file in the system browser. If you want to display a
* file, you must include the absolute path name.
*
* @param url the file's url (the url must start with either "http://"
* or "file://").
*/
......@@ -77,7 +71,6 @@ public class BrowserControl
}
else
{
String[] browsers =
{
"x-www-browser", "mozilla", "firefox", "opera", "konqueror",
......@@ -88,15 +81,22 @@ public class BrowserControl
{
ExternalApplication exApp = new ExternalApplication(
new String[] {"which", browsers[count]}, null, null);
//String stderr = exApp.getProcessStderr();
String stdout = exApp.getProcessStdout();
if(stdout != null && stdout.startsWith("/"))
browser = browsers[count];
}
if(browser == null)
{
try
{
java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
}
catch(Exception e)
{
System.err.println("Could not find web browser");
}
}
else
{
if(browser.equals("netscape") || browser.equals("mozilla"))
......@@ -114,7 +114,6 @@ public class BrowserControl
}
}
private static void handleNetscapeAndMozilla(final String url, final String browser)
throws IOException
{
......@@ -142,7 +141,6 @@ public class BrowserControl
/**
* Try to determine whether this application is running under Windows
* or some other platform by examing the "os.name" property.
*
* @return true if this application is running under a Windows OS
*/
public static boolean isWindowsPlatform()
......@@ -156,7 +154,8 @@ public class BrowserControl
private static boolean isMac()
{
return System.getProperty("mrj.version") != null;
return System.getProperty("mrj.version") != null ||
System.getProperty("os.name").toLowerCase().indexOf("mac") >= 0;
}
/**
......
......@@ -144,7 +144,8 @@ public class DocumentEntryAutosaveThread extends Thread {
private boolean isMac()
{
return System.getProperty("mrj.version") != null;
return System.getProperty("mrj.version") != null ||
System.getProperty("os.name").toLowerCase().indexOf("mac") >= 0;
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment