congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Font.getWeight
Code IndexAdd Tabnine to your IDE (free)

How to use
getWeight
method
in
org.geotools.styling.Font

Best Java code snippets using org.geotools.styling.Font.getWeight (Showing top 20 results out of 315)

origin: geotools/geotools

public FontBuilder reset() {
  Font df = sf.getDefaultFont();
  this.families = new ArrayList<Expression>();
  this.size = df.getSize();
  this.style = df.getStyle();
  this.weight = df.getWeight();
  return this;
}
origin: geotools/geotools

public FontBuilder reset(Font font) {
  if (font == null) {
    return reset();
  }
  this.families = font.getFamily() != null ? font.getFamily() : new ArrayList<Expression>();
  this.size = font.getSize();
  this.style = font.getStyle();
  this.weight = font.getWeight();
  unset = false;
  return this;
}
origin: geotools/geotools

Expression referenceSize = reference.getSize();
Expression referenceStyle = reference.getStyle();
Expression referenceWeight = reference.getWeight();
for (int i = 1; i < fonts.size(); i++) {
  Font f = fonts.get(i);
    return false;
  Expression weight = f.getWeight();
  if (!expressionEquals(referenceWeight, weight, DEFAULT_FONT.getWeight())) {
    return false;
origin: geotools/geotools

String weightName = ((Literal) selectedFont.getWeight()).getValue().toString();
for (int index = 0; index < weights.length; index++) {
  if (weights[index].equalsIgnoreCase(weightName)) {
origin: geotools/geotools

  @Override
  protected void encode(Font font) {
    putName("font-family", font.getFontFamily());
    put("font-size", font.getSize());
    putName("font-style", font.getStyle());
    putName("font-weight", font.getWeight());
  }
}
origin: geotools/geotools

/** Null safe copy of a single font */
protected Font copy(Font font) {
  if (font == null) return font;
  List<Expression> fontFamily = copyExpressions(font.getFamily());
  Expression fontStyle = copy(font.getStyle());
  Expression fontWeight = copy(font.getWeight());
  Expression fontSize = copy(font.getSize());
  Font copy = sf.font(fontFamily, fontStyle, fontWeight, fontSize);
  return copy;
}
origin: robward-scisys/sldeditor

/**
 * Checks if font weight set.
 *
 * @return true, if is font name set
 */
public boolean isFontWeightSet() {
  return ((font != null) && (font.getWeight() != null));
}
origin: geotools/geotools

@SuppressWarnings("deprecation")
@Test
public void font() throws Exception {
  List<Expression> family = new ArrayList<Expression>();
  family.add(ff.literal("ariel"));
  family.add(ff.literal("Helvetica"));
  family.add(ff.literal("sanserif"));
  Expression style = ff.literal("noraml");
  Expression weight = ff.literal("normal");
  Expression size = ff.literal(12);
  Font font = sf.font(family, style, weight, size);
  assertEquals(family, font.getFamily());
  assertEquals(style, font.getStyle()); // oblique or italic
  assertEquals(weight, font.getWeight()); // bold or normal
  assertEquals(size, font.getSize());
  assertSame(font.getFontStyle(), font.getStyle());
  assertSame(font.getFontFamily(), family.get(0));
  assertSame(font.getFontWeight(), font.getWeight());
  assertSame(font.getFontSize(), font.getSize());
  FontImpl cast = FontImpl.cast(font);
  assertSame(cast, font);
}
origin: robward-scisys/sldeditor

/**
 * Gets the font weight.
 *
 * @return the fontWeight
 */
public String getFontWeight() {
  if (isFontWeightSet()) {
    return this.font.getWeight().toString();
  }
  return NOT_SET_STRING;
}
origin: robward-scisys/sldeditor

/**
 * Checks if is font weight updated.
 *
 * @return the fontWeightUpdated
 */
public boolean isFontWeightUpdated() {
  return (font != null) && isSame(originalFontWeight, font.getWeight());
}
origin: geotools/geotools

  font.getStyle().accept(this, null);
if (font.getWeight() != null) {
  font.getWeight().accept(this, null);
origin: geotools/geotools

  encodeCssParam("font-weight", initialFont.getWeight());
  end("Font");
} else {
    encodeCssParam("font-size", font.getSize());
    encodeCssParam("font-style", font.getStyle());
    encodeCssParam("font-weight", font.getWeight());
    end("Font");
origin: geotools/geotools

if (font.getWeight() != null) {
  font.getWeight().accept(this, null);
origin: geotools/geotools

assertEquals(10, Filters.asInt(font.getSize()));
assertEquals("normal", Filters.asString(font.getStyle()));
assertEquals("bold", Filters.asString(font.getWeight()));
origin: robward-scisys/sldeditor

/**
 * Sets the original data.
 *
 * @param newFont the new original data
 */
private void setOriginalData(Font newFont) {
  this.originalFontName = newFont.getFamily();
  this.originalFontStyle = newFont.getStyle();
  this.originalFontWeight = newFont.getWeight();
  this.originalFontSize = newFont.getSize();
}
origin: geotools/geotools

assertEquals(11, Filters.asInt(font.getSize()));
assertEquals("normal", Filters.asString(font.getStyle()));
assertEquals("bold", Filters.asString(font.getWeight()));
origin: geotools/geotools

assertEquals("Arial", Filters.asString(font.getFamily().get(0)));
assertEquals(12, Filters.asInt(font.getSize()));
assertEquals("bold", Filters.asString(font.getWeight()));
assertEquals("normal", Filters.asString(font.getStyle()));
origin: org.geotools/gt-ysld

  @Override
  protected void encode(Font font) {
    putName("font-family", font.getFontFamily());
    put("font-size", font.getSize());
    putName("font-style", font.getStyle());
    putName("font-weight", font.getWeight());
  }
}
origin: geotools/geotools

assertEquals("Arial", Filters.asString(font.getFamily().get(0)));
assertEquals(12, Filters.asInt(font.getSize()));
assertEquals("bold", Filters.asString(font.getWeight()));
assertEquals("normal", Filters.asString(font.getStyle()));
origin: robward-scisys/sldeditor

/** @param textSymbolizer */
private void populateFont(TextSymbolizer textSymbolizer) {
  Font font = textSymbolizer.getFont();
  GroupConfigInterface group = getGroup(GroupIdEnum.FONT);
  group.enable(font != null);
  if (font != null) {
    fieldConfigVisitor.populateFontField(FieldIdEnum.FONT_FAMILY, font);
    fieldConfigVisitor.populateField(FieldIdEnum.FONT_WEIGHT, font.getWeight());
    fieldConfigVisitor.populateField(FieldIdEnum.FONT_STYLE, font.getStyle());
    fieldConfigVisitor.populateField(FieldIdEnum.FONT_SIZE, font.getSize());
  }
  fieldConfigVisitor.populateFontField(FieldIdEnum.FONT_PREVIEW, font);
}
org.geotools.stylingFontgetWeight

Javadoc

The "font-weight" SVG parameter should be "normal" or "bold".

If null the default should be considered as "normal"

Popular methods of Font

  • getFamily
  • getSize
  • getStyle
  • getFontFamily
  • getFontSize
  • getFontStyle
  • getFontWeight
  • setSize
  • setStyle
  • setFontFamily
  • setFontSize
  • setFontStyle
  • setFontSize,
  • setFontStyle,
  • setFontWeight,
  • setWeight

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now