congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Finding current android device location
  • runOnUiThread (Activity)
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • 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