Class JavaCompatibility

java.lang.Object
com.formdev.flatlaf.util.JavaCompatibility

public class JavaCompatibility extends Object
Provides Java version compatibility methods.

WARNING: This is private API and may change.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    drawStringUnderlineCharAt(JComponent c, Graphics g, String text, int underlinedIndex, int x, int y)
    Java 8: sun.swing.SwingUtilities2.drawStringUnderlineCharAt( JComponent c, Graphics g, String text, int underlinedIndex, int x, int y )
    Java 9: javax.swing.plaf.basic.BasicGraphicsUtils.drawStringUnderlineCharAt( JComponent c, Graphics2D g, String string, int underlinedIndex, float x, float y )
    static String
    getClippedString(JComponent c, FontMetrics fm, String string, int availTextWidth)
    Java 8: sun.swing.SwingUtilities2.clipStringIfNecessary( JComponent c, FontMetrics fm, String string, int availTextWidth )
    Java 9: javax.swing.plaf.basic.BasicGraphicsUtils.getClippedString( JComponent c, FontMetrics fm, String string, int availTextWidth )

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JavaCompatibility

      public JavaCompatibility()
  • Method Details

    • drawStringUnderlineCharAt

      public static void drawStringUnderlineCharAt(JComponent c, Graphics g, String text, int underlinedIndex, int x, int y)
      Java 8: sun.swing.SwingUtilities2.drawStringUnderlineCharAt( JComponent c, Graphics g, String text, int underlinedIndex, int x, int y )
      Java 9: javax.swing.plaf.basic.BasicGraphicsUtils.drawStringUnderlineCharAt( JComponent c, Graphics2D g, String string, int underlinedIndex, float x, float y )
    • getClippedString

      public static String getClippedString(JComponent c, FontMetrics fm, String string, int availTextWidth)
      Java 8: sun.swing.SwingUtilities2.clipStringIfNecessary( JComponent c, FontMetrics fm, String string, int availTextWidth )
      Java 9: javax.swing.plaf.basic.BasicGraphicsUtils.getClippedString( JComponent c, FontMetrics fm, String string, int availTextWidth )