Package org.nlogo.window

Examples of org.nlogo.window.Widget


          }
        };
    String type = strings[0];
    int x = Integer.parseInt(strings[1]);
    int y = Integer.parseInt(strings[2]);
    Widget newGuy = makeWidget(type, true);
    if (newGuy != null) {
      newGuy.load(strings, helper);
      enforceMinimumAndMaximumWidgetSizes(newGuy);
      addWidget(newGuy, x, y, false, true);
    }
    return newGuy;
  }
View Full Code Here


    if (e.widget instanceof org.nlogo.window.PlotWidget) {
      java.awt.Component[] comps = getComponents();
      for (int i = 0; i < comps.length; i++) {
        if (comps[i] instanceof WidgetWrapper) {
          WidgetWrapper wrapper = (WidgetWrapper) comps[i];
          Widget widget = wrapper.widget();
          if (widget instanceof DummyPlotWidget &&
              e.widget.displayName().equals(widget.displayName())) {
            removeWidget(wrapper);
          }
        }
      }
      repaint();
View Full Code Here

    // loop backwards so JLayeredPane gives us the components
    // in back-to-front order for saving - ST 9/29/03
    for (int i = comps.length - 1; i >= 0; i--) {
      if (comps[i] instanceof WidgetWrapper) {
        WidgetWrapper wrapper = (WidgetWrapper) comps[i];
        Widget widget = wrapper.widget();
        if (!result.contains(widget)) {
          result.add(widget);
        }
      }
    }
View Full Code Here

  @Override
  public boolean isFocusable() {
    java.awt.Component[] comps = getComponents();
    for (int i = 0; i < comps.length; i++) {
      if (comps[i] instanceof WidgetWrapper) {
        Widget widget = ((WidgetWrapper) comps[i]).widget();
        if (widget instanceof org.nlogo.window.ButtonWidget) {
          org.nlogo.window.ButtonWidget button =
              (org.nlogo.window.ButtonWidget) widget;
          if (button.actionKey() != '\0' &&
              button.actionKey() != ' ') {
View Full Code Here

TOP

Related Classes of org.nlogo.window.Widget

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.