Beispiel #1
0
 public int showConfirmFileOverwriteDialog(File outFile) {
   return JOptionPane.showConfirmDialog(
       this.getFrame(),
       "Replace existing file\n" + outFile.getName() + "?",
       "Overwrite Existing File?",
       JOptionPane.YES_NO_CANCEL_OPTION);
 }
Beispiel #2
0
 public int showOptionDialog(
     Object message,
     String title,
     int optionType,
     int messageType,
     Icon icon,
     Object[] options,
     Object initialValue) {
   return JOptionPane.showOptionDialog(
       this.getFrame(), message, title, optionType, messageType, icon, options, initialValue);
 }
    protected void openFromURL() {
      Object input =
          JOptionPane.showInputDialog(
              this.getApp(),
              "Enter a URL: ",
              "Open Shapes from URL",
              JOptionPane.QUESTION_MESSAGE,
              null,
              null,
              null);
      if (input == null) return;

      URL url = null;
      try {
        url = new URL(input.toString());
      } catch (IOException e) {
        e.printStackTrace();
      }

      if (url != null) {
        this.openFromPath(url.toExternalForm());
      }
    }
Beispiel #4
0
 public void showMessageDialog(
     Component component, Object message, String title, int messageType, Object... args) {
   JOptionPane.showMessageDialog(
       component, formatMessage(null, message, args), title, messageType);
 }
Beispiel #5
0
 public void showMessageDialog(
     Component component, Object message, String title, int messageType) {
   JOptionPane.showMessageDialog(component, message, title, messageType);
 }