Examples of ErrorDialog


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

                                "An error has occur for the connection of : \n");
                        builder.append(widget.getClass().getSimpleName());
                        builder.append("\nWith :\n");
                        builder.append(key.getInformationKey());

                        new ErrorDialog(null, "Error at " + this.getClass().getName(), builder
                                .toString(), false, null).setVisible(true);
                    }
                }

            }
            catch (final Exception e) {
                if (graphicalErrorManagement) {
                    final StringBuilder builder = new StringBuilder();
                    builder.append("An error has occur for the connection of : \n");
                    builder.append(widget.getClass().getSimpleName());
                    builder.append("\nWith :\n");
                    builder.append(key.getInformationKey());
                    builder.append("\nError type : ");
                    builder.append(e.getClass().getName());
                    builder.append("\nError message : ");
                    builder.append(e.getMessage());

                    final 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

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

                TangoKeyTool.registerAttribute(aKey, element);

                connected = ((ChartViewerBox) mybox).connectWidget(widget, aKey);

                if (!connected) {
                    new ErrorDialog(null, "Connection Error", "Error :can not add " + element,
                            false, null);
                }
            }
            isInit = true;
        }
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

              TangoKeyTool.getAttributeName(yKey));
          ((IChartViewer)widget).setDataViewDisplayName(dataViewId, displayName);
        }
       
        if (!connected) {
          new ErrorDialog(null, "Connection Error",
              "Error :can not add brace ["
                  + xAttributeNameList[i] + ", "
                  + yAttributeNameList[i] + "]", false, null);
        }
      }
View Full Code Here

Examples of gld.ErrorDialog

  /**
   * Shows an error dialog.
   * @param msg The message to be shown.
   */
  public void showError(String msg) {
    new ErrorDialog(this, msg);
  }
View Full Code Here

Examples of jpa.tools.swing.ErrorDialog

            getService.execute();
            try {
                setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
                _service = getService.get(10, TimeUnit.SECONDS);
            } catch (Exception t) {
                new ErrorDialog(t).setVisible(true);
            } finally {
                setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
            }
        }
        return _service;
View Full Code Here

Examples of jpa.tools.swing.ErrorDialog

            };
            task.execute();
            try {
                _customer = task.get(1, TimeUnit.SECONDS);
            } catch (Exception t) {
                new ErrorDialog(t).setVisible(true);
            }
        }
        return _customer;
    }
View Full Code Here

Examples of jpa.tools.swing.ErrorDialog

                    try {
                        _queryView.setText(_formatter.prettyPrint(queryString).toString());
                        List<Book> selectedBooks = get(1, TimeUnit.SECONDS);
                        _selectPanel.updateDataModel(selectedBooks);
                    } catch (Exception e) {
                        new ErrorDialog(e).setVisible(true);
                    }
                }
            }.execute();
        }
View Full Code Here

Examples of jpa.tools.swing.ErrorDialog

                            _items[i].setText("");
                            _items[i].setIcon(null);
                        }
                        _placeOrder.setEnabled(false);
                    } catch (Exception e) {
                        new ErrorDialog(e).setVisible(true);
                    }
                }
            }.execute();
        }
View Full Code Here

Examples of jpa.tools.swing.ErrorDialog

                   
                    public void done() {
                        try {
                            _lowInventories.getDataModel().updateData(get(1, TimeUnit.SECONDS));
                        } catch (Exception e) {
                            new ErrorDialog(e).setVisible(true);
                        }
                    }
                }.execute();
               
            }
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.