### setRightStyle  Sets the right property of the panelDiv of a docked widget  May close docked widgets to make space to this one.  @param {Widget} w The widget
16335
function setRightStyle(w) {
        var dockedMargin, safeMargin;
        var lastDocked, right, ws, tmp;

        safeMargin = 200;
        dockedMargin = 20;

        ws = node.widgets;

        right = 0;
        // The widget w has been already added to the docked list.
        if (ws.docked.length > 1) {
            lastDocked = ws.docked[(ws.docked.length - 2)];
            right = getPxNum(lastDocked.panelDiv.style.right);
            right += lastDocked.panelDiv.offsetWidth;
        }
        right += dockedMargin;

        w.panelDiv.style.right = (right + "px");

        // Check if there is enough space on page?
        tmp = 0;
        right += w.panelDiv.offsetWidth + safeMargin;
        while (ws.docked.length > 1 &&
               right > window.innerWidth &&
               tmp < (ws.docked.length - 1)) {

            // Make some space...
            closeDocked(ws.docked[tmp].wid, true);
            tmp++;
        }
        // Store final offsetWidth in widget, because we need it after
        // it is destroyed.
        w.dockedOffsetWidth = w.panelDiv.offsetWidth + dockedMargin;
    }
180478
@Api
	public void setRectangleStyle(ShapeStyle rectangleStyle) {
		this.rectangleStyle = rectangleStyle;
		if (targetRectangle != null) {
			targetRectangle.setStyle(rectangleStyle);
			render(targetRectangle, RenderGroup.SCREEN, RenderStatus.ALL);
		}
	}
1196921
private void setFilePosition(FileWindow w, int line) {
        boolean activate = true;
        JTextArea ta = w.textArea;
        try {
            if (line == -1) {
                w.setPosition(-1);
                if (currentWindow == w) {
                    currentWindow = null;
                }
            } else {
                int loc = ta.getLineStartOffset(line-1);
                if (currentWindow != null && currentWindow != w) {
                    currentWindow.setPosition(-1);
                }
                w.setPosition(loc);
                currentWindow = w;
            }
        } catch (BadLocationException exc) {
            // fix me
        }
        if (activate) {
            if (w.isIcon()) {
                desk.getDesktopManager().deiconifyFrame(w);
            }
            desk.getDesktopManager().activateFrame(w);
            try {
                w.show();
                w.toFront();  // required for correct frame layering (JDK 1.4.1)
                w.setSelected(true);
            } catch (Exception exc) {
            }
        }
    }
1260547
def setWidget(self, widget, index=0, row=None,
                  col=0, rowspan=1, colspan=1):
        
        if row is None:
            row = self.currentRow
        self.currentRow = max(row + 1, self.currentRow)
        if index > len(self.widgets) - 1:
            # add new widget
            self.widgets.append(widget)
        else:  # change existing widget
            self.layout.removeWidget(self.widgets[index])
            self.widgets[index] = widget
        self.layout.addWidget(widget, row, col, rowspan, colspan)
        self.raiseOverlay()
95774
function right() {
        var role = getRole(), parentRole = getParentRole();

        if (parentRole == "tablist") {
          moveFocus(1, getFocusElements(focusedElement.parentNode));
        } else if (role == "menuitem" && parentRole == "menu" && getAriaProp('haspopup')) {
          enter();
        } else {
          moveFocus(1);
        }
      }
1027936
@Override
	public void setWidget( Widget w )
	{
		// Validate
		if( w == widget )
			return;

		// Detach new child.
		if( w != null )
			w.removeFromParent();

		// Remove old child.
		if( widget != null )
			remove( widget );

		// Logical attach.
		widget = w;

		if( w != null )
		{
			// Physical attach.
			DOM.appendChild( containerElement, widget.getElement() );

			adopt( w );
		}
	}
15375
public AT_Row setPaddingLeftRight(int padding){
		if(this.hasCells()){
			for(AT_Cell cell : this.getCells()){
				cell.getContext().setPaddingLeftRight(padding);
			}
		}
		return this;
	}
716290
public void setStyle(StyleRow styleRow, GeometryType geometryType) {
		if (geometryType != null) {
			if (styleRow != null) {
				styles.put(geometryType, styleRow);
			} else {
				styles.remove(geometryType);
			}
		} else {
			defaultStyle = styleRow;
		}
	}
