Show this component inside a region
775173
function(region) {
    if (this._isShown) {
      throw new Error('This component is already shown in a region.');
    }

    if (!region) {
      throw new Error('Please supply a region to show inside.');
    }

    this.region = region;

    this.triggerMethod('before:show');

    this._showView();
    this._isShown = true;

    this.triggerMethod('show');
  }
11750
private void showTab() {
		if (parentTab != null) {
			tab = parentTab.getTab(this);
			if (tab != null) {
				// FIXME: this should be added by the constructor or by the panel that adds this
				// tab
				// tab.getComponent().addStyleName("example-queries-tab");
				tab.setEnabled(true);

				if (!(parentTab.getSelectedTab() instanceof ResultViewPanel)) {
					parentTab.setSelectedTab(tab);
				}
			}
		}

	}
742920
function() {
		var closeStack, popout, label, maximise;

		/**
		 * Popout control to launch component in new window.
		 */
		popout = lm.utils.fnBind( this.parent.popout, this.parent );
		label = this.layoutManager.config.labels.popout;
		new lm.controls.HeaderButton( this, label, 'lm_popout', popout );

		/**
		 * Maximise control - set the component to the full size of the layout
		 */
		maximise = lm.utils.fnBind( this.parent.toggleMaximise, this.parent );
		label = this.layoutManager.config.labels.maximise;
		new lm.controls.HeaderButton( this, label, 'lm_maximise', maximise );

		/**
		 * Close button
		 */
		if( this.parent.config.isClosable ) {
			closeStack = lm.utils.fnBind( this.parent.remove, this.parent );
			label = this.layoutManager.config.labels.close;
			new lm.controls.HeaderButton( this, label, 'lm_close', closeStack );
		}
	}
1116660
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WPanel panel = (WPanel) component;
		XmlStringBuilder xml = renderContext.getWriter();
		ListLayout layout = (ListLayout) panel.getLayout();
		int childCount = panel.getChildCount();
		Size gap = layout.getSpace();
		String gapString = gap != null ? gap.toString() : null;

		xml.appendTagOpen("ui:listlayout");

		switch (layout.getType()) {
			case FLAT:
				xml.appendAttribute("type", "flat");
				break;

			case STACKED:
				xml.appendAttribute("type", "stacked");
				break;

			case STRIPED:
				xml.appendAttribute("type", "striped");
				break;

			default:
				throw new IllegalArgumentException("Invalid type: " + layout.getType());
		}

		switch (layout.getAlignment()) {
			case LEFT:
				// left is assumed if omitted
				break;

			case RIGHT:
				xml.appendAttribute("align", "right");
				break;

			case CENTER:
				xml.appendAttribute("align", "center");
				break;

			default:
				throw new IllegalArgumentException("Invalid alignment: " + layout.getAlignment());
		}

		switch (layout.getSeparator()) {
			case NONE:
				// none is assumed if omitted
				break;

			case BAR:
				xml.appendAttribute("separator", "bar");
				break;

			case DOT:
				xml.appendAttribute("separator", "dot");
				break;

			default:
				throw new IllegalArgumentException("Invalid separator: " + layout.getSeparator());
		}

		xml.appendOptionalAttribute("ordered", layout.isOrdered(), "true");

		xml.appendOptionalAttribute("gap", gapString);

		xml.appendClose();

		// Paint children
		for (int i = 0; i < childCount; i++) {
			xml.appendTag("ui:cell");
			panel.getChildAt(i).paint(renderContext);
			xml.appendEndTag("ui:cell");
		}

		xml.appendEndTag("ui:listlayout");
	}
538489
function (cb) {
    var componentName;
    var data = this.data;
    var el = this.el;
    var self = this;

    if (data.from !== '') { return false; }

    if (!data.property.startsWith(STRING_COMPONENTS)) { return false; }

    componentName = splitDot(data.property)[1];
    if (el.components[componentName]) { return false; }

    el.addEventListener('componentinitialized', function wait (evt) {
      if (evt.detail.name !== componentName) { return; }
      cb();
      // Since the config was created async, create the animation now since we missed it
      // earlier.
      self.animation = anime(self.config);
      el.removeEventListener('componentinitialized', wait);
    });
    return true;
  }
