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

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

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

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: org.geotools/gt-widgets-swing-pending

  @Override
  public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {

    JLabel lbl = (JLabel) super.getTableCellRendererComponent(table, text, isSelected, hasFocus, row, column);

    Font f = (Font) value;
    java.awt.Font font = new java.awt.Font(f.getFontFamily().toString(), java.awt.Font.PLAIN, 12);
    lbl.setFont(font);
    return lbl;
  }
}
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: org.geotools/gt-widgets-swing-pending

public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
  if (value != null && value instanceof Font) {
    font = (Font) value;
    java.awt.Font f = new java.awt.Font(font.getFontFamily().toString(), java.awt.Font.PLAIN, 12);
    but.setFont(f);
  } else {
    but.setFont(new java.awt.Font("Arial", java.awt.Font.PLAIN, 12));
    font = null;
  }
  return but;
}
origin: geotools/geotools

assertEquals("Arial", Filters.asString(font.getFontFamily()));
assertEquals(10, Filters.asInt(font.getSize()));
assertEquals("normal", Filters.asString(font.getStyle()));
origin: org.geotools/gt2-render

requestedFont = fonts[k].getFontFamily().evaluate(feature).toString();
origin: org.geotools/gt-render

String requestedFont = evalToString(curr.getFontFamily(),
    feature, null);
java.awt.Font javaFont = FontCache.getDefaultInstance().getFont(
origin: org.geotools/gt-widgets-swing-pending

public void setEdited(Font font){        
  this.font = font;
  
  if(font != null){
    guiFamily.setExpression(font.getFontFamily());
    guiSize.setExpression(font.getFontSize());
    guiStyle.setExpression(font.getFontStyle());
    guiWeight.setExpression(font.getFontWeight());
  }
}

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.getFontFamily()));
assertEquals(11, Filters.asInt(font.getSize()));
assertEquals("normal", Filters.asString(font.getStyle()));
origin: org.geotools/gt-main

/** Null safe copy of a single font */
protected Font copy(Font font) {
  if( font == null) return font;
  
  Expression fontFamily = copy( font.getFontFamily() );
  Expression fontStyle = copy( font.getFontStyle() );
  Expression fontWeight = copy( font.getFontWeight() );
  Expression fontSize = copy( font.getFontSize() );
  Font copy = sf.createFont(fontFamily, fontStyle, fontWeight, fontSize);
  return copy;
}

origin: org.geotools/gt-render

Font font = fonts[i];
if (font.getFontFamily() != null) {
  font.getFontFamily().accept(this, null);
origin: org.geotools/gt2-main

Font font = fonts[i];
if (font.getFontFamily() != null) {
  font.getFontFamily().accept(this,null);
origin: org.geotools/gt2-main

Font font = fonts[i];
if (font.getFontFamily() != null) {
  font.getFontFamily().accept(this,null);
origin: org.geotools/gt-main

encodeCssParam("font-family", fonts[i].getFontFamily());
origin: org.geotools/gt-render

Font font = fonts[i];
if (font.getFontFamily() != null) {
  font.getFontFamily().accept(this,null);
origin: org.geotools/gt2-main

encodeCssParam("font-family", fonts[i].getFontFamily());
org.geotools.stylingFontgetFontFamily

Popular methods of Font

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

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Top 12 Jupyter Notebook extensions
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