Moves the button along the table seats.
331961
public function moveButton()
    {
        $this->button = $this->button + 1;

        if ($this->button >= $this->playersSatDown()->count()) {
            $this->button = 0;
        }
    }
622668
public function button(MenuItem $button)
    {
        $subButtons = $this->sub_button;

        $subButtons[] = $button;

        $this->with('sub_button', $subButtons);
    }
1330279
public void addCloseButton () {
		Label titleLabel = getTitleLabel();
		Table titleTable = getTitleTable();

		VisImageButton closeButton = new VisImageButton("close-window");
		titleTable.add(closeButton).padRight(-getPadRight() + 0.7f);
		closeButton.addListener(new ChangeListener() {
			@Override
			public void changed (ChangeEvent event, Actor actor) {
				close();
			}
		});
		closeButton.addListener(new ClickListener() {
			@Override
			public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
				event.cancel();
				return true;
			}
		});

		if (titleLabel.getLabelAlign() == Align.center && titleTable.getChildren().size == 2)
			titleTable.getCell(titleLabel).padLeft(closeButton.getWidth() * 2);
	}
1188473
public void moveDown(I_CmsEditableGroupRow row) {

        int index = m_container.getComponentIndex(row);
        if ((index >= 0) && (index < (m_container.getComponentCount() - 1))) {
            m_container.removeComponent(row);
            m_container.addComponent(row, index + 1);
        }
        updateButtonBars();
    }
1073069
public static void toggleButton(Button button) {

        if (isButtonPressed(button)) {
            button.removeStyleName(OpenCmsTheme.BUTTON_PRESSED);
        } else {
            button.addStyleName(OpenCmsTheme.BUTTON_PRESSED);
        }
    }
628937
function move(delta) {
    const { state } = this;
    const { index, items, itemsPerSlide, autoplayInterval, slideWidth, gap, peek, config } = state;
    const nextIndex = getNextIndex(state, delta);
    let offsetOverride;

    config.preserveItems = true;
    this.isMoving = true;

    // When we are in autoplay mode we overshoot the desired index to land on a clone
    // of one of the ends. Then after the transition is over we update to the proper position.
    if (autoplayInterval) {
        if (delta === RIGHT && nextIndex < index) {
            // Transitions to one slide before the beginning.
            offsetOverride = -slideWidth - gap;

            // Move the items in the last slide to be before the first slide.
            for (let i = Math.ceil(itemsPerSlide + peek); i--;) {
                const item = items[items.length - i - 1];
                item.transform = `translateX(${(getMaxOffset(state) + slideWidth + gap) * -1}px)`;
            }
        } else if (delta === LEFT && nextIndex > index) {
            // Transitions one slide past the end.
            offsetOverride = getMaxOffset(state) + slideWidth + gap;

            // Moves the items in the first slide to be after the last slide.
            for (let i = Math.ceil(itemsPerSlide + peek); i--;) {
                const item = items[i];
                item.transform = `translateX(${(getMaxOffset(state) + slideWidth + gap)}px)`;
            }
        }

        config.offsetOverride = offsetOverride;
    }

    this.setState('index', nextIndex);
    this.once('carousel-update', () => {
        this.isMoving = false;

        if (offsetOverride !== undefined) {
            // If we are in autoplay mode and went outside of the normal offset
            // We make sure to restore all of the items that got moved around.
            items.forEach(item => { item.transform = undefined; });
        }
    });

    return nextIndex;
}
559448
function tableButtonClick(e, data) {

    // Wire up the submit button click event handler
    $(data.popup).children(":button")
      .unbind("click")
      .bind("click", function(e) {

        // Get the editor
        var editor = data.editor;

        // Get the column and row count
        var $text = $(data.popup).find(":text"),
          cols = parseInt($text[0].value),
          rows = parseInt($text[1].value),
          spacing = parseInt($text[2].value),
          padding = parseInt($text[3].value),
          border = parseInt($text[4].value),
          styles = $text[5].value;

        if (parseInt(cols) < 1 || !parseInt(cols)) cols = 0;
        if (parseInt(rows) < 1 || !parseInt(rows)) rows = 0;
        if (parseInt(spacing) < 1 || !parseInt(spacing)) spacing = 0;
        if (parseInt(padding) < 1 || !parseInt(padding)) padding = 0;
        if (parseInt(border) < 1 || !parseInt(border)) border = 0;

        // Build the html
        var html;
        if (cols > 0 && rows > 0) {
          html = "<table border=" + border + " cellpadding=" + padding +
            " cellspacing=" + spacing + 
            (styles ? ' style="' + styles + '"' : "") + ">";
          for (y = 0; y < rows; y++) {
            html += "<tr>";
            for (x = 0; x < cols; x++)
              html += "<td>" + x + "," + y + "</td>";
            html += "</tr>";
          }
          html += "</table><br />";
        }

        // Insert the html
        if (html)
          editor.execCommand(data.command, html, null, data.button);

        // Reset the text, hide the popup and set focus
        $text[0].value = "4";
        $text[1].value = "4";
        $text[2].value = "2";
        $text[3].value = "2";
        $text[4].value = "1";
        $text[5].value = "";
        editor.hidePopups();
        editor.focus();

      });

    }
