Package org.beryl.gui

Examples of org.beryl.gui.GUIException


          return button;
        }
      }
    }

    throw new GUIException("Value not found in ButtonGroup");
  }
View Full Code Here


      addChild(widget);
    } else if (widget instanceof Spacer) {
      menuBar.add(widget.getWidget());
      addChild(widget);
    } else {
      throw new GUIException("Only Menu and Spacer children allowed");
    }
  }
View Full Code Here

      if (modifiers == 0)
        return KeyStroke.getKeyStroke(ch);
      else
        return KeyStroke.getKeyStroke(ch, modifiers);
    } else if (key.length() == 0) {
      throw new GUIException("Invalid key stroke: " + keyStroke);
    } else {
      try {
        int ch = KeyEvent.class.getField("VK_".concat(key)).getInt(null);
        return KeyStroke.getKeyStroke(ch, modifiers);
      } catch (Exception e) {
        throw new GUIException("Invalid key stroke: " + keyStroke);
      }
    }
  }
View Full Code Here

  public void setProperty(String name, Object value) throws GUIException {
    if ("layout".equals(name) || "border".equals(name) || "spacing".equals(name) || "background".equals(name)) {
      panel.setProperty(name, value);
    } else if ("helpid".equals(name)) {
      if (helpBroker == null)
        throw new GUIException("JavaHelp has not been activated");
      if (value != null)
        helpBroker.enableHelpKey(frame.getRootPane(), (String) value, null);
    } else if ("iconImage".equals(name)) {
      frame.setIconImage(((ImageIcon) value).getImage());
    } else if ("size".equals(name)) {
View Full Code Here

    }
  }

  public void addChild(Widget widget, Object constraint) throws GUIException {
    if (constraint != null)
      throw new GUIException("Anchors not supported inside a labeled dataWidget");
    if (dataWidget != null)
      throw new GUIException("A labeled component cannot have more than one child");
    ((JLabel) label.getRealWidget()).setLabelFor(widget.getRealWidget());
    dataWidget = widget;
   
    if (!(getParentWidget() instanceof Group)) {
      super.addChild(widget, constraints.rc(1, 3));
View Full Code Here

      else
        separator.menuSeparator.setOrientation(JSeparator.VERTICAL);
      toolBar.add(separator.menuSeparator);
      addChild(widget);
    } else {
      throw new GUIException("Only Button and Separator children allowed");
    }
  } 
View Full Code Here

      if (orientation.equals("h")) {
        splitPane.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
      } else if (orientation.equals("v")) {
        splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
      } else {
        throw new GUIException("Invalid split pane orientation");
      }
    } else {
      super.setProperty(name, value);
    }
  }
View Full Code Here

      else
        splitPane.setBottomComponent(widget.getWidget());
      second = widget;
      addChild(widget);
    } else {
      throw new GUIException("A SplitPane cannot have more than two children");
    }
  }
View Full Code Here

          if (button.isEnabled())
            button.setBorderPainted(false);
        }
      });
    } else {
      throw new GUIException("Unknown preset [" + preset + "]");
    }
  }
View Full Code Here

      Widget widget = getParentWidgetByClass(Frame.class);
      if (widget == null) {
        widget = getParentWidgetByClass(Dialog.class);
      }
      if (widget == null) {
        throw new GUIException("Could not find root window");
      }
      if (((Boolean) value).booleanValue()) {
        widget.setProperty("default", this);
      } else {
        if (widget.getProperty("default") == this)
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.