Examples of ErrorDialog


Examples of DisplayProject.ErrorDialog

            }
        }
        if (!GraphicsEnvironment.isHeadless()) {
            if (mgr.errorList.size() > 0){
                Throwable e = mgr.errorList.get(0);
                new ErrorDialog(owner, message, e).setVisible(true);
            } else {
                new ErrorDialog(owner, message, null).setVisible(true);
            }

        }
        if (clearout) {
          clear();
View Full Code Here

Examples of DisplayProject.ErrorDialog

            }
        }
        if (!GraphicsEnvironment.isHeadless()) {
            if (mgr.errorList.size() > 0){
                Throwable e = mgr.errorList.get(0);
                new ErrorDialog(owner, message, e).setVisible(true);
            } else {
                new ErrorDialog(owner, message, null).setVisible(true);
            }

        }
        if (clearout) {
          clear();
View Full Code Here

Examples of com.alphacsp.common.swing.ErrorDialog

    }

    public void showErrorMessage(Throwable throwable) {
        throwable.printStackTrace(getPrintStream());
        getPrintStream().flush();
        new ErrorDialog(frame,throwable).setVisible(true);
    }
View Full Code Here

Examples of com.alphacsp.common.swing.ErrorDialog

    }

    public void showErrorMessage(String message) {
        getPrintStream().println(message);
        getPrintStream().flush();
        new ErrorDialog(frame,message).setVisible(true);
    }
View Full Code Here

Examples of com.alphacsp.common.swing.ErrorDialog

    public void showErrorMessage(String message, Throwable throwable) {
        getPrintStream().println(message);
        throwable.printStackTrace(getPrintStream());
        getPrintStream().flush();
        new ErrorDialog(frame,message,throwable).setVisible(true);
    }
View Full Code Here

Examples of com.alphacsp.common.swing.ErrorDialog

            Interperter interperter = interperterFactory.createInterperter();
            swingInterface.addCompletion(new CommandCompletion(interperter));
            swingInterface.addCompletion(new FileCompletion(interperter));
            interperter.interpret();
        } catch (ValidationException e) {
            ErrorDialog errorDialog = new ErrorDialog(swingInterface.getFrame(), e);
            errorDialog.setVisible(true);
            swingInterface.stop();
        }

    }
View Full Code Here

Examples of com.google.gerrit.client.ErrorDialog

              }

              branchIds.removeAll(deleted);
              if (!branchIds.isEmpty()) {
                final VerticalPanel p = new VerticalPanel();
                final ErrorDialog errorDialog = new ErrorDialog(p);
                final Label l = new Label(Util.C.branchDeletionOpenChanges());
                l.setStyleName(Gerrit.RESOURCES.css().errorDialogText());
                p.add(l);
                for (final Branch.NameKey branch : branchIds) {
                  final BranchLink link =
                      new BranchLink(branch.getParentKey(), Change.Status.NEW,
                          branch.get(), null) {
                    @Override
                    public void go() {
                      errorDialog.hide();
                      super.go();
                    };
                  };
                  p.add(link);
                }
                errorDialog.center();
              }
            }
          });
    }
View Full Code Here

