Package org.beryl.gui

Examples of org.beryl.gui.MessageDialog


        for (int i = 0; i < values.length; i++)
          model.addValue(list2, values[i]);
      }
    } catch (Exception e) {
      new MessageDialog(e);
    }
  }
View Full Code Here


      } else if (name.equals("about")) {
        new About(frame);
      } else if (name.equals("dnd")) {
        new DnDTest();
      } else if (name.equals("message.info")) {
        new MessageDialog(frame, getString("test.message.info.title"), getString("test.message.info.message"));
      } else if (name.equals("message.warning")) {
        new MessageDialog(frame, MessageDialog.WARNING_MESSAGE, getString("test.message.warning.title"), getString("test.message.warning.message"), null);
      } else if (name.equals("message.error")) {
        throw new GUIException("This is an example error");
      } else if (name.equals("edit")) {
        TableRow selection[] = (TableRow[]) model.getValue("table.value");
        for (int i = 0; i < selection.length; i++) {
          new PersonEditor(selection[i]);
        }
      } else if (name.equals("consoleCommand")) {
        CommandEvent event = (CommandEvent) e.getSwingEvent();
        event.getSource().appendText(getString("test.console.command"));
        event.getSource().appendText(event.getCommand(), boldAttribute);
        event.getSource().appendText(getString("test.console.notfound")+"\n");
      } else if (name.equals("login")) {
        log.debug(
          "Login has been clicked. username ["
            + model.getValue("username")
            + "], password ["
            + model.getValue("password")
            + "], ssl ["
            + model.getValue("ssl")
            + "], verbose ["
            + model.getValue("verbose")
            + "]");
      }
    } catch (GUIException ex) {
      new MessageDialog(ex);
    }
  }
View Full Code Here

      ImageIconFactory.addSearchPath("resources/test/icons");
      InternationalizationManager.addLanguageFile("resources/test/test");

      new Test();
    } catch (Exception e) {
      new MessageDialog(e);
    }
  }
View Full Code Here

        okButton.setEnabled(false);
      } catch (GUIException exx) {
        /* Won't happen since it is a JComponent */
      }
    } catch (GUIException ex) {
      new MessageDialog(ex);
    }
  }
View Full Code Here

        TableRow source = (TableRow) model.removeValueByKey(null, "source");
        source.replace(model);
        frame.dispose();
      }
    } catch (GUIException e) {
      new MessageDialog(e);
    }
  }
View Full Code Here

        GUIUtils.updateAllWidgets();
      } else if (name.equals("close")) {
        frame.dispose();
      }
    } catch (Exception e) {
      new MessageDialog(e);
    }
  }
View Full Code Here

                  propertyModel.addRow(new PropertyTableRow(key));
                modified = true;
              }
              ((Dialog) source.getParentWidgetByClass(Dialog.class)).dispose();
            } catch (Exception e) {
              new MessageDialog(e);
            }
          }
        }, new MapDataModel());
        dialog.initDialog(frame);
        dialog.show();
      } else if (name.equals("popup")) {
        PopupMenu popup = (PopupMenu) constructWidget("PropertyPopup");
        popup.popup(event);
      } else if (name.equals("delete")) {
        TableRow rows[] = (TableRow[]) dataModel.getValue("property.value");
        for (int i = 0; i < rows.length; i++) {
          PropertyTableRow row = (PropertyTableRow) rows[i];
          propertyModel.removeRow(row);
          properties.remove(row.getValue("key"));
        }
      } else if (name.equals("clear")) {
        dataModel.setValue("property.value", new TableRow[] {
        });
        propertyModel.clear();
        properties.clear();
      } else if (name.equals("import")) {
        File file = DialogUtils.showOpenFileDialog(frame, "properties");
        if (file != null) {
          properties.load(new FileInputStream(file));
          buildModel();
        }
      } else if (name.equals("save")) {
        doSave();
      } else if (name.equals("refresh")) {
        widgetTree.refreshInternationalProperties();
      }
    } catch (Exception e) {
      new MessageDialog(e);
    }
  }
View Full Code Here

        try {
          userObject.widget.setProperty(
            (String) getValue("name"),
            PropertyFactory.getInstance().constructProperty(propertyNode));
        } catch (Exception ex) {
          new MessageDialog(ex);
        }

        WidgetTree.revalidate(userObject.widget);
      } else if (propertyNode.getNodeName().equals("layout")) {
        getPropertyAdapter().toDOM(event.getNewValue(), propertyNode);
       
        if (!propertyNode.getAttribute("type").equals("hig") && !propertyNode.getAttribute("type").equals("")) {
          propertyNode.removeAttribute("horiz");
          propertyNode.removeAttribute("vert");
          propertyNode.removeAttribute("hweights");
          propertyNode.removeAttribute("vweights");
        }

        try {
          userObject.widget.setProperty(
            "layout",
            LayoutFactory.getInstance().constructLayout(userObject.widget, propertyNode));
        } catch (Exception ex) {
          new MessageDialog(ex);
        }

        WidgetTree.revalidate(userObject.widget);
      }
    }
View Full Code Here

  public void show() {
    try {
      dialog.initDialog(parent);
      dialog.show();
    } catch (GUIException e) {
      new MessageDialog(e);
    }
  }
View Full Code Here

      } else if (name.equals("ok")) {
        doOK();
        dialog.dispose();
      }
    } catch (Exception e) {
      new MessageDialog(dialog, e);
    }
  }
View Full Code Here

TOP

Related Classes of org.beryl.gui.MessageDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.