846548
function renderComponent() {
    d3.select('svg')
      .call(gridline);

    var canvas = d3.select('canvas').node();
    var ctx = canvas.getContext('2d');
    gridlineCanvas.context(ctx)();
}
46343
function() {
            var t = Y.Dom.getDocumentScrollTop(),
                l = Y.Dom.getDocumentScrollLeft(),
                r = Y.Dom.getViewportWidth() + l,
                b = Y.Dom.getViewportHeight() + t;

            return new Y.Region(t, r, b, l);
        }
1182321
function() {
        var options = this.options,
            node = this.node,
            element = this.loadElement(node);

        // Only position if the menu has children
        if (!element.children().length) {
            return;
        }

        this.fireEvent('showing');

        var height = element.outerHeight(),
            coords = node.offset(),
            x = coords.left + options.xOffset,
            y = coords.top + options.yOffset + node.outerHeight(),
            windowScroll = $(window).height(),
            dir = 'left';

        // If menu goes below half page, position it above
        if (y > (windowScroll / 2)) {
            y = coords.top - options.yOffset - height;
        }

        // Change position for RTL
        if (Toolkit.isRTL) {
            x = $(window).width() - coords.left - node.outerWidth();
            dir = 'right';
        }

        element
            .css('top', y)
            .css(dir, x)
            .reveal();

        this.fireEvent('shown');
    }
1010157
public void show() {
        if (!(container instanceof RootPanel)) {
            if (!(container instanceof MaterialDialog)) {
                container.getElement().getStyle().setPosition(Style.Position.RELATIVE);
            }
            div.getElement().getStyle().setPosition(Style.Position.ABSOLUTE);
        }
        if (scrollDisabled) {
            RootPanel.get().getElement().getStyle().setOverflow(Style.Overflow.HIDDEN);
        }
        if (type == LoaderType.CIRCULAR) {
            div.setStyleName(CssName.VALIGN_WRAPPER + " " + CssName.LOADER_WRAPPER);
            div.add(preLoader);
        } else if (type == LoaderType.PROGRESS) {
            div.setStyleName(CssName.VALIGN_WRAPPER + " " + CssName.PROGRESS_WRAPPER);
            progress.getElement().getStyle().setProperty("margin", "auto");
            div.add(progress);
        }
        container.add(div);
    }
544510
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WPanel panel = (WPanel) component;
		XmlStringBuilder xml = renderContext.getWriter();
		GridLayout layout = (GridLayout) panel.getLayout();
		Size hgap = layout.getHorizontalGap();
		String hgapString = hgap == null ? null : hgap.toString();
		Size vgap = layout.getVerticalGap();
		String vgapString = vgap == null ? null : vgap.toString();
		int rows = layout.getRows();
		int cols = layout.getCols();

		xml.appendTagOpen("ui:gridlayout");

		xml.appendAttribute("rows", rows > 0 ? String.valueOf(rows) : "0");
		xml.appendAttribute("cols", cols > 0 ? String.valueOf(cols) : "0");
		xml.appendOptionalAttribute("hgap", hgapString);
		xml.appendOptionalAttribute("vgap", vgapString);

		xml.appendClose();

		int size = panel.getChildCount();

		for (int i = 0; i < size; i++) {
			xml.appendTag("ui:cell");
			WComponent child = panel.getChildAt(i);
			child.paint(renderContext);
			xml.appendEndTag("ui:cell");
		}

		xml.appendEndTag("ui:gridlayout");
	}
188556
function () {
        var self = this, settings = self.settings, elm, box, parent, name, parentEventsRoot;

        self.$el = $(self.getEl());
        self.state.set('rendered', true);

        // Bind on<event> settings
        for (name in settings) {
          if (name.indexOf("on") === 0) {
            self.on(name.substr(2), settings[name]);
          }
        }

        if (self._eventsRoot) {
          for (parent = self.parent(); !parentEventsRoot && parent; parent = parent.parent()) {
            parentEventsRoot = parent._eventsRoot;
          }

          if (parentEventsRoot) {
            for (name in parentEventsRoot._nativeEvents) {
              self._nativeEvents[name] = true;
            }
          }
        }

        bindPendingEvents(self);

        if (settings.style) {
          elm = self.getEl();
          if (elm) {
            elm.setAttribute('style', settings.style);
            elm.style.cssText = settings.style;
          }
        }

        if (self.settings.border) {
          box = self.borderBox;
          self.$el.css({
            'border-top-width': box.top,
            'border-right-width': box.right,
            'border-bottom-width': box.bottom,
            'border-left-width': box.left
          });
        }

        // Add instance to lookup
        var root = self.getRoot();
        if (!root.controlIdLookup) {
          root.controlIdLookup = {};
        }

        root.controlIdLookup[self._id] = self;

        for (var key in self._aria) {
          self.aria(key, self._aria[key]);
        }

        if (self.state.get('visible') === false) {
          self.getEl().style.display = 'none';
        }

        self.bindStates();

        self.state.on('change:visible', function (e) {
          var state = e.value, parentCtrl;

          if (self.state.get('rendered')) {
            self.getEl().style.display = state === false ? 'none' : '';

            // Need to force a reflow here on IE 8
            self.getEl().getBoundingClientRect();
          }

          // Parent container needs to reflow
          parentCtrl = self.parent();
          if (parentCtrl) {
            parentCtrl._lastRect = null;
          }

          self.fire(state ? 'show' : 'hide');

          ReflowQueue.add(self);
        });

        self.fire('postrender', {}, false);
      }
