8211300: Convert C-style array declarations in JDK client code
Reviewed-by: prr, serb
This commit is contained in:
parent
c33f1a61de
commit
fc807d0914
@ -188,7 +188,7 @@ public abstract class X11InputMethod extends X11InputMethodBase {
|
||||
// to insure that it cannot be overridden by client subclasses.
|
||||
// DO NOT INVOKE CLIENT CODE ON THIS THREAD!
|
||||
void dispatchComposedText(String chgText,
|
||||
int chgStyles[],
|
||||
int[] chgStyles,
|
||||
int chgOffset,
|
||||
int chgLength,
|
||||
int caretPosition,
|
||||
|
@ -110,7 +110,7 @@ public class FileManager {
|
||||
public static int OSTypeToInt(String type) {
|
||||
int result = 0;
|
||||
|
||||
byte b[] = { (byte) 0, (byte) 0, (byte) 0, (byte) 0 };
|
||||
byte[] b = { (byte) 0, (byte) 0, (byte) 0, (byte) 0 };
|
||||
int len = type.length();
|
||||
if (len > 0) {
|
||||
if (len > 4) len = 4;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1420,7 +1420,7 @@ public class AquaFileChooserUI extends FileChooserUI {
|
||||
}
|
||||
|
||||
// One sort state for each column. Both are ascending by default
|
||||
final boolean fSortAscending[] = {true, true};
|
||||
final boolean[] fSortAscending = {true, true};
|
||||
|
||||
// Instead of dragging, it selects which one to sort by
|
||||
public void setDraggedColumn(final TableColumn aColumn) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -53,7 +53,7 @@ class AquaFileSystemModel extends AbstractTableModel implements PropertyChangeLi
|
||||
Vector<File> directories = null;
|
||||
int fetchID = 0;
|
||||
|
||||
private final boolean fSortAscending[] = {true, true};
|
||||
private final boolean[] fSortAscending = {true, true};
|
||||
// private boolean fSortAscending = true;
|
||||
private boolean fSortNames = true;
|
||||
private final String[] fColumnNames;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -37,7 +37,7 @@ import apple.laf.JRSUIConstants.Size;
|
||||
// TODO: no screen menu bar for now
|
||||
public class AquaMenuItemUI extends BasicMenuItemUI implements AquaMenuPainter.Client/*, ScreenMenuItemUI*/ {
|
||||
static final int kPlain = 0, kCheckBox = 1, kRadioButton = 2;
|
||||
static final String sPropertyPrefixes[] = { "MenuItem", "CheckBoxMenuItem", "RadioButtonMenuItem" };
|
||||
static final String[] sPropertyPrefixes = { "MenuItem", "CheckBoxMenuItem", "RadioButtonMenuItem" };
|
||||
|
||||
boolean fIsScreenMenuItem = false;
|
||||
boolean fIsIndeterminate = false;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -96,14 +96,14 @@ public class AquaMenuUI extends BasicMenuUI implements AquaMenuPainter.Client {
|
||||
if (menuItem.isEnabled() == false) return;
|
||||
|
||||
final MenuSelectionManager manager = e.getMenuSelectionManager();
|
||||
final MenuElement path[] = e.getPath();
|
||||
final MenuElement[] path = e.getPath();
|
||||
|
||||
// In Aqua, we always respect the menu's delay, if one is set.
|
||||
// Doesn't matter how the menu is clicked on or otherwise moused over.
|
||||
final Point p = e.getPoint();
|
||||
if (p.x >= 0 && p.x < menuItem.getWidth() && p.y >= 0 && p.y < menuItem.getHeight()) {
|
||||
final JMenu menu = (JMenu)menuItem;
|
||||
final MenuElement selectedPath[] = manager.getSelectedPath();
|
||||
final MenuElement[] selectedPath = manager.getSelectedPath();
|
||||
if (!(selectedPath.length > 0 && selectedPath[selectedPath.length - 1] == menu.getPopupMenu())) {
|
||||
if (menu.getDelay() == 0) {
|
||||
appendPath(path, menu.getPopupMenu());
|
||||
@ -124,7 +124,7 @@ public class AquaMenuUI extends BasicMenuUI implements AquaMenuPainter.Client {
|
||||
}
|
||||
|
||||
static void appendPath(final MenuElement[] path, final MenuElement elem) {
|
||||
final MenuElement newPath[] = new MenuElement[path.length + 1];
|
||||
final MenuElement[] newPath = new MenuElement[path.length + 1];
|
||||
System.arraycopy(path, 0, newPath, 0, path.length);
|
||||
newPath[path.length] = elem;
|
||||
MenuSelectionManager.defaultManager().setSelectedPath(newPath);
|
||||
@ -144,7 +144,7 @@ public class AquaMenuUI extends BasicMenuUI implements AquaMenuPainter.Client {
|
||||
if (!menu.isEnabled()) return;
|
||||
|
||||
final MenuSelectionManager manager = MenuSelectionManager.defaultManager();
|
||||
final MenuElement selectedPath[] = manager.getSelectedPath();
|
||||
final MenuElement[] selectedPath = manager.getSelectedPath();
|
||||
|
||||
// In Aqua, we always have a menu delay, regardless of where the menu is.
|
||||
if (!(selectedPath.length > 0 && selectedPath[selectedPath.length - 1] == menu.getPopupMenu())) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -113,10 +113,10 @@ public class AquaTabbedPaneCopyFromBasicUI extends TabbedPaneUI implements Swing
|
||||
|
||||
// Transient variables (recalculated each time TabbedPane is layed out)
|
||||
|
||||
protected int tabRuns[] = new int[10];
|
||||
protected int[] tabRuns = new int[10];
|
||||
protected int runCount = 0;
|
||||
protected int selectedRun = -1;
|
||||
protected Rectangle rects[] = new Rectangle[0];
|
||||
protected Rectangle[] rects = new Rectangle[0];
|
||||
protected int maxTabHeight;
|
||||
protected int maxTabWidth;
|
||||
|
||||
@ -864,8 +864,8 @@ public class AquaTabbedPaneCopyFromBasicUI extends TabbedPaneUI implements Swing
|
||||
* subtracting xCropLen[i] from (tab.y + tab.height) and adding yCropLen[i]
|
||||
* to (tab.x).
|
||||
*/
|
||||
private static int xCropLen[] = { 1, 1, 0, 0, 1, 1, 2, 2 };
|
||||
private static int yCropLen[] = { 0, 3, 3, 6, 6, 9, 9, 12 };
|
||||
private static int[] xCropLen = { 1, 1, 0, 0, 1, 1, 2, 2 };
|
||||
private static int[] yCropLen = { 0, 3, 3, 6, 6, 9, 9, 12 };
|
||||
private static final int CROP_SEGMENT = 12;
|
||||
|
||||
private static Polygon createCroppedTabShape(final int tabPlacement, final Rectangle tabRect, final int cropline) {
|
||||
@ -895,8 +895,8 @@ public class AquaTabbedPaneCopyFromBasicUI extends TabbedPaneUI implements Swing
|
||||
rcnt++;
|
||||
}
|
||||
final int npts = 2 + (rcnt * 8);
|
||||
final int xp[] = new int[npts];
|
||||
final int yp[] = new int[npts];
|
||||
final int[] xp = new int[npts];
|
||||
final int[] yp = new int[npts];
|
||||
int pcnt = 0;
|
||||
|
||||
xp[pcnt] = ostart;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -36,7 +36,7 @@ class AquaTabbedPaneTabState {
|
||||
protected final Rectangle rightScrollTabRect = new Rectangle();
|
||||
|
||||
protected int numberOfVisibleTabs = 0;
|
||||
protected int visibleTabList[] = new int[10];
|
||||
protected int[] visibleTabList = new int[10];
|
||||
protected int lastLeftmostTab;
|
||||
protected int lastReturnAt;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -67,7 +67,7 @@ final class ScreenMenu extends Menu
|
||||
private ScreenMenuPropertyListener fPropertyListener;
|
||||
|
||||
// Array of child hashes used to see if we need to recreate the Menu.
|
||||
private int childHashArray[];
|
||||
private int[] childHashArray;
|
||||
|
||||
ScreenMenu(final JMenu invoker) {
|
||||
super(invoker.getText());
|
||||
@ -85,7 +85,7 @@ final class ScreenMenu extends Menu
|
||||
* we do not get notified of it, because EDT is busy in our code. We only need to update if the menu contents have changed in some
|
||||
* way, such as the number of menu items, the text of the menuitems, icon, shortcut etc.
|
||||
*/
|
||||
private static boolean needsUpdate(final Component items[], final int childHashArray[]) {
|
||||
private static boolean needsUpdate(final Component[] items, final int[] childHashArray) {
|
||||
if (items == null || childHashArray == null) {
|
||||
return true;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -28,7 +28,7 @@ package sun.font;
|
||||
public final class CCompositeGlyphMapper extends CompositeGlyphMapper {
|
||||
|
||||
private CompositeFont font;
|
||||
private CharToGlyphMapper slotMappers[];
|
||||
private CharToGlyphMapper[] slotMappers;
|
||||
|
||||
public CCompositeGlyphMapper(CompositeFont compFont) {
|
||||
super(compFont);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -230,7 +230,7 @@ public class CRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe, D
|
||||
|
||||
native void doPoly(SurfaceData sData, int[] xpoints, int[] ypoints, int npoints, boolean ispolygon, boolean isfill);
|
||||
|
||||
public void drawPolyline(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints) {
|
||||
public void drawPolyline(SunGraphics2D sg2d, int[] xpoints, int[] ypoints, int npoints) {
|
||||
OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
|
||||
if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
|
||||
surfaceData.doPolygon(this, sg2d, xpoints, ypoints, npoints, false, false);
|
||||
@ -244,7 +244,7 @@ public class CRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe, D
|
||||
}
|
||||
}
|
||||
|
||||
public void drawPolygon(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints) {
|
||||
public void drawPolygon(SunGraphics2D sg2d, int[] xpoints, int[] ypoints, int npoints) {
|
||||
OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
|
||||
if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
|
||||
surfaceData.doPolygon(this, sg2d, xpoints, ypoints, npoints, true, false);
|
||||
@ -259,7 +259,7 @@ public class CRenderer implements PixelDrawPipe, PixelFillPipe, ShapeDrawPipe, D
|
||||
}
|
||||
}
|
||||
|
||||
public void fillPolygon(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints) {
|
||||
public void fillPolygon(SunGraphics2D sg2d, int[] xpoints, int[] ypoints, int npoints) {
|
||||
OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
|
||||
surfaceData.doPolygon(this, sg2d, xpoints, ypoints, npoints, true, true);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -84,11 +84,11 @@ public class CompositeCRenderer extends CRenderer implements PixelDrawPipe, Pixe
|
||||
draw(sg2d, arc);
|
||||
}
|
||||
|
||||
public synchronized void drawPolyline(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints) {
|
||||
public synchronized void drawPolyline(SunGraphics2D sg2d, int[] xpoints, int[] ypoints, int npoints) {
|
||||
doPolygon(sg2d, xpoints, ypoints, npoints, false, false);
|
||||
}
|
||||
|
||||
public synchronized void drawPolygon(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints) {
|
||||
public synchronized void drawPolygon(SunGraphics2D sg2d, int[] xpoints, int[] ypoints, int npoints) {
|
||||
doPolygon(sg2d, xpoints, ypoints, npoints, true, false);
|
||||
}
|
||||
|
||||
@ -120,11 +120,11 @@ public class CompositeCRenderer extends CRenderer implements PixelDrawPipe, Pixe
|
||||
fill(sg2d, arc);
|
||||
}
|
||||
|
||||
public synchronized void fillPolygon(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints) {
|
||||
public synchronized void fillPolygon(SunGraphics2D sg2d, int[] xpoints, int[] ypoints, int npoints) {
|
||||
doPolygon(sg2d, xpoints, ypoints, npoints, true, true);
|
||||
}
|
||||
|
||||
public synchronized void doPolygon(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints, boolean ispolygon, boolean isfill) {
|
||||
public synchronized void doPolygon(SunGraphics2D sg2d, int[] xpoints, int[] ypoints, int npoints, boolean ispolygon, boolean isfill) {
|
||||
GeneralPath gp = new GeneralPath(Path2D.WIND_NON_ZERO, npoints);
|
||||
gp.moveTo(xpoints[0], ypoints[0]);
|
||||
for (int i = 1; i < npoints; i++) {
|
||||
@ -196,7 +196,7 @@ public class CompositeCRenderer extends CRenderer implements PixelDrawPipe, Pixe
|
||||
drawGlyphVector(sg2d, sg2d.getFont().createGlyphVector(sg2d.getFontRenderContext(), str), x, y);
|
||||
}
|
||||
|
||||
public synchronized void drawChars(SunGraphics2D sg2d, char data[], int offset, int length, int x, int y) {
|
||||
public synchronized void drawChars(SunGraphics2D sg2d, char[] data, int offset, int length, int x, int y) {
|
||||
drawString(sg2d, new String(data, offset, length), x, y);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -34,7 +34,7 @@ public final class DataBufferNIOInt extends DataBuffer {
|
||||
IntBuffer data;
|
||||
|
||||
/** All data banks */
|
||||
IntBuffer bankdata[];
|
||||
IntBuffer[] bankdata;
|
||||
|
||||
/**
|
||||
* Constructs an integer-based {@code DataBuffer} with a single bank
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -34,7 +34,7 @@ public class IntegerNIORaster extends SunWritableRaster {
|
||||
|
||||
protected IntBuffer data;
|
||||
|
||||
public static WritableRaster createNIORaster(int w, int h, int bandMasks[], Point location) {
|
||||
public static WritableRaster createNIORaster(int w, int h, int[] bandMasks, Point location) {
|
||||
if ((w <= 0) || (h <= 0)) {
|
||||
throw new IllegalArgumentException("Width (" + w + ") and height (" + h +
|
||||
") cannot be <= 0");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -171,7 +171,7 @@ public class OSXOffScreenSurfaceData extends OSXSurfaceData // implements Raster
|
||||
int pixelSize = cm.getPixelSize();
|
||||
int numOfComponents = cm.getNumColorComponents();
|
||||
if ((numOfComponents == 3) && (cm instanceof ComponentColorModel) && (sm instanceof PixelInterleavedSampleModel)) {
|
||||
int sizes[] = cm.getComponentSize();
|
||||
int[] sizes = cm.getComponentSize();
|
||||
boolean validsizes = (sizes[0] == 8) && (sizes[1] == 8) && (sizes[2] == 8);
|
||||
int[] offs = ((ComponentSampleModel) sm).getBandOffsets();
|
||||
int numBands = raster.getNumBands();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -605,14 +605,14 @@ public abstract class OSXSurfaceData extends BufImgSurfaceData {
|
||||
|
||||
this.fGraphicsStatesInt.put(kColorStateIndex, kColorLinearGradient);
|
||||
int numColor = color.getColors().length;
|
||||
int colorArray[] = new int[numColor];
|
||||
int[] colorArray = new int[numColor];
|
||||
for (int i = 0; i < numColor; i++) {
|
||||
colorArray[i] = color.getColors()[i].getRGB();
|
||||
}
|
||||
this.fGraphicsStatesObject[kColorArrayIndex] = colorArray;
|
||||
|
||||
int numFractions = color.getFractions().length;
|
||||
float fractionArray[] = new float[numFractions];
|
||||
float[] fractionArray = new float[numFractions];
|
||||
for (int i = 0; i < numFractions; i++) {
|
||||
fractionArray[i] = color.getFractions()[i];
|
||||
}
|
||||
@ -639,14 +639,14 @@ public abstract class OSXSurfaceData extends BufImgSurfaceData {
|
||||
|
||||
this.fGraphicsStatesInt.put(kColorStateIndex, kColorRadialGradient);
|
||||
int numColor = color.getColors().length;
|
||||
int colorArray[] = new int[numColor];
|
||||
int[] colorArray = new int[numColor];
|
||||
for (int i = 0; i < numColor; i++) {
|
||||
colorArray[i] = color.getColors()[i].getRGB();
|
||||
}
|
||||
this.fGraphicsStatesObject[kColorArrayIndex] = colorArray;
|
||||
|
||||
int numStops = color.getFractions().length;
|
||||
float stopsArray[] = new float[numStops];
|
||||
float[] stopsArray = new float[numStops];
|
||||
for (int i = 0; i < numStops; i++) {
|
||||
stopsArray[i] = color.getFractions()[i];
|
||||
}
|
||||
@ -1031,7 +1031,7 @@ public abstract class OSXSurfaceData extends BufImgSurfaceData {
|
||||
renderer.doArc(this, x, y, width, height, startAngle, arcAngle, type, isfill);
|
||||
}
|
||||
|
||||
public void doPolygon(CRenderer renderer, SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints, boolean ispolygon, boolean isfill) {
|
||||
public void doPolygon(CRenderer renderer, SunGraphics2D sg2d, int[] xpoints, int[] ypoints, int npoints, boolean ispolygon, boolean isfill) {
|
||||
// System.err.println("--- doPolygon");
|
||||
|
||||
if ((isfill) && (isCustomPaint(sg2d))) {
|
||||
@ -1127,7 +1127,7 @@ public abstract class OSXSurfaceData extends BufImgSurfaceData {
|
||||
renderer.doDrawGlyphs(this, nativeStrikePtr, gv, x, y);
|
||||
}
|
||||
|
||||
public void drawUnicodes(CTextPipe renderer, SunGraphics2D sg2d, long nativeStrikePtr, char unicodes[], int offset, int length, float x, float y) {
|
||||
public void drawUnicodes(CTextPipe renderer, SunGraphics2D sg2d, long nativeStrikePtr, char[] unicodes, int offset, int length, float x, float y) {
|
||||
// System.err.println("--- drawUnicodes "+(new String(unicodes, offset, length)));
|
||||
setupGraphicsState(sg2d, kUnicodes, sg2d.font, 0, 0, fBounds.width, fBounds.height);
|
||||
if (length == 1) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -133,7 +133,7 @@ public final class CGLGraphicsConfig extends CGraphicsConfig
|
||||
|
||||
long cfginfo = 0;
|
||||
int textureSize = 0;
|
||||
final String ids[] = new String[1];
|
||||
final String[] ids = new String[1];
|
||||
OGLRenderQueue rq = OGLRenderQueue.getInstance();
|
||||
rq.lock();
|
||||
try {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -41,7 +41,7 @@ import sun.awt.image.SunWritableRaster;
|
||||
public class CImage extends CFRetainedResource {
|
||||
private static native long nativeCreateNSImageFromArray(int[] buffer, int w, int h);
|
||||
private static native long nativeCreateNSImageFromBytes(byte[] buffer);
|
||||
private static native long nativeCreateNSImageFromArrays(int[][] buffers, int w[], int h[]);
|
||||
private static native long nativeCreateNSImageFromArrays(int[][] buffers, int[] w, int[] h);
|
||||
private static native long nativeCreateNSImageFromFileContents(String file);
|
||||
private static native long nativeCreateNSImageOfFileFromLaunchServices(String file);
|
||||
private static native long nativeCreateNSImageFromImageName(String name);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,7 +55,7 @@ public class CInputMethod extends InputMethodAdapter {
|
||||
// Intitalize highlight mapping table and its mapper.
|
||||
static {
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
Map<TextAttribute, Integer> styles[] = new Map[4];
|
||||
Map<TextAttribute, Integer>[] styles = new Map[4];
|
||||
HashMap<TextAttribute, Integer> map;
|
||||
|
||||
// UNSELECTED_RAW_TEXT_HIGHLIGHT
|
||||
@ -613,7 +613,7 @@ public class CInputMethod extends InputMethodAdapter {
|
||||
}
|
||||
|
||||
// Get the characters from the iterator
|
||||
char selectedText[] = new char[theIterator.getEndIndex() - theIterator.getBeginIndex()];
|
||||
char[] selectedText = new char[theIterator.getEndIndex() - theIterator.getBeginIndex()];
|
||||
char current = theIterator.first();
|
||||
int index = 0;
|
||||
while (current != CharacterIterator.DONE) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -106,7 +106,7 @@ public class CInputMethodDescriptor implements InputMethodDescriptor {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
Locale loc[] = getAvailableLocales();
|
||||
Locale[] loc = getAvailableLocales();
|
||||
String locnames = null;
|
||||
|
||||
for (int i = 0; i < loc.length; i++) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -173,7 +173,7 @@ class CRobot implements RobotPeer {
|
||||
*/
|
||||
@Override
|
||||
public int getRGBPixel(int x, int y) {
|
||||
int c[] = new int[1];
|
||||
int[] c = new int[1];
|
||||
double scale = fDevice.getScaleFactor();
|
||||
getScreenPixels(new Rectangle(x, y, (int) scale, (int) scale), c);
|
||||
return c[0];
|
||||
@ -186,7 +186,7 @@ class CRobot implements RobotPeer {
|
||||
*/
|
||||
@Override
|
||||
public int [] getRGBPixels(final Rectangle bounds) {
|
||||
int c[] = new int[bounds.width * bounds.height];
|
||||
int[] c = new int[bounds.width * bounds.height];
|
||||
getScreenPixels(bounds, c);
|
||||
|
||||
return c;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -38,7 +38,7 @@ import sun.java2d.pipe.*;
|
||||
public class CTextPipe implements TextPipe {
|
||||
public native void doDrawString(SurfaceData sData, long nativeStrikePtr, String s, double x, double y);
|
||||
public native void doDrawGlyphs(SurfaceData sData, long nativeStrikePtr, GlyphVector gV, float x, float y);
|
||||
public native void doUnicodes(SurfaceData sData, long nativeStrikePtr, char unicodes[], int offset, int length, float x, float y);
|
||||
public native void doUnicodes(SurfaceData sData, long nativeStrikePtr, char[] unicodes, int offset, int length, float x, float y);
|
||||
public native void doOneUnicode(SurfaceData sData, long nativeStrikePtr, char aUnicode, float x, float y);
|
||||
|
||||
long getNativeStrikePtr(final SunGraphics2D sg2d) {
|
||||
@ -95,7 +95,7 @@ public class CTextPipe implements TextPipe {
|
||||
sg2d.setFont(prevFont);
|
||||
}
|
||||
|
||||
public void drawChars(final SunGraphics2D sg2d, final char data[], final int offset, final int length, final int x, final int y) {
|
||||
public void drawChars(final SunGraphics2D sg2d, final char[] data, final int offset, final int length, final int x, final int y) {
|
||||
final long nativeStrikePtr = getNativeStrikePtr(sg2d);
|
||||
if (OSXSurfaceData.IsSimpleColor(sg2d.paint) && nativeStrikePtr != 0) {
|
||||
final OSXSurfaceData surfaceData = (OSXSurfaceData)sg2d.getSurfaceData();
|
||||
@ -120,7 +120,7 @@ public class CTextPipe implements TextPipe {
|
||||
super.doDrawGlyphs(sData, nativeStrikePtr, gV, x, y);
|
||||
}
|
||||
|
||||
public void doUnicodes(final SurfaceData sData, final long nativeStrikePtr, final char unicodes[], final int offset, final int length, final float x, final float y) {
|
||||
public void doUnicodes(final SurfaceData sData, final long nativeStrikePtr, final char[] unicodes, final int offset, final int length, final float x, final float y) {
|
||||
GraphicsPrimitive.tracePrimitive("QuartzDrawUnicodes");
|
||||
super.doUnicodes(sData, nativeStrikePtr, unicodes, offset, length, x, y);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -195,11 +195,11 @@ public class ColorEditor extends Panel implements PropertyEditor {
|
||||
}
|
||||
|
||||
|
||||
private String colorNames[] = { " ", "white", "lightGray", "gray", "darkGray",
|
||||
private String[] colorNames = { " ", "white", "lightGray", "gray", "darkGray",
|
||||
"black", "red", "pink", "orange",
|
||||
"yellow", "green", "magenta", "cyan",
|
||||
"blue"};
|
||||
private Color colors[] = { null, Color.white, Color.lightGray, Color.gray, Color.darkGray,
|
||||
private Color[] colors = { null, Color.white, Color.lightGray, Color.gray, Color.darkGray,
|
||||
Color.black, Color.red, Color.pink, Color.orange,
|
||||
Color.yellow, Color.green, Color.magenta, Color.cyan,
|
||||
Color.blue};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -213,7 +213,7 @@ public class FontEditor extends Panel implements java.beans.PropertyEditor {
|
||||
private Choice styleChoser;
|
||||
private Choice sizeChoser;
|
||||
|
||||
private String fonts[];
|
||||
private String[] fonts;
|
||||
private String[] styleNames = { "plain", "bold", "italic" };
|
||||
private int[] styles = { Font.PLAIN, Font.BOLD, Font.ITALIC };
|
||||
private int[] pointSizes = { 3, 5, 8, 10, 12, 14, 18, 24, 36, 48 };
|
||||
|
@ -122,7 +122,7 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
|
||||
private long bitmapStart;
|
||||
private long compression;
|
||||
private long imageSize;
|
||||
private byte palette[];
|
||||
private byte[] palette;
|
||||
private int imageType;
|
||||
private int numBands;
|
||||
private boolean isBottomUp;
|
||||
@ -655,7 +655,7 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
|
||||
}
|
||||
|
||||
// Create IndexColorModel from the palette.
|
||||
byte r[], g[], b[];
|
||||
byte[] r, g, b;
|
||||
if (imageType == VERSION_2_1_BIT ||
|
||||
imageType == VERSION_2_4_BIT ||
|
||||
imageType == VERSION_2_8_BIT) {
|
||||
@ -885,9 +885,9 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
|
||||
noTransform &= destinationRegion.equals(raster.getBounds());
|
||||
}
|
||||
|
||||
byte bdata[] = null; // buffer for byte data
|
||||
short sdata[] = null; // buffer for short data
|
||||
int idata[] = null; // buffer for int data
|
||||
byte[] bdata = null; // buffer for byte data
|
||||
short[] sdata = null; // buffer for short data
|
||||
int[] idata = null; // buffer for int data
|
||||
|
||||
// the sampleModel can be null in case of embedded image
|
||||
if (sampleModel != null) {
|
||||
@ -1368,7 +1368,7 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
|
||||
}
|
||||
}
|
||||
|
||||
private void read16Bit(short sdata[]) throws IOException {
|
||||
private void read16Bit(short[] sdata) throws IOException {
|
||||
// Padding bytes at the end of each scanline
|
||||
// width * bitsPerPixel should be divisible by 32
|
||||
int padding = width * 2 % 4;
|
||||
@ -1434,7 +1434,7 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
|
||||
}
|
||||
}
|
||||
|
||||
private void read32Bit(int idata[]) throws IOException {
|
||||
private void read32Bit(int[] idata) throws IOException {
|
||||
if (noTransform) {
|
||||
int j = isBottomUp ? (height -1) * width : 0;
|
||||
|
||||
@ -1490,7 +1490,7 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
|
||||
}
|
||||
}
|
||||
|
||||
private void readRLE8(byte bdata[]) throws IOException {
|
||||
private void readRLE8(byte[] bdata) throws IOException {
|
||||
// If imageSize field is not provided, calculate it.
|
||||
int imSize = (int)imageSize;
|
||||
if (imSize == 0) {
|
||||
@ -1506,7 +1506,7 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
|
||||
}
|
||||
|
||||
// Read till we have the whole image
|
||||
byte values[] = new byte[imSize];
|
||||
byte[] values = new byte[imSize];
|
||||
int bytesRead = 0;
|
||||
iis.readFully(values, 0, imSize);
|
||||
|
||||
@ -1562,7 +1562,7 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
|
||||
byte[] values,
|
||||
byte[] bdata) throws IOException {
|
||||
|
||||
byte val[] = new byte[width];
|
||||
byte[] val = new byte[width];
|
||||
int count = 0, l = 0;
|
||||
int value;
|
||||
boolean flag = false;
|
||||
@ -1864,7 +1864,7 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
|
||||
// Ensure to check if the source index-count, does not
|
||||
// exceed the source image size
|
||||
if (count < imSize) {
|
||||
int alternate[] = { (values[count] & 0xf0) >> 4,
|
||||
int[] alternate = { (values[count] & 0xf0) >> 4,
|
||||
values[count] & 0x0f };
|
||||
for (int i=0; (i < value) && (l < width); i++) {
|
||||
val[l++] = (byte)alternate[i & 1];
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -295,7 +295,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
|
||||
noTransform &= bgrOrder;
|
||||
|
||||
int sampleSize[] = sampleModel.getSampleSize();
|
||||
int[] sampleSize = sampleModel.getSampleSize();
|
||||
|
||||
//XXX: check more
|
||||
|
||||
@ -322,7 +322,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
+ BMPCompressionTypes.getName(compressionType));
|
||||
}
|
||||
|
||||
byte r[] = null, g[] = null, b[] = null, a[] = null;
|
||||
byte[] r = null, g = null, b = null, a = null;
|
||||
|
||||
if (compressionType == BI_BITFIELDS) {
|
||||
bitsPerPixel =
|
||||
@ -752,7 +752,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
}
|
||||
|
||||
private void writePixels(int l, int scanlineBytes, int bitsPerPixel,
|
||||
int pixels[],
|
||||
int[] pixels,
|
||||
int padding, int numBands,
|
||||
IndexColorModel icm) throws IOException {
|
||||
int pixel = 0;
|
||||
@ -867,9 +867,9 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
// Case where IndexColorModel had > 256 colors.
|
||||
int entries = icm.getMapSize();
|
||||
|
||||
byte r[] = new byte[entries];
|
||||
byte g[] = new byte[entries];
|
||||
byte b[] = new byte[entries];
|
||||
byte[] r = new byte[entries];
|
||||
byte[] g = new byte[entries];
|
||||
byte[] b = new byte[entries];
|
||||
|
||||
icm.getReds(r);
|
||||
icm.getGreens(g);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -35,7 +35,7 @@ import javax.imageio.stream.ImageOutputStream;
|
||||
*/
|
||||
public class BitFile {
|
||||
ImageOutputStream output;
|
||||
byte buffer[];
|
||||
byte[] buffer;
|
||||
int index;
|
||||
int bitsLeft; // bits left at current index that are avail.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -43,7 +43,7 @@ public class InputStreamAdapter extends InputStream {
|
||||
return stream.read();
|
||||
}
|
||||
|
||||
public int read(byte b[], int off, int len) throws IOException {
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
return stream.read(b, off, len);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -263,7 +263,7 @@ public abstract class SimpleRenderedImage implements RenderedImage {
|
||||
* property names.
|
||||
*/
|
||||
public String[] getPropertyNames(String prefix) {
|
||||
String propertyNames[] = getPropertyNames();
|
||||
String[] propertyNames = getPropertyNames();
|
||||
if (propertyNames == null) {
|
||||
return null;
|
||||
}
|
||||
@ -282,7 +282,7 @@ public abstract class SimpleRenderedImage implements RenderedImage {
|
||||
}
|
||||
|
||||
// Copy the strings from the Vector over to a String array.
|
||||
String prefixNames[] = new String[names.size()];
|
||||
String[] prefixNames = new String[names.size()];
|
||||
int count = 0;
|
||||
for (Iterator<String> it = names.iterator(); it.hasNext(); ) {
|
||||
prefixNames[count++] = it.next();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -71,13 +71,13 @@ class TIFFFaxDecompressor extends TIFFDecompressor {
|
||||
// Data structures needed to store changing elements for the previous
|
||||
// and the current scanline
|
||||
private int changingElemSize = 0;
|
||||
private int prevChangingElems[];
|
||||
private int currChangingElems[];
|
||||
private int[] prevChangingElems;
|
||||
private int[] currChangingElems;
|
||||
|
||||
// Element at which to start search in getNextChangingElement
|
||||
private int lastChangingElement = 0;
|
||||
|
||||
private static int table1[] = {
|
||||
private static int[] table1 = {
|
||||
0x00, // 0 bits are left in first byte - SHOULD NOT HAPPEN
|
||||
0x01, // 1 bits are left in first byte
|
||||
0x03, // 2 bits are left in first byte
|
||||
@ -89,7 +89,7 @@ class TIFFFaxDecompressor extends TIFFDecompressor {
|
||||
0xff // 8 bits are left in first byte
|
||||
};
|
||||
|
||||
private static int table2[] = {
|
||||
private static int[] table2 = {
|
||||
0x00, // 0
|
||||
0x80, // 1
|
||||
0xc0, // 2
|
||||
@ -103,7 +103,7 @@ class TIFFFaxDecompressor extends TIFFDecompressor {
|
||||
|
||||
// Table to be used for flipping bytes when fillOrder is
|
||||
// BaselineTIFFTagSet.FILL_ORDER_RIGHT_TO_LEFT (2).
|
||||
static byte flipTable[] = {
|
||||
static byte[] flipTable = {
|
||||
0, -128, 64, -64, 32, -96, 96, -32,
|
||||
16, -112, 80, -48, 48, -80, 112, -16,
|
||||
8, -120, 72, -56, 40, -88, 104, -24,
|
||||
@ -139,7 +139,7 @@ class TIFFFaxDecompressor extends TIFFDecompressor {
|
||||
};
|
||||
|
||||
// The main 10 bit white runs lookup table
|
||||
private static short white[] = {
|
||||
private static short[] white = {
|
||||
// 0 - 7
|
||||
6430, 6400, 6400, 6400, 3225, 3225, 3225, 3225,
|
||||
// 8 - 15
|
||||
@ -399,7 +399,7 @@ class TIFFFaxDecompressor extends TIFFDecompressor {
|
||||
};
|
||||
|
||||
// Additional make up codes for both White and Black runs
|
||||
private static short additionalMakeup[] = {
|
||||
private static short[] additionalMakeup = {
|
||||
28679, 28679, 31752, (short)32777,
|
||||
(short)33801, (short)34825, (short)35849, (short)36873,
|
||||
(short)29703, (short)29703, (short)30727, (short)30727,
|
||||
@ -407,7 +407,7 @@ class TIFFFaxDecompressor extends TIFFDecompressor {
|
||||
};
|
||||
|
||||
// Initial black run look up table, uses the first 4 bits of a code
|
||||
private static short initBlack[] = {
|
||||
private static short[] initBlack = {
|
||||
// 0 - 7
|
||||
3226, 6412, 200, 168, 38, 38, 134, 134,
|
||||
// 8 - 15
|
||||
@ -415,10 +415,10 @@ class TIFFFaxDecompressor extends TIFFDecompressor {
|
||||
};
|
||||
|
||||
//
|
||||
private static short twoBitBlack[] = {292, 260, 226, 226}; // 0 - 3
|
||||
private static short[] twoBitBlack = {292, 260, 226, 226}; // 0 - 3
|
||||
|
||||
// Main black run table, using the last 9 bits of possible 13 bit code
|
||||
private static short black[] = {
|
||||
private static short[] black = {
|
||||
// 0 - 7
|
||||
62, 62, 30, 30, 0, 0, 0, 0,
|
||||
// 8 - 15
|
||||
@ -549,7 +549,7 @@ class TIFFFaxDecompressor extends TIFFDecompressor {
|
||||
390, 390, 390, 390, 390, 390, 390, 390,
|
||||
};
|
||||
|
||||
private static byte twoDCodes[] = {
|
||||
private static byte[] twoDCodes = {
|
||||
// 0 - 7
|
||||
80, 88, 23, 71, 30, 30, 62, 62,
|
||||
// 8 - 15
|
||||
@ -853,7 +853,7 @@ class TIFFFaxDecompressor extends TIFFDecompressor {
|
||||
int entry, code, bits, color;
|
||||
boolean isWhite;
|
||||
int currIndex = 0;
|
||||
int temp[];
|
||||
int[] temp;
|
||||
|
||||
if(data.length < 2) {
|
||||
throw new IIOException("Insufficient data to read initial EOL.");
|
||||
@ -1029,7 +1029,7 @@ class TIFFFaxDecompressor extends TIFFDecompressor {
|
||||
byte color;
|
||||
boolean isWhite;
|
||||
int currIndex;
|
||||
int temp[];
|
||||
int[] temp;
|
||||
|
||||
// Return values from getNextChangingElement
|
||||
int[] b = new int[2];
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -34,7 +34,7 @@ class TIFFLZWDecompressor extends TIFFDecompressor {
|
||||
private static final int EOI_CODE = 257;
|
||||
private static final int FIRST_CODE = 258;
|
||||
|
||||
private static final int andTable[] = {
|
||||
private static final int[] andTable = {
|
||||
511,
|
||||
1023,
|
||||
2047,
|
||||
@ -53,7 +53,7 @@ class TIFFLZWDecompressor extends TIFFDecompressor {
|
||||
private int srcIndex;
|
||||
private int dstIndex;
|
||||
|
||||
private byte stringTable[][];
|
||||
private byte[][] stringTable;
|
||||
private int tableIndex, bitsToGet = 9;
|
||||
|
||||
private int nextData = 0;
|
||||
@ -215,7 +215,7 @@ class TIFFLZWDecompressor extends TIFFDecompressor {
|
||||
/**
|
||||
* Write out the string just uncompressed.
|
||||
*/
|
||||
public void writeString(byte string[]) {
|
||||
public void writeString(byte[] string) {
|
||||
if(dstIndex < dstData.length) {
|
||||
int maxIndex = Math.min(string.length,
|
||||
dstData.length - dstIndex);
|
||||
@ -229,9 +229,9 @@ class TIFFLZWDecompressor extends TIFFDecompressor {
|
||||
/**
|
||||
* Add a new string to the string table.
|
||||
*/
|
||||
public void addStringToTable(byte oldString[], byte newString) {
|
||||
public void addStringToTable(byte[] oldString, byte newString) {
|
||||
int length = oldString.length;
|
||||
byte string[] = new byte[length + 1];
|
||||
byte[] string = new byte[length + 1];
|
||||
System.arraycopy(oldString, 0, string, 0, length);
|
||||
string[length] = newString;
|
||||
|
||||
@ -250,7 +250,7 @@ class TIFFLZWDecompressor extends TIFFDecompressor {
|
||||
/**
|
||||
* Add a new string to the string table.
|
||||
*/
|
||||
public void addStringToTable(byte string[]) {
|
||||
public void addStringToTable(byte[] string) {
|
||||
// Add this new String to the table
|
||||
stringTable[tableIndex++] = string;
|
||||
|
||||
@ -266,9 +266,9 @@ class TIFFLZWDecompressor extends TIFFDecompressor {
|
||||
/**
|
||||
* Append {@code newString} to the end of {@code oldString}.
|
||||
*/
|
||||
public byte[] composeString(byte oldString[], byte newString) {
|
||||
public byte[] composeString(byte[] oldString, byte newString) {
|
||||
int length = oldString.length;
|
||||
byte string[] = new byte[length + 1];
|
||||
byte[] string = new byte[length + 1];
|
||||
System.arraycopy(oldString, 0, string, 0, length);
|
||||
string[length] = newString;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -37,13 +37,13 @@ class TIFFLZWUtil {
|
||||
byte[] dstData;
|
||||
int dstIndex = 0;
|
||||
|
||||
byte stringTable[][];
|
||||
byte[][] stringTable;
|
||||
int tableIndex, bitsToGet = 9;
|
||||
|
||||
int nextData = 0;
|
||||
int nextBits = 0;
|
||||
|
||||
private static final int andTable[] = {
|
||||
private static final int[] andTable = {
|
||||
511,
|
||||
1023,
|
||||
2047,
|
||||
@ -143,7 +143,7 @@ class TIFFLZWUtil {
|
||||
/**
|
||||
* Write out the string just uncompressed.
|
||||
*/
|
||||
public void writeString(byte string[]) {
|
||||
public void writeString(byte[] string) {
|
||||
ensureCapacity(string.length);
|
||||
for (int i = 0; i < string.length; i++) {
|
||||
dstData[dstIndex++] = string[i];
|
||||
@ -153,9 +153,9 @@ class TIFFLZWUtil {
|
||||
/**
|
||||
* Add a new string to the string table.
|
||||
*/
|
||||
public void addStringToTable(byte oldString[], byte newString) {
|
||||
public void addStringToTable(byte[] oldString, byte newString) {
|
||||
int length = oldString.length;
|
||||
byte string[] = new byte[length + 1];
|
||||
byte[] string = new byte[length + 1];
|
||||
System.arraycopy(oldString, 0, string, 0, length);
|
||||
string[length] = newString;
|
||||
|
||||
@ -174,7 +174,7 @@ class TIFFLZWUtil {
|
||||
/**
|
||||
* Add a new string to the string table.
|
||||
*/
|
||||
public void addStringToTable(byte string[]) {
|
||||
public void addStringToTable(byte[] string) {
|
||||
// Add this new String to the table
|
||||
stringTable[tableIndex++] = string;
|
||||
|
||||
@ -190,9 +190,9 @@ class TIFFLZWUtil {
|
||||
/**
|
||||
* Append {@code newString} to the end of {@code oldString}.
|
||||
*/
|
||||
public byte[] composeString(byte oldString[], byte newString) {
|
||||
public byte[] composeString(byte[] oldString, byte newString) {
|
||||
int length = oldString.length;
|
||||
byte string[] = new byte[length + 1];
|
||||
byte[] string = new byte[length + 1];
|
||||
System.arraycopy(oldString, 0, string, 0, length);
|
||||
string[length] = newString;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1497,7 +1497,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||
GTKIconFactory.resetIcons();
|
||||
}
|
||||
lnf.loadStyles();
|
||||
Window appWindows[] = Window.getWindows();
|
||||
Window[] appWindows = Window.getWindows();
|
||||
for (int i = 0; i < appWindows.length; i++) {
|
||||
SynthLookAndFeel.updateStyles(appWindows[i]);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -61,7 +61,7 @@ class GTKPainter extends SynthPainter {
|
||||
PositionType.TOP, PositionType.LEFT
|
||||
};
|
||||
|
||||
private static final ShadowType SHADOWS[] = {
|
||||
private static final ShadowType[] SHADOWS = {
|
||||
ShadowType.NONE, ShadowType.IN, ShadowType.OUT,
|
||||
ShadowType.ETCHED_IN, ShadowType.OUT
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -2028,8 +2028,8 @@ class Metacity implements SynthConstants {
|
||||
AffineTransform affine;
|
||||
int index;
|
||||
|
||||
double ctrlpts[][];
|
||||
int types[];
|
||||
double[][] ctrlpts;
|
||||
int[] types;
|
||||
|
||||
private static final double angle = Math.PI / 4.0;
|
||||
private static final double a = 1.0 - Math.cos(angle);
|
||||
@ -2042,7 +2042,7 @@ class Metacity implements SynthConstants {
|
||||
// 4 values for each point {v0, v1, v2, v3}:
|
||||
// point = (x + v0 * w + v1 * arcWidth,
|
||||
// y + v2 * h + v3 * arcHeight);
|
||||
private static final double CtrlPtTemplate[][] = {
|
||||
private static final double[][] CtrlPtTemplate = {
|
||||
{ 0.0, 0.0, 1.0, 0.0 }, /* BOTTOM LEFT corner */
|
||||
{ 0.0, 0.0, 1.0, -0.5 }, /* BOTTOM LEFT arc start */
|
||||
{ 0.0, 0.0, 1.0, -acv, /* BOTTOM LEFT arc curve */
|
||||
@ -2065,7 +2065,7 @@ class Metacity implements SynthConstants {
|
||||
0.0, 0.0, 0.0, 0.5 },
|
||||
{}, /* Closing path element */
|
||||
};
|
||||
private static final int CornerFlags[] = {
|
||||
private static final int[] CornerFlags = {
|
||||
RoundRectClipShape.BOTTOM_LEFT,
|
||||
RoundRectClipShape.BOTTOM_RIGHT,
|
||||
RoundRectClipShape.TOP_RIGHT,
|
||||
@ -2126,7 +2126,7 @@ class Metacity implements SynthConstants {
|
||||
if (isDone()) {
|
||||
throw new NoSuchElementException("roundrect iterator out of bounds");
|
||||
}
|
||||
double ctrls[] = ctrlpts[index];
|
||||
double[] ctrls = ctrlpts[index];
|
||||
int nc = 0;
|
||||
for (int i = 0; i < ctrls.length; i += 4) {
|
||||
coords[nc++] = (float) (x + ctrls[i + 0] * w + ctrls[i + 1] * aw);
|
||||
@ -2142,7 +2142,7 @@ class Metacity implements SynthConstants {
|
||||
if (isDone()) {
|
||||
throw new NoSuchElementException("roundrect iterator out of bounds");
|
||||
}
|
||||
double ctrls[] = ctrlpts[index];
|
||||
double[] ctrls = ctrlpts[index];
|
||||
int nc = 0;
|
||||
for (int i = 0; i < ctrls.length; i += 4) {
|
||||
coords[nc++] = x + ctrls[i + 0] * w + ctrls[i + 1] * aw;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -65,7 +65,7 @@ public class MotifMenuUI extends BasicMenuUI
|
||||
return new MotifChangeHandler((JMenu)c, this);
|
||||
}
|
||||
|
||||
private boolean popupIsOpen(JMenu m,MenuElement me[]) {
|
||||
private boolean popupIsOpen(JMenu m,MenuElement[] me) {
|
||||
int i;
|
||||
JPopupMenu pm = m.getPopupMenu();
|
||||
|
||||
@ -111,7 +111,7 @@ public class MotifMenuUI extends BasicMenuUI
|
||||
} else {
|
||||
Container cnt = menu.getParent();
|
||||
if(cnt != null && cnt instanceof JMenuBar) {
|
||||
MenuElement me[] = new MenuElement[2];
|
||||
MenuElement[] me = new MenuElement[2];
|
||||
me[0]=(MenuElement)cnt;
|
||||
me[1]=menu;
|
||||
manager.setSelectedPath(me);
|
||||
@ -119,9 +119,9 @@ public class MotifMenuUI extends BasicMenuUI
|
||||
}
|
||||
}
|
||||
|
||||
MenuElement path[] = getPath();
|
||||
MenuElement[] path = getPath();
|
||||
if (path.length > 0) {
|
||||
MenuElement newPath[] = new MenuElement[path.length+1];
|
||||
MenuElement[] newPath = new MenuElement[path.length+1];
|
||||
System.arraycopy(path,0,newPath,0,path.length);
|
||||
newPath[path.length] = menu.getPopupMenu();
|
||||
manager.setSelectedPath(newPath);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -234,7 +234,7 @@ public final class AiffFileWriter extends SunFileWriter {
|
||||
int bytesRead = 0;
|
||||
int bytesWritten = 0;
|
||||
InputStream fileStream = getFileStream(aiffFileFormat, in);
|
||||
byte buffer[] = new byte[bisBufferSize];
|
||||
byte[] buffer = new byte[bisBufferSize];
|
||||
int maxLength = aiffFileFormat.getByteLength();
|
||||
|
||||
while( (bytesRead = fileStream.read( buffer )) >= 0 ) {
|
||||
@ -288,7 +288,7 @@ public final class AiffFileWriter extends SunFileWriter {
|
||||
float sampleFramesPerSecond = format.getSampleRate();
|
||||
int compCode = AiffFileFormat.AIFC_PCM;
|
||||
|
||||
byte header[] = null;
|
||||
byte[] header = null;
|
||||
InputStream codedAudioStream = audioStream;
|
||||
|
||||
// if we need to do any format conversion, do it here....
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,7 +47,7 @@ public final class AlawCodec extends FormatConversionProvider {
|
||||
private static final byte[] ALAW_TABH = new byte[256];
|
||||
private static final byte[] ALAW_TABL = new byte[256];
|
||||
|
||||
private static final short seg_end[] = {
|
||||
private static final short[] seg_end = {
|
||||
0xFF, 0x1FF, 0x3FF, 0x7FF, 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF
|
||||
};
|
||||
|
||||
@ -91,7 +91,7 @@ public final class AlawCodec extends FormatConversionProvider {
|
||||
|
||||
if( sourceFormat.getSampleSizeInBits() == 16 ) {
|
||||
|
||||
AudioFormat.Encoding enc[] = new AudioFormat.Encoding[1];
|
||||
AudioFormat.Encoding[] enc = new AudioFormat.Encoding[1];
|
||||
enc[0] = AudioFormat.Encoding.ALAW;
|
||||
return enc;
|
||||
|
||||
@ -102,7 +102,7 @@ public final class AlawCodec extends FormatConversionProvider {
|
||||
|
||||
if( sourceFormat.getSampleSizeInBits() == 8 ) {
|
||||
|
||||
AudioFormat.Encoding enc[] = new AudioFormat.Encoding[1];
|
||||
AudioFormat.Encoding[] enc = new AudioFormat.Encoding[1];
|
||||
enc[0] = AudioFormat.Encoding.PCM_SIGNED;
|
||||
return enc;
|
||||
|
||||
@ -246,7 +246,7 @@ public final class AlawCodec extends FormatConversionProvider {
|
||||
|
||||
// tempBuffer required only for encoding (when encode is true)
|
||||
private static final int tempBufferSize = 64;
|
||||
private byte tempBuffer [] = null;
|
||||
private byte[] tempBuffer = null;
|
||||
|
||||
/**
|
||||
* True to encode to a-law, false to decode to linear
|
||||
@ -256,8 +256,8 @@ public final class AlawCodec extends FormatConversionProvider {
|
||||
AudioFormat encodeFormat;
|
||||
AudioFormat decodeFormat;
|
||||
|
||||
byte tabByte1[] = null;
|
||||
byte tabByte2[] = null;
|
||||
byte[] tabByte1 = null;
|
||||
byte[] tabByte2 = null;
|
||||
int highByte = 0;
|
||||
int lowByte = 1;
|
||||
|
||||
@ -320,7 +320,7 @@ public final class AlawCodec extends FormatConversionProvider {
|
||||
* $$jb 2/23/99
|
||||
* Used to determine segment number in aLaw encoding
|
||||
*/
|
||||
private short search(short val, short table[], short size) {
|
||||
private short search(short val, short[] table, short size) {
|
||||
for(short i = 0; i < size; i++) {
|
||||
if (val <= table[i]) { return i; }
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -219,7 +219,7 @@ public final class AuFileWriter extends SunFileWriter {
|
||||
int bytesRead = 0;
|
||||
int bytesWritten = 0;
|
||||
InputStream fileStream = getFileStream(auFileFormat, in);
|
||||
byte buffer[] = new byte[bisBufferSize];
|
||||
byte[] buffer = new byte[bisBufferSize];
|
||||
int maxLength = auFileFormat.getByteLength();
|
||||
|
||||
while( (bytesRead = fileStream.read( buffer )) >= 0 ) {
|
||||
|
@ -1148,7 +1148,7 @@ final class DirectAudioDevice extends AbstractMixer {
|
||||
// to be allocated)
|
||||
int MAX_READ_LIMIT = 16384;
|
||||
DirectBAOS dbaos = new DirectBAOS();
|
||||
byte tmp[] = new byte[MAX_READ_LIMIT];
|
||||
byte[] tmp = new byte[MAX_READ_LIMIT];
|
||||
int thisRead = 0;
|
||||
while (thisRead >= 0) {
|
||||
thisRead = stream.read(tmp, 0, tmp.length);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -635,7 +635,7 @@ public final class EmergencySoundbank {
|
||||
|
||||
public static SF2Layer new_guitar_pick(SF2Soundbank sf2) {
|
||||
|
||||
double datab[];
|
||||
double[] datab;
|
||||
|
||||
// Make treble part
|
||||
{
|
||||
@ -814,7 +814,7 @@ public final class EmergencySoundbank {
|
||||
|
||||
public static SF2Layer new_piano_hammer(SF2Soundbank sf2) {
|
||||
|
||||
double datab[];
|
||||
double[] datab;
|
||||
|
||||
// Make treble part
|
||||
{
|
||||
@ -1803,8 +1803,8 @@ public final class EmergencySoundbank {
|
||||
|
||||
public static SF2Layer new_timpani(SF2Soundbank sf2) {
|
||||
|
||||
double datab[];
|
||||
double datah[];
|
||||
double[] datab;
|
||||
double[] datah;
|
||||
|
||||
// Make Bass Part
|
||||
{
|
||||
@ -1891,8 +1891,8 @@ public final class EmergencySoundbank {
|
||||
|
||||
public static SF2Layer new_melodic_toms(SF2Soundbank sf2) {
|
||||
|
||||
double datab[];
|
||||
double datah[];
|
||||
double[] datab;
|
||||
double[] datah;
|
||||
|
||||
// Make Bass Part
|
||||
{
|
||||
@ -1969,7 +1969,7 @@ public final class EmergencySoundbank {
|
||||
}
|
||||
|
||||
public static SF2Layer new_reverse_cymbal(SF2Soundbank sf2) {
|
||||
double datah[];
|
||||
double[] datah;
|
||||
{
|
||||
int fftlen = 4096 * 4;
|
||||
double[] data = new double[2 * fftlen];
|
||||
@ -2012,8 +2012,8 @@ public final class EmergencySoundbank {
|
||||
|
||||
public static SF2Layer new_snare_drum(SF2Soundbank sf2) {
|
||||
|
||||
double datab[];
|
||||
double datah[];
|
||||
double[] datab;
|
||||
double[] datah;
|
||||
|
||||
// Make Bass Part
|
||||
{
|
||||
@ -2088,8 +2088,8 @@ public final class EmergencySoundbank {
|
||||
|
||||
public static SF2Layer new_bass_drum(SF2Soundbank sf2) {
|
||||
|
||||
double datab[];
|
||||
double datah[];
|
||||
double[] datab;
|
||||
double[] datah;
|
||||
|
||||
// Make Bass Part
|
||||
{
|
||||
@ -2162,8 +2162,8 @@ public final class EmergencySoundbank {
|
||||
|
||||
public static SF2Layer new_tom(SF2Soundbank sf2) {
|
||||
|
||||
double datab[];
|
||||
double datah[];
|
||||
double[] datab;
|
||||
double[] datah;
|
||||
|
||||
// Make Bass Part
|
||||
{
|
||||
@ -2240,7 +2240,7 @@ public final class EmergencySoundbank {
|
||||
}
|
||||
|
||||
public static SF2Layer new_closed_hihat(SF2Soundbank sf2) {
|
||||
double datah[];
|
||||
double[] datah;
|
||||
|
||||
// Make treble part
|
||||
{
|
||||
@ -2291,7 +2291,7 @@ public final class EmergencySoundbank {
|
||||
}
|
||||
|
||||
public static SF2Layer new_open_hihat(SF2Soundbank sf2) {
|
||||
double datah[];
|
||||
double[] datah;
|
||||
{
|
||||
int fftlen = 4096 * 4;
|
||||
double[] data = new double[2 * fftlen];
|
||||
@ -2332,7 +2332,7 @@ public final class EmergencySoundbank {
|
||||
}
|
||||
|
||||
public static SF2Layer new_crash_cymbal(SF2Soundbank sf2) {
|
||||
double datah[];
|
||||
double[] datah;
|
||||
{
|
||||
int fftlen = 4096 * 4;
|
||||
double[] data = new double[2 * fftlen];
|
||||
@ -2372,7 +2372,7 @@ public final class EmergencySoundbank {
|
||||
}
|
||||
|
||||
public static SF2Layer new_side_stick(SF2Soundbank sf2) {
|
||||
double datab[];
|
||||
double[] datab;
|
||||
|
||||
// Make treble part
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ public final class JavaSoundAudioClip implements AudioClip, MetaEventListener, L
|
||||
private long lastPlayCall = 0;
|
||||
private static final int MINIMUM_PLAY_DELAY = 30;
|
||||
|
||||
private byte loadedAudio[] = null;
|
||||
private byte[] loadedAudio = null;
|
||||
private int loadedAudioByteLength = 0;
|
||||
private AudioFormat loadedAudioFormat = null;
|
||||
|
||||
@ -383,7 +383,7 @@ public final class JavaSoundAudioClip implements AudioClip, MetaEventListener, L
|
||||
private void readStream(AudioInputStream as) throws IOException {
|
||||
|
||||
DirectBAOS baos = new DirectBAOS();
|
||||
byte buffer[] = new byte[16384];
|
||||
byte[] buffer = new byte[16384];
|
||||
int bytesRead = 0;
|
||||
int totalBytesRead = 0;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -102,7 +102,7 @@ public final class ModelByteBuffer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(byte b[], int off, int len) throws IOException {
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
if (len > left)
|
||||
len = (int)left;
|
||||
if (left == 0)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -156,11 +156,11 @@ public final class RIFFReader extends InputStream {
|
||||
}
|
||||
}
|
||||
|
||||
public void readFully(byte b[]) throws IOException {
|
||||
public void readFully(byte[] b) throws IOException {
|
||||
readFully(b, 0, b.length);
|
||||
}
|
||||
|
||||
public void readFully(byte b[], int off, int len) throws IOException {
|
||||
public void readFully(byte[] b, int off, int len) throws IOException {
|
||||
if (len < 0)
|
||||
throw new IndexOutOfBoundsException();
|
||||
while (len > 0) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -279,7 +279,7 @@ public final class RIFFWriter extends OutputStream {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(byte b[], int off, int len) throws IOException {
|
||||
public void write(byte[] b, int off, int len) throws IOException {
|
||||
if (!writeoverride) {
|
||||
if (chunktype != 2) {
|
||||
throw new IllegalArgumentException(
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1126,7 +1126,7 @@ final class RealTimeSequencer extends AbstractMidiDevice
|
||||
}
|
||||
return;
|
||||
}
|
||||
int temp[] = new int[ controllers.length + c.length ];
|
||||
int[] temp = new int[ controllers.length + c.length ];
|
||||
int elements;
|
||||
|
||||
// first add what we have
|
||||
@ -1149,7 +1149,7 @@ final class RealTimeSequencer extends AbstractMidiDevice
|
||||
}
|
||||
}
|
||||
// now keep only the elements we need
|
||||
int newc[] = new int[ elements ];
|
||||
int[] newc = new int[ elements ];
|
||||
for(int i=0; i<elements; i++){
|
||||
newc[i] = temp[i];
|
||||
}
|
||||
@ -1161,7 +1161,7 @@ final class RealTimeSequencer extends AbstractMidiDevice
|
||||
if (c==null) {
|
||||
controllers = new int[0];
|
||||
} else {
|
||||
int temp[] = new int[ controllers.length ];
|
||||
int[] temp = new int[ controllers.length ];
|
||||
int elements = 0;
|
||||
|
||||
|
||||
@ -1178,7 +1178,7 @@ final class RealTimeSequencer extends AbstractMidiDevice
|
||||
}
|
||||
}
|
||||
// now keep only the elements remaining
|
||||
int newc[] = new int[ elements ];
|
||||
int[] newc = new int[ elements ];
|
||||
for(int i=0; i<elements; i++) {
|
||||
newc[i] = temp[i];
|
||||
}
|
||||
@ -1195,7 +1195,7 @@ final class RealTimeSequencer extends AbstractMidiDevice
|
||||
return null;
|
||||
}
|
||||
|
||||
int c[] = new int[controllers.length];
|
||||
int[] c = new int[controllers.length];
|
||||
|
||||
for(int i=0; i<controllers.length; i++){
|
||||
c[i] = controllers[i];
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -87,7 +87,7 @@ public final class SoftReverb implements SoftAudioProcessor {
|
||||
this.feedback = feedback;
|
||||
}
|
||||
|
||||
public void processReplace(float inout[]) {
|
||||
public void processReplace(float[] inout) {
|
||||
int len = inout.length;
|
||||
int delaybuffersize = this.delaybuffersize;
|
||||
int rovepos = this.rovepos;
|
||||
@ -102,7 +102,7 @@ public final class SoftReverb implements SoftAudioProcessor {
|
||||
this.rovepos = rovepos;
|
||||
}
|
||||
|
||||
public void processReplace(float in[], float out[]) {
|
||||
public void processReplace(float[] in, float[] out) {
|
||||
int len = in.length;
|
||||
int delaybuffersize = this.delaybuffersize;
|
||||
int rovepos = this.rovepos;
|
||||
@ -138,7 +138,7 @@ public final class SoftReverb implements SoftAudioProcessor {
|
||||
filtercoeff2 = (1 - filtercoeff1)* feedback;
|
||||
}
|
||||
|
||||
public void processMix(float in[], float out[]) {
|
||||
public void processMix(float[] in, float[] out) {
|
||||
int len = in.length;
|
||||
int delaybuffersize = this.delaybuffersize;
|
||||
int rovepos = this.rovepos;
|
||||
@ -159,7 +159,7 @@ public final class SoftReverb implements SoftAudioProcessor {
|
||||
this.rovepos = rovepos;
|
||||
}
|
||||
|
||||
public void processReplace(float in[], float out[]) {
|
||||
public void processReplace(float[] in, float[] out) {
|
||||
int len = in.length;
|
||||
int delaybuffersize = this.delaybuffersize;
|
||||
int rovepos = this.rovepos;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -74,7 +74,7 @@ public final class StandardMidiFileWriter extends MidiFileWriter {
|
||||
/**
|
||||
* MIDI parser types.
|
||||
*/
|
||||
private static final int types[] = {
|
||||
private static final int[] types = {
|
||||
MIDI_TYPE_0,
|
||||
MIDI_TYPE_1
|
||||
};
|
||||
@ -96,8 +96,8 @@ public final class StandardMidiFileWriter extends MidiFileWriter {
|
||||
*/
|
||||
@Override
|
||||
public int[] getMidiFileTypes(Sequence sequence){
|
||||
int typesArray[];
|
||||
Track tracks[] = sequence.getTracks();
|
||||
int[] typesArray;
|
||||
Track[] tracks = sequence.getTracks();
|
||||
|
||||
if( tracks.length==1 ) {
|
||||
typesArray = new int[2];
|
||||
@ -149,7 +149,7 @@ public final class StandardMidiFileWriter extends MidiFileWriter {
|
||||
//=================================================================================
|
||||
|
||||
private InputStream getFileStream(int type, Sequence sequence) throws IOException {
|
||||
Track tracks[] = sequence.getTracks();
|
||||
Track[] tracks = sequence.getTracks();
|
||||
int bytesBuilt = 0;
|
||||
int headerLength = 14;
|
||||
int length = 0;
|
||||
@ -160,7 +160,7 @@ public final class StandardMidiFileWriter extends MidiFileWriter {
|
||||
DataOutputStream hdos = null;
|
||||
PipedInputStream headerStream = null;
|
||||
|
||||
InputStream trackStreams [] = null;
|
||||
InputStream[] trackStreams = null;
|
||||
InputStream trackStream = null;
|
||||
InputStream fStream = null;
|
||||
|
||||
@ -344,7 +344,7 @@ public final class StandardMidiFileWriter extends MidiFileWriter {
|
||||
int metatype;
|
||||
int data1, data2;
|
||||
int length;
|
||||
byte data[] = null;
|
||||
byte[] data = null;
|
||||
ShortMessage shortMessage = null;
|
||||
MetaMessage metaMessage = null;
|
||||
SysexMessage sysexMessage = null;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -45,12 +45,12 @@ abstract class SunFileWriter extends AudioFileWriter {
|
||||
// buffer size for temporary input streams
|
||||
protected static final int bisBufferSize = 4096;
|
||||
|
||||
final AudioFileFormat.Type types[];
|
||||
final AudioFileFormat.Type[] types;
|
||||
|
||||
/**
|
||||
* Constructs a new SunParser object.
|
||||
*/
|
||||
SunFileWriter(AudioFileFormat.Type types[]) {
|
||||
SunFileWriter(AudioFileFormat.Type[] types) {
|
||||
this.types = types;
|
||||
}
|
||||
|
||||
@ -164,12 +164,12 @@ abstract class SunFileWriter extends AudioFileWriter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(byte b[]) throws IOException {
|
||||
public int read(byte[] b) throws IOException {
|
||||
return in.read(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(byte b[], int off, int len) throws IOException {
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
return in.read(b, off, len);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -47,7 +47,7 @@ public final class UlawCodec extends FormatConversionProvider {
|
||||
private static final byte[] ULAW_TABH = new byte[256];
|
||||
private static final byte[] ULAW_TABL = new byte[256];
|
||||
|
||||
private static final short seg_end[] = {
|
||||
private static final short[] seg_end = {
|
||||
0xFF, 0x1FF, 0x3FF, 0x7FF, 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF
|
||||
};
|
||||
|
||||
@ -83,7 +83,7 @@ public final class UlawCodec extends FormatConversionProvider {
|
||||
public AudioFormat.Encoding[] getTargetEncodings(AudioFormat sourceFormat){
|
||||
if( AudioFormat.Encoding.PCM_SIGNED.equals(sourceFormat.getEncoding()) ) {
|
||||
if( sourceFormat.getSampleSizeInBits() == 16 ) {
|
||||
AudioFormat.Encoding enc[] = new AudioFormat.Encoding[1];
|
||||
AudioFormat.Encoding[] enc = new AudioFormat.Encoding[1];
|
||||
enc[0] = AudioFormat.Encoding.ULAW;
|
||||
return enc;
|
||||
} else {
|
||||
@ -91,7 +91,7 @@ public final class UlawCodec extends FormatConversionProvider {
|
||||
}
|
||||
} else if (AudioFormat.Encoding.ULAW.equals(sourceFormat.getEncoding())) {
|
||||
if (sourceFormat.getSampleSizeInBits() == 8) {
|
||||
AudioFormat.Encoding enc[] = new AudioFormat.Encoding[1];
|
||||
AudioFormat.Encoding[] enc = new AudioFormat.Encoding[1];
|
||||
enc[0] = AudioFormat.Encoding.PCM_SIGNED;
|
||||
return enc;
|
||||
} else {
|
||||
@ -234,7 +234,7 @@ public final class UlawCodec extends FormatConversionProvider {
|
||||
private final class UlawCodecStream extends AudioInputStream {
|
||||
|
||||
private static final int tempBufferSize = 64;
|
||||
private byte tempBuffer [] = null;
|
||||
private byte[] tempBuffer = null;
|
||||
|
||||
/**
|
||||
* True to encode to u-law, false to decode to linear.
|
||||
@ -244,8 +244,8 @@ public final class UlawCodec extends FormatConversionProvider {
|
||||
AudioFormat encodeFormat;
|
||||
AudioFormat decodeFormat;
|
||||
|
||||
byte tabByte1[] = null;
|
||||
byte tabByte2[] = null;
|
||||
byte[] tabByte1 = null;
|
||||
byte[] tabByte2 = null;
|
||||
int highByte = 0;
|
||||
int lowByte = 1;
|
||||
|
||||
@ -305,7 +305,7 @@ public final class UlawCodec extends FormatConversionProvider {
|
||||
* $$jb 2/23/99
|
||||
* Used to determine segment number in uLaw encoding
|
||||
*/
|
||||
private short search(short val, short table[], short size) {
|
||||
private short search(short val, short[] table, short size) {
|
||||
for(short i = 0; i < size; i++) {
|
||||
if (val <= table[i]) { return i; }
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -215,7 +215,7 @@ public final class WaveFileWriter extends SunFileWriter {
|
||||
int bytesRead = 0;
|
||||
int bytesWritten = 0;
|
||||
InputStream fileStream = getFileStream(waveFileFormat, in);
|
||||
byte buffer[] = new byte[bisBufferSize];
|
||||
byte[] buffer = new byte[bisBufferSize];
|
||||
int maxLength = waveFileFormat.getByteLength();
|
||||
|
||||
while( (bytesRead = fileStream.read( buffer )) >= 0 ) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -87,7 +87,7 @@ import sun.awt.AWTAccessor;
|
||||
*/
|
||||
public abstract class AWTEvent extends EventObject {
|
||||
|
||||
private byte bdata[];
|
||||
private byte[] bdata;
|
||||
|
||||
/**
|
||||
* The event's id.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -157,7 +157,7 @@ public class BasicStroke implements Stroke {
|
||||
int cap;
|
||||
float miterlimit;
|
||||
|
||||
float dash[];
|
||||
float[] dash;
|
||||
float dash_phase;
|
||||
|
||||
/**
|
||||
@ -189,7 +189,7 @@ public class BasicStroke implements Stroke {
|
||||
*/
|
||||
@ConstructorProperties({ "lineWidth", "endCap", "lineJoin", "miterLimit", "dashArray", "dashPhase" })
|
||||
public BasicStroke(float width, int cap, int join, float miterlimit,
|
||||
float dash[], float dash_phase) {
|
||||
float[] dash, float dash_phase) {
|
||||
if (width < 0.0f) {
|
||||
throw new IllegalArgumentException("negative width");
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -154,7 +154,7 @@ public class BufferCapabilities implements Cloneable {
|
||||
private static int I_PRIOR = 2;
|
||||
private static int I_COPIED = 3;
|
||||
|
||||
private static final String NAMES[] =
|
||||
private static final String[] NAMES =
|
||||
{ "undefined", "background", "prior", "copied" };
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -219,7 +219,7 @@ public class Color implements Paint, java.io.Serializable {
|
||||
* @see #getRGBColorComponents
|
||||
* @see #getRGBComponents
|
||||
*/
|
||||
private float frgbvalue[] = null;
|
||||
private float[] frgbvalue = null;
|
||||
|
||||
/**
|
||||
* The color value in the native {@code ColorSpace} as
|
||||
@ -231,7 +231,7 @@ public class Color implements Paint, java.io.Serializable {
|
||||
* @see #getRGBColorComponents
|
||||
* @see #getRGBComponents
|
||||
*/
|
||||
private float fvalue[] = null;
|
||||
private float[] fvalue = null;
|
||||
|
||||
/**
|
||||
* The alpha value as a {@code float} component.
|
||||
@ -514,7 +514,7 @@ public class Color implements Paint, java.io.Serializable {
|
||||
* @see #getComponents
|
||||
* @see #getColorComponents
|
||||
*/
|
||||
public Color(ColorSpace cspace, float components[], float alpha) {
|
||||
public Color(ColorSpace cspace, float[] components, float alpha) {
|
||||
boolean rangeError = false;
|
||||
String badComponentString = "";
|
||||
int n = cspace.getNumComponents();
|
||||
@ -1110,7 +1110,7 @@ public class Color implements Paint, java.io.Serializable {
|
||||
if (cs == null) {
|
||||
cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
|
||||
}
|
||||
float f[];
|
||||
float[] f;
|
||||
if (fvalue == null) {
|
||||
f = new float[3];
|
||||
f[0] = ((float)getRed())/255f;
|
||||
@ -1119,8 +1119,8 @@ public class Color implements Paint, java.io.Serializable {
|
||||
} else {
|
||||
f = fvalue;
|
||||
}
|
||||
float tmp[] = cs.toCIEXYZ(f);
|
||||
float tmpout[] = cspace.fromCIEXYZ(tmp);
|
||||
float[] tmp = cs.toCIEXYZ(f);
|
||||
float[] tmpout = cspace.fromCIEXYZ(tmp);
|
||||
if (compArray == null) {
|
||||
compArray = new float[tmpout.length + 1];
|
||||
}
|
||||
@ -1154,7 +1154,7 @@ public class Color implements Paint, java.io.Serializable {
|
||||
if (cs == null) {
|
||||
cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
|
||||
}
|
||||
float f[];
|
||||
float[] f;
|
||||
if (fvalue == null) {
|
||||
f = new float[3];
|
||||
f[0] = ((float)getRed())/255f;
|
||||
@ -1163,8 +1163,8 @@ public class Color implements Paint, java.io.Serializable {
|
||||
} else {
|
||||
f = fvalue;
|
||||
}
|
||||
float tmp[] = cs.toCIEXYZ(f);
|
||||
float tmpout[] = cspace.fromCIEXYZ(tmp);
|
||||
float[] tmp = cs.toCIEXYZ(f);
|
||||
float[] tmpout = cspace.fromCIEXYZ(tmp);
|
||||
if (compArray == null) {
|
||||
return tmpout;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -119,7 +119,7 @@ public class Cursor implements java.io.Serializable {
|
||||
* method should be used instead.
|
||||
*/
|
||||
@Deprecated
|
||||
protected static Cursor predefined[] = new Cursor[14];
|
||||
protected static Cursor[] predefined = new Cursor[14];
|
||||
|
||||
/**
|
||||
* This field is a private replacement for 'predefined' array.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -550,7 +550,7 @@ public class Event implements java.io.Serializable {
|
||||
public Event evt;
|
||||
|
||||
/* table for mapping old Event action keys to KeyEvent virtual keys. */
|
||||
private static final int actionKeyCodes[][] = {
|
||||
private static final int[][] actionKeyCodes = {
|
||||
/* virtual key action key */
|
||||
{ KeyEvent.VK_HOME, Event.HOME },
|
||||
{ KeyEvent.VK_END, Event.END },
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -147,7 +147,7 @@ public class FileDialog extends Dialog {
|
||||
static {
|
||||
AWTAccessor.setFileDialogAccessor(
|
||||
new AWTAccessor.FileDialogAccessor() {
|
||||
public void setFiles(FileDialog fileDialog, File files[]) {
|
||||
public void setFiles(FileDialog fileDialog, File[] files) {
|
||||
fileDialog.setFiles(files);
|
||||
}
|
||||
public void setFile(FileDialog fileDialog, String file) {
|
||||
@ -497,7 +497,7 @@ public class FileDialog extends Dialog {
|
||||
* @see #getFiles
|
||||
* @since 1.7
|
||||
*/
|
||||
private void setFiles(File files[]) {
|
||||
private void setFiles(File[] files) {
|
||||
synchronized (getObjectLock()) {
|
||||
this.files = files;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -2011,7 +2011,7 @@ public class Font implements java.io.Serializable
|
||||
public Attribute[] getAvailableAttributes() {
|
||||
// FONT is not supported by Font
|
||||
|
||||
Attribute attributes[] = {
|
||||
Attribute[] attributes = {
|
||||
TextAttribute.FAMILY,
|
||||
TextAttribute.WEIGHT,
|
||||
TextAttribute.WIDTH,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -332,7 +332,7 @@ public abstract class FontMetrics implements java.io.Serializable {
|
||||
if (ch < 256) {
|
||||
return getWidths()[ch];
|
||||
}
|
||||
char data[] = {ch};
|
||||
char[] data = {ch};
|
||||
return charsWidth(data, 0, 1);
|
||||
}
|
||||
|
||||
@ -355,7 +355,7 @@ public abstract class FontMetrics implements java.io.Serializable {
|
||||
*/
|
||||
public int stringWidth(String str) {
|
||||
int len = str.length();
|
||||
char data[] = new char[len];
|
||||
char[] data = new char[len];
|
||||
str.getChars(0, len, data, 0);
|
||||
return charsWidth(data, 0, len);
|
||||
}
|
||||
@ -383,7 +383,7 @@ public abstract class FontMetrics implements java.io.Serializable {
|
||||
* @see #bytesWidth(byte[], int, int)
|
||||
* @see #stringWidth(String)
|
||||
*/
|
||||
public int charsWidth(char data[], int off, int len) {
|
||||
public int charsWidth(char[] data, int off, int len) {
|
||||
return stringWidth(new String(data, off, len));
|
||||
}
|
||||
|
||||
@ -410,7 +410,7 @@ public abstract class FontMetrics implements java.io.Serializable {
|
||||
* @see #stringWidth(String)
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public int bytesWidth(byte data[], int off, int len) {
|
||||
public int bytesWidth(byte[] data, int off, int len) {
|
||||
return stringWidth(new String(data, 0, off, len));
|
||||
}
|
||||
|
||||
@ -426,7 +426,7 @@ public abstract class FontMetrics implements java.io.Serializable {
|
||||
* described by this {@code FontMetrics} object.
|
||||
*/
|
||||
public int[] getWidths() {
|
||||
int widths[] = new int[256];
|
||||
int[] widths = new int[256];
|
||||
for (char ch = 0 ; ch < 256 ; ch++) {
|
||||
widths[ch] = charWidth(ch);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -84,7 +84,7 @@ class GradientPaintContext implements PaintContext {
|
||||
double dx;
|
||||
double dy;
|
||||
boolean cyclic;
|
||||
int interp[];
|
||||
int[] interp;
|
||||
Raster saved;
|
||||
ColorModel model;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -696,7 +696,7 @@ public abstract class Graphics {
|
||||
* @see java.awt.Graphics#drawPolygon(int[], int[], int)
|
||||
* @since 1.1
|
||||
*/
|
||||
public abstract void drawPolyline(int xPoints[], int yPoints[],
|
||||
public abstract void drawPolyline(int[] xPoints, int[] yPoints,
|
||||
int nPoints);
|
||||
|
||||
/**
|
||||
@ -718,7 +718,7 @@ public abstract class Graphics {
|
||||
* @see java.awt.Graphics#fillPolygon
|
||||
* @see java.awt.Graphics#drawPolyline
|
||||
*/
|
||||
public abstract void drawPolygon(int xPoints[], int yPoints[],
|
||||
public abstract void drawPolygon(int[] xPoints, int[] yPoints,
|
||||
int nPoints);
|
||||
|
||||
/**
|
||||
@ -752,7 +752,7 @@ public abstract class Graphics {
|
||||
* @param nPoints a the total number of points.
|
||||
* @see java.awt.Graphics#drawPolygon(int[], int[], int)
|
||||
*/
|
||||
public abstract void fillPolygon(int xPoints[], int yPoints[],
|
||||
public abstract void fillPolygon(int[] xPoints, int[] yPoints,
|
||||
int nPoints);
|
||||
|
||||
/**
|
||||
@ -818,7 +818,7 @@ public abstract class Graphics {
|
||||
* @see java.awt.Graphics#drawBytes
|
||||
* @see java.awt.Graphics#drawString
|
||||
*/
|
||||
public void drawChars(char data[], int offset, int length, int x, int y) {
|
||||
public void drawChars(char[] data, int offset, int length, int x, int y) {
|
||||
drawString(new String(data, offset, length), x, y);
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ public abstract class Graphics {
|
||||
* @see java.awt.Graphics#drawString
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void drawBytes(byte data[], int offset, int length, int x, int y) {
|
||||
public void drawBytes(byte[] data, int offset, int length, int x, int y) {
|
||||
drawString(new String(data, 0, offset, length), x, y);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -442,7 +442,7 @@ java.io.Serializable {
|
||||
* @serial
|
||||
* @see #getLayoutDimensions()
|
||||
*/
|
||||
public int columnWidths[];
|
||||
public int[] columnWidths;
|
||||
|
||||
/**
|
||||
* This field holds the overrides to the row minimum
|
||||
@ -456,7 +456,7 @@ java.io.Serializable {
|
||||
* @serial
|
||||
* @see #getLayoutDimensions()
|
||||
*/
|
||||
public int rowHeights[];
|
||||
public int[] rowHeights;
|
||||
|
||||
/**
|
||||
* This field holds the overrides to the column weights.
|
||||
@ -471,7 +471,7 @@ java.io.Serializable {
|
||||
*
|
||||
* @serial
|
||||
*/
|
||||
public double columnWeights[];
|
||||
public double[] columnWeights;
|
||||
|
||||
/**
|
||||
* This field holds the overrides to the row weights.
|
||||
@ -486,7 +486,7 @@ java.io.Serializable {
|
||||
*
|
||||
* @serial
|
||||
*/
|
||||
public double rowWeights[];
|
||||
public double[] rowWeights;
|
||||
|
||||
/**
|
||||
* The component being positioned. This is set before calling into
|
||||
@ -592,7 +592,7 @@ java.io.Serializable {
|
||||
if (layoutInfo == null)
|
||||
return new int[2][0];
|
||||
|
||||
int dim[][] = new int [2][];
|
||||
int[][] dim = new int [2][];
|
||||
dim[0] = new int[layoutInfo.width];
|
||||
dim[1] = new int[layoutInfo.height];
|
||||
|
||||
@ -618,7 +618,7 @@ java.io.Serializable {
|
||||
if (layoutInfo == null)
|
||||
return new double[2][0];
|
||||
|
||||
double weights[][] = new double [2][];
|
||||
double[][] weights = new double [2][];
|
||||
weights[0] = new double[layoutInfo.width];
|
||||
weights[1] = new double[layoutInfo.height];
|
||||
|
||||
@ -929,7 +929,7 @@ java.io.Serializable {
|
||||
*/
|
||||
|
||||
private long[] preInitMaximumArraySizes(Container parent){
|
||||
Component components[] = parent.getComponents();
|
||||
Component[] components = parent.getComponents();
|
||||
Component comp;
|
||||
GridBagConstraints constraints;
|
||||
int curX, curY;
|
||||
@ -1003,7 +1003,7 @@ java.io.Serializable {
|
||||
Component comp;
|
||||
GridBagConstraints constraints;
|
||||
Dimension d;
|
||||
Component components[] = parent.getComponents();
|
||||
Component[] components = parent.getComponents();
|
||||
// Code below will address index curX+curWidth in the case of yMaxArray, weightY
|
||||
// ( respectively curY+curHeight for xMaxArray, weightX ) where
|
||||
// curX in 0 to preInitMaximumArraySizes.y
|
||||
@ -2063,7 +2063,7 @@ java.io.Serializable {
|
||||
int compindex;
|
||||
GridBagConstraints constraints;
|
||||
Insets insets = parent.getInsets();
|
||||
Component components[] = parent.getComponents();
|
||||
Component[] components = parent.getComponents();
|
||||
Dimension d;
|
||||
Rectangle r = new Rectangle();
|
||||
int i, diffw, diffh;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -42,20 +42,20 @@ public class GridBagLayoutInfo implements java.io.Serializable {
|
||||
|
||||
int width, height; /* number of cells: horizontal and vertical */
|
||||
int startx, starty; /* starting point for layout */
|
||||
int minWidth[]; /* largest minWidth in each column */
|
||||
int minHeight[]; /* largest minHeight in each row */
|
||||
double weightX[]; /* largest weight in each column */
|
||||
double weightY[]; /* largest weight in each row */
|
||||
int[] minWidth; /* largest minWidth in each column */
|
||||
int[] minHeight; /* largest minHeight in each row */
|
||||
double[] weightX; /* largest weight in each column */
|
||||
double[] weightY; /* largest weight in each row */
|
||||
boolean hasBaseline; /* Whether or not baseline layout has been
|
||||
* requested and one of the components
|
||||
* has a valid baseline. */
|
||||
// These are only valid if hasBaseline is true and are indexed by
|
||||
// row.
|
||||
short baselineType[]; /* The type of baseline for a particular
|
||||
short[] baselineType; /* The type of baseline for a particular
|
||||
* row. A mix of the BaselineResizeBehavior
|
||||
* constants (1 << ordinal()) */
|
||||
int maxAscent[]; /* Max ascent (baseline). */
|
||||
int maxDescent[]; /* Max descent (height - baseline) */
|
||||
int[] maxAscent; /* Max ascent (baseline). */
|
||||
int[] maxDescent; /* Max descent (height - baseline) */
|
||||
|
||||
/**
|
||||
* Creates an instance of GridBagLayoutInfo representing {@code GridBagLayout}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -67,7 +67,7 @@ public final class JobAttributes implements Cloneable {
|
||||
private static final int I_RANGE = 1;
|
||||
private static final int I_SELECTION = 2;
|
||||
|
||||
private static final String NAMES[] = {
|
||||
private static final String[] NAMES = {
|
||||
"all", "range", "selection"
|
||||
};
|
||||
|
||||
@ -103,7 +103,7 @@ public final class JobAttributes implements Cloneable {
|
||||
private static final int I_FILE = 0;
|
||||
private static final int I_PRINTER = 1;
|
||||
|
||||
private static final String NAMES[] = {
|
||||
private static final String[] NAMES = {
|
||||
"file", "printer"
|
||||
};
|
||||
|
||||
@ -134,7 +134,7 @@ public final class JobAttributes implements Cloneable {
|
||||
private static final int I_NATIVE = 1;
|
||||
private static final int I_NONE = 2;
|
||||
|
||||
private static final String NAMES[] = {
|
||||
private static final String[] NAMES = {
|
||||
"common", "native", "none"
|
||||
};
|
||||
|
||||
@ -170,7 +170,7 @@ public final class JobAttributes implements Cloneable {
|
||||
private static final int I_SEPARATE_DOCUMENTS_COLLATED_COPIES = 0;
|
||||
private static final int I_SEPARATE_DOCUMENTS_UNCOLLATED_COPIES = 1;
|
||||
|
||||
private static final String NAMES[] = {
|
||||
private static final String[] NAMES = {
|
||||
"separate-documents-collated-copies",
|
||||
"separate-documents-uncollated-copies"
|
||||
};
|
||||
@ -207,7 +207,7 @@ public final class JobAttributes implements Cloneable {
|
||||
private static final int I_TWO_SIDED_LONG_EDGE = 1;
|
||||
private static final int I_TWO_SIDED_SHORT_EDGE = 2;
|
||||
|
||||
private static final String NAMES[] = {
|
||||
private static final String[] NAMES = {
|
||||
"one-sided", "two-sided-long-edge", "two-sided-short-edge"
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -152,7 +152,7 @@ public class List extends Component implements ItemSelectable, Accessible {
|
||||
* @see #getSelectedIndexes()
|
||||
* @see #getSelectedIndex()
|
||||
*/
|
||||
int selected[] = new int[0];
|
||||
int[] selected = new int[0];
|
||||
|
||||
/**
|
||||
* This variable contains the value that will be used
|
||||
@ -321,7 +321,7 @@ public class List extends Component implements ItemSelectable, Accessible {
|
||||
* @since 1.1
|
||||
*/
|
||||
public synchronized String[] getItems() {
|
||||
String itemCopies[] = new String[items.size()];
|
||||
String[] itemCopies = new String[items.size()];
|
||||
items.copyInto(itemCopies);
|
||||
return itemCopies;
|
||||
}
|
||||
@ -488,7 +488,7 @@ public class List extends Component implements ItemSelectable, Accessible {
|
||||
* @see #isIndexSelected
|
||||
*/
|
||||
public synchronized int getSelectedIndex() {
|
||||
int sel[] = getSelectedIndexes();
|
||||
int[] sel = getSelectedIndexes();
|
||||
return (sel.length == 1) ? sel[0] : -1;
|
||||
}
|
||||
|
||||
@ -534,8 +534,8 @@ public class List extends Component implements ItemSelectable, Accessible {
|
||||
* @see #isIndexSelected
|
||||
*/
|
||||
public synchronized String[] getSelectedItems() {
|
||||
int sel[] = getSelectedIndexes();
|
||||
String str[] = new String[sel.length];
|
||||
int[] sel = getSelectedIndexes();
|
||||
String[] str = new String[sel.length];
|
||||
for (int i = 0 ; i < sel.length ; i++) {
|
||||
str[i] = getItem(sel[i]);
|
||||
}
|
||||
@ -602,7 +602,7 @@ public class List extends Component implements ItemSelectable, Accessible {
|
||||
selected = new int[1];
|
||||
selected[0] = index;
|
||||
} else {
|
||||
int newsel[] = new int[selected.length + 1];
|
||||
int[] newsel = new int[selected.length + 1];
|
||||
System.arraycopy(selected, 0, newsel, 0,
|
||||
selected.length);
|
||||
newsel[selected.length] = index;
|
||||
@ -636,7 +636,7 @@ public class List extends Component implements ItemSelectable, Accessible {
|
||||
|
||||
for (int i = 0 ; i < selected.length ; i++) {
|
||||
if (selected[i] == index) {
|
||||
int newsel[] = new int[selected.length - 1];
|
||||
int[] newsel = new int[selected.length - 1];
|
||||
System.arraycopy(selected, 0, newsel, 0, i);
|
||||
System.arraycopy(selected, i+1, newsel, i, selected.length - (i+1));
|
||||
selected = newsel;
|
||||
@ -669,7 +669,7 @@ public class List extends Component implements ItemSelectable, Accessible {
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isSelected(int index) {
|
||||
int sel[] = getSelectedIndexes();
|
||||
int[] sel = getSelectedIndexes();
|
||||
for (int i = 0 ; i < sel.length ; i++) {
|
||||
if (sel[i] == index) {
|
||||
return true;
|
||||
@ -1493,7 +1493,7 @@ public class List extends Component implements ItemSelectable, Accessible {
|
||||
*/
|
||||
public void clearAccessibleSelection() {
|
||||
synchronized(List.this) {
|
||||
int selectedIndexes[] = List.this.getSelectedIndexes();
|
||||
int[] selectedIndexes = List.this.getSelectedIndexes();
|
||||
if (selectedIndexes == null)
|
||||
return;
|
||||
for (int i = selectedIndexes.length - 1; i >= 0; i--) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -369,7 +369,7 @@ public class MediaTracker implements java.io.Serializable {
|
||||
if (numerrors == 0) {
|
||||
return null;
|
||||
}
|
||||
Object errors[] = new Object[numerrors];
|
||||
Object[] errors = new Object[numerrors];
|
||||
cur = head;
|
||||
numerrors = 0;
|
||||
while (cur != null) {
|
||||
@ -598,7 +598,7 @@ public class MediaTracker implements java.io.Serializable {
|
||||
if (numerrors == 0) {
|
||||
return null;
|
||||
}
|
||||
Object errors[] = new Object[numerrors];
|
||||
Object[] errors = new Object[numerrors];
|
||||
cur = head;
|
||||
numerrors = 0;
|
||||
while (cur != null) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -118,8 +118,8 @@ abstract class MultipleGradientPaintContext implements PaintContext {
|
||||
private int transparencyTest;
|
||||
|
||||
/** Color space conversion lookup tables. */
|
||||
private static final int SRGBtoLinearRGB[] = new int[256];
|
||||
private static final int LinearRGBtoSRGB[] = new int[256];
|
||||
private static final int[] SRGBtoLinearRGB = new int[256];
|
||||
private static final int[] LinearRGBtoSRGB = new int[256];
|
||||
|
||||
static {
|
||||
// build the tables
|
||||
@ -187,7 +187,7 @@ abstract class MultipleGradientPaintContext implements PaintContext {
|
||||
// (incorrect) results than to throw an exception and/or no-op
|
||||
tInv = new AffineTransform();
|
||||
}
|
||||
double m[] = new double[6];
|
||||
double[] m = new double[6];
|
||||
tInv.getMatrix(m);
|
||||
a00 = (float)m[0];
|
||||
a10 = (float)m[1];
|
||||
@ -651,7 +651,7 @@ abstract class MultipleGradientPaintContext implements PaintContext {
|
||||
return raster;
|
||||
}
|
||||
|
||||
protected abstract void fillRaster(int pixels[], int off, int adjust,
|
||||
protected abstract void fillRaster(int[] pixels, int off, int adjust,
|
||||
int x, int y, int w, int h);
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -67,7 +67,7 @@ public final class PageAttributes implements Cloneable {
|
||||
private static final int I_COLOR = 0;
|
||||
private static final int I_MONOCHROME = 1;
|
||||
|
||||
private static final String NAMES[] = {
|
||||
private static final String[] NAMES = {
|
||||
"color", "monochrome"
|
||||
};
|
||||
|
||||
@ -167,7 +167,7 @@ public final class PageAttributes implements Cloneable {
|
||||
private static final int I_MONARCH_ENVELOPE = 73;
|
||||
private static final int I_PERSONAL_ENVELOPE = 74;
|
||||
|
||||
private static final String NAMES[] = {
|
||||
private static final String[] NAMES = {
|
||||
"iso-4a0", "iso-2a0", "iso-a0", "iso-a1", "iso-a2", "iso-a3",
|
||||
"iso-a4", "iso-a5", "iso-a6", "iso-a7", "iso-a8", "iso-a9",
|
||||
"iso-a10", "iso-b0", "iso-b1", "iso-b2", "iso-b3", "iso-b4",
|
||||
@ -812,7 +812,7 @@ public final class PageAttributes implements Cloneable {
|
||||
private static final int I_PORTRAIT = 0;
|
||||
private static final int I_LANDSCAPE = 1;
|
||||
|
||||
private static final String NAMES[] = {
|
||||
private static final String[] NAMES = {
|
||||
"portrait", "landscape"
|
||||
};
|
||||
|
||||
@ -842,7 +842,7 @@ public final class PageAttributes implements Cloneable {
|
||||
private static final int I_PHYSICAL = 0;
|
||||
private static final int I_PRINTABLE = 1;
|
||||
|
||||
private static final String NAMES[] = {
|
||||
private static final String[] NAMES = {
|
||||
"physical", "printable"
|
||||
};
|
||||
|
||||
@ -870,7 +870,7 @@ public final class PageAttributes implements Cloneable {
|
||||
private static final int I_NORMAL = 1;
|
||||
private static final int I_DRAFT = 2;
|
||||
|
||||
private static final String NAMES[] = {
|
||||
private static final String[] NAMES = {
|
||||
"high", "normal", "draft"
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -82,7 +82,7 @@ public class Polygon implements Shape, java.io.Serializable {
|
||||
* @see #addPoint(int, int)
|
||||
* @since 1.0
|
||||
*/
|
||||
public int xpoints[];
|
||||
public int[] xpoints;
|
||||
|
||||
/**
|
||||
* The array of Y coordinates. The number of elements in
|
||||
@ -96,7 +96,7 @@ public class Polygon implements Shape, java.io.Serializable {
|
||||
* @see #addPoint(int, int)
|
||||
* @since 1.0
|
||||
*/
|
||||
public int ypoints[];
|
||||
public int[] ypoints;
|
||||
|
||||
/**
|
||||
* The bounds of this {@code Polygon}.
|
||||
@ -144,7 +144,7 @@ public class Polygon implements Shape, java.io.Serializable {
|
||||
* {@code ypoints} is {@code null}.
|
||||
* @since 1.0
|
||||
*/
|
||||
public Polygon(int xpoints[], int ypoints[], int npoints) {
|
||||
public Polygon(int[] xpoints, int[] ypoints, int npoints) {
|
||||
// Fix 4489009: should throw IndexOutOfBoundsException instead
|
||||
// of OutOfMemoryError if npoints is huge and > {x,y}points.length
|
||||
if (npoints > xpoints.length || npoints > ypoints.length) {
|
||||
@ -226,7 +226,7 @@ public class Polygon implements Shape, java.io.Serializable {
|
||||
* @param ypoints[] array of <i>y</i> coordinates
|
||||
* @param npoints the total number of points
|
||||
*/
|
||||
void calculateBounds(int xpoints[], int ypoints[], int npoints) {
|
||||
void calculateBounds(int[] xpoints, int[] ypoints, int npoints) {
|
||||
int boundsMinX = Integer.MAX_VALUE;
|
||||
int boundsMinY = Integer.MAX_VALUE;
|
||||
int boundsMaxX = Integer.MIN_VALUE;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -170,7 +170,7 @@ final class RadialGradientPaintContext extends MultipleGradientPaintContext {
|
||||
* @param x,y,w,h the area in device space for which colors are
|
||||
* generated.
|
||||
*/
|
||||
protected void fillRaster(int pixels[], int off, int adjust,
|
||||
protected void fillRaster(int[] pixels, int off, int adjust,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
if (isSimpleFocus && isNonCyclic && isSimpleLookup) {
|
||||
@ -185,7 +185,7 @@ final class RadialGradientPaintContext extends MultipleGradientPaintContext {
|
||||
* point, the gradient is noncyclic, and the gradient lookup method is
|
||||
* fast (single array index, no conversion necessary).
|
||||
*/
|
||||
private void simpleNonCyclicFillRaster(int pixels[], int off, int adjust,
|
||||
private void simpleNonCyclicFillRaster(int[] pixels, int off, int adjust,
|
||||
int x, int y, int w, int h)
|
||||
{
|
||||
/* We calculate sqrt(X^2 + Y^2) relative to the radius
|
||||
@ -301,7 +301,7 @@ final class RadialGradientPaintContext extends MultipleGradientPaintContext {
|
||||
|
||||
// SQRT_LUT_SIZE must be a power of 2 for the test above to work.
|
||||
private static final int SQRT_LUT_SIZE = (1 << 11);
|
||||
private static float sqrtLut[] = new float[SQRT_LUT_SIZE+1];
|
||||
private static float[] sqrtLut = new float[SQRT_LUT_SIZE+1];
|
||||
static {
|
||||
for (int i = 0; i < sqrtLut.length; i++) {
|
||||
sqrtLut[i] = (float) Math.sqrt(i / ((float) SQRT_LUT_SIZE));
|
||||
@ -327,7 +327,7 @@ final class RadialGradientPaintContext extends MultipleGradientPaintContext {
|
||||
* formula produces the following set of equations. Constant factors have
|
||||
* been extracted out of the inner loop.
|
||||
*/
|
||||
private void cyclicCircularGradientFillRaster(int pixels[], int off,
|
||||
private void cyclicCircularGradientFillRaster(int[] pixels, int off,
|
||||
int adjust,
|
||||
int x, int y,
|
||||
int w, int h)
|
||||
|
@ -511,7 +511,7 @@ public class Robot {
|
||||
AffineTransform tx = gc.getDefaultTransform();
|
||||
double uiScaleX = tx.getScaleX();
|
||||
double uiScaleY = tx.getScaleY();
|
||||
int pixels[];
|
||||
int[] pixels;
|
||||
|
||||
if (uiScaleX == 1 && uiScaleY == 1) {
|
||||
|
||||
@ -537,7 +537,7 @@ public class Robot {
|
||||
int sY = (int) Math.floor(screenRect.y * uiScaleY);
|
||||
int sWidth = (int) Math.ceil(screenRect.width * uiScaleX);
|
||||
int sHeight = (int) Math.ceil(screenRect.height * uiScaleY);
|
||||
int temppixels[];
|
||||
int[] temppixels;
|
||||
Rectangle scaledRect = new Rectangle(sX, sY, sWidth, sHeight);
|
||||
temppixels = peer.getRGBPixels(scaledRect);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -431,7 +431,7 @@ public final class SystemColor extends Color implements java.io.Serializable {
|
||||
*/
|
||||
private transient int index;
|
||||
|
||||
private static SystemColor systemColorObjects [] = {
|
||||
private static SystemColor[] systemColorObjects = {
|
||||
SystemColor.desktop,
|
||||
SystemColor.activeCaption,
|
||||
SystemColor.activeCaptionText,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -335,7 +335,7 @@ abstract class TexturePaintContext implements PaintContext {
|
||||
* pixels to blend, when the error values reach 1.0 we move to the
|
||||
* next pixel and reset them to 0.0.
|
||||
*/
|
||||
public static int blend(int rgbs[], int xmul, int ymul) {
|
||||
public static int blend(int[] rgbs, int xmul, int ymul) {
|
||||
// xmul/ymul are 31 bits wide, (0 => 2^31-1)
|
||||
// shift them to 12 bits wide, (0 => 2^12-1)
|
||||
xmul = (xmul >>> 19);
|
||||
@ -372,10 +372,10 @@ abstract class TexturePaintContext implements PaintContext {
|
||||
|
||||
static class Int extends TexturePaintContext {
|
||||
IntegerInterleavedRaster srcRas;
|
||||
int inData[];
|
||||
int[] inData;
|
||||
int inOff;
|
||||
int inSpan;
|
||||
int outData[];
|
||||
int[] outData;
|
||||
int outOff;
|
||||
int outSpan;
|
||||
boolean filter;
|
||||
@ -422,7 +422,7 @@ abstract class TexturePaintContext implements PaintContext {
|
||||
if (normalx) {
|
||||
outSpan -= w;
|
||||
}
|
||||
int rgbs[] = filter ? new int[4] : null;
|
||||
int[] rgbs = filter ? new int[4] : null;
|
||||
for (int j = 0; j < h; j++) {
|
||||
if (normalx) {
|
||||
int in = inOff + rowy * inSpan + bWidth;
|
||||
@ -508,10 +508,10 @@ abstract class TexturePaintContext implements PaintContext {
|
||||
|
||||
static class Byte extends TexturePaintContext {
|
||||
ByteInterleavedRaster srcRas;
|
||||
byte inData[];
|
||||
byte[] inData;
|
||||
int inOff;
|
||||
int inSpan;
|
||||
byte outData[];
|
||||
byte[] outData;
|
||||
int outOff;
|
||||
int outSpan;
|
||||
|
||||
@ -628,11 +628,11 @@ abstract class TexturePaintContext implements PaintContext {
|
||||
|
||||
static class ByteFilter extends TexturePaintContext {
|
||||
ByteInterleavedRaster srcRas;
|
||||
int inPalette[];
|
||||
byte inData[];
|
||||
int[] inPalette;
|
||||
byte[] inData;
|
||||
int inOff;
|
||||
int inSpan;
|
||||
int outData[];
|
||||
int[] outData;
|
||||
int outOff;
|
||||
int outSpan;
|
||||
|
||||
@ -677,7 +677,7 @@ abstract class TexturePaintContext implements PaintContext {
|
||||
int rowy = y;
|
||||
int rowxerr = xerr;
|
||||
int rowyerr = yerr;
|
||||
int rgbs[] = new int[4];
|
||||
int[] rgbs = new int[4];
|
||||
for (int j = 0; j < h; j++) {
|
||||
x = rowx;
|
||||
y = rowy;
|
||||
@ -764,7 +764,7 @@ abstract class TexturePaintContext implements PaintContext {
|
||||
int rowyerr = yerr;
|
||||
WritableRaster srcRas = this.srcRas;
|
||||
WritableRaster outRas = this.outRas;
|
||||
int rgbs[] = filter ? new int[4] : null;
|
||||
int[] rgbs = filter ? new int[4] : null;
|
||||
for (int j = 0; j < h; j++) {
|
||||
x = rowx;
|
||||
y = rowy;
|
||||
|
@ -1477,7 +1477,7 @@ public class Window extends Container implements Accessible {
|
||||
return getOwnedWindows_NoClientCode();
|
||||
}
|
||||
final Window[] getOwnedWindows_NoClientCode() {
|
||||
Window realCopy[];
|
||||
Window[] realCopy;
|
||||
|
||||
synchronized(ownedWindowList) {
|
||||
// Recall that ownedWindowList is actually a Vector of
|
||||
@ -1487,7 +1487,7 @@ public class Window extends Container implements Accessible {
|
||||
// all non-null get()s (realCopy with size realSize).
|
||||
int fullSize = ownedWindowList.size();
|
||||
int realSize = 0;
|
||||
Window fullCopy[] = new Window[fullSize];
|
||||
Window[] fullCopy = new Window[fullSize];
|
||||
|
||||
for (int i = 0; i < fullSize; i++) {
|
||||
fullCopy[realSize] = ownedWindowList.elementAt(i).get();
|
||||
@ -1555,14 +1555,14 @@ public class Window extends Container implements Accessible {
|
||||
|
||||
private static Window[] getWindows(AppContext appContext) {
|
||||
synchronized (Window.class) {
|
||||
Window realCopy[];
|
||||
Window[] realCopy;
|
||||
@SuppressWarnings("unchecked")
|
||||
Vector<WeakReference<Window>> windowList =
|
||||
(Vector<WeakReference<Window>>)appContext.get(Window.class);
|
||||
if (windowList != null) {
|
||||
int fullSize = windowList.size();
|
||||
int realSize = 0;
|
||||
Window fullCopy[] = new Window[fullSize];
|
||||
Window[] fullCopy = new Window[fullSize];
|
||||
for (int i = 0; i < fullSize; i++) {
|
||||
Window w = windowList.get(i).get();
|
||||
if (w != null) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -186,7 +186,7 @@ public class ICC_ColorSpace extends ColorSpace {
|
||||
}
|
||||
|
||||
int nc = this.getNumComponents();
|
||||
short tmp[] = new short[nc];
|
||||
short[] tmp = new short[nc];
|
||||
for (int i = 0; i < nc; i++) {
|
||||
tmp[i] = (short)
|
||||
((colorvalue[i] - minVal[i]) * invDiffMinMax[i] + 0.5f);
|
||||
@ -237,7 +237,7 @@ public class ICC_ColorSpace extends ColorSpace {
|
||||
}
|
||||
}
|
||||
|
||||
short tmp[] = new short[3];
|
||||
short[] tmp = new short[3];
|
||||
for (int i = 0; i < 3; i++) {
|
||||
tmp[i] = (short) ((rgbvalue[i] * 65535.0f) + 0.5f);
|
||||
}
|
||||
@ -379,7 +379,7 @@ public class ICC_ColorSpace extends ColorSpace {
|
||||
}
|
||||
|
||||
int nc = this.getNumComponents();
|
||||
short tmp[] = new short[nc];
|
||||
short[] tmp = new short[nc];
|
||||
for (int i = 0; i < nc; i++) {
|
||||
tmp[i] = (short)
|
||||
((colorvalue[i] - minVal[i]) * invDiffMinMax[i] + 0.5f);
|
||||
@ -522,7 +522,7 @@ public class ICC_ColorSpace extends ColorSpace {
|
||||
}
|
||||
}
|
||||
|
||||
short tmp[] = new short[3];
|
||||
short[] tmp = new short[3];
|
||||
float ALMOST_TWO = 1.0f + (32767.0f / 32768.0f);
|
||||
float factor = 65535.0f / ALMOST_TWO;
|
||||
// For CIEXYZ, min = 0.0, max = ALMOST_TWO for all components
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1016,7 +1016,7 @@ public class ICC_Profile implements Serializable {
|
||||
* contain valid ICC Profile data.
|
||||
*/
|
||||
public static ICC_Profile getInstance(InputStream s) throws IOException {
|
||||
byte profileData[];
|
||||
byte[] profileData;
|
||||
|
||||
if (s instanceof ProfileDeferralInfo) {
|
||||
/* hack to detect profiles whose loading can be deferred */
|
||||
@ -1032,10 +1032,10 @@ public class ICC_Profile implements Serializable {
|
||||
|
||||
|
||||
static byte[] getProfileDataFromStream(InputStream s) throws IOException {
|
||||
byte profileData[];
|
||||
byte[] profileData;
|
||||
int profileSize;
|
||||
|
||||
byte header[] = new byte[128];
|
||||
byte[] header = new byte[128];
|
||||
int bytestoread = 128;
|
||||
int bytesread = 0;
|
||||
int n;
|
||||
@ -1098,7 +1098,7 @@ public class ICC_Profile implements Serializable {
|
||||
|
||||
|
||||
void activateDeferredProfile() throws ProfileDataException {
|
||||
byte profileData[];
|
||||
byte[] profileData;
|
||||
final String fileName = deferralInfo.filename;
|
||||
|
||||
profileActivator = null;
|
||||
@ -1286,7 +1286,7 @@ public class ICC_Profile implements Serializable {
|
||||
*/
|
||||
public void write(String fileName) throws IOException {
|
||||
FileOutputStream outputFile;
|
||||
byte profileData[];
|
||||
byte[] profileData;
|
||||
|
||||
profileData = getData(); /* this will activate deferred
|
||||
profiles if necessary */
|
||||
@ -1305,7 +1305,7 @@ public class ICC_Profile implements Serializable {
|
||||
* stream.
|
||||
*/
|
||||
public void write(OutputStream s) throws IOException {
|
||||
byte profileData[];
|
||||
byte[] profileData;
|
||||
|
||||
profileData = getData(); /* this will activate deferred
|
||||
profiles if necessary */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1293,7 +1293,7 @@ final class TextLine {
|
||||
/*
|
||||
* The new version requires that chunks be at the same level.
|
||||
*/
|
||||
private static int firstVisualChunk(int order[], byte direction[],
|
||||
private static int firstVisualChunk(int[] order, byte[] direction,
|
||||
int start, int limit)
|
||||
{
|
||||
if (order != null && direction != null) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1344,7 +1344,7 @@ public class AffineTransform implements Cloneable, java.io.Serializable {
|
||||
// Utility methods to optimize rotate methods.
|
||||
// These tables translate the flags during predictable quadrant
|
||||
// rotations where the shear and scale values are swapped and negated.
|
||||
private static final int rot90conversion[] = {
|
||||
private static final int[] rot90conversion = {
|
||||
/* IDENTITY => */ APPLY_SHEAR,
|
||||
/* TRANSLATE (TR) => */ APPLY_SHEAR | APPLY_TRANSLATE,
|
||||
/* SCALE (SC) => */ APPLY_SHEAR,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -144,7 +144,7 @@ public class Area implements Shape, Cloneable {
|
||||
// 0-2 horizontal splitting parameters
|
||||
// OR
|
||||
// 3 parametric equation derivative coefficients
|
||||
double coords[] = new double[23];
|
||||
double[] coords = new double[23];
|
||||
double movx = 0, movy = 0;
|
||||
double curx = 0, cury = 0;
|
||||
double newx, newy;
|
||||
@ -702,8 +702,8 @@ class AreaIterator implements PathIterator {
|
||||
}
|
||||
}
|
||||
|
||||
public int currentSegment(float coords[]) {
|
||||
double dcoords[] = new double[6];
|
||||
public int currentSegment(float[] coords) {
|
||||
double[] dcoords = new double[6];
|
||||
int segtype = currentSegment(dcoords);
|
||||
int numpoints = (segtype == SEG_CLOSE ? 0
|
||||
: (segtype == SEG_QUADTO ? 2
|
||||
@ -715,7 +715,7 @@ class AreaIterator implements PathIterator {
|
||||
return segtype;
|
||||
}
|
||||
|
||||
public int currentSegment(double coords[]) {
|
||||
public int currentSegment(double[] coords) {
|
||||
int segtype;
|
||||
int numpoints;
|
||||
if (prevcurve != null) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -860,7 +860,7 @@ public abstract class CubicCurve2D implements Shape, Cloneable {
|
||||
* the specified offset.
|
||||
* @since 1.2
|
||||
*/
|
||||
public static double getFlatnessSq(double coords[], int offset) {
|
||||
public static double getFlatnessSq(double[] coords, int offset) {
|
||||
return getFlatnessSq(coords[offset + 0], coords[offset + 1],
|
||||
coords[offset + 2], coords[offset + 3],
|
||||
coords[offset + 4], coords[offset + 5],
|
||||
@ -880,7 +880,7 @@ public abstract class CubicCurve2D implements Shape, Cloneable {
|
||||
* the specified offset.
|
||||
* @since 1.2
|
||||
*/
|
||||
public static double getFlatness(double coords[], int offset) {
|
||||
public static double getFlatness(double[] coords, int offset) {
|
||||
return getFlatness(coords[offset + 0], coords[offset + 1],
|
||||
coords[offset + 2], coords[offset + 3],
|
||||
coords[offset + 4], coords[offset + 5],
|
||||
@ -1000,9 +1000,9 @@ public abstract class CubicCurve2D implements Shape, Cloneable {
|
||||
* the 6 right coordinates
|
||||
* @since 1.2
|
||||
*/
|
||||
public static void subdivide(double src[], int srcoff,
|
||||
double left[], int leftoff,
|
||||
double right[], int rightoff) {
|
||||
public static void subdivide(double[] src, int srcoff,
|
||||
double[] left, int leftoff,
|
||||
double[] right, int rightoff) {
|
||||
double x1 = src[srcoff + 0];
|
||||
double y1 = src[srcoff + 1];
|
||||
double ctrlx1 = src[srcoff + 2];
|
||||
@ -1065,7 +1065,7 @@ public abstract class CubicCurve2D implements Shape, Cloneable {
|
||||
* @return the number of roots, or -1 if the equation is a constant.
|
||||
* @since 1.2
|
||||
*/
|
||||
public static int solveCubic(double eqn[]) {
|
||||
public static int solveCubic(double[] eqn) {
|
||||
return solveCubic(eqn, eqn);
|
||||
}
|
||||
|
||||
@ -1086,7 +1086,7 @@ public abstract class CubicCurve2D implements Shape, Cloneable {
|
||||
* @return the number of roots, or -1 if the equation is a constant
|
||||
* @since 1.3
|
||||
*/
|
||||
public static int solveCubic(double eqn[], double res[]) {
|
||||
public static int solveCubic(double[] eqn, double[] res) {
|
||||
// From Graphics Gems:
|
||||
// http://tog.acm.org/resources/GraphicsGems/gems/Roots3And4.c
|
||||
final double d = eqn[3];
|
||||
@ -1369,7 +1369,7 @@ public abstract class CubicCurve2D implements Shape, Cloneable {
|
||||
return (x1 < 0 && x2 > 0) || (x1 > 0 && x2 < 0);
|
||||
}
|
||||
|
||||
private static double solveEqn(double eqn[], int order, double t) {
|
||||
private static double solveEqn(double[] eqn, int order, double t) {
|
||||
double v = eqn[order];
|
||||
while (--order >= 0) {
|
||||
v = v * t + eqn[order];
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -86,7 +86,7 @@ class EllipseIterator implements PathIterator {
|
||||
*/
|
||||
private static final double pcv = 0.5 + CtrlVal * 0.5;
|
||||
private static final double ncv = 0.5 - CtrlVal * 0.5;
|
||||
private static double ctrlpts[][] = {
|
||||
private static double[][] ctrlpts = {
|
||||
{ 1.0, pcv, pcv, 1.0, 0.5, 1.0 },
|
||||
{ ncv, 1.0, 0.0, pcv, 0.0, 0.5 },
|
||||
{ 0.0, ncv, ncv, 0.0, 0.5, 0.0 },
|
||||
@ -119,7 +119,7 @@ class EllipseIterator implements PathIterator {
|
||||
return SEG_CLOSE;
|
||||
}
|
||||
if (index == 0) {
|
||||
double ctrls[] = ctrlpts[3];
|
||||
double[] ctrls = ctrlpts[3];
|
||||
coords[0] = (float) (x + ctrls[4] * w);
|
||||
coords[1] = (float) (y + ctrls[5] * h);
|
||||
if (affine != null) {
|
||||
@ -127,7 +127,7 @@ class EllipseIterator implements PathIterator {
|
||||
}
|
||||
return SEG_MOVETO;
|
||||
}
|
||||
double ctrls[] = ctrlpts[index - 1];
|
||||
double[] ctrls = ctrlpts[index - 1];
|
||||
coords[0] = (float) (x + ctrls[0] * w);
|
||||
coords[1] = (float) (y + ctrls[1] * h);
|
||||
coords[2] = (float) (x + ctrls[2] * w);
|
||||
@ -166,7 +166,7 @@ class EllipseIterator implements PathIterator {
|
||||
return SEG_CLOSE;
|
||||
}
|
||||
if (index == 0) {
|
||||
double ctrls[] = ctrlpts[3];
|
||||
double[] ctrls = ctrlpts[3];
|
||||
coords[0] = x + ctrls[4] * w;
|
||||
coords[1] = y + ctrls[5] * h;
|
||||
if (affine != null) {
|
||||
@ -174,7 +174,7 @@ class EllipseIterator implements PathIterator {
|
||||
}
|
||||
return SEG_MOVETO;
|
||||
}
|
||||
double ctrls[] = ctrlpts[index - 1];
|
||||
double[] ctrls = ctrlpts[index - 1];
|
||||
coords[0] = x + ctrls[0] * w;
|
||||
coords[1] = y + ctrls[1] * h;
|
||||
coords[2] = x + ctrls[2] * w;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -45,7 +45,7 @@ public class FlatteningPathIterator implements PathIterator {
|
||||
|
||||
int limit; // Maximum number of recursion levels
|
||||
|
||||
double hold[] = new double[14]; // The cache of interpolated coords
|
||||
double[] hold = new double[14]; // The cache of interpolated coords
|
||||
// Note that this must be long enough
|
||||
// to store a full cubic segment and
|
||||
// a relative cubic segment to avoid
|
||||
@ -71,7 +71,7 @@ public class FlatteningPathIterator implements PathIterator {
|
||||
// returned in the next call to
|
||||
// currentSegment().
|
||||
|
||||
int levels[]; // The recursion level at which
|
||||
int[] levels; // The recursion level at which
|
||||
// each curve being held in storage
|
||||
// was generated.
|
||||
|
||||
@ -175,7 +175,7 @@ public class FlatteningPathIterator implements PathIterator {
|
||||
if (holdIndex - want < 0) {
|
||||
int have = hold.length - holdIndex;
|
||||
int newsize = hold.length + GROW_SIZE;
|
||||
double newhold[] = new double[newsize];
|
||||
double[] newhold = new double[newsize];
|
||||
System.arraycopy(hold, holdIndex,
|
||||
newhold, holdIndex + GROW_SIZE,
|
||||
have);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -187,7 +187,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
* @since 1.6
|
||||
*/
|
||||
public static class Float extends Path2D implements Serializable {
|
||||
transient float floatCoords[];
|
||||
transient float[] floatCoords;
|
||||
|
||||
/**
|
||||
* Constructs a new empty single precision {@code Path2D} object
|
||||
@ -290,7 +290,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
@Override
|
||||
float[] cloneCoordsFloat(AffineTransform at) {
|
||||
// trim arrays:
|
||||
float ret[];
|
||||
float[] ret;
|
||||
if (at == null) {
|
||||
ret = Arrays.copyOf(floatCoords, numCoords);
|
||||
} else {
|
||||
@ -303,7 +303,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
@Override
|
||||
double[] cloneCoordsDouble(AffineTransform at) {
|
||||
// trim arrays:
|
||||
double ret[] = new double[numCoords];
|
||||
double[] ret = new double[numCoords];
|
||||
if (at == null) {
|
||||
for (int i = 0; i < numCoords; i++) {
|
||||
ret[i] = floatCoords[i];
|
||||
@ -555,7 +555,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
return 0;
|
||||
}
|
||||
double movx, movy, curx, cury, endx, endy;
|
||||
float coords[] = floatCoords;
|
||||
float[] coords = floatCoords;
|
||||
curx = movx = coords[0];
|
||||
cury = movy = coords[1];
|
||||
int crossings = 0;
|
||||
@ -634,7 +634,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
if (numTypes == 0) {
|
||||
return 0;
|
||||
}
|
||||
float coords[] = floatCoords;
|
||||
float[] coords = floatCoords;
|
||||
double curx, cury, movx, movy, endx, endy;
|
||||
curx = movx = coords[0];
|
||||
cury = movy = coords[1];
|
||||
@ -736,7 +736,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
* @since 1.6
|
||||
*/
|
||||
public final void append(PathIterator pi, boolean connect) {
|
||||
float coords[] = new float[6];
|
||||
float[] coords = new float[6];
|
||||
while (!pi.isDone()) {
|
||||
switch (pi.currentSegment(coords)) {
|
||||
case SEG_MOVETO:
|
||||
@ -1004,7 +1004,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
}
|
||||
|
||||
static class CopyIterator extends Path2D.Iterator {
|
||||
float floatCoords[];
|
||||
float[] floatCoords;
|
||||
|
||||
CopyIterator(Path2D.Float p2df) {
|
||||
super(p2df);
|
||||
@ -1034,7 +1034,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
}
|
||||
|
||||
static class TxIterator extends Path2D.Iterator {
|
||||
float floatCoords[];
|
||||
float[] floatCoords;
|
||||
AffineTransform affine;
|
||||
|
||||
TxIterator(Path2D.Float p2df, AffineTransform at) {
|
||||
@ -1073,7 +1073,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
* @since 1.6
|
||||
*/
|
||||
public static class Double extends Path2D implements Serializable {
|
||||
transient double doubleCoords[];
|
||||
transient double[] doubleCoords;
|
||||
|
||||
/**
|
||||
* Constructs a new empty double precision {@code Path2D} object
|
||||
@ -1176,7 +1176,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
@Override
|
||||
float[] cloneCoordsFloat(AffineTransform at) {
|
||||
// trim arrays:
|
||||
float ret[] = new float[numCoords];
|
||||
float[] ret = new float[numCoords];
|
||||
if (at == null) {
|
||||
for (int i = 0; i < numCoords; i++) {
|
||||
ret[i] = (float) doubleCoords[i];
|
||||
@ -1190,7 +1190,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
@Override
|
||||
double[] cloneCoordsDouble(AffineTransform at) {
|
||||
// trim arrays:
|
||||
double ret[];
|
||||
double[] ret;
|
||||
if (at == null) {
|
||||
ret = Arrays.copyOf(doubleCoords, numCoords);
|
||||
} else {
|
||||
@ -1330,7 +1330,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
return 0;
|
||||
}
|
||||
double movx, movy, curx, cury, endx, endy;
|
||||
double coords[] = doubleCoords;
|
||||
double[] coords = doubleCoords;
|
||||
curx = movx = coords[0];
|
||||
cury = movy = coords[1];
|
||||
int crossings = 0;
|
||||
@ -1409,7 +1409,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
if (numTypes == 0) {
|
||||
return 0;
|
||||
}
|
||||
double coords[] = doubleCoords;
|
||||
double[] coords = doubleCoords;
|
||||
double curx, cury, movx, movy, endx, endy;
|
||||
curx = movx = coords[0];
|
||||
cury = movy = coords[1];
|
||||
@ -1512,7 +1512,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
* @since 1.6
|
||||
*/
|
||||
public final void append(PathIterator pi, boolean connect) {
|
||||
double coords[] = new double[6];
|
||||
double[] coords = new double[6];
|
||||
while (!pi.isDone()) {
|
||||
switch (pi.currentSegment(coords)) {
|
||||
case SEG_MOVETO:
|
||||
@ -1779,7 +1779,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
}
|
||||
|
||||
static class CopyIterator extends Path2D.Iterator {
|
||||
double doubleCoords[];
|
||||
double[] doubleCoords;
|
||||
|
||||
CopyIterator(Path2D.Double p2dd) {
|
||||
super(p2dd);
|
||||
@ -1809,7 +1809,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
}
|
||||
|
||||
static class TxIterator extends Path2D.Iterator {
|
||||
double doubleCoords[];
|
||||
double[] doubleCoords;
|
||||
AffineTransform affine;
|
||||
|
||||
TxIterator(Path2D.Double p2dd, AffineTransform at) {
|
||||
@ -2537,8 +2537,8 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
{
|
||||
s.defaultWriteObject();
|
||||
|
||||
float fCoords[];
|
||||
double dCoords[];
|
||||
float[] fCoords;
|
||||
double[] dCoords;
|
||||
|
||||
if (isdbl) {
|
||||
dCoords = ((Path2D.Double) this).doubleCoords;
|
||||
@ -2726,7 +2726,7 @@ public abstract class Path2D implements Shape, Cloneable {
|
||||
int pointIdx;
|
||||
Path2D path;
|
||||
|
||||
static final int curvecoords[] = {2, 2, 4, 6, 0};
|
||||
static final int[] curvecoords = {2, 2, 4, 6, 0};
|
||||
|
||||
Iterator(Path2D path) {
|
||||
this.path = path;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -664,7 +664,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable {
|
||||
* values in the specified array at the specified index.
|
||||
* @since 1.2
|
||||
*/
|
||||
public static double getFlatnessSq(double coords[], int offset) {
|
||||
public static double getFlatnessSq(double[] coords, int offset) {
|
||||
return Line2D.ptSegDistSq(coords[offset + 0], coords[offset + 1],
|
||||
coords[offset + 4], coords[offset + 5],
|
||||
coords[offset + 2], coords[offset + 3]);
|
||||
@ -682,7 +682,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable {
|
||||
* specified array at the specified offset.
|
||||
* @since 1.2
|
||||
*/
|
||||
public static double getFlatness(double coords[], int offset) {
|
||||
public static double getFlatness(double[] coords, int offset) {
|
||||
return Line2D.ptSegDist(coords[offset + 0], coords[offset + 1],
|
||||
coords[offset + 4], coords[offset + 5],
|
||||
coords[offset + 2], coords[offset + 3]);
|
||||
@ -797,9 +797,9 @@ public abstract class QuadCurve2D implements Shape, Cloneable {
|
||||
* the 6 right coordinates
|
||||
* @since 1.2
|
||||
*/
|
||||
public static void subdivide(double src[], int srcoff,
|
||||
double left[], int leftoff,
|
||||
double right[], int rightoff) {
|
||||
public static void subdivide(double[] src, int srcoff,
|
||||
double[] left, int leftoff,
|
||||
double[] right, int rightoff) {
|
||||
double x1 = src[srcoff + 0];
|
||||
double y1 = src[srcoff + 1];
|
||||
double ctrlx = src[srcoff + 2];
|
||||
@ -851,7 +851,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable {
|
||||
* a constant
|
||||
* @since 1.2
|
||||
*/
|
||||
public static int solveQuadratic(double eqn[]) {
|
||||
public static int solveQuadratic(double[] eqn) {
|
||||
return solveQuadratic(eqn, eqn);
|
||||
}
|
||||
|
||||
@ -875,7 +875,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable {
|
||||
* a constant.
|
||||
* @since 1.3
|
||||
*/
|
||||
public static int solveQuadratic(double eqn[], double res[]) {
|
||||
public static int solveQuadratic(double[] eqn, double[] res) {
|
||||
double a = eqn[2];
|
||||
double b = eqn[1];
|
||||
double c = eqn[0];
|
||||
@ -1036,7 +1036,7 @@ public abstract class QuadCurve2D implements Shape, Cloneable {
|
||||
* B = 2*CP - 2*C1
|
||||
* A = C1 - 2*CP + C2
|
||||
*/
|
||||
private static void fillEqn(double eqn[], double val,
|
||||
private static void fillEqn(double[] eqn, double val,
|
||||
double c1, double cp, double c2) {
|
||||
eqn[0] = c1 - val;
|
||||
eqn[1] = cp + cp - c1 - c1;
|
||||
@ -1053,10 +1053,10 @@ public abstract class QuadCurve2D implements Shape, Cloneable {
|
||||
* then any points which represent a point of inflection for that
|
||||
* quadratic equation are also ignored.
|
||||
*/
|
||||
private static int evalQuadratic(double vals[], int num,
|
||||
private static int evalQuadratic(double[] vals, int num,
|
||||
boolean include0,
|
||||
boolean include1,
|
||||
double inflect[],
|
||||
double[] inflect,
|
||||
double c1, double ctrl, double c2) {
|
||||
int j = 0;
|
||||
for (int i = 0; i < num; i++) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -90,7 +90,7 @@ class RoundRectIterator implements PathIterator {
|
||||
// 4 values for each point {v0, v1, v2, v3}:
|
||||
// point = (x + v0 * w + v1 * arcWidth,
|
||||
// y + v2 * h + v3 * arcHeight);
|
||||
private static double ctrlpts[][] = {
|
||||
private static double[][] ctrlpts = {
|
||||
{ 0.0, 0.0, 0.0, 0.5 },
|
||||
{ 0.0, 0.0, 1.0, -0.5 },
|
||||
{ 0.0, 0.0, 1.0, -acv,
|
||||
@ -110,7 +110,7 @@ class RoundRectIterator implements PathIterator {
|
||||
0.0, 0.0, 0.0, 0.5 },
|
||||
{},
|
||||
};
|
||||
private static int types[] = {
|
||||
private static int[] types = {
|
||||
SEG_MOVETO,
|
||||
SEG_LINETO, SEG_CUBICTO,
|
||||
SEG_LINETO, SEG_CUBICTO,
|
||||
@ -141,7 +141,7 @@ class RoundRectIterator implements PathIterator {
|
||||
if (isDone()) {
|
||||
throw new NoSuchElementException("roundrect iterator out of bounds");
|
||||
}
|
||||
double ctrls[] = ctrlpts[index];
|
||||
double[] ctrls = ctrlpts[index];
|
||||
int nc = 0;
|
||||
for (int i = 0; i < ctrls.length; i += 4) {
|
||||
coords[nc++] = (float) (x + ctrls[i + 0] * w + ctrls[i + 1] * aw);
|
||||
@ -175,7 +175,7 @@ class RoundRectIterator implements PathIterator {
|
||||
if (isDone()) {
|
||||
throw new NoSuchElementException("roundrect iterator out of bounds");
|
||||
}
|
||||
double ctrls[] = ctrlpts[index];
|
||||
double[] ctrls = ctrlpts[index];
|
||||
int nc = 0;
|
||||
for (int i = 0; i < ctrls.length; i += 4) {
|
||||
coords[nc++] = (x + ctrls[i + 0] * w + ctrls[i + 1] * aw);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2002, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -63,7 +63,7 @@ public class AreaAveragingScaleFilter extends ReplicateScaleFilter {
|
||||
| COMPLETESCANLINES);
|
||||
|
||||
private boolean passthrough;
|
||||
private float reds[], greens[], blues[], alphas[];
|
||||
private float[] reds, greens, blues, alphas;
|
||||
private int savedy;
|
||||
private int savedyrem;
|
||||
|
||||
@ -208,7 +208,7 @@ public class AreaAveragingScaleFilter extends ReplicateScaleFilter {
|
||||
}
|
||||
}
|
||||
if ((dyrem -= amty) == 0) {
|
||||
int outpix[] = calcRow();
|
||||
int[] outpix = calcRow();
|
||||
do {
|
||||
consumer.setPixels(0, dy, destWidth, 1,
|
||||
rgbmodel, outpix, 0, destWidth);
|
||||
@ -244,7 +244,7 @@ public class AreaAveragingScaleFilter extends ReplicateScaleFilter {
|
||||
* @see ReplicateScaleFilter
|
||||
*/
|
||||
public void setPixels(int x, int y, int w, int h,
|
||||
ColorModel model, byte pixels[], int off,
|
||||
ColorModel model, byte[] pixels, int off,
|
||||
int scansize) {
|
||||
if (passthrough) {
|
||||
super.setPixels(x, y, w, h, model, pixels, off, scansize);
|
||||
@ -270,7 +270,7 @@ public class AreaAveragingScaleFilter extends ReplicateScaleFilter {
|
||||
* @see ReplicateScaleFilter
|
||||
*/
|
||||
public void setPixels(int x, int y, int w, int h,
|
||||
ColorModel model, int pixels[], int off,
|
||||
ColorModel model, int[] pixels, int off,
|
||||
int scansize) {
|
||||
if (passthrough) {
|
||||
super.setPixels(x, y, w, h, model, pixels, off, scansize);
|
||||
|
@ -106,8 +106,8 @@ public final class BandedSampleModel extends ComponentSampleModel
|
||||
public BandedSampleModel(int dataType,
|
||||
int w, int h,
|
||||
int scanlineStride,
|
||||
int bankIndices[],
|
||||
int bandOffsets[]) {
|
||||
int[] bankIndices,
|
||||
int[] bandOffsets) {
|
||||
|
||||
super(dataType, w, h, 1,scanlineStride, bankIndices, bandOffsets);
|
||||
}
|
||||
@ -157,13 +157,13 @@ public final class BandedSampleModel extends ComponentSampleModel
|
||||
* @throws IllegalArgumentException if {@code dataType} is not
|
||||
* one of the supported data types
|
||||
*/
|
||||
public SampleModel createSubsetSampleModel(int bands[]) {
|
||||
public SampleModel createSubsetSampleModel(int[] bands) {
|
||||
if (bands.length > bankIndices.length)
|
||||
throw new RasterFormatException("There are only " +
|
||||
bankIndices.length +
|
||||
" bands");
|
||||
int newBankIndices[] = new int[bands.length];
|
||||
int newBandOffsets[] = new int[bands.length];
|
||||
int[] newBankIndices = new int[bands.length];
|
||||
int[] newBandOffsets = new int[bands.length];
|
||||
|
||||
for (int i=0; i<bands.length; i++) {
|
||||
newBankIndices[i] = bankIndices[bands[i]];
|
||||
@ -396,7 +396,7 @@ public final class BandedSampleModel extends ComponentSampleModel
|
||||
* @return the samples for the specified pixel.
|
||||
* @see #setPixel(int, int, int[], DataBuffer)
|
||||
*/
|
||||
public int[] getPixel(int x, int y, int iArray[], DataBuffer data) {
|
||||
public int[] getPixel(int x, int y, int[] iArray, DataBuffer data) {
|
||||
if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {
|
||||
throw new ArrayIndexOutOfBoundsException
|
||||
("Coordinate out of bounds!");
|
||||
@ -433,7 +433,7 @@ public final class BandedSampleModel extends ComponentSampleModel
|
||||
* @see #setPixels(int, int, int, int, int[], DataBuffer)
|
||||
*/
|
||||
public int[] getPixels(int x, int y, int w, int h,
|
||||
int iArray[], DataBuffer data) {
|
||||
int[] iArray, DataBuffer data) {
|
||||
int x1 = x + w;
|
||||
int y1 = y + h;
|
||||
|
||||
@ -557,13 +557,13 @@ public final class BandedSampleModel extends ComponentSampleModel
|
||||
* @see #setSamples(int, int, int, int, int, int[], DataBuffer)
|
||||
*/
|
||||
public int[] getSamples(int x, int y, int w, int h, int b,
|
||||
int iArray[], DataBuffer data) {
|
||||
int[] iArray, DataBuffer data) {
|
||||
// Bounds check for 'b' will be performed automatically
|
||||
if ((x < 0) || (y < 0) || (x + w > width) || (y + h > height)) {
|
||||
throw new ArrayIndexOutOfBoundsException
|
||||
("Coordinate out of bounds!");
|
||||
}
|
||||
int samples[];
|
||||
int[] samples;
|
||||
if (iArray != null) {
|
||||
samples = iArray;
|
||||
} else {
|
||||
@ -694,7 +694,7 @@ public final class BandedSampleModel extends ComponentSampleModel
|
||||
* @param data The DataBuffer containing the image data
|
||||
* @see #getPixel(int, int, int[], DataBuffer)
|
||||
*/
|
||||
public void setPixel(int x, int y, int iArray[], DataBuffer data) {
|
||||
public void setPixel(int x, int y, int[] iArray, DataBuffer data) {
|
||||
if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {
|
||||
throw new ArrayIndexOutOfBoundsException
|
||||
("Coordinate out of bounds!");
|
||||
@ -720,7 +720,7 @@ public final class BandedSampleModel extends ComponentSampleModel
|
||||
* @see #getPixels(int, int, int, int, int[], DataBuffer)
|
||||
*/
|
||||
public void setPixels(int x, int y, int w, int h,
|
||||
int iArray[], DataBuffer data) {
|
||||
int[] iArray, DataBuffer data) {
|
||||
int x1 = x + w;
|
||||
int y1 = y + h;
|
||||
|
||||
@ -833,7 +833,7 @@ public final class BandedSampleModel extends ComponentSampleModel
|
||||
* @see #getSamples(int, int, int, int, int, int[], DataBuffer)
|
||||
*/
|
||||
public void setSamples(int x, int y, int w, int h, int b,
|
||||
int iArray[], DataBuffer data) {
|
||||
int[] iArray, DataBuffer data) {
|
||||
// Bounds check for 'b' will be performed automatically
|
||||
if ((x < 0) || (y < 0) || (x + w > width) || (y + h > height)) {
|
||||
throw new ArrayIndexOutOfBoundsException
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -127,7 +127,7 @@ public class BufferedImageFilter extends ImageFilter implements Cloneable {
|
||||
|
||||
private void convertToRGB() {
|
||||
int size = width * height;
|
||||
int newpixels[] = new int[size];
|
||||
int[] newpixels = new int[size];
|
||||
if (bytePixels != null) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
newpixels[i] = this.model.getRGB(bytePixels[i] & 0xff);
|
||||
@ -159,7 +159,7 @@ public class BufferedImageFilter extends ImageFilter implements Cloneable {
|
||||
int, int)
|
||||
*/
|
||||
public void setPixels(int x, int y, int w, int h,
|
||||
ColorModel model, byte pixels[], int off,
|
||||
ColorModel model, byte[] pixels, int off,
|
||||
int scansize) {
|
||||
// Fix 4184230
|
||||
if (w < 0 || h < 0) {
|
||||
@ -246,7 +246,7 @@ public class BufferedImageFilter extends ImageFilter implements Cloneable {
|
||||
int, int)
|
||||
*/
|
||||
public void setPixels(int x, int y, int w, int h,
|
||||
ColorModel model, int pixels[], int off,
|
||||
ColorModel model, int[] pixels, int off,
|
||||
int scansize) {
|
||||
// Fix 4184230
|
||||
if (w < 0 || h < 0) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -46,7 +46,7 @@ public class ByteLookupTable extends LookupTable {
|
||||
* Constants
|
||||
*/
|
||||
|
||||
byte data[][];
|
||||
byte[][] data;
|
||||
|
||||
/**
|
||||
* Constructs a ByteLookupTable object from an array of byte
|
||||
@ -63,7 +63,7 @@ public class ByteLookupTable extends LookupTable {
|
||||
* is less than 0 or if the length of {@code data}
|
||||
* is less than 1
|
||||
*/
|
||||
public ByteLookupTable(int offset, byte data[][]) {
|
||||
public ByteLookupTable(int offset, byte[][] data) {
|
||||
super(offset,data.length);
|
||||
numComponents = data.length;
|
||||
numEntries = data[0].length;
|
||||
@ -87,7 +87,7 @@ public class ByteLookupTable extends LookupTable {
|
||||
* is less than 0 or if the length of {@code data}
|
||||
* is less than 1
|
||||
*/
|
||||
public ByteLookupTable(int offset, byte data[]) {
|
||||
public ByteLookupTable(int offset, byte[] data) {
|
||||
super(offset,data.length);
|
||||
numComponents = 1;
|
||||
numEntries = data.length;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -160,7 +160,7 @@ public abstract class ColorModel implements Transparency{
|
||||
* The total number of bits in the pixel.
|
||||
*/
|
||||
protected int pixel_bits;
|
||||
int nBits[];
|
||||
int[] nBits;
|
||||
int transparency = Transparency.TRANSLUCENT;
|
||||
boolean supportsAlpha = true;
|
||||
boolean isAlphaPremultiplied = false;
|
||||
@ -645,17 +645,17 @@ public abstract class ColorModel implements Transparency{
|
||||
int pixel=0,length=0;
|
||||
switch (transferType) {
|
||||
case DataBuffer.TYPE_BYTE:
|
||||
byte bdata[] = (byte[])inData;
|
||||
byte[] bdata = (byte[])inData;
|
||||
pixel = bdata[0] & 0xff;
|
||||
length = bdata.length;
|
||||
break;
|
||||
case DataBuffer.TYPE_USHORT:
|
||||
short sdata[] = (short[])inData;
|
||||
short[] sdata = (short[])inData;
|
||||
pixel = sdata[0] & 0xffff;
|
||||
length = sdata.length;
|
||||
break;
|
||||
case DataBuffer.TYPE_INT:
|
||||
int idata[] = (int[])inData;
|
||||
int[] idata = (int[])inData;
|
||||
pixel = idata[0];
|
||||
length = idata.length;
|
||||
break;
|
||||
@ -712,17 +712,17 @@ public abstract class ColorModel implements Transparency{
|
||||
int pixel=0,length=0;
|
||||
switch (transferType) {
|
||||
case DataBuffer.TYPE_BYTE:
|
||||
byte bdata[] = (byte[])inData;
|
||||
byte[] bdata = (byte[])inData;
|
||||
pixel = bdata[0] & 0xff;
|
||||
length = bdata.length;
|
||||
break;
|
||||
case DataBuffer.TYPE_USHORT:
|
||||
short sdata[] = (short[])inData;
|
||||
short[] sdata = (short[])inData;
|
||||
pixel = sdata[0] & 0xffff;
|
||||
length = sdata.length;
|
||||
break;
|
||||
case DataBuffer.TYPE_INT:
|
||||
int idata[] = (int[])inData;
|
||||
int[] idata = (int[])inData;
|
||||
pixel = idata[0];
|
||||
length = idata.length;
|
||||
break;
|
||||
@ -779,17 +779,17 @@ public abstract class ColorModel implements Transparency{
|
||||
int pixel=0,length=0;
|
||||
switch (transferType) {
|
||||
case DataBuffer.TYPE_BYTE:
|
||||
byte bdata[] = (byte[])inData;
|
||||
byte[] bdata = (byte[])inData;
|
||||
pixel = bdata[0] & 0xff;
|
||||
length = bdata.length;
|
||||
break;
|
||||
case DataBuffer.TYPE_USHORT:
|
||||
short sdata[] = (short[])inData;
|
||||
short[] sdata = (short[])inData;
|
||||
pixel = sdata[0] & 0xffff;
|
||||
length = sdata.length;
|
||||
break;
|
||||
case DataBuffer.TYPE_INT:
|
||||
int idata[] = (int[])inData;
|
||||
int[] idata = (int[])inData;
|
||||
pixel = idata[0];
|
||||
length = idata.length;
|
||||
break;
|
||||
@ -842,17 +842,17 @@ public abstract class ColorModel implements Transparency{
|
||||
int pixel=0,length=0;
|
||||
switch (transferType) {
|
||||
case DataBuffer.TYPE_BYTE:
|
||||
byte bdata[] = (byte[])inData;
|
||||
byte[] bdata = (byte[])inData;
|
||||
pixel = bdata[0] & 0xff;
|
||||
length = bdata.length;
|
||||
break;
|
||||
case DataBuffer.TYPE_USHORT:
|
||||
short sdata[] = (short[])inData;
|
||||
short[] sdata = (short[])inData;
|
||||
pixel = sdata[0] & 0xffff;
|
||||
length = sdata.length;
|
||||
break;
|
||||
case DataBuffer.TYPE_INT:
|
||||
int idata[] = (int[])inData;
|
||||
int[] idata = (int[])inData;
|
||||
pixel = idata[0];
|
||||
length = idata.length;
|
||||
break;
|
||||
@ -1333,7 +1333,7 @@ public abstract class ColorModel implements Transparency{
|
||||
* @since 1.4
|
||||
*/
|
||||
public int getDataElement(float[] normComponents, int normOffset) {
|
||||
int components[] = getUnnormalizedComponents(normComponents,
|
||||
int[] components = getUnnormalizedComponents(normComponents,
|
||||
normOffset, null, 0);
|
||||
return getDataElement(components, 0);
|
||||
}
|
||||
@ -1381,7 +1381,7 @@ public abstract class ColorModel implements Transparency{
|
||||
*/
|
||||
public Object getDataElements(float[] normComponents, int normOffset,
|
||||
Object obj) {
|
||||
int components[] = getUnnormalizedComponents(normComponents,
|
||||
int[] components = getUnnormalizedComponents(normComponents,
|
||||
normOffset, null, 0);
|
||||
return getDataElements(components, 0, obj);
|
||||
}
|
||||
@ -1442,7 +1442,7 @@ public abstract class ColorModel implements Transparency{
|
||||
public float[] getNormalizedComponents(Object pixel,
|
||||
float[] normComponents,
|
||||
int normOffset) {
|
||||
int components[] = getComponents(pixel, null, 0);
|
||||
int[] components = getComponents(pixel, null, 0);
|
||||
return getNormalizedComponents(components, 0,
|
||||
normComponents, normOffset);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -802,7 +802,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
// Note: we do no clamping of the pixel data here - we
|
||||
// assume that the data is scaled properly
|
||||
case DataBuffer.TYPE_SHORT: {
|
||||
short sdata[] = (short[]) inData;
|
||||
short[] sdata = (short[]) inData;
|
||||
float scalefactor = (float) ((1 << precision) - 1);
|
||||
if (needAlpha) {
|
||||
short s = sdata[numColorComponents];
|
||||
@ -817,7 +817,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
}
|
||||
case DataBuffer.TYPE_FLOAT: {
|
||||
float fdata[] = (float[]) inData;
|
||||
float[] fdata = (float[]) inData;
|
||||
float scalefactor = (float) ((1 << precision) - 1);
|
||||
if (needAlpha) {
|
||||
float f = fdata[numColorComponents];
|
||||
@ -831,7 +831,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
}
|
||||
case DataBuffer.TYPE_DOUBLE: {
|
||||
double ddata[] = (double[]) inData;
|
||||
double[] ddata = (double[]) inData;
|
||||
double scalefactor = (double) ((1 << precision) - 1);
|
||||
if (needAlpha) {
|
||||
double d = ddata[numColorComponents];
|
||||
@ -845,7 +845,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
}
|
||||
case DataBuffer.TYPE_BYTE:
|
||||
byte bdata[] = (byte[])inData;
|
||||
byte[] bdata = (byte[])inData;
|
||||
comp = bdata[idx] & mask;
|
||||
precision = 8;
|
||||
if (needAlpha) {
|
||||
@ -853,14 +853,14 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
break;
|
||||
case DataBuffer.TYPE_USHORT:
|
||||
short usdata[] = (short[])inData;
|
||||
short[] usdata = (short[])inData;
|
||||
comp = usdata[idx] & mask;
|
||||
if (needAlpha) {
|
||||
alp = usdata[numColorComponents] & mask;
|
||||
}
|
||||
break;
|
||||
case DataBuffer.TYPE_INT:
|
||||
int idata[] = (int[])inData;
|
||||
int[] idata = (int[])inData;
|
||||
comp = idata[idx];
|
||||
if (needAlpha) {
|
||||
alp = idata[numColorComponents];
|
||||
@ -1054,27 +1054,27 @@ public class ComponentColorModel extends ColorModel {
|
||||
|
||||
switch (transferType) {
|
||||
case DataBuffer.TYPE_SHORT:
|
||||
short sdata[] = (short[])inData;
|
||||
short[] sdata = (short[])inData;
|
||||
alpha = (int) ((sdata[aIdx] / 32767.0f) * 255.0f + 0.5f);
|
||||
return alpha;
|
||||
case DataBuffer.TYPE_FLOAT:
|
||||
float fdata[] = (float[])inData;
|
||||
float[] fdata = (float[])inData;
|
||||
alpha = (int) (fdata[aIdx] * 255.0f + 0.5f);
|
||||
return alpha;
|
||||
case DataBuffer.TYPE_DOUBLE:
|
||||
double ddata[] = (double[])inData;
|
||||
double[] ddata = (double[])inData;
|
||||
alpha = (int) (ddata[aIdx] * 255.0 + 0.5);
|
||||
return alpha;
|
||||
case DataBuffer.TYPE_BYTE:
|
||||
byte bdata[] = (byte[])inData;
|
||||
byte[] bdata = (byte[])inData;
|
||||
alpha = bdata[aIdx] & mask;
|
||||
break;
|
||||
case DataBuffer.TYPE_USHORT:
|
||||
short usdata[] = (short[])inData;
|
||||
short[] usdata = (short[])inData;
|
||||
alpha = usdata[aIdx] & mask;
|
||||
break;
|
||||
case DataBuffer.TYPE_INT:
|
||||
int idata[] = (int[])inData;
|
||||
int[] idata = (int[])inData;
|
||||
alpha = idata[aIdx];
|
||||
break;
|
||||
default:
|
||||
@ -1201,7 +1201,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
switch(transferType) {
|
||||
case DataBuffer.TYPE_SHORT:
|
||||
{
|
||||
short sdata[];
|
||||
short[] sdata;
|
||||
if (pixel == null) {
|
||||
sdata = new short[numComponents];
|
||||
} else {
|
||||
@ -1264,7 +1264,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
sdata[0] = (short) (gray * factor + 0.5f);
|
||||
} else {
|
||||
factor = 1.0f / 255.0f;
|
||||
float norm[] = new float[3];
|
||||
float[] norm = new float[3];
|
||||
norm[0] = red * factor;
|
||||
norm[1] = grn * factor;
|
||||
norm[2] = blu * factor;
|
||||
@ -1300,7 +1300,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
case DataBuffer.TYPE_FLOAT:
|
||||
{
|
||||
float fdata[];
|
||||
float[] fdata;
|
||||
if (pixel == null) {
|
||||
fdata = new float[numComponents];
|
||||
} else {
|
||||
@ -1357,7 +1357,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
float norm[] = new float[3];
|
||||
float[] norm = new float[3];
|
||||
factor = 1.0f / 255.0f;
|
||||
norm[0] = red * factor;
|
||||
norm[1] = grn * factor;
|
||||
@ -1381,7 +1381,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
case DataBuffer.TYPE_DOUBLE:
|
||||
{
|
||||
double ddata[];
|
||||
double[] ddata;
|
||||
if (pixel == null) {
|
||||
ddata = new double[numComponents];
|
||||
} else {
|
||||
@ -1439,7 +1439,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
} else {
|
||||
float factor = 1.0f / 255.0f;
|
||||
float norm[] = new float[3];
|
||||
float[] norm = new float[3];
|
||||
norm[0] = red * factor;
|
||||
norm[1] = grn * factor;
|
||||
norm[2] = blu * factor;
|
||||
@ -1466,7 +1466,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
// Handle BYTE, USHORT, & INT here
|
||||
//REMIND: maybe more efficient not to use int array for
|
||||
//DataBuffer.TYPE_USHORT and DataBuffer.TYPE_INT
|
||||
int intpixel[];
|
||||
int[] intpixel;
|
||||
if (transferType == DataBuffer.TYPE_INT &&
|
||||
pixel != null) {
|
||||
intpixel = (int[])pixel;
|
||||
@ -1615,7 +1615,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
|
||||
switch (transferType) {
|
||||
case DataBuffer.TYPE_BYTE: {
|
||||
byte bdata[];
|
||||
byte[] bdata;
|
||||
if (pixel == null) {
|
||||
bdata = new byte[numComponents];
|
||||
} else {
|
||||
@ -1627,7 +1627,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
return bdata;
|
||||
}
|
||||
case DataBuffer.TYPE_USHORT:{
|
||||
short sdata[];
|
||||
short[] sdata;
|
||||
if (pixel == null) {
|
||||
sdata = new short[numComponents];
|
||||
} else {
|
||||
@ -1741,7 +1741,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
* enough to hold a pixel value for this ColorModel.
|
||||
*/
|
||||
public int[] getComponents(Object pixel, int[] components, int offset) {
|
||||
int intpixel[];
|
||||
int[] intpixel;
|
||||
if (needScaleInit) {
|
||||
initScale();
|
||||
}
|
||||
@ -2057,7 +2057,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
switch (transferType) {
|
||||
case DataBuffer.TYPE_BYTE:
|
||||
{
|
||||
byte bpixel[] = (byte[]) pixel;
|
||||
byte[] bpixel = (byte[]) pixel;
|
||||
return bpixel[0] & 0xff;
|
||||
}
|
||||
case DataBuffer.TYPE_USHORT:
|
||||
@ -2468,8 +2468,8 @@ public class ComponentColorModel extends ColorModel {
|
||||
if (isAlphaPremultiplied) {
|
||||
switch (transferType) {
|
||||
case DataBuffer.TYPE_BYTE: {
|
||||
byte pixel[] = null;
|
||||
byte zpixel[] = null;
|
||||
byte[] pixel = null;
|
||||
byte[] zpixel = null;
|
||||
float alphaScale = 1.0f / ((float) ((1<<nBits[aIdx]) - 1));
|
||||
for (int y = 0; y < h; y++, rY++) {
|
||||
rX = rminX;
|
||||
@ -2495,8 +2495,8 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
break;
|
||||
case DataBuffer.TYPE_USHORT: {
|
||||
short pixel[] = null;
|
||||
short zpixel[] = null;
|
||||
short[] pixel = null;
|
||||
short[] zpixel = null;
|
||||
float alphaScale = 1.0f / ((float) ((1<<nBits[aIdx]) - 1));
|
||||
for (int y = 0; y < h; y++, rY++) {
|
||||
rX = rminX;
|
||||
@ -2523,8 +2523,8 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
break;
|
||||
case DataBuffer.TYPE_INT: {
|
||||
int pixel[] = null;
|
||||
int zpixel[] = null;
|
||||
int[] pixel = null;
|
||||
int[] zpixel = null;
|
||||
float alphaScale = 1.0f / ((float) ((1<<nBits[aIdx]) - 1));
|
||||
for (int y = 0; y < h; y++, rY++) {
|
||||
rX = rminX;
|
||||
@ -2550,8 +2550,8 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
break;
|
||||
case DataBuffer.TYPE_SHORT: {
|
||||
short pixel[] = null;
|
||||
short zpixel[] = null;
|
||||
short[] pixel = null;
|
||||
short[] zpixel = null;
|
||||
float alphaScale = 1.0f / 32767.0f;
|
||||
for (int y = 0; y < h; y++, rY++) {
|
||||
rX = rminX;
|
||||
@ -2577,8 +2577,8 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
break;
|
||||
case DataBuffer.TYPE_FLOAT: {
|
||||
float pixel[] = null;
|
||||
float zpixel[] = null;
|
||||
float[] pixel = null;
|
||||
float[] zpixel = null;
|
||||
for (int y = 0; y < h; y++, rY++) {
|
||||
rX = rminX;
|
||||
for (int x = 0; x < w; x++, rX++) {
|
||||
@ -2602,8 +2602,8 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
break;
|
||||
case DataBuffer.TYPE_DOUBLE: {
|
||||
double pixel[] = null;
|
||||
double zpixel[] = null;
|
||||
double[] pixel = null;
|
||||
double[] zpixel = null;
|
||||
for (int y = 0; y < h; y++, rY++) {
|
||||
rX = rminX;
|
||||
for (int x = 0; x < w; x++, rX++) {
|
||||
@ -2635,7 +2635,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
// We are premultiplied and want to divide it out
|
||||
switch (transferType) {
|
||||
case DataBuffer.TYPE_BYTE: {
|
||||
byte pixel[] = null;
|
||||
byte[] pixel = null;
|
||||
float alphaScale = 1.0f / ((float) ((1<<nBits[aIdx]) - 1));
|
||||
for (int y = 0; y < h; y++, rY++) {
|
||||
rX = rminX;
|
||||
@ -2656,7 +2656,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
break;
|
||||
case DataBuffer.TYPE_USHORT: {
|
||||
short pixel[] = null;
|
||||
short[] pixel = null;
|
||||
float alphaScale = 1.0f / ((float) ((1<<nBits[aIdx]) - 1));
|
||||
for (int y = 0; y < h; y++, rY++) {
|
||||
rX = rminX;
|
||||
@ -2677,7 +2677,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
break;
|
||||
case DataBuffer.TYPE_INT: {
|
||||
int pixel[] = null;
|
||||
int[] pixel = null;
|
||||
float alphaScale = 1.0f / ((float) ((1<<nBits[aIdx]) - 1));
|
||||
for (int y = 0; y < h; y++, rY++) {
|
||||
rX = rminX;
|
||||
@ -2698,7 +2698,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
break;
|
||||
case DataBuffer.TYPE_SHORT: {
|
||||
short pixel[] = null;
|
||||
short[] pixel = null;
|
||||
float alphaScale = 1.0f / 32767.0f;
|
||||
for (int y = 0; y < h; y++, rY++) {
|
||||
rX = rminX;
|
||||
@ -2719,7 +2719,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
break;
|
||||
case DataBuffer.TYPE_FLOAT: {
|
||||
float pixel[] = null;
|
||||
float[] pixel = null;
|
||||
for (int y = 0; y < h; y++, rY++) {
|
||||
rX = rminX;
|
||||
for (int x = 0; x < w; x++, rX++) {
|
||||
@ -2738,7 +2738,7 @@ public class ComponentColorModel extends ColorModel {
|
||||
}
|
||||
break;
|
||||
case DataBuffer.TYPE_DOUBLE: {
|
||||
double pixel[] = null;
|
||||
double[] pixel = null;
|
||||
for (int y = 0; y < h; y++, rY++) {
|
||||
rX = rminX;
|
||||
for (int x = 0; x < w; x++, rX++) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -76,7 +76,7 @@ import java.util.Arrays;
|
||||
public class ComponentSampleModel extends SampleModel
|
||||
{
|
||||
/** Offsets for all bands in data array elements. */
|
||||
protected int bandOffsets[];
|
||||
protected int[] bandOffsets;
|
||||
|
||||
/** Index for each bank storing a band of image data. */
|
||||
protected int[] bankIndices;
|
||||
@ -136,7 +136,7 @@ public class ComponentSampleModel extends SampleModel
|
||||
int w, int h,
|
||||
int pixelStride,
|
||||
int scanlineStride,
|
||||
int bandOffsets[]) {
|
||||
int[] bandOffsets) {
|
||||
super(dataType, w, h, bandOffsets.length);
|
||||
this.dataType = dataType;
|
||||
this.pixelStride = pixelStride;
|
||||
@ -199,8 +199,8 @@ public class ComponentSampleModel extends SampleModel
|
||||
int w, int h,
|
||||
int pixelStride,
|
||||
int scanlineStride,
|
||||
int bankIndices[],
|
||||
int bandOffsets[]) {
|
||||
int[] bankIndices,
|
||||
int[] bandOffsets) {
|
||||
super(dataType, w, h, bandOffsets.length);
|
||||
this.dataType = dataType;
|
||||
this.pixelStride = pixelStride;
|
||||
@ -292,9 +292,9 @@ public class ComponentSampleModel extends SampleModel
|
||||
/**
|
||||
* Preserves band ordering with new step factor...
|
||||
*/
|
||||
int []orderBands(int orig[], int step) {
|
||||
int map[] = new int[orig.length];
|
||||
int ret[] = new int[orig.length];
|
||||
int []orderBands(int[] orig, int step) {
|
||||
int[] map = new int[orig.length];
|
||||
int[] ret = new int[orig.length];
|
||||
|
||||
for (int i=0; i<map.length; i++) map[i] = i;
|
||||
|
||||
@ -334,7 +334,7 @@ public class ComponentSampleModel extends SampleModel
|
||||
maxBandOff -= minBandOff;
|
||||
|
||||
int bands = bandOffsets.length;
|
||||
int bandOff[];
|
||||
int[] bandOff;
|
||||
int pStride = Math.abs(pixelStride);
|
||||
int lStride = Math.abs(scanlineStride);
|
||||
int bStride = Math.abs(maxBandOff);
|
||||
@ -402,13 +402,13 @@ public class ComponentSampleModel extends SampleModel
|
||||
* @return a {@code ComponentSampleModel} created with a subset
|
||||
* of bands from this {@code ComponentSampleModel}.
|
||||
*/
|
||||
public SampleModel createSubsetSampleModel(int bands[]) {
|
||||
public SampleModel createSubsetSampleModel(int[] bands) {
|
||||
if (bands.length > bankIndices.length)
|
||||
throw new RasterFormatException("There are only " +
|
||||
bankIndices.length +
|
||||
" bands");
|
||||
int newBankIndices[] = new int[bands.length];
|
||||
int newBandOffsets[] = new int[bands.length];
|
||||
int[] newBankIndices = new int[bands.length];
|
||||
int[] newBandOffsets = new int[bands.length];
|
||||
|
||||
for (int i=0; i<bands.length; i++) {
|
||||
newBankIndices[i] = bankIndices[bands[i]];
|
||||
@ -499,7 +499,7 @@ public class ComponentSampleModel extends SampleModel
|
||||
* represents a band.
|
||||
*/
|
||||
public final int[] getSampleSize() {
|
||||
int sampleSize[] = new int [numBands];
|
||||
int[] sampleSize = new int [numBands];
|
||||
int sizeInBits = getSampleSize(0);
|
||||
|
||||
for (int i=0; i<numBands; i++)
|
||||
@ -728,12 +728,12 @@ public class ComponentSampleModel extends SampleModel
|
||||
* @throws ArrayIndexOutOfBoundsException if the coordinates are
|
||||
* not in bounds, or if iArray is too small to hold the output.
|
||||
*/
|
||||
public int[] getPixel(int x, int y, int iArray[], DataBuffer data) {
|
||||
public int[] getPixel(int x, int y, int[] iArray, DataBuffer data) {
|
||||
if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {
|
||||
throw new ArrayIndexOutOfBoundsException
|
||||
("Coordinate out of bounds!");
|
||||
}
|
||||
int pixels[];
|
||||
int[] pixels;
|
||||
if (iArray != null) {
|
||||
pixels = iArray;
|
||||
} else {
|
||||
@ -762,7 +762,7 @@ public class ComponentSampleModel extends SampleModel
|
||||
* @see #setPixels(int, int, int, int, int[], DataBuffer)
|
||||
*/
|
||||
public int[] getPixels(int x, int y, int w, int h,
|
||||
int iArray[], DataBuffer data) {
|
||||
int[] iArray, DataBuffer data) {
|
||||
int x1 = x + w;
|
||||
int y1 = y + h;
|
||||
|
||||
@ -772,7 +772,7 @@ public class ComponentSampleModel extends SampleModel
|
||||
throw new ArrayIndexOutOfBoundsException
|
||||
("Coordinate out of bounds!");
|
||||
}
|
||||
int pixels[];
|
||||
int[] pixels;
|
||||
if (iArray != null) {
|
||||
pixels = iArray;
|
||||
} else {
|
||||
@ -886,13 +886,13 @@ public class ComponentSampleModel extends SampleModel
|
||||
* @see #setSamples(int, int, int, int, int, int[], DataBuffer)
|
||||
*/
|
||||
public int[] getSamples(int x, int y, int w, int h, int b,
|
||||
int iArray[], DataBuffer data) {
|
||||
int[] iArray, DataBuffer data) {
|
||||
// Bounds check for 'b' will be performed automatically
|
||||
if ((x < 0) || (y < 0) || (x + w > width) || (y + h > height)) {
|
||||
throw new ArrayIndexOutOfBoundsException
|
||||
("Coordinate out of bounds!");
|
||||
}
|
||||
int samples[];
|
||||
int[] samples;
|
||||
if (iArray != null) {
|
||||
samples = iArray;
|
||||
} else {
|
||||
@ -1027,7 +1027,7 @@ public class ComponentSampleModel extends SampleModel
|
||||
* @param data The DataBuffer containing the image data
|
||||
* @see #getPixel(int, int, int[], DataBuffer)
|
||||
*/
|
||||
public void setPixel(int x, int y, int iArray[], DataBuffer data) {
|
||||
public void setPixel(int x, int y, int[] iArray, DataBuffer data) {
|
||||
if ((x < 0) || (y < 0) || (x >= width) || (y >= height)) {
|
||||
throw new ArrayIndexOutOfBoundsException
|
||||
("Coordinate out of bounds!");
|
||||
@ -1053,7 +1053,7 @@ public class ComponentSampleModel extends SampleModel
|
||||
* @see #getPixels(int, int, int, int, int[], DataBuffer)
|
||||
*/
|
||||
public void setPixels(int x, int y, int w, int h,
|
||||
int iArray[], DataBuffer data) {
|
||||
int[] iArray, DataBuffer data) {
|
||||
int x1 = x + w;
|
||||
int y1 = y + h;
|
||||
|
||||
@ -1168,7 +1168,7 @@ public class ComponentSampleModel extends SampleModel
|
||||
* @see #getSamples(int, int, int, int, int, int[], DataBuffer)
|
||||
*/
|
||||
public void setSamples(int x, int y, int w, int h, int b,
|
||||
int iArray[], DataBuffer data) {
|
||||
int[] iArray, DataBuffer data) {
|
||||
// Bounds check for 'b' will be performed automatically
|
||||
if ((x < 0) || (y < 0) || (x + w > width) || (y + h > height)) {
|
||||
throw new ArrayIndexOutOfBoundsException
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -114,7 +114,7 @@ public class CropImageFilter extends ImageFilter {
|
||||
* with the filtering operation.
|
||||
*/
|
||||
public void setPixels(int x, int y, int w, int h,
|
||||
ColorModel model, byte pixels[], int off,
|
||||
ColorModel model, byte[] pixels, int off,
|
||||
int scansize) {
|
||||
int x1 = x;
|
||||
if (x1 < cropX) {
|
||||
@ -154,7 +154,7 @@ public class CropImageFilter extends ImageFilter {
|
||||
* with the filtering operation.
|
||||
*/
|
||||
public void setPixels(int x, int y, int w, int h,
|
||||
ColorModel model, int pixels[], int off,
|
||||
ColorModel model, int[] pixels, int off,
|
||||
int scansize) {
|
||||
int x1 = x;
|
||||
if (x1 < cropX) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -103,13 +103,13 @@ public abstract class DataBuffer {
|
||||
protected int size;
|
||||
|
||||
/** Offsets into all banks. */
|
||||
protected int offsets[];
|
||||
protected int[] offsets;
|
||||
|
||||
/* The current StateTrackable state. */
|
||||
StateTrackableDelegate theTrackable;
|
||||
|
||||
/** Size of the data types indexed by DataType tags defined above. */
|
||||
private static final int dataTypeSize[] = {8,16,16,32,32,64};
|
||||
private static final int[] dataTypeSize = {8,16,16,32,32,64};
|
||||
|
||||
/** Returns the size (in bits) of the data type, given a datatype tag.
|
||||
* @param type the value of one of the defined datatype tags
|
||||
@ -246,7 +246,7 @@ public abstract class DataBuffer {
|
||||
* @throws ArrayIndexOutOfBoundsException if {@code numBanks}
|
||||
* does not equal the length of {@code offsets}
|
||||
*/
|
||||
protected DataBuffer(int dataType, int size, int numBanks, int offsets[]) {
|
||||
protected DataBuffer(int dataType, int size, int numBanks, int[] offsets) {
|
||||
this(UNTRACKABLE, dataType, size, numBanks, offsets);
|
||||
}
|
||||
|
||||
@ -268,7 +268,7 @@ public abstract class DataBuffer {
|
||||
* @since 1.7
|
||||
*/
|
||||
DataBuffer(State initialState,
|
||||
int dataType, int size, int numBanks, int offsets[])
|
||||
int dataType, int size, int numBanks, int[] offsets)
|
||||
{
|
||||
if (numBanks != offsets.length) {
|
||||
throw new ArrayIndexOutOfBoundsException("Number of banks" +
|
||||
@ -498,15 +498,15 @@ public abstract class DataBuffer {
|
||||
} else if (obj == null) {
|
||||
return null;
|
||||
} else if (obj instanceof short[]) {
|
||||
short sdata[] = (short[])obj;
|
||||
int idata[] = new int[sdata.length];
|
||||
short[] sdata = (short[])obj;
|
||||
int[] idata = new int[sdata.length];
|
||||
for (int i = 0; i < sdata.length; i++) {
|
||||
idata[i] = (int)sdata[i] & 0xffff;
|
||||
}
|
||||
return idata;
|
||||
} else if (obj instanceof byte[]) {
|
||||
byte bdata[] = (byte[])obj;
|
||||
int idata[] = new int[bdata.length];
|
||||
byte[] bdata = (byte[])obj;
|
||||
int[] idata = new int[bdata.length];
|
||||
for (int i = 0; i < bdata.length; i++) {
|
||||
idata[i] = 0xff & (int)bdata[i];
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -60,10 +60,10 @@ import static sun.java2d.StateTrackable.State.*;
|
||||
public final class DataBufferByte extends DataBuffer
|
||||
{
|
||||
/** The default data bank. */
|
||||
byte data[];
|
||||
byte[] data;
|
||||
|
||||
/** All data banks */
|
||||
byte bankdata[][];
|
||||
byte[][] bankdata;
|
||||
|
||||
/**
|
||||
* Constructs a byte-based {@code DataBuffer} with a single bank and the
|
||||
@ -109,7 +109,7 @@ public final class DataBufferByte extends DataBuffer
|
||||
* @param dataArray The byte array for the {@code DataBuffer}.
|
||||
* @param size The size of the {@code DataBuffer} bank.
|
||||
*/
|
||||
public DataBufferByte(byte dataArray[], int size) {
|
||||
public DataBufferByte(byte[] dataArray, int size) {
|
||||
super(UNTRACKABLE, TYPE_BYTE, size);
|
||||
data = dataArray;
|
||||
bankdata = new byte[1][];
|
||||
@ -133,7 +133,7 @@ public final class DataBufferByte extends DataBuffer
|
||||
* @param offset The offset into the {@code dataArray}. {@code dataArray}
|
||||
* must have at least {@code offset} + {@code size} elements.
|
||||
*/
|
||||
public DataBufferByte(byte dataArray[], int size, int offset){
|
||||
public DataBufferByte(byte[] dataArray, int size, int offset){
|
||||
super(UNTRACKABLE, TYPE_BYTE, size, 1, offset);
|
||||
data = dataArray;
|
||||
bankdata = new byte[1][];
|
||||
@ -154,7 +154,7 @@ public final class DataBufferByte extends DataBuffer
|
||||
* @param dataArray The byte arrays for the {@code DataBuffer}.
|
||||
* @param size The size of the banks in the {@code DataBuffer}.
|
||||
*/
|
||||
public DataBufferByte(byte dataArray[][], int size) {
|
||||
public DataBufferByte(byte[][] dataArray, int size) {
|
||||
super(UNTRACKABLE, TYPE_BYTE, size, dataArray.length);
|
||||
bankdata = dataArray.clone();
|
||||
data = bankdata[0];
|
||||
@ -179,7 +179,7 @@ public final class DataBufferByte extends DataBuffer
|
||||
* @param size The size of the banks in the {@code DataBuffer}.
|
||||
* @param offsets The offsets into each array.
|
||||
*/
|
||||
public DataBufferByte(byte dataArray[][], int size, int offsets[]) {
|
||||
public DataBufferByte(byte[][] dataArray, int size, int[] offsets) {
|
||||
super(UNTRACKABLE, TYPE_BYTE, size, dataArray.length, offsets);
|
||||
bankdata = dataArray.clone();
|
||||
data = bankdata[0];
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -52,10 +52,10 @@ import static sun.java2d.StateTrackable.State.*;
|
||||
public final class DataBufferDouble extends DataBuffer {
|
||||
|
||||
/** The array of data banks. */
|
||||
double bankdata[][];
|
||||
double[][] bankdata;
|
||||
|
||||
/** A reference to the default data bank. */
|
||||
double data[];
|
||||
double[] data;
|
||||
|
||||
/**
|
||||
* Constructs a {@code double}-based {@code DataBuffer}
|
||||
@ -104,7 +104,7 @@ public final class DataBufferDouble extends DataBuffer {
|
||||
* first and only bank of this {@code DataBuffer}.
|
||||
* @param size The number of elements of the array to be used.
|
||||
*/
|
||||
public DataBufferDouble(double dataArray[], int size) {
|
||||
public DataBufferDouble(double[] dataArray, int size) {
|
||||
super(UNTRACKABLE, TYPE_DOUBLE, size);
|
||||
data = dataArray;
|
||||
bankdata = new double[1][];
|
||||
@ -129,7 +129,7 @@ public final class DataBufferDouble extends DataBuffer {
|
||||
* @param offset The offset of the first element of the array
|
||||
* that will be used.
|
||||
*/
|
||||
public DataBufferDouble(double dataArray[], int size, int offset) {
|
||||
public DataBufferDouble(double[] dataArray, int size, int offset) {
|
||||
super(UNTRACKABLE, TYPE_DOUBLE, size, 1, offset);
|
||||
data = dataArray;
|
||||
bankdata = new double[1][];
|
||||
@ -152,7 +152,7 @@ public final class DataBufferDouble extends DataBuffer {
|
||||
* used as the banks of this {@code DataBuffer}.
|
||||
* @param size The number of elements of each array to be used.
|
||||
*/
|
||||
public DataBufferDouble(double dataArray[][], int size) {
|
||||
public DataBufferDouble(double[][] dataArray, int size) {
|
||||
super(UNTRACKABLE, TYPE_DOUBLE, size, dataArray.length);
|
||||
bankdata = dataArray.clone();
|
||||
data = bankdata[0];
|
||||
@ -176,7 +176,7 @@ public final class DataBufferDouble extends DataBuffer {
|
||||
* @param size The number of elements of each array to be used.
|
||||
* @param offsets An array of integer offsets, one for each bank.
|
||||
*/
|
||||
public DataBufferDouble(double dataArray[][], int size, int offsets[]) {
|
||||
public DataBufferDouble(double[][] dataArray, int size, int[] offsets) {
|
||||
super(UNTRACKABLE, TYPE_DOUBLE, size, dataArray.length, offsets);
|
||||
bankdata = dataArray.clone();
|
||||
data = bankdata[0];
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -52,10 +52,10 @@ import static sun.java2d.StateTrackable.State.*;
|
||||
public final class DataBufferFloat extends DataBuffer {
|
||||
|
||||
/** The array of data banks. */
|
||||
float bankdata[][];
|
||||
float[][] bankdata;
|
||||
|
||||
/** A reference to the default data bank. */
|
||||
float data[];
|
||||
float[] data;
|
||||
|
||||
/**
|
||||
* Constructs a {@code float}-based {@code DataBuffer}
|
||||
@ -105,7 +105,7 @@ public final class DataBufferFloat extends DataBuffer {
|
||||
* first and only bank of this {@code DataBuffer}.
|
||||
* @param size The number of elements of the array to be used.
|
||||
*/
|
||||
public DataBufferFloat(float dataArray[], int size) {
|
||||
public DataBufferFloat(float[] dataArray, int size) {
|
||||
super(UNTRACKABLE, TYPE_FLOAT, size);
|
||||
data = dataArray;
|
||||
bankdata = new float[1][];
|
||||
@ -131,7 +131,7 @@ public final class DataBufferFloat extends DataBuffer {
|
||||
* @param offset The offset of the first element of the array
|
||||
* that will be used.
|
||||
*/
|
||||
public DataBufferFloat(float dataArray[], int size, int offset) {
|
||||
public DataBufferFloat(float[] dataArray, int size, int offset) {
|
||||
super(UNTRACKABLE, TYPE_FLOAT, size, 1, offset);
|
||||
data = dataArray;
|
||||
bankdata = new float[1][];
|
||||
@ -154,7 +154,7 @@ public final class DataBufferFloat extends DataBuffer {
|
||||
* used as the banks of this {@code DataBuffer}.
|
||||
* @param size The number of elements of each array to be used.
|
||||
*/
|
||||
public DataBufferFloat(float dataArray[][], int size) {
|
||||
public DataBufferFloat(float[][] dataArray, int size) {
|
||||
super(UNTRACKABLE, TYPE_FLOAT, size, dataArray.length);
|
||||
bankdata = dataArray.clone();
|
||||
data = bankdata[0];
|
||||
@ -178,7 +178,7 @@ public final class DataBufferFloat extends DataBuffer {
|
||||
* @param size The number of elements of each array to be used.
|
||||
* @param offsets An array of integer offsets, one for each bank.
|
||||
*/
|
||||
public DataBufferFloat(float dataArray[][], int size, int offsets[]) {
|
||||
public DataBufferFloat(float[][] dataArray, int size, int[] offsets) {
|
||||
super(UNTRACKABLE, TYPE_FLOAT, size,dataArray.length, offsets);
|
||||
bankdata = dataArray.clone();
|
||||
data = bankdata[0];
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -59,10 +59,10 @@ import static sun.java2d.StateTrackable.State.*;
|
||||
public final class DataBufferInt extends DataBuffer
|
||||
{
|
||||
/** The default data bank. */
|
||||
int data[];
|
||||
int[] data;
|
||||
|
||||
/** All data banks */
|
||||
int bankdata[][];
|
||||
int[][] bankdata;
|
||||
|
||||
/**
|
||||
* Constructs an integer-based {@code DataBuffer} with a single bank
|
||||
@ -108,7 +108,7 @@ public final class DataBufferInt extends DataBuffer
|
||||
* @param dataArray The integer array for the {@code DataBuffer}.
|
||||
* @param size The size of the {@code DataBuffer} bank.
|
||||
*/
|
||||
public DataBufferInt(int dataArray[], int size) {
|
||||
public DataBufferInt(int[] dataArray, int size) {
|
||||
super(UNTRACKABLE, TYPE_INT, size);
|
||||
data = dataArray;
|
||||
bankdata = new int[1][];
|
||||
@ -131,7 +131,7 @@ public final class DataBufferInt extends DataBuffer
|
||||
* @param size The size of the {@code DataBuffer} bank.
|
||||
* @param offset The offset into the {@code dataArray}.
|
||||
*/
|
||||
public DataBufferInt(int dataArray[], int size, int offset) {
|
||||
public DataBufferInt(int[] dataArray, int size, int offset) {
|
||||
super(UNTRACKABLE, TYPE_INT, size, 1, offset);
|
||||
data = dataArray;
|
||||
bankdata = new int[1][];
|
||||
@ -152,7 +152,7 @@ public final class DataBufferInt extends DataBuffer
|
||||
* @param dataArray The integer arrays for the {@code DataBuffer}.
|
||||
* @param size The size of the banks in the {@code DataBuffer}.
|
||||
*/
|
||||
public DataBufferInt(int dataArray[][], int size) {
|
||||
public DataBufferInt(int[][] dataArray, int size) {
|
||||
super(UNTRACKABLE, TYPE_INT, size, dataArray.length);
|
||||
bankdata = dataArray.clone();
|
||||
data = bankdata[0];
|
||||
@ -177,7 +177,7 @@ public final class DataBufferInt extends DataBuffer
|
||||
* @param size The size of the banks in the {@code DataBuffer}.
|
||||
* @param offsets The offsets into each array.
|
||||
*/
|
||||
public DataBufferInt(int dataArray[][], int size, int offsets[]) {
|
||||
public DataBufferInt(int[][] dataArray, int size, int[] offsets) {
|
||||
super(UNTRACKABLE, TYPE_INT, size, dataArray.length, offsets);
|
||||
bankdata = dataArray.clone();
|
||||
data = bankdata[0];
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -58,10 +58,10 @@ import static sun.java2d.StateTrackable.State.*;
|
||||
public final class DataBufferShort extends DataBuffer
|
||||
{
|
||||
/** The default data bank. */
|
||||
short data[];
|
||||
short[] data;
|
||||
|
||||
/** All data banks */
|
||||
short bankdata[][];
|
||||
short[][] bankdata;
|
||||
|
||||
/**
|
||||
* Constructs a short-based {@code DataBuffer} with a single bank and the
|
||||
@ -107,7 +107,7 @@ public final class DataBufferShort extends DataBuffer
|
||||
* @param dataArray The short array for the {@code DataBuffer}.
|
||||
* @param size The size of the {@code DataBuffer} bank.
|
||||
*/
|
||||
public DataBufferShort(short dataArray[], int size) {
|
||||
public DataBufferShort(short[] dataArray, int size) {
|
||||
super(UNTRACKABLE, TYPE_SHORT, size);
|
||||
data = dataArray;
|
||||
bankdata = new short[1][];
|
||||
@ -130,7 +130,7 @@ public final class DataBufferShort extends DataBuffer
|
||||
* @param size The size of the {@code DataBuffer} bank.
|
||||
* @param offset The offset into the {@code dataArray}.
|
||||
*/
|
||||
public DataBufferShort(short dataArray[], int size, int offset) {
|
||||
public DataBufferShort(short[] dataArray, int size, int offset) {
|
||||
super(UNTRACKABLE, TYPE_SHORT, size, 1, offset);
|
||||
data = dataArray;
|
||||
bankdata = new short[1][];
|
||||
@ -151,7 +151,7 @@ public final class DataBufferShort extends DataBuffer
|
||||
* @param dataArray The short arrays for the {@code DataBuffer}.
|
||||
* @param size The size of the banks in the {@code DataBuffer}.
|
||||
*/
|
||||
public DataBufferShort(short dataArray[][], int size) {
|
||||
public DataBufferShort(short[][] dataArray, int size) {
|
||||
super(UNTRACKABLE, TYPE_SHORT, size, dataArray.length);
|
||||
bankdata = dataArray.clone();
|
||||
data = bankdata[0];
|
||||
@ -176,7 +176,7 @@ public final class DataBufferShort extends DataBuffer
|
||||
* @param size The size of the banks in the {@code DataBuffer}.
|
||||
* @param offsets The offsets into each array.
|
||||
*/
|
||||
public DataBufferShort(short dataArray[][], int size, int offsets[]) {
|
||||
public DataBufferShort(short[][] dataArray, int size, int[] offsets) {
|
||||
super(UNTRACKABLE, TYPE_SHORT, size, dataArray.length, offsets);
|
||||
bankdata = dataArray.clone();
|
||||
data = bankdata[0];
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user