Package ca.nengo.ui.models.nodes.widgets

Examples of ca.nengo.ui.models.nodes.widgets.Widget


        probe.setOffset(getWidth() * (1f / 4f), probeY + getHeight() * (1f / 4f));
        probeY += probe.getHeight() + 5;

      } else if (wo instanceof Widget) {
        Widget widget = (Widget) wo;
        if (widget.getParent() == null) {
          /*
           * Check to see that the origin has not been removed from
           * the world
           */

        } else {

          double scale = widget.getScale();

          if (!(widget).isWidgetVisible()) {
            double x = centerX - widget.getWidth() * scale / 2f;
            double y = centerY - widget.getHeight() * scale / 2f;

            widget.setOffset(x, y);

            widget.setVisible(false);
            widget.setPickable(false);
            widget.setChildrenPickable(false);

          } else {
            widget.setVisible(true);
            widget.setPickable(true);
            widget.setChildrenPickable(true);

            if (widget instanceof UIOrigin) {
              originY -= scale * widget.getHeight() + 8;
              widget.setOffset(originX, originY);

            } else if (widget instanceof UITermination) {
              termY -= scale * widget.getHeight() + 8;
              widget.setOffset(termX, termY);
            }
          }
        }

      }
View Full Code Here

TOP

Related Classes of ca.nengo.ui.models.nodes.widgets.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.