Tabnine Logo
Font.getStyle
Code IndexAdd Tabnine to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
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 referenceStyle = reference.getStyle();
Expression referenceWeight = reference.getWeight();
for (int i = 1; i < fonts.size(); i++) {
    return false;
  Expression style = f.getStyle();
  if (!expressionEquals(referenceStyle, style, DEFAULT_FONT.getStyle())) {
    return false;
origin: geotools/geotools

String styleName = ((Literal) selectedFont.getStyle()).getValue().toString();
for (int index = 0; index < styles.length; index++) {
  if (styles[index].equalsIgnoreCase(styleName)) {
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 style set.
 *
 * @return true, if is font name set
 */
public boolean isFontStyleSet() {
  return ((font != null) && (font.getStyle() != 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: geotools/geotools

  font.getSize().accept(this, null);
if (font.getStyle() != null) {
  font.getStyle().accept(this, null);
origin: robward-scisys/sldeditor

/**
 * Gets the font style.
 *
 * @return the fontStyle
 */
public String getFontStyle() {
  if (isFontStyleSet()) {
    return this.font.getStyle().toString();
  }
  return NOT_SET_STRING;
}
origin: robward-scisys/sldeditor

/**
 * Checks if is font style updated.
 *
 * @return the fontStyleUpdated
 */
public boolean isFontStyleUpdated() {
  return (font != null) && isSame(originalFontStyle, font.getStyle());
}
origin: geotools/geotools

encodeCssParam("font-style", initialFont.getStyle());
encodeCssParam("font-weight", initialFont.getWeight());
end("Font");
  encodeCssParam("font-family", font.getFamily().get(0));
  encodeCssParam("font-size", font.getSize());
  encodeCssParam("font-style", font.getStyle());
  encodeCssParam("font-weight", font.getWeight());
  end("Font");
origin: geotools/geotools

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

assertEquals("Arial", Filters.asString(font.getFontFamily()));
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(12, Filters.asInt(font.getSize()));
assertEquals("bold", Filters.asString(font.getWeight()));
assertEquals("normal", Filters.asString(font.getStyle()));
origin: geotools/geotools

assertEquals("Arial", Filters.asString(font.getFontFamily()));
assertEquals(11, Filters.asInt(font.getSize()));
assertEquals("normal", Filters.asString(font.getStyle()));
assertEquals("bold", Filters.asString(font.getWeight()));
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(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.stylingFontgetStyle

Javadoc

The "font-style" SVG parameter should be "normal", "italic", or "oblique".

If null is returned the default value should be considered "normal".

Popular methods of Font

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

Popular in Java

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • startActivity (Activity)
  • getSystemService (Context)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • ImageIO (javax.imageio)
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JTextField (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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