Class JavaCompatibility


  • public class JavaCompatibility
    extends java.lang.Object
    Provides Java version compatibility methods.

    WARNING: This is private API and may change.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void drawStringUnderlineCharAt​(javax.swing.JComponent c, java.awt.Graphics g, java.lang.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 java.lang.String getClippedString​(javax.swing.JComponent c, java.awt.FontMetrics fm, java.lang.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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • drawStringUnderlineCharAtMethod

        private static java.lang.invoke.MethodHandle drawStringUnderlineCharAtMethod
      • getClippedStringMethod

        private static java.lang.invoke.MethodHandle getClippedStringMethod
    • Constructor Detail

      • JavaCompatibility

        public JavaCompatibility()
    • Method Detail

      • drawStringUnderlineCharAt

        public static void drawStringUnderlineCharAt​(javax.swing.JComponent c,
                                                     java.awt.Graphics g,
                                                     java.lang.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 java.lang.String getClippedString​(javax.swing.JComponent c,
                                                        java.awt.FontMetrics fm,
                                                        java.lang.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 )