Skip to content

Commit

Permalink
Formatted the code 2 space
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar122 committed Sep 13, 2023
1 parent 4a90a55 commit c30443b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions jsplot/src/main/java/tech/tablesaw/plotly/display/Browser.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@

public class Browser {

public static void main(String[] args) throws Exception {
public static void main(String[] args) throws Exception {

if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().browse(new URI("http://www.example.com"));
}
if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().browse(new URI("http://www.example.com"));
}
}

public void browse(File file) throws IOException {
if (Desktop.isDesktopSupported()) {
if (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
Desktop.getDesktop().browse(file.toURI());
} else if (Desktop.getDesktop().isSupported(Desktop.Action.OPEN)) {
Desktop.getDesktop().open(file);
} else {
throw new UnsupportedOperationException("Neither open nor browse are supported");
}
} else {
throw new UnsupportedOperationException("Browser not supported.");
}
public void browse(File file) throws IOException {
if (Desktop.isDesktopSupported()) {
if (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
Desktop.getDesktop().browse(file.toURI());
} else if (Desktop.getDesktop().isSupported(Desktop.Action.OPEN)) {
Desktop.getDesktop().open(file);
} else {
throw new UnsupportedOperationException("Neither open nor browse are supported");
}
} else {
throw new UnsupportedOperationException("Browser not supported.");
}
}
}

0 comments on commit c30443b

Please sign in to comment.