Find the last button.
 @return [BUTTON]
967546
def last_button
      # uiautomator index doesn't support last
      # and it's 0 indexed
      button_index = tags(BUTTON).length
      button_index -= 1 if button_index > 0
      image_button_index = tags(IMAGE_BUTTON).length
      image_button_index -= 1 if image_button_index > 0

      find_element :uiautomator,
                   _button_visible_selectors(button_index: button_index,
                                             image_button_index: image_button_index)
    end
322097
def refreshButtons(self):
        
        last = self._last
        first = self._first
        
        joiner = self._containerWidget.currentJoiner()
        
        # the first button set can contain the toggle options
        if first:
            self.uiJoinSBTN.setActionTexts(['AND', 'OR'])
        elif joiner == QueryCompound.Op.And:
            self.uiJoinSBTN.setActionTexts(['AND'])
        else:
            self.uiJoinSBTN.setActionTexts(['OR'])
        
        # the last option should not show an active action
        if last:
            self.uiJoinSBTN.setCurrentAction(None)
        
        # otherwise, highlight the proper action
        else:
            act = self.uiJoinSBTN.findAction(QueryCompound.Op[joiner].upper())
            self.uiJoinSBTN.setCurrentAction(act)
        
        enable = QueryCompound.typecheck(self._query) or self.isChecked()
        self.uiEnterBTN.setEnabled(enable)
783301
public JToggleButton getSelectedToggleButton() {
        for (final AbstractButton button : _buttons) {
            if (button instanceof JToggleButton) {
                if (button.isSelected()) {
                    return (JToggleButton) button;
                }
            }
        }
        return null;
    }
755678
def goto_next_component
      if @current_component != nil 
        leave_current_component
        if on_last_component?
          @_entered = false
          return :UNHANDLED
        end
        @current_index = @components.index(@current_component)
        index = @current_index + 1
        index.upto(@components.length-1) do |i|
          f = @components[i]
          if f.focusable
            @current_index = i
            @current_component = f
            return set_form_row
          end
        end
      end
      @_entered = false
      return :UNHANDLED
    end
275007
public E pollLast() {
        final Node<E> l = last;
        return (l == null) ? null : unlinkLast(l);
    }
319127
def find_primary_button(self):
        """"""
        if self.window.firefox_version >= 67:
            return self.root.find_element(
                By.CLASS_NAME, "popup-notification-primary-button")
        return self.root.find_anonymous_element_by_attribute(
            "anonid", "button")
180494
def last(self):
        """"""
        if len(self._range) == 0:
            raise IndexError("range is empty")
        if self._idx == -1:
            return self._range[0]
        return self._get(self._idx)
333687
public function last()
    {
        $where = $this->where;

        $whereData = $this->where_data_binding;

        // We count all.
        $c = $this->count();

        $this->where = $where;

        $this->where_data_binding = $whereData;

        return $this->jump($c - 1)
            ->take(1)->first();
    }
585895
def last(self):
        
        if self._last is UNDETERMINED:
            # not necessarily the last one...
            self._last = self.sdat.tseries.index[-1]
        return self[self._last]
216196
private JButton getBtnOK() {
		if (btnOK == null) {
			btnOK = new JButton();
			btnOK.setText(Constant.messages.getString("all.button.ok"));
			btnOK.addActionListener(new java.awt.event.ActionListener() { 

				@Override
				public void actionPerformed(java.awt.event.ActionEvent e) {    
					saveAndClose();
				}
			});

		}
		return btnOK;
	}
1084809
def last(self, node):
        # TODO: check docstring
        
        return self._nodes.index(node) == len(self._nodes) - 1
836758
public Node getLastChild()
  {

    ElemTemplateElement lastChild = null;

    for (ElemTemplateElement node = m_firstChild; node != null;
            node = node.m_nextSibling)
    {
      lastChild = node;
    }

    return lastChild;
  }
640283
def press(button, scope={})
      in_scope(scope) do
        begin
          click_button(button)
        rescue Capybara::ElementNotFound
          raise Kelp::MissingButton,
            "No button with value, id or text '#{button}' found"
        end
      end
    end
411006
def last_view(element_id)
      element = last(element_id)
      if element.is_a?(Layout)
        element = element.view
      end
      element
    end
1072366
private JButton getBtnCancel() {
		if (btnCancel == null) {
			btnCancel = new JButton();
			btnCancel.setText(Constant.messages.getString("all.button.cancel"));
			btnCancel.addActionListener(new java.awt.event.ActionListener() { 

				@Override
				public void actionPerformed(java.awt.event.ActionEvent e) {
					getTxtPattern().discardAllEdits();
					FilterReplaceDialog.this.dispose();
				    exitCode = JOptionPane.CANCEL_OPTION;

				}
			});

		}
		return btnCancel;
	}
1273906
def last(self):
        
        if self.type == HoloMap:
            last_items = [(k, v.last if isinstance(v, HoloMap) else v)
                          for (k, v) in self.data.items()]
        else:
            last_items = self.data
        return self.clone(last_items)
483045
def select button
      if button.is_a? String
        ;
      else
        button = button.value
      end
      set_value button
    end