756166
private void foldButtons() {

        VerticalLayout mainPV = (VerticalLayout)m_foldedButtonsMenu.getContent().getPopupComponent();
        for (int i = m_itemsLeft.getComponentCount() - 1; i > -1; i--) {
            Component comp = m_itemsLeft.getComponent(i);
            if (!isAlwaysShow(comp)) {
                m_itemsLeft.removeComponent(comp);
                m_leftButtons.addComponent(comp, 0);
                m_leftButtons.setComponentAlignment(comp, Alignment.MIDDLE_CENTER);
            }
        }
        if (m_leftButtons.getComponentCount() == 0) {
            mainPV.removeComponent(m_leftButtons);
        } else {
            mainPV.addComponent(m_leftButtons, 0);
        }
        for (int i = m_itemsRight.getComponentCount() - 1; i > -1; i--) {
            Component comp = m_itemsRight.getComponent(i);
            if (!isAlwaysShow(comp)) {
                m_itemsRight.removeComponent(comp);
                m_rightButtons.addComponent(comp, 0);
                m_rightButtons.setComponentAlignment(comp, Alignment.MIDDLE_CENTER);
            }
        }
        if (m_rightButtons.getComponentCount() == 0) {
            mainPV.removeComponent(m_rightButtons);
        } else {
            mainPV.addComponent(m_rightButtons);
        }
        m_itemsRight.addComponent(m_foldedButtonsMenu, 0);
        m_buttonsFolded = true;
        markAsDirtyRecursive();
    }
126392
function () {
			$.fn.mediumInsert.settings.enabled = true;

			$.fn.mediumInsert.insert.$el.find('.mediumInsert-buttons').removeClass('hide');
		}
686732
def insert(self, button):
        
        if self.keyboard and len(self.keyboard[-1]) < self.row_width:
            self.keyboard[-1].append(button)
        else:
            self.add(button)
        return self
503172
function() {
    // Move Editor
    var elContainer = this.getContainerEl(),
        elTd = this.getTdEl(),
        x = Dom.getX(elTd),
        y = Dom.getY(elTd);

    //TODO: remove scrolling logic
    // SF doesn't get xy for cells in scrolling table
    // when tbody display is set to block
    if(isNaN(x) || isNaN(y)) {
        var elTbody = this.getDataTable().getTbodyEl();
        x = elTd.offsetLeft + // cell pos relative to table
                Dom.getX(elTbody.parentNode) - // plus table pos relative to document
                elTbody.scrollLeft; // minus tbody scroll
        y = elTd.offsetTop + // cell pos relative to table
                Dom.getY(elTbody.parentNode) - // plus table pos relative to document
                elTbody.scrollTop + // minus tbody scroll
                this.getDataTable().getTheadEl().offsetHeight; // account for fixed THEAD cells
    }

    elContainer.style.left = x + "px";
    elContainer.style.top = y + "px";
}
796255
private void moveToPrevious() {
        if (controller != null) {
            currentItemIndex = controller.previousItem(this, currentItemIndex);
        } else {
            currentItemIndex = defaultController.previousItem(this, currentItemIndex);
        }
    }
824998
public void addButton(ToolStripButton button, int position) {
		toolStrip.addButton(button, position);
		extraButtons.add(button);
		button.setDisabled(true);
	}
1251716
def adjustButtons( self ):
        
        y = 1
        
        for btn in self.buttons():
            btn.setIconSize(self.iconSize())
            btn.setFixedSize(QSize(self.height() - 2, self.height() - 2))
        
        # adjust the location for the left buttons
        left_buttons = self._buttons.get(Qt.AlignLeft, [])
        x = (self.cornerRadius() / 2.0) + 2
        
        for btn in left_buttons:
            btn.move(x, y)
            x += btn.width()
        
        # adjust the location for the right buttons
        right_buttons = self._buttons.get(Qt.AlignRight, [])
        
        w       = self.width()
        bwidth  = sum([btn.width() for btn in right_buttons])
        bwidth  += (self.cornerRadius() / 2.0) + 1
        
        for btn in right_buttons:
            btn.move(w - bwidth, y)
            bwidth -= btn.width()
        
        self._buttonWidth = sum([btn.width() for btn in self.buttons()])
        self.adjustTextMargins()
924803
public void removeButton(Component button) {

        m_itemsLeft.removeComponent(button);
        m_itemsRight.removeComponent(button);
        m_leftButtons.removeComponent(button);
        m_rightButtons.removeComponent(button);
        updateFoldingThreshhold();
    }
206462
protected void moveSelectionUp() {
		final IStructuredSelection selection = this.list.getStructuredSelection();
		final int index = this.conversions.indexOf(selection.getFirstElement());
		if (index > 0) {
			final ConversionMapping previous = this.conversions.remove(index - 1);
			this.conversions.add(index + selection.size() - 1, previous);
			refreshListUI();
			this.list.refresh(true);
			enableButtons();
			preferenceValueChanged();
		}
	}
357065
private void enableButtons() {
		final int itemCount = this.list.getTable().getItemCount();
		final boolean hasElement = itemCount > 0;
		IStructuredSelection selection;
		if (hasElement) {
			selection = this.list.getStructuredSelection();
			final int selectionCount = selection.size();
			if (selectionCount <= 0 || selectionCount > itemCount) {
				selection = null;
			}
		} else {
			selection = null;
		}
		this.removeButton.setEnabled(selection != null);
		this.clearButton.setEnabled(hasElement);
		if (this.isSortedElements) {
			final Object firstElement = selection != null ? this.list.getTable().getItem(0).getData() : null;
			final Object lastElement = selection != null ? this.list.getTable().getItem(this.list.getTable().getItemCount() - 1).getData() : null;
			final boolean isNotFirst = firstElement != null && selection != null && firstElement != selection.getFirstElement();
			final boolean isNotLast = lastElement != null && selection != null && lastElement != selection.getFirstElement();
			this.moveTopButton.setEnabled(isNotFirst);
			this.moveUpButton.setEnabled(isNotFirst);
			this.moveDownButton.setEnabled(isNotLast);
			this.moveBottomButton.setEnabled(isNotLast);
		}
	}