Adds a keyline to the {@link DesignSpec}.
432336
public DesignSpec addKeyline(float position, From from) {
        final Keyline keyline = new Keyline(position * mDensity, from);
        if (mKeylines.contains(keyline)) {
            return this;
        }

        mKeylines.add(keyline);
        return this;
    }
1360479
public TableBuilder addOutlineBorder(BorderStyle style) {
		this.addBorder(0, 0, model.getRowCount(), model.getColumnCount(), OUTLINE, style);
		return this;
	}
808687
private void addWrapper(MethodSpec.Builder method, String pattern) {
    method.addComment("$S", pattern);
    for (Node node : WRAPPER_PARSER.parseWrapper(pattern)) {
      if (node instanceof Text) {
        method.addStatement("b.append($S)", ((Text)node).text());

      } else if (node instanceof Field) {
        Field field = (Field)node;
        switch (field.ch()) {
          case '0':
            method.beginControlFlow("if (timeType != null)");
            method.addStatement("formatTime(timeType, d, b)");
            method.nextControlFlow("else");
            method.addStatement("formatSkeleton(timeSkel, d, b)");
            method.endControlFlow();
            break;

          case '1':
            method.beginControlFlow("if (dateType != null)");
            method.addStatement("formatDate(dateType, d, b)");
            method.nextControlFlow("else");
            method.addStatement("formatSkeleton(dateSkel, d, b)");
            method.endControlFlow();
            break;
        }
      }
    }
  }
659167
public TableBuilder addHeaderBorder(BorderStyle style) {
		this.addBorder(0, 0, 1, model.getColumnCount(), OUTLINE, style);
		return addOutlineBorder(style);
	}
292689
def _add_line_segment(self, x, y):
        """"""
        self._drawing_operations.append(_LineSegment.new(self, x, y))
193709
public DesignSpec setSpacingsColor(int color) {
        if (mSpacingsPaint.getColor() == color) {
            return this;
        }

        mSpacingsPaint.setColor(color);
        invalidateSelf();

        return this;
    }
1327410
protected void addMethod(String k, ExecutableElement e, MethodModel exec) {
    ArrayList<ContractableMethod> list = methodMap.get(k);
    if (list == null) {
      list = new ArrayList<ContractableMethod>();
      methodMap.put(k, list);
    }
    list.add(new ContractableMethod(e, exec));
  }
210822
def add_color_scheme_stack(self, scheme_name, custom=False):
        """"""
        color_scheme_groups = [
            (_('Text'), ["normal", "comment", "string", "number", "keyword",
                         "builtin", "definition", "instance", ]),
            (_('Highlight'), ["currentcell", "currentline", "occurrence",
                              "matched_p", "unmatched_p", "ctrlclick"]),
            (_('Background'), ["background", "sideareas"])
            ]

        parent = self.parent
        line_edit = parent.create_lineedit(_("Scheme name:"),
                                           '{0}/name'.format(scheme_name))

        self.widgets[scheme_name] = {}

        # Widget setup
        line_edit.label.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
        self.setWindowTitle(_('Color scheme editor'))

        # Layout
        name_layout = QHBoxLayout()
        name_layout.addWidget(line_edit.label)
        name_layout.addWidget(line_edit.textbox)
        self.scheme_name_textbox[scheme_name] = line_edit.textbox

        if not custom:
            line_edit.textbox.setDisabled(True)
        if not self.isVisible():
            line_edit.setVisible(False)

        cs_layout = QVBoxLayout()
        cs_layout.addLayout(name_layout)

        h_layout = QHBoxLayout()
        v_layout = QVBoxLayout()

        for index, item in enumerate(color_scheme_groups):
            group_name, keys = item
            group_layout = QGridLayout()

            for row, key in enumerate(keys):
                option = "{0}/{1}".format(scheme_name, key)
                value = self.parent.get_option(option)
                name = syntaxhighlighters.COLOR_SCHEME_KEYS[key]

                if is_text_string(value):
                    label, clayout = parent.create_coloredit(
                        name,
                        option,
                        without_layout=True,
                        )
                    label.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
                    group_layout.addWidget(label, row+1, 0)
                    group_layout.addLayout(clayout, row+1, 1)

                    # Needed to update temp scheme to obtain instant preview
                    self.widgets[scheme_name][key] = [clayout]
                else:
                    label, clayout, cb_bold, cb_italic = parent.create_scedit(
                        name,
                        option,
                        without_layout=True,
                        )
                    label.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
                    group_layout.addWidget(label, row+1, 0)
                    group_layout.addLayout(clayout, row+1, 1)
                    group_layout.addWidget(cb_bold, row+1, 2)
                    group_layout.addWidget(cb_italic, row+1, 3)

                    # Needed to update temp scheme to obtain instant preview
                    self.widgets[scheme_name][key] = [clayout, cb_bold,
                                                      cb_italic]

            group_box = QGroupBox(group_name)
            group_box.setLayout(group_layout)

            if index == 0:
                h_layout.addWidget(group_box)
            else:
                v_layout.addWidget(group_box)

        h_layout.addLayout(v_layout)
        cs_layout.addLayout(h_layout)

        stackitem = QWidget()
        stackitem.setLayout(cs_layout)
        self.stack.addWidget(stackitem)
        self.order.append(scheme_name)
834431
public PyCodeBuilder append(String... codeFragments) {
    for (String codeFragment : codeFragments) {
      code.append(codeFragment);
    }
    return this;
  }
46326
def add_line(self, line, source, *lineno):
        """"""
        self.result.append(line, source, *lineno)