Examples of fr.soleil.lib.project.swing.dialog.ErrorDialog

            RoiShape shape = null;
            try {
                shape = RoiShape.valueOf(roiDesc[1].trim().toUpperCase(Locale.US));
            }
            catch (final IllegalArgumentException e) {
                new ErrorDialog(
                        null,
                        "Can not create ROI",
                        "Invalid ROI Shape not added "
                                + Arrays.toString(roiDesc)
                                + ".\n\nCorrect values are RECTANGLE, OVAL, POINT, TEXT or CROSS and NONE to supress it.",
                        false, null).setVisible(true);
            }

            if (shape != null) {
                CometeColor color = null;

                try {
                    final Field colorField = CometeColor.class.getDeclaredField(roiDesc[7].trim()
                            .toUpperCase());
                    color = (CometeColor) colorField.get(colorField);
                }
                catch (final SecurityException e1) {
                    System.err.println("cant find color => SecurityException");
                }
                catch (final NoSuchFieldException e1) {
                    System.err.println("color does'nt exist");
                }
                catch (final IllegalArgumentException e) {
                    System.err.println("cant find color => IllegalArgumentException");
                }
                catch (final IllegalAccessException e) {
                    System.err.println("cant find color => IllegalAccessException");
                }

                if (color != null) {
                    try {
                        roi = new CometeRoi(roiDesc[0].trim(), shape, Integer.parseInt(roiDesc[2]
                                .trim()), Integer.parseInt(roiDesc[3].trim()),
                                Integer.parseInt(roiDesc[4].trim()), Integer.parseInt(roiDesc[5]
                                        .trim()), Integer.parseInt(roiDesc[6].trim()), color);
                    }
                    catch (final NumberFormatException e) {
                        // TODO change to logger
                        System.err.println("invalid size or position: " + e.getMessage());
                    }
                }
                else {
                    new ErrorDialog(
                            null,
                            "Can not create ROI",
                            "Invalid ROI Color not added "
                                    + Arrays.toString(roiDesc)
                                    + ".\n\nCorrects colors are WHITE, BLACK, RED, GREEN, BLUE, YELLOW, ORANGE, CYAN, MAGENTA, PURPLE, PINK, GRAY, DARK_GRAY or LIGHT_GRAY.",
                            false, null).setVisible(true);
                }
            }
        }
        else {
            new ErrorDialog(
                    null,
                    "Can not create ROI",
                    "Invalid ROI not added, the correct value must be RoiName,shape, LineSize, X, Y, Width, Height, Color.\n\nRoi : "
                            + Arrays.toString(roiDesc), false, null).setVisible(true);
        }
View Full Code Here

Examples of fr.soleil.lib.project.swing.dialog.ErrorDialog

        if (roiDesc.length == ROI_DESC_LENGTH) {
            RoiShape shape = null;
            try {
                shape = RoiShape.valueOf(roiDesc[1].trim().toUpperCase(Locale.US));
            } catch (final IllegalArgumentException e) {
                new ErrorDialog(null, "Can not create ROI", "Invalid ROI Shape not added " + Arrays.toString(roiDesc)
                        + ".\n\nCorrect values are RECTANGLE, OVAL, POINT, TEXT or CROSS and NONE to supress it.",
                        false, null).setVisible(true);
            }

            if (shape != null) {
                CometeColor color = null;

                try {
                    final Field colorField = CometeColor.class.getDeclaredField(roiDesc[7].trim().toUpperCase());
                    color = (CometeColor) colorField.get(colorField);
                } catch (final SecurityException e1) {
                    System.err.println("cant find color => SecurityException");
                } catch (final NoSuchFieldException e1) {
                    System.err.println("color does'nt exist");
                } catch (final IllegalArgumentException e) {
                    System.err.println("cant find color => IllegalArgumentException");
                } catch (final IllegalAccessException e) {
                    System.err.println("cant find color => IllegalAccessException");
                }

                if (color != null) {
                    try {
                        roi = new CometeRoi(roiDesc[0].trim(), shape, Integer.parseInt(roiDesc[2].trim()),
                                Integer.parseInt(roiDesc[3].trim()), Integer.parseInt(roiDesc[4].trim()),
                                Integer.parseInt(roiDesc[5].trim()), Integer.parseInt(roiDesc[6].trim()), color);
                    } catch (final NumberFormatException e) {
                        // TODO change to logger
                        System.err.println("invalid size or position: " + e.getMessage());
                    }
                } else {
                    new ErrorDialog(
                            null,
                            "Can not create ROI",
                            "Invalid ROI Color not added "
                                    + Arrays.toString(roiDesc)
                                    + ".\n\nCorrects colors are WHITE, BLACK, RED, GREEN, BLUE, YELLOW, ORANGE, CYAN, MAGENTA, PURPLE, PINK, GRAY, DARK_GRAY or LIGHT_GRAY.",
                            false, null).setVisible(true);
                }
            }
        } else {
            new ErrorDialog(null, "Can not create ROI",
                    "Invalid ROI not added, the correct value must be RoiName,shape, LineSize, X, Y, Width, Height, Color.\n\nRoi : "
                            + Arrays.toString(roiDesc), false, null).setVisible(true);
        }

        return roi;
View Full Code Here

Examples of fr.soleil.lib.project.swing.dialog.ErrorDialog

                    builder.append("\nError type : ");
                    builder.append(e.getClass().getName());
                    builder.append("\nError message : ");
                    builder.append(e.getMessage());

                    ErrorDialog dialog = new ErrorDialog(null, "Error at "
                            + this.getClass().getName(), builder.toString(), false,
                            e.getStackTrace());

                    dialog.setVisible(true);
                }
                else {
                    e.printStackTrace();
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.