Package org.beryl.gui

Examples of org.beryl.gui.GUIException


        super.setValue(
          source,
          "birthDate",
          DateFieldValidator.EUROPEAN_DATE.parse((String) newValue));
      } catch (ParseException e) {
        throw new GUIException("Invalid date [" + newValue + "]");
      }
    } else {
      super.setValue(source, key, newValue);
    }
  }
View Full Code Here


    RE r = null;

    try {
      r = new RE(sPattern);
    } catch (Exception e) {
      throw new GUIException("Error while constructing a regular expression", e);
    }

    if (r != null) {
      if (!r.isMatch(validationString)) {
        throw new ValidationException(view, InternationalizationManager.getString("xmlgui.validator.phone.invalid"));
View Full Code Here

     
      RE r = null;
      try {
        r = new RE(sPattern);
      } catch (Exception e) {
        throw new GUIException("Error while constructing a regular expression", e);
      }

      if (r != null) {
        if (!r.isMatch(validationString)) {
          throw new ValidationException(view, InternationalizationManager.getString("xmlgui.validator.phone.invalid"));
View Full Code Here

  public final void addText(String text, String style) throws GUIException {
    try {
      document.insertString(document.getLength(), text, style == null ? null : textPane.getStyle(style));
    } catch (BadLocationException e) {
      throw new GUIException("Error while inserting text", e);
    }
  }
View Full Code Here

      });
      addChild(widget);
      if (isConstructed)
        finalizeConstruction();
    } else {
      throw new GUIException("OutlookPanel can only have Button children");
    }
  }
View Full Code Here

    if ("icon".equals(name)) {
      icon = (ImageIcon) value;
    } else if ("text".equals(name)) {
      setText((String) value);
    } else {
      throw new GUIException("Item only supports name and icon properties");
    }
  }
View Full Code Here

  }

  public void addChild(Widget widget, Object constraint) throws GUIException {
    String name = widget.getName();
    if (constraint != null)
      throw new GUIException("Anchors not supported inside a tabbed pane");
    if (!(widget instanceof Panel))
      throw new GUIException("Only panels can be added to a tabbed pane");

    String title = (String) paneInfo.get(name + ".title");
    if (title == null)
      title = "(unnamed)";
View Full Code Here

      if (isConstructed) {
        Widget widget = getChildWidgetByName(widgetName);
        if (widget != null) {
          int index = pane.indexOfComponent(widget.getWidget());
          if (index == -1)
            throw new GUIException("That widget is not a child of the tabbed pane");
          pane.removeTabAt(index);

          String title = (String) paneInfo.get(widgetName + ".title");
          if (title == null)
            title = "(unnamed)";
          pane.insertTab(
            title,
            (Icon) paneInfo.get(widgetName + ".icon"),
            widget.getWidget(),
            (String) paneInfo.get(widgetName + ".tooltip"), index);
        } else {
          throw new GUIException("A tab with that name was not found");
        }
      }
    } else {
      super.setProperty(name, value);
    }
View Full Code Here

    if (value != null) {
      RadioButton button = findButton(value);
      if (button != null)
         ((JRadioButton) button.getRealWidget()).setSelected(true);
      else
        throw new GUIException("Invalid radio button value [" + value + "]");
    }
  }
View Full Code Here

      } else if (event.getKey().equals(key)) {
        RadioButton button = findButton(event.getNewValue());
        if (button != null)
           ((JRadioButton) button.getRealWidget()).setSelected(true);
        else
          throw new GUIException("Invalid radio button value [" + event.getNewValue() + "]");
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.beryl.gui.GUIException

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.