1058778
public void addMethodLine(String className, String methodName, String methodSignature, SourceLineRange range) {
        methodLineMap.put(new MethodDescriptor(className, methodName, methodSignature), range);
    }
155005
private void addConstructorByKey() {
    context.constructorByKey = MethodSpec.constructorBuilder().addParameter(keySpec);
    context.constructorByKey.addParameter(keyRefQueueSpec);
    addCommonParameters(context.constructorByKey);
    if (isBaseClass()) {
      callSiblingConstructor();
    } else {
      callParentByKey();
    }
  }
67980
private void updateStyle(JTextComponent c) {
        SeaGlassContext context  = getContext(c, ENABLED);
        SynthStyle      oldStyle = style;

        SynthStyle s = SeaGlassLookAndFeel.updateStyle(context, this);
        if (s instanceof SeaGlassStyle) {
            style = (SeaGlassStyle) s;

            updateSearchStyle(c, context, getPropertyPrefix());

            if (style != oldStyle) {
                updateStyle(c, context, getPropertyPrefix());

                if (oldStyle != null) {
                    uninstallKeyboardActions();
                    installKeyboardActions();
                }
            }
        }
        
        context.dispose();

        context   = getContext(c, SeaGlassRegion.SEARCH_FIELD_FIND_BUTTON, ENABLED);
        findStyle = SeaGlassLookAndFeel.updateStyle(context, this);
        context.dispose();

        context     = getContext(c, SeaGlassRegion.SEARCH_FIELD_CANCEL_BUTTON, ENABLED);
        cancelStyle = SeaGlassLookAndFeel.updateStyle(context, this);
        context.dispose();
    }
14816
def _add(self, codeobj):
        """"""
        assert isinstance(codeobj, (CodeStatement, CodeExpression))
        self.body._add(codeobj)
713360
public void addVertex(final AbstractJobInputVertex inputVertex) {

		if (!inputVertices.containsKey(inputVertex.getID())) {
			inputVertices.put(inputVertex.getID(), inputVertex);
		}
	}
1325580
public void addStubMethods(TypeSpec.Builder classBuilder) {

        MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("onTransact")
                .addModifiers(Modifier.PUBLIC)
                .addAnnotation(Override.class)
                .returns(boolean.class)
                .addException(ClassName.get("android.os", "RemoteException"))
                .addParameter(int.class, "code")
                .addParameter(ClassName.get("android.os", "Parcel"), "data")
                .addParameter(ClassName.get("android.os", "Parcel"), "reply")
                .addParameter(int.class, "flags");

        methodBuilder.beginControlFlow("try");
        methodBuilder.beginControlFlow("switch (code)");

        methodBuilder.beginControlFlow("case INTERFACE_TRANSACTION:");
        methodBuilder.addStatement("reply.writeString(DESCRIPTOR)");
        methodBuilder.addStatement("return true");
        methodBuilder.endControlFlow();

        processRemoterElements(classBuilder, new ElementVisitor() {
            @Override
            public void visitElement(TypeSpec.Builder classBuilder, Element member, int methodIndex, MethodSpec.Builder methodBuilder) {
                addStubMethods(classBuilder, member, methodIndex, methodBuilder);
            }
        }, methodBuilder);


        methodBuilder.beginControlFlow("case TRANSACTION__getStubID:");
        methodBuilder.addStatement("data.enforceInterface(DESCRIPTOR)");
        methodBuilder.addStatement("reply.writeNoException()");
        methodBuilder.addStatement("reply.writeInt(serviceImpl.hashCode())");
        methodBuilder.addStatement("return true");
        methodBuilder.endControlFlow();


        //end switch
        methodBuilder.endControlFlow();
        //end of try
        methodBuilder.endControlFlow();
        //catch rethrow
        methodBuilder.beginControlFlow("catch ($T re)", Throwable.class);
        methodBuilder.beginControlFlow("if ((flags & FLAG_ONEWAY) == 0)");
        methodBuilder.addStatement("reply.setDataPosition(0)");
        methodBuilder.addStatement("reply.writeInt(REMOTER_EXCEPTION_CODE)");
        methodBuilder.addStatement("reply.writeString(re.getMessage())");
        methodBuilder.addStatement("reply.writeSerializable(re)");
        methodBuilder.endControlFlow();
        methodBuilder.beginControlFlow("else");
        methodBuilder.addStatement("$T.w(serviceImpl.getClass().getName(), \"Binder call failed.\", re)", ClassName.get("android.util", "Log"));
        methodBuilder.endControlFlow();
        methodBuilder.addStatement("return true");
        methodBuilder.endControlFlow();
        methodBuilder.addStatement("return super.onTransact(code, data, reply, flags)");
        classBuilder.addMethod(methodBuilder.build());
        addCommonExtras(classBuilder);

        addStubExtras(classBuilder);

    }
1227291
private void append(CharMatcher matcher, TokenBuilder builder)
      throws
      IOException,
      CssException
  {
    while (true)
    {
      Mark mark = reader.mark();
      int ch = reader.next();
      if (ch > -1 && matcher.matches((char) ch))
      {
        builder.append(ch);
      }
      else if (ch == '\\')
      {
        Optional<CssEscape> escape = new CssEscape(reader, builder)
            .create();
        if (escape.isPresent())
        {
          reader.forward(escape.get().render(builder, matcher));
        }
        else
        {
          reader.unread(ch, mark);
          break;
        }
      }
      else
      {
        reader.unread(ch, mark);
        break;
      }
    }
  }