This repository has been archived by the owner on Jul 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from tparker-usgs/master
Add hypocenter plotter
- Loading branch information
Showing
67 changed files
with
4,934 additions
and
2,781 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.