1134245
function() {
      var t = this;

      // Add the component to the model, then to the page view
      var copy = t.model.toJSON();
      delete copy.id;
      var component = t.pageView.model.addComponent(copy.viewClass);
      component.set(copy);

      // Position the component on top left
      var cv = t.pageView.getComponentView(component.get('id'));
      cv.raiseToTop(true);
      cv.moveToLeft();
      t.pageView.leftJustify();
      t.pageView.centerPage();

      // Close the dialog box
      t.closeDialog();
    }
143843
public String showDialog(Component comp) {
        value = null;
        setLocationRelativeTo(comp);
        setVisible(true);
        return value;
    }
1304463
function(component){
		var clist = component.clist = new this.klass.CellList(component.getnodeobjs());
		if(this.hastop){
			component.top = clist.getTopCell();
			
			if(this.rebuildmode){
				var val = -1, clist = clist, top = component.top;
				for(var i=0,len=clist.length;i<len;i++){
					var cell = clist[i];
					if(cell.room===component && cell.qnum!==-1){
						if(val===-1){ val = cell.qnum;}
						if(top!==cell){ cell.qnum = -1;}
					}
				}
				if(val!==-1 && top.qnum===-1){
					top.qnum = val;
				}
			}
		}
		if(this.puzzle.validConfig('autocmp')){
			component.checkAutoCmp();
		}
	}
1346970
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WTabSet tabSet = (WTabSet) component;
		XmlStringBuilder xml = renderContext.getWriter();

		xml.appendTagOpen("ui:tabset");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendAttribute("type", getTypeAsString(tabSet.getType()));
		xml.appendOptionalAttribute("disabled", tabSet.isDisabled(), "true");
		xml.appendOptionalAttribute("hidden", tabSet.isHidden(), "true");
		xml.appendOptionalAttribute("contentHeight", tabSet.getContentHeight());
		xml.appendOptionalAttribute("showHeadOnly", tabSet.isShowHeadOnly(), "true");
		xml.appendOptionalAttribute("single",
				TabSetType.ACCORDION.equals(tabSet.getType()) && tabSet.isSingle(),
				"true");
		if (WTabSet.TabSetType.ACCORDION.equals(tabSet.getType())) {
			xml.appendOptionalAttribute("groupName", tabSet.getGroupName());
		}
		xml.appendClose();

		// Render margin
		MarginRendererUtil.renderMargin(tabSet, renderContext);

		paintChildren(tabSet, renderContext);

		xml.appendEndTag("ui:tabset");
	}
75361
function() {
		var dimensions = this._layoutManager.config.dimensions,
			width = dimensions.dragProxyWidth,
			height = dimensions.dragProxyHeight;

		this.element.width( width );
		this.element.height( height );
		width -= ( this._sided ? dimensions.headerHeight : 0 );
		height -= ( !this._sided ? dimensions.headerHeight : 0 );
		this.childElementContainer.width( width );
		this.childElementContainer.height( height );
		this._contentItem.element.width( width );
		this._contentItem.element.height( height );
		this._contentItem.callDownwards( '_$show' );
		this._contentItem.callDownwards( 'setSize' );
	}
26455
function(bounds, zoomChanged, dragging) {
        var display = this.visibility;
        if (!this.isBaseLayer) {
            display = display && this.inRange;
        }
        this.display(display);
    }