Tabnine Logo
TextSizingUtility.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
ch.sahits.game.openpatrician.javafx.control.TextSizingUtility
constructor

Best Java code snippets using ch.sahits.game.openpatrician.javafx.control.TextSizingUtility.<init> (Showing top 4 results out of 315)

origin: ch.sahits.game/OpenPatricianJavaFX

/**
 * Initialize the page splitter.
 * @param pageHeigth height of a page
 * @param pageWidth width of a page
 * @param lineSpacing spacing between two lines
 * @param initialHeigth initial height of the page
 * @param font to be used.
 */
public PageSplitter(double pageHeigth, double pageWidth,
    double lineSpacing, double initialHeigth, Font font) {
  super();
  this.pageHeigth = pageHeigth;
  this.pageWidth = pageWidth;
  this.lineSpacing = lineSpacing;
  this.initialHeigth = initialHeigth;
  this.font = font;
  sizing = new TextSizingUtility();
}
/**
origin: ch.sahits.game/OpenPatricianDisplay

@Bean
@Lazy
public TextSizingUtility textSizingUtility() {
  return new TextSizingUtility();
}
origin: ch.sahits.game/OpenPatricianJavaFX

private Dimension2D calculateButtonDimensions(
    final OpenPatricianButton button) {
  Dimension2D dim = new TextSizingUtility().calculate(button.getText(), button.getFont());
  return new Dimension2D(dim.getWidth()*1.2, dim.getHeight()*1.2);
}
origin: ch.sahits.game/OpenPatricianJavaFX

public OpenPatricianSliderSkin(OpenPatricianSlider slider) {
  super(slider);
  control = slider;
  
  currentRotation = new SimpleDoubleProperty(this, "currentRotation", INITIAL_ROTATION);
  sizeing = new TextSizingUtility();
  
  final SteeringWheelGroup background = new SteeringWheelGroup(control.getInitialWidth(), currentRotation.doubleValue());
  background.setManaged(false); 
  Group g = new Group(background);
  
  final Point2D centerPoint = new Point2D(control.getInitialWidth()/2, control.getInitialWidth()/2);
  
  createAndAddLabels(g, centerPoint);
  
  background.setTranslateX(centerPoint.getX() - background.getImageWidth()/2);
  background.setTranslateY(centerPoint.getY() - background.getImageWidth()/2 - yTranslation);
  getChildren().add(g);
}
/**
ch.sahits.game.openpatrician.javafx.controlTextSizingUtility<init>

Popular methods of TextSizingUtility

  • calculate
    Calculate the dimensions of a string using the font with the characters in the string. The height an
  • computeTextHeight
  • computeTextWidth
  • guessNumberOfCharacters
    Guess the number of characters that can be displayed in destWidth. The number is guessed as an arbit

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • compareTo (BigDecimal)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • 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