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

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

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

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

  if (firstFontFamily) {
    font.getFamily().clear();
    firstFontFamily = false;
  font.getFamily().add(parseCssParameter(child));
} else if (res.equalsIgnoreCase("font-style")) {
  font.setFontStyle(parseCssParameter(child));
origin: geotools/geotools

for (Expression family : curr.getFamily()) {
  String requestedFont = evalToString(family, feature, null);
  java.awt.Font javaFont = FontCache.getDefaultInstance().getFont(requestedFont);
origin: geotools/geotools

  font.getFamily().set(0, exp);
  familyFound = true;
} else {
  font.getFamily().add(exp);
origin: geotools/geotools

for (Expression family : selectedFont.getFamily()) {
  String familyName = ((Literal) family).getValue().toString();
  for (int index = 0; index < families.length; index++) {
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 name set.
 *
 * @return true, if is font name set
 */
public boolean isFontNameSet() {
  return ((font != null) && !font.getFamily().isEmpty());
}
origin: robward-scisys/sldeditor

/**
 * Checks if is font name updated.
 *
 * @return the fontNameUpdated
 */
public boolean isFontNameUpdated() {
  return ((font != null) && !(originalFontName.equals(font.getFamily())));
}
origin: robward-scisys/sldeditor

/**
 * Gets the string value.
 *
 * @return the string value
 */
@Override
public String getStringValue() {
  Font font = getFont();
  if ((font != null) && (!font.getFamily().isEmpty())) {
    return font.getFamily().get(0).toString();
  }
  return null;
}
origin: robward-scisys/sldeditor

/**
 * Gets the font name.
 *
 * @return the fontName
 */
public String getFontName() {
  if (isFontNameSet()) {
    return this.font.getFamily().get(0).toString();
  }
  return NOT_SET_STRING;
}
origin: geotools/geotools

List<Font> fonts = text.fonts();
for (Font font : fonts) {
  if (font.getFamily() != null) {
    for (Expression family : font.getFamily()) {
      family.accept(this, null);
origin: geotools/geotools

encodeCssParam("font-family", font.getFamily().get(0));
encodeCssParam("font-family", font.getFamily().get(0));
encodeCssParam("font-size", font.getSize());
encodeCssParam("font-style", font.getStyle());
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

/** Revert to original. */
public void revertToOriginal() {
  if (this.font != null) {
    this.font.getFamily().clear();
    this.font.getFamily().addAll(originalFontName);
    this.font.setWeight(originalFontWeight);
    this.font.setStyle(originalFontStyle);
    this.font.setSize(originalFontSize);
  }
}
origin: geotools/geotools

if (font.getFamily() != null) {
  for (Expression list : font.getFamily()) {
    list.accept(this, null);
origin: robward-scisys/sldeditor

/**
 * Sets the font.
 *
 * @param newFont the new font
 */
public void setFont(Font newFont) {
  if (newFont != null) {
    this.font = styleFactory.getDefaultFont();
    font.getFamily().clear();
    font.getFamily().addAll(newFont.getFamily());
    font.setStyle(newFont.getStyle());
    font.setWeight(newFont.getWeight());
    font.setSize(newFont.getSize());
    setOriginalData(newFont);
  }
}
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: robward-scisys/sldeditor

  /**
   * Gets the font.
   *
   * @return the font
   */
  public Font getFont() {

    List<Expression> family = new ArrayList<>();
    Expression style = null;
    Expression weight = null;
    Expression size = null;

    if (firstEntry != null) {
      family = (familyMultipleValue ? firstEntry.getFamily() : family);
      style = (styleMultipleValue ? firstEntry.getStyle() : null);
      weight = (weightMultipleValue ? firstEntry.getWeight() : null);
      size = (sizeMultipleValue ? firstEntry.getSize() : null);
    }

    return styleFactory.font(family, style, weight, size);
  }
}
origin: geotools/geotools

assertEquals("Arial", Filters.asString(font.getFamily().get(0)));
assertEquals(12, Filters.asInt(font.getSize()));
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()));
org.geotools.stylingFontgetFamily

Javadoc

SVG font-family parameters in preferred order.

Popular methods of Font

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

Popular in Java

  • Start an intent from android
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Notification (javax.management)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • CodeWhisperer alternatives
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