676933
function setRawMode (mode) {
  if (mode) {
    this.do.suppress_go_ahead()
    this.will.suppress_go_ahead()
    this.will.echo()
  } else {
    this.dont.suppress_go_ahead()
    this.wont.suppress_go_ahead()
    this.wont.echo()
  }
}
1082142
public static Widget wrapWithBorderPadding(Widget w) {

        w.addStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().borderPadding());
        w.addStyleName(I_CmsLayoutBundle.INSTANCE.generalCss().cornerAll());
        SimplePanel panel = new SimplePanel();
        panel.add(w);
        return panel;
    }
1245711
function( width, height ) {
		if( arguments.length === 2 ) {
			this.width = width;
			this.height = height;
		} else {
			this.width = this.container.width();
			this.height = this.container.height();
		}

		if( this.isInitialised === true ) {
			this.root.callDownwards( 'setSize' );
		}
	}
762878
public void setButtonStyle(I_CmsButton.ButtonStyle style, I_CmsButton.ButtonColor color) {

        if (m_buttonStyle != null) {
            for (String styleName : m_buttonStyle.getAdditionalClasses()) {
                removeStyleName(styleName);
            }
        }
        if (style == ButtonStyle.TRANSPARENT) {
            setSize(null);
        }
        addStyleName(style.getCssClassName());
        m_buttonStyle = style;

        if (m_color != null) {
            removeStyleName(m_color.getClassName());
        }
        if (color != null) {
            addStyleName(color.getClassName());
        }
        m_color = color;
    }
1012408
function setCss(el, prop, val, idx) {
  if ('string' == typeof prop) {
    var styles = getCss(el);
    if (typeof val === 'function') {
      val = val.call(el, idx, styles[prop]);
    }

    if (val === '') {
      delete styles[prop];
    } else if (val != null) {
      styles[prop] = val;
    }

    el.attribs.style = stringify(styles);
  } else if ('object' == typeof prop) {
    Object.keys(prop).forEach(function(k){
      setCss(el, k, prop[k]);
    });
  }
}
574483
def snap_right(window, width=None):
    
    if not width:
        width = window.width()
    rect = QApplication.desktop().screenGeometry()
    window.setGeometry(rect.width()-width, _DESKTOP_OFFSET_TOP, width, rect.height())
110980
public void updateStyle(AbstractButton b) {
        SeaGlassContext context  = getContext(b, SynthConstants.ENABLED);
        SynthStyle      oldStyle = style;

        style = SeaGlassLookAndFeel.updateStyle(context, this);
        if (style != oldStyle) {
            if (b.getMargin() == null || (b.getMargin() instanceof UIResource)) {
                Insets margin = (Insets) style.get(context, getPropertyPrefix() + "margin");

                if (margin == null) {
                    // Some places assume margins are non-null.
                    margin = SeaGlassLookAndFeel.EMPTY_UIRESOURCE_INSETS;
                }

                b.setMargin(margin);
            }

            Object value = style.get(context, getPropertyPrefix() + "iconTextGap");

            if (value != null) {
                LookAndFeel.installProperty(b, "iconTextGap", value);
            }

            value = style.get(context, getPropertyPrefix() + "contentAreaFilled");
            LookAndFeel.installProperty(b, "contentAreaFilled", value != null ? value : Boolean.TRUE);

            value = b.getClientProperty(APPLE_PREFIX + "buttonType");
            if (value != null) {
                if ("segmented".equals(value)) {
                    b.setMargin(SeaGlassLookAndFeel.EMPTY_UIRESOURCE_INSETS);
                }
            }

            if (oldStyle != null) {
                uninstallKeyboardActions(b);
                installKeyboardActions(b);
            }
        }

        context.dispose();
    }
410076
def setArrowStyle( self, state ):
        
        self._arrowStyle = state
        
        if not state:
            self.setStyleSheet('')
        else:
            right = resources.find('img/treeview/triangle_right.png')
            down  = resources.find('img/treeview/triangle_down.png')
            opts  = (right.replace('\\', '/'), down.replace('\\', '/'))
            self.setStyleSheet(ARROW_STYLESHEET % opts)
54836
public int addWidget (Widget widget, int colSpan, String... styles)
    {
        int row = getRowCount();
        setWidget(row, 0, widget, colSpan, styles);
        return row;
    }