Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #48 from tparker-usgs/master
Browse files Browse the repository at this point in the history
Add hypocenter plotter
  • Loading branch information
tparker-usgs authored Jan 30, 2017
2 parents a34444c + 420f2d1 commit ea0f990
Show file tree
Hide file tree
Showing 67 changed files with 4,934 additions and 2,781 deletions.
30 changes: 26 additions & 4 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>gov.usgs.volcanoes</groupId>
<artifactId>swarm</artifactId>
<name>Swarm</name>
<version>2.5.3</version>
<version>2.6.0-SNAPSHOT</version>
<description>Swarm is a Java application designed to display and analyze seismic waveforms in real-time. Swarm can connect to and read from a variety of different static and dynamics data sources, including Earthworm waveservers, IRIS DMCs, SEED and SAC files, and simple ASCII. Swarm has both time- and frequency-domain analysis tools, along with a simple but powerful mapping platfrom. A full-screen kiosk mode can act as a low-cost, low-maintenance replacement for paper drum recorders. Swarm was written by and for scientists and provides fine control over many different program settings and variables.</description>
<url>http://volcanoes.usgs.gov/software/swarm</url>
<issueManagement>
Expand Down Expand Up @@ -160,6 +160,12 @@
<include>**</include>
</includes>
</filter>
<filter>
<artifact>opensymphony:oscache</artifact>
<includes>
<include>**</include>
</includes>
</filter>
</filters>
<artifactSet>
<includes>
Expand Down Expand Up @@ -292,9 +298,7 @@
</build>
<repositories>
<repository>
<releases>
<checksumPolicy>true</checksumPolicy>
</releases>
<releases />
<id>volcanoes</id>
<url>http://volcanoes.usgs.gov/software/maven2/</url>
</repository>
Expand All @@ -306,6 +310,24 @@
<version>1.0.10</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.0.31.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>opensymphony</groupId>
<artifactId>oscache</artifactId>
<version>2.4.1</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>jms</artifactId>
<groupId>javax.jms</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<reporting>
<plugins>
Expand Down
29 changes: 19 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>gov.usgs.volcanoes</groupId>
<artifactId>swarm</artifactId>
<version>2.5.9</version>
<version>2.6.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Swarm</name>
Expand Down Expand Up @@ -404,7 +404,6 @@
<repository>
<id>volcanoes</id>
<releases>
<checksumPolicy>true</checksumPolicy>
</releases>
<url>http://volcanoes.usgs.gov/software/maven2/</url>
</repository>
Expand Down Expand Up @@ -479,28 +478,38 @@
<dependency>
<groupId>gov.usgs.volcanoes</groupId>
<artifactId>usgs</artifactId>
<version>1.2</version>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>gov.usgs.volcanoes</groupId>
<artifactId>volcano-core</artifactId>
<version>[1.3.2,)</version>
<version>[1.3.3,)</version>
</dependency>
<dependency>
<groupId>gov.usgs.volcanoes</groupId>
<artifactId>winston</artifactId>
<version>1.3.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.0.31.Final</version>
</dependency>
<dependency>
<groupId>opensymphony</groupId>
<artifactId>oscache</artifactId>
<version>2.4.1</version>
<exclusions>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
</exclusions>
<exclusions>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.pegdown</groupId>
<artifactId>pegdown</artifactId>
<version>1.6.0</version>
</dependency>
</dependencies>
</project>
5 changes: 5 additions & 0 deletions src/main/java/gov/usgs/volcanoes/swarm/ConfigListener.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package gov.usgs.volcanoes.swarm;

public interface ConfigListener {
public void settingsChanged();
}
4 changes: 2 additions & 2 deletions src/main/java/gov/usgs/volcanoes/swarm/FileTypeDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/*
* @author Tom Parker
*/
public class FileTypeDialog extends SwarmDialog {
public class FileTypeDialog extends SwarmModalDialog {
private static final long serialVersionUID = 1L;
private static final JFrame applicationFrame = Swarm.getApplicationFrame();
private JLabel filename;
Expand All @@ -30,7 +30,7 @@ public class FileTypeDialog extends SwarmDialog {
private boolean opened = false;

public FileTypeDialog() {
super(applicationFrame, "Select File Type", true);
super(applicationFrame, "Select File Type");
setSizeAndLocation();
}

Expand Down
40 changes: 40 additions & 0 deletions src/main/java/gov/usgs/volcanoes/swarm/HelpDialog.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package gov.usgs.volcanoes.swarm;

import org.pegdown.PegDownProcessor;

import java.awt.Component;
import java.util.Scanner;

import javax.swing.BoxLayout;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextPane;

public final class HelpDialog {

private static final PegDownProcessor pegdownProcessor = new PegDownProcessor();

public static void displayHelp(Component parent, String helpFile) {
final JPanel helpPanel = new JPanel();
helpPanel.setLayout(new BoxLayout(helpPanel, BoxLayout.PAGE_AXIS));
JTextPane htmlPane = new JTextPane();

Scanner scanner = new Scanner(HelpDialog.class.getResourceAsStream("/help/" + helpFile), "UTF-8");
String text = scanner.useDelimiter("\\A").next();
scanner.close();

htmlPane.setContentType("text/html");
htmlPane.setText(pegdownProcessor.markdownToHtml(text));
JScrollPane paneScrollPane = new JScrollPane(htmlPane);

helpPanel.add(paneScrollPane);


JOptionPane.showMessageDialog(parent,
helpPanel,
"A plain message",
JOptionPane.PLAIN_MESSAGE);

}
}
1 change: 1 addition & 0 deletions src/main/java/gov/usgs/volcanoes/swarm/Icons.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public class Icons {
public static final ImageIcon rsam_values = getIcon("images/rsam_values.png");
public static final ImageIcon rsam_counts = getIcon("images/rsam_counts.png");
public static final ImageIcon particle_motion = getIcon("images/bee.png");
public static final ImageIcon locate = getIcon("images/bee.png");

private static ImageIcon getIcon(String key) {
return new ImageIcon(ClassLoader.getSystemResource(key));
Expand Down
Loading

0 comments on commit ea0f990

Please sign in to comment.