--- old/src/demo/share/jfc/Font2DTest/FontPanel.java 2020-01-22 16:03:17.000000000 -0800 +++ new/src/demo/share/jfc/Font2DTest/FontPanel.java 2020-01-22 16:03:17.000000000 -0800 @@ -392,7 +392,7 @@ setTransformG2( g2transform ); // ABP setDrawMethod( method ); setRenderingHints(AAValues.getValue(aa), FMValues.getValue(fm), - new Integer(contrast)); + Integer.valueOf(contrast)); } /// Writes the current screen to PNG file @@ -434,7 +434,7 @@ private int canvasInset_X = 5, canvasInset_Y = 5; /// LineBreak'ed TextLayout vector - private Vector lineBreakTLs = null; + private Vector lineBreakTLs = null; /// Whether the current draw command requested is for printing private boolean isPrinting = false; @@ -800,7 +800,7 @@ if ( textToUse == FILE_TEXT ) { if ( !isPrinting ) f2dt.fireChangeStatus( "LineBreaking Text... Please Wait", false ); - lineBreakTLs = new Vector(); + lineBreakTLs = new Vector<>(); for ( int i = 0; i < fileText.length; i++ ) { AttributedString as = new AttributedString( fileText[i], g2.getFont().getAttributes() ); @@ -929,7 +929,7 @@ float xPos, yPos = (float) canvasInset_Y; g2.drawRect( 0, 0, w - 1, h - 1 ); for ( int i = drawStart; i <= drawEnd; i++ ) { - TextLayout oneLine = (TextLayout) lineBreakTLs.elementAt( i ); + TextLayout oneLine = lineBreakTLs.elementAt( i ); xPos = oneLine.isLeftToRight() ? canvasInset_X : ( (float) w - oneLine.getAdvance() - canvasInset_X ); @@ -992,9 +992,9 @@ /// Back up metrics and other drawing info before printing modifies it int backupDrawStart = drawStart, backupDrawEnd = drawEnd; int backupNumCharAcross = numCharAcross, backupNumCharDown = numCharDown; - Vector backupLineBreakTLs = null; + Vector backupLineBreakTLs = null; if ( textToUse == FILE_TEXT ) - backupLineBreakTLs = (Vector) lineBreakTLs.clone(); + backupLineBreakTLs = new Vector<>(lineBreakTLs); printPageNumber = pageIndex; isPrinting = true; @@ -1137,7 +1137,7 @@ zoomAreaWidth / 2, (int) ( maxAscent * ZOOM )); g2.dispose(); if ( !nowZooming ) - zoomWindow.show(); + zoomWindow.setVisible(true); /// This is sort of redundant... since there is a paint function /// inside zoomWindow definition that does the drawImage. /// (I should be able to call just repaint() here) @@ -1176,7 +1176,7 @@ public void mouseReleased( MouseEvent e ) { if ( textToUse == RANGE_TEXT || textToUse == ALL_GLYPHS ) { if ( nowZooming ) - zoomWindow.hide(); + zoomWindow.setVisible(false); nowZooming = false; } this.setCursor( Cursor.getDefaultCursor() ); @@ -1246,7 +1246,7 @@ } public static Object getValue(int ordinal) { if (valArray == null) { - valArray = (FMValues[])EnumSet.allOf(FMValues.class).toArray(new FMValues[0]); + valArray = EnumSet.allOf(FMValues.class).toArray(new FMValues[0]); } for (int i=0;i