6613529
: Avoid duplicate object creation within JDK packages
Avoid using constructors when unique values are not necessary Reviewed-by: volk, igor, peterz
This commit is contained in:
parent
31835022c4
commit
0e36651f33
@ -504,7 +504,7 @@ public class GIFImageReader extends ImageReader {
|
||||
}
|
||||
|
||||
// Found position of metadata for image 0
|
||||
imageStartPosition.add(new Long(stream.getStreamPosition()));
|
||||
imageStartPosition.add(Long.valueOf(stream.getStreamPosition()));
|
||||
} catch (IOException e) {
|
||||
throw new IIOException("I/O error reading header!", e);
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ class GIFWritableImageMetadata extends GIFImageMetadata {
|
||||
try {
|
||||
return data.getBytes("ISO-8859-1");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return (new String("")).getBytes();
|
||||
return "".getBytes();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -328,7 +328,7 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
|
||||
setHSB(hue, saturation, brightness);
|
||||
if (update) {
|
||||
settingColor = true;
|
||||
hueSpinner.setValue(new Integer((int)(hue * 360)));
|
||||
hueSpinner.setValue(Integer.valueOf((int)(hue * 360)));
|
||||
settingColor = false;
|
||||
}
|
||||
}
|
||||
@ -376,8 +376,8 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
|
||||
setHSB(hue, s, b);
|
||||
if (update) {
|
||||
settingColor = true;
|
||||
saturationSpinner.setValue(new Integer((int)(s * 255)));
|
||||
valueSpinner.setValue(new Integer((int)(b * 255)));
|
||||
saturationSpinner.setValue(Integer.valueOf((int)(s * 255)));
|
||||
valueSpinner.setValue(Integer.valueOf((int)(b * 255)));
|
||||
settingColor = false;
|
||||
}
|
||||
}
|
||||
@ -391,9 +391,9 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
|
||||
setColor(color, false, true, true);
|
||||
|
||||
settingColor = true;
|
||||
hueSpinner.setValue(new Integer((int)(hue * 360)));
|
||||
saturationSpinner.setValue(new Integer((int)(saturation * 255)));
|
||||
valueSpinner.setValue(new Integer((int)(brightness * 255)));
|
||||
hueSpinner.setValue(Integer.valueOf((int)(hue * 360)));
|
||||
saturationSpinner.setValue(Integer.valueOf((int)(saturation * 255)));
|
||||
valueSpinner.setValue(Integer.valueOf((int)(brightness * 255)));
|
||||
settingColor = false;
|
||||
}
|
||||
|
||||
@ -409,9 +409,9 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
|
||||
setColor(color, false, false, true);
|
||||
|
||||
settingColor = true;
|
||||
redSpinner.setValue(new Integer(color.getRed()));
|
||||
greenSpinner.setValue(new Integer(color.getGreen()));
|
||||
blueSpinner.setValue(new Integer(color.getBlue()));
|
||||
redSpinner.setValue(Integer.valueOf(color.getRed()));
|
||||
greenSpinner.setValue(Integer.valueOf(color.getGreen()));
|
||||
blueSpinner.setValue(Integer.valueOf(color.getBlue()));
|
||||
settingColor = false;
|
||||
}
|
||||
|
||||
@ -454,13 +454,13 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
|
||||
colorNameTF.setText("#" + hexString.substring(1));
|
||||
|
||||
if (updateSpinners) {
|
||||
redSpinner.setValue(new Integer(color.getRed()));
|
||||
greenSpinner.setValue(new Integer(color.getGreen()));
|
||||
blueSpinner.setValue(new Integer(color.getBlue()));
|
||||
redSpinner.setValue(Integer.valueOf(color.getRed()));
|
||||
greenSpinner.setValue(Integer.valueOf(color.getGreen()));
|
||||
blueSpinner.setValue(Integer.valueOf(color.getBlue()));
|
||||
|
||||
hueSpinner.setValue(new Integer((int)(hue * 360)));
|
||||
saturationSpinner.setValue(new Integer((int)(saturation * 255)));
|
||||
valueSpinner.setValue(new Integer((int)(brightness * 255)));
|
||||
hueSpinner.setValue(Integer.valueOf((int)(hue * 360)));
|
||||
saturationSpinner.setValue(Integer.valueOf((int)(saturation * 255)));
|
||||
valueSpinner.setValue(Integer.valueOf((int)(brightness * 255)));
|
||||
}
|
||||
settingColor = false;
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||
// populate the table with the values from basic.
|
||||
super.initComponentDefaults(table);
|
||||
|
||||
Integer zero = new Integer(0);
|
||||
Integer zero = Integer.valueOf(0);
|
||||
Object zeroBorder = new sun.swing.SwingLazyValue(
|
||||
"javax.swing.plaf.BorderUIResource$EmptyBorderUIResource",
|
||||
new Object[] {zero, zero, zero, zero});
|
||||
@ -371,7 +371,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||
int vProgWidth = 22 - (progXThickness * 2);
|
||||
int vProgHeight = 80 - (progYThickness * 2);
|
||||
|
||||
Integer caretBlinkRate = new Integer(500);
|
||||
Integer caretBlinkRate = Integer.valueOf(500);
|
||||
Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0);
|
||||
|
||||
Double defaultCaretAspectRatio = new Double(0.025);
|
||||
@ -540,7 +540,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||
}
|
||||
|
||||
Object[] defaults = new Object[] {
|
||||
"ArrowButton.size", new Integer(13),
|
||||
"ArrowButton.size", Integer.valueOf(13),
|
||||
|
||||
|
||||
"Button.defaultButtonFollowsFocus", Boolean.FALSE,
|
||||
@ -893,8 +893,8 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||
|
||||
|
||||
"ScrollBar.squareButtons", Boolean.FALSE,
|
||||
"ScrollBar.thumbHeight", new Integer(14),
|
||||
"ScrollBar.width", new Integer(16),
|
||||
"ScrollBar.thumbHeight", Integer.valueOf(14),
|
||||
"ScrollBar.width", Integer.valueOf(16),
|
||||
"ScrollBar.minimumThumbSize", new Dimension(8, 8),
|
||||
"ScrollBar.maximumThumbSize", new Dimension(4096, 4096),
|
||||
"ScrollBar.allowsAbsolutePositioning", Boolean.TRUE,
|
||||
@ -954,12 +954,12 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||
|
||||
|
||||
"Separator.insets", zeroInsets,
|
||||
"Separator.thickness", new Integer(2),
|
||||
"Separator.thickness", Integer.valueOf(2),
|
||||
|
||||
|
||||
"Slider.paintValue", Boolean.TRUE,
|
||||
"Slider.thumbWidth", new Integer(30),
|
||||
"Slider.thumbHeight", new Integer(14),
|
||||
"Slider.thumbWidth", Integer.valueOf(30),
|
||||
"Slider.thumbHeight", Integer.valueOf(14),
|
||||
"Slider.focusInputMap",
|
||||
new UIDefaults.LazyInputMap(new Object[] {
|
||||
"RIGHT", "positiveUnitIncrement",
|
||||
@ -1013,9 +1013,9 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||
}),
|
||||
|
||||
|
||||
"SplitPane.size", new Integer(7),
|
||||
"SplitPane.oneTouchOffset", new Integer(2),
|
||||
"SplitPane.oneTouchButtonSize", new Integer(5),
|
||||
"SplitPane.size", Integer.valueOf(7),
|
||||
"SplitPane.oneTouchOffset", Integer.valueOf(2),
|
||||
"SplitPane.oneTouchButtonSize", Integer.valueOf(5),
|
||||
"SplitPane.supportsOneTouchButtons", Boolean.FALSE,
|
||||
|
||||
|
||||
@ -1223,13 +1223,13 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||
|
||||
"ToolTip.font", new FontLazyValue(Region.TOOL_TIP),
|
||||
|
||||
"Tree.padding", new Integer(4),
|
||||
"Tree.padding", Integer.valueOf(4),
|
||||
"Tree.background", tableBg,
|
||||
"Tree.drawHorizontalLines", Boolean.FALSE,
|
||||
"Tree.drawVerticalLines", Boolean.FALSE,
|
||||
"Tree.rowHeight", new Integer(-1),
|
||||
"Tree.rowHeight", Integer.valueOf(-1),
|
||||
"Tree.scrollsOnExpand", Boolean.FALSE,
|
||||
"Tree.expanderSize", new Integer(10),
|
||||
"Tree.expanderSize", Integer.valueOf(10),
|
||||
"Tree.repaintWholeRow", Boolean.TRUE,
|
||||
"Tree.closedIcon", null,
|
||||
"Tree.leafIcon", null,
|
||||
@ -1240,8 +1240,8 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||
"Tree.collapsedIcon", new GTKStyle.GTKLazyValue(
|
||||
"com.sun.java.swing.plaf.gtk.GTKIconFactory",
|
||||
"getTreeCollapsedIcon"),
|
||||
"Tree.leftChildIndent", new Integer(2),
|
||||
"Tree.rightChildIndent", new Integer(12),
|
||||
"Tree.leftChildIndent", Integer.valueOf(2),
|
||||
"Tree.rightChildIndent", Integer.valueOf(12),
|
||||
"Tree.scrollsHorizontallyAndVertically", Boolean.FALSE,
|
||||
"Tree.drawsFocusBorder", Boolean.TRUE,
|
||||
"Tree.focusInputMap",
|
||||
|
@ -851,7 +851,7 @@ class GTKStyle extends SynthStyle implements GTKConstants {
|
||||
int focusLineWidth = getClassSpecificIntValue(context,
|
||||
"focus-line-width", 0);
|
||||
if (value == null && focusLineWidth > 0) {
|
||||
value = new Integer(16 + 2 * focusLineWidth);
|
||||
value = Integer.valueOf(16 + 2 * focusLineWidth);
|
||||
}
|
||||
}
|
||||
return value;
|
||||
@ -975,12 +975,12 @@ class GTKStyle extends SynthStyle implements GTKConstants {
|
||||
|
||||
private static void initIconTypeMap() {
|
||||
ICON_TYPE_MAP = new HashMap<String,Integer>();
|
||||
ICON_TYPE_MAP.put("gtk-menu", new Integer(1));
|
||||
ICON_TYPE_MAP.put("gtk-small-toolbar", new Integer(2));
|
||||
ICON_TYPE_MAP.put("gtk-large-toolbar", new Integer(3));
|
||||
ICON_TYPE_MAP.put("gtk-button", new Integer(4));
|
||||
ICON_TYPE_MAP.put("gtk-dnd", new Integer(5));
|
||||
ICON_TYPE_MAP.put("gtk-dialog", new Integer(6));
|
||||
ICON_TYPE_MAP.put("gtk-menu", Integer.valueOf(1));
|
||||
ICON_TYPE_MAP.put("gtk-small-toolbar", Integer.valueOf(2));
|
||||
ICON_TYPE_MAP.put("gtk-large-toolbar", Integer.valueOf(3));
|
||||
ICON_TYPE_MAP.put("gtk-button", Integer.valueOf(4));
|
||||
ICON_TYPE_MAP.put("gtk-dnd", Integer.valueOf(5));
|
||||
ICON_TYPE_MAP.put("gtk-dialog", Integer.valueOf(6));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ class Metacity implements SynthConstants {
|
||||
name = child.getNodeName();
|
||||
Object value = null;
|
||||
if ("distance".equals(name)) {
|
||||
value = new Integer(getIntAttr(child, "value", 0));
|
||||
value = Integer.valueOf(getIntAttr(child, "value", 0));
|
||||
} else if ("border".equals(name)) {
|
||||
value = new Insets(getIntAttr(child, "top", 0),
|
||||
getIntAttr(child, "left", 0),
|
||||
@ -808,7 +808,7 @@ class Metacity implements SynthConstants {
|
||||
protected void setFrameGeometry(JComponent titlePane, Map gm) {
|
||||
this.frameGeometry = gm;
|
||||
if (getInt("top_height") == 0 && titlePane != null) {
|
||||
gm.put("top_height", new Integer(titlePane.getHeight()));
|
||||
gm.put("top_height", Integer.valueOf(titlePane.getHeight()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -567,7 +567,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||
"ProgressBar.selectionBackground", table.get("controlText"),
|
||||
"ProgressBar.border", loweredBevelBorder,
|
||||
"ProgressBar.cellLength", new Integer(6),
|
||||
"ProgressBar.cellSpacing", new Integer(0),
|
||||
"ProgressBar.cellSpacing", Integer.valueOf(0),
|
||||
|
||||
// Buttons
|
||||
"Button.margin", new InsetsUIResource(2, 4, 2, 4),
|
||||
@ -859,7 +859,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||
"SplitPane.background", table.get("control"),
|
||||
"SplitPane.highlight", table.get("controlHighlight"),
|
||||
"SplitPane.shadow", table.get("controlShadow"),
|
||||
"SplitPane.dividerSize", new Integer(20),
|
||||
"SplitPane.dividerSize", Integer.valueOf(20),
|
||||
"SplitPane.activeThumb", table.get("activeCaptionBorder"),
|
||||
"SplitPane.ancestorInputMap",
|
||||
new UIDefaults.LazyInputMap(new Object[] {
|
||||
@ -1160,7 +1160,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||
}),
|
||||
|
||||
"TextField.caretForeground", black,
|
||||
"TextField.caretBlinkRate", new Integer(500),
|
||||
"TextField.caretBlinkRate", Integer.valueOf(500),
|
||||
"TextField.inactiveForeground", table.get("textInactiveText"),
|
||||
"TextField.selectionBackground", table.get("textHighlight"),
|
||||
"TextField.selectionForeground", table.get("textHighlightText"),
|
||||
@ -1171,7 +1171,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||
"TextField.focusInputMap", fieldInputMap,
|
||||
|
||||
"PasswordField.caretForeground", black,
|
||||
"PasswordField.caretBlinkRate", new Integer(500),
|
||||
"PasswordField.caretBlinkRate", Integer.valueOf(500),
|
||||
"PasswordField.inactiveForeground", table.get("textInactiveText"),
|
||||
"PasswordField.selectionBackground", table.get("textHighlight"),
|
||||
"PasswordField.selectionForeground", table.get("textHighlightText"),
|
||||
@ -1182,7 +1182,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||
"PasswordField.focusInputMap", passwordInputMap,
|
||||
|
||||
"TextArea.caretForeground", black,
|
||||
"TextArea.caretBlinkRate", new Integer(500),
|
||||
"TextArea.caretBlinkRate", Integer.valueOf(500),
|
||||
"TextArea.inactiveForeground", table.get("textInactiveText"),
|
||||
"TextArea.selectionBackground", table.get("textHighlight"),
|
||||
"TextArea.selectionForeground", table.get("textHighlightText"),
|
||||
@ -1193,7 +1193,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||
"TextArea.focusInputMap", multilineInputMap,
|
||||
|
||||
"TextPane.caretForeground", black,
|
||||
"TextPane.caretBlinkRate", new Integer(500),
|
||||
"TextPane.caretBlinkRate", Integer.valueOf(500),
|
||||
"TextPane.inactiveForeground", table.get("textInactiveText"),
|
||||
"TextPane.selectionBackground", lightGray,
|
||||
"TextPane.selectionForeground", table.get("textHighlightText"),
|
||||
@ -1204,7 +1204,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||
"TextPane.focusInputMap", multilineInputMap,
|
||||
|
||||
"EditorPane.caretForeground", red,
|
||||
"EditorPane.caretBlinkRate", new Integer(500),
|
||||
"EditorPane.caretBlinkRate", Integer.valueOf(500),
|
||||
"EditorPane.inactiveForeground", table.get("textInactiveText"),
|
||||
"EditorPane.selectionBackground", lightGray,
|
||||
"EditorPane.selectionForeground", table.get("textHighlightText"),
|
||||
|
@ -299,9 +299,9 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||
initResourceBundle(table);
|
||||
|
||||
// *** Shared Fonts
|
||||
Integer twelve = new Integer(12);
|
||||
Integer fontPlain = new Integer(Font.PLAIN);
|
||||
Integer fontBold = new Integer(Font.BOLD);
|
||||
Integer twelve = Integer.valueOf(12);
|
||||
Integer fontPlain = Integer.valueOf(Font.PLAIN);
|
||||
Integer fontBold = Integer.valueOf(Font.BOLD);
|
||||
|
||||
Object dialogPlain12 = new SwingLazyValue(
|
||||
"javax.swing.plaf.FontUIResource",
|
||||
@ -522,19 +522,19 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||
toolkit);
|
||||
Object WindowBorderWidth = new DesktopProperty(
|
||||
"win.frame.sizingBorderWidth",
|
||||
new Integer(1),
|
||||
Integer.valueOf(1),
|
||||
toolkit);
|
||||
Object TitlePaneHeight = new DesktopProperty(
|
||||
"win.frame.captionHeight",
|
||||
new Integer(18),
|
||||
Integer.valueOf(18),
|
||||
toolkit);
|
||||
Object TitleButtonWidth = new DesktopProperty(
|
||||
"win.frame.captionButtonWidth",
|
||||
new Integer(16),
|
||||
Integer.valueOf(16),
|
||||
toolkit);
|
||||
Object TitleButtonHeight = new DesktopProperty(
|
||||
"win.frame.captionButtonHeight",
|
||||
new Integer(16),
|
||||
Integer.valueOf(16),
|
||||
toolkit);
|
||||
Object InactiveTextColor = new DesktopProperty(
|
||||
"win.text.grayedTextColor",
|
||||
@ -567,7 +567,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||
Object IconFont = ControlFont;
|
||||
|
||||
Object scrollBarWidth = new DesktopProperty("win.scrollbar.width",
|
||||
new Integer(16), toolkit);
|
||||
Integer.valueOf(16), toolkit);
|
||||
|
||||
Object menuBarHeight = new DesktopProperty("win.menu.height",
|
||||
null, toolkit);
|
||||
@ -673,12 +673,12 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||
"Button.disabledForeground", InactiveTextColor,
|
||||
"Button.disabledShadow", ControlHighlightColor,
|
||||
"Button.focus", black,
|
||||
"Button.dashedRectGapX", new XPValue(new Integer(3), new Integer(5)),
|
||||
"Button.dashedRectGapY", new XPValue(new Integer(3), new Integer(4)),
|
||||
"Button.dashedRectGapWidth", new XPValue(new Integer(6), new Integer(10)),
|
||||
"Button.dashedRectGapHeight", new XPValue(new Integer(6), new Integer(8)),
|
||||
"Button.textShiftOffset", new XPValue(new Integer(0),
|
||||
new Integer(1)),
|
||||
"Button.dashedRectGapX", new XPValue(Integer.valueOf(3), Integer.valueOf(5)),
|
||||
"Button.dashedRectGapY", new XPValue(Integer.valueOf(3), Integer.valueOf(4)),
|
||||
"Button.dashedRectGapWidth", new XPValue(Integer.valueOf(6), Integer.valueOf(10)),
|
||||
"Button.dashedRectGapHeight", new XPValue(Integer.valueOf(6), Integer.valueOf(8)),
|
||||
"Button.textShiftOffset", new XPValue(Integer.valueOf(0),
|
||||
Integer.valueOf(1)),
|
||||
// W2K keyboard navigation hidding.
|
||||
"Button.showMnemonics", showMnemonics,
|
||||
"Button.focusInputMap",
|
||||
@ -780,7 +780,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||
}),
|
||||
|
||||
// DesktopIcon
|
||||
"DesktopIcon.width", new Integer(160),
|
||||
"DesktopIcon.width", Integer.valueOf(160),
|
||||
|
||||
"EditorPane.font", ControlFont,
|
||||
"EditorPane.background", WindowBackgroundColor,
|
||||
@ -814,9 +814,9 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||
"icons/NewFolder.gif"),
|
||||
"FileChooser.useSystemExtensionHiding", Boolean.TRUE,
|
||||
|
||||
"FileChooser.lookInLabelMnemonic", new Integer(KeyEvent.VK_I),
|
||||
"FileChooser.fileNameLabelMnemonic", new Integer(KeyEvent.VK_N),
|
||||
"FileChooser.filesOfTypeLabelMnemonic", new Integer(KeyEvent.VK_T),
|
||||
"FileChooser.lookInLabelMnemonic", Integer.valueOf(KeyEvent.VK_I),
|
||||
"FileChooser.fileNameLabelMnemonic", Integer.valueOf(KeyEvent.VK_N),
|
||||
"FileChooser.filesOfTypeLabelMnemonic", Integer.valueOf(KeyEvent.VK_T),
|
||||
"FileChooser.usesSingleFilePane", Boolean.TRUE,
|
||||
"FileChooser.noPlacesBar", new DesktopProperty("win.comdlg.noPlacesBar",
|
||||
Boolean.FALSE, toolkit),
|
||||
@ -1021,10 +1021,10 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||
"Menu.selectionBackground", SelectionBackgroundColor,
|
||||
"Menu.acceleratorForeground", MenuTextColor,
|
||||
"Menu.acceleratorSelectionForeground", SelectionTextColor,
|
||||
"Menu.menuPopupOffsetX", new Integer(0),
|
||||
"Menu.menuPopupOffsetY", new Integer(0),
|
||||
"Menu.submenuPopupOffsetX", new Integer(-4),
|
||||
"Menu.submenuPopupOffsetY", new Integer(-3),
|
||||
"Menu.menuPopupOffsetX", Integer.valueOf(0),
|
||||
"Menu.menuPopupOffsetY", Integer.valueOf(0),
|
||||
"Menu.submenuPopupOffsetX", Integer.valueOf(-4),
|
||||
"Menu.submenuPopupOffsetY", Integer.valueOf(-3),
|
||||
"Menu.crossMenuMnemonic", Boolean.FALSE,
|
||||
"Menu.preserveTopLevelSelection", Boolean.TRUE,
|
||||
|
||||
@ -1184,8 +1184,8 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||
"ProgressBar.highlight", ControlHighlightColor,
|
||||
"ProgressBar.selectionForeground", ControlBackgroundColor,
|
||||
"ProgressBar.selectionBackground", SelectionBackgroundColor,
|
||||
"ProgressBar.cellLength", new Integer(7),
|
||||
"ProgressBar.cellSpacing", new Integer(2),
|
||||
"ProgressBar.cellLength", Integer.valueOf(7),
|
||||
"ProgressBar.cellSpacing", Integer.valueOf(2),
|
||||
"ProgressBar.indeterminateInsets", new Insets(3, 3, 3, 3),
|
||||
|
||||
// *** RootPane.
|
||||
@ -1292,7 +1292,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||
"SplitPane.highlight", ControlHighlightColor,
|
||||
"SplitPane.shadow", ControlShadowColor,
|
||||
"SplitPane.darkShadow", ControlDarkShadowColor,
|
||||
"SplitPane.dividerSize", new Integer(5),
|
||||
"SplitPane.dividerSize", Integer.valueOf(5),
|
||||
"SplitPane.ancestorInputMap",
|
||||
new UIDefaults.LazyInputMap(new Object[] {
|
||||
"UP", "negativeIncrement",
|
||||
@ -1496,7 +1496,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||
"ToggleButton.light", ControlLightColor,
|
||||
"ToggleButton.highlight", ControlHighlightColor,
|
||||
"ToggleButton.focus", ControlTextColor,
|
||||
"ToggleButton.textShiftOffset", new Integer(1),
|
||||
"ToggleButton.textShiftOffset", Integer.valueOf(1),
|
||||
"ToggleButton.focusInputMap",
|
||||
new UIDefaults.LazyInputMap(new Object[] {
|
||||
"SPACE", "pressed",
|
||||
@ -1548,8 +1548,8 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||
"Tree.background", WindowBackgroundColor,
|
||||
"Tree.foreground", WindowTextColor,
|
||||
"Tree.hash", gray,
|
||||
"Tree.leftChildIndent", new Integer(8),
|
||||
"Tree.rightChildIndent", new Integer(11),
|
||||
"Tree.leftChildIndent", Integer.valueOf(8),
|
||||
"Tree.rightChildIndent", Integer.valueOf(11),
|
||||
"Tree.textForeground", WindowTextColor,
|
||||
"Tree.textBackground", WindowBackgroundColor,
|
||||
"Tree.selectionForeground", SelectionTextColor,
|
||||
@ -2488,18 +2488,18 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||
private int direction;
|
||||
|
||||
XPDLUValue(int xpdlu, int classicdlu, int direction) {
|
||||
super(new Integer(xpdlu), new Integer(classicdlu));
|
||||
super(Integer.valueOf(xpdlu), Integer.valueOf(classicdlu));
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public Object getXPValue(UIDefaults table) {
|
||||
int px = dluToPixels(((Integer)xpValue).intValue(), direction);
|
||||
return new Integer(px);
|
||||
return Integer.valueOf(px);
|
||||
}
|
||||
|
||||
public Object getClassicValue(UIDefaults table) {
|
||||
int px = dluToPixels(((Integer)classicValue).intValue(), direction);
|
||||
return new Integer(px);
|
||||
return Integer.valueOf(px);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -597,7 +597,7 @@ public class Button extends Component implements Accessible {
|
||||
public String getAccessibleActionDescription(int i) {
|
||||
if (i == 0) {
|
||||
// [[[PENDING: WDW -- need to provide a localized string]]]
|
||||
return new String("click");
|
||||
return "click";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -847,7 +847,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
||||
public String getAccessibleActionDescription(int i) {
|
||||
if (i == 0) {
|
||||
// [[[PENDING: WDW -- need to provide a localized string]]]
|
||||
return new String("click");
|
||||
return "click";
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable {
|
||||
while (continueLine(line)) {
|
||||
String nextLine = in.readLine();
|
||||
if (nextLine == null) {
|
||||
nextLine = new String("");
|
||||
nextLine = "";
|
||||
}
|
||||
String loppedLine =
|
||||
line.substring(0, line.length() - 1);
|
||||
@ -313,7 +313,7 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable {
|
||||
}
|
||||
nextLine = nextLine.substring(startIndex,
|
||||
nextLine.length());
|
||||
line = new String(loppedLine+nextLine);
|
||||
line = loppedLine+nextLine;
|
||||
}
|
||||
|
||||
// Find start of key
|
||||
|
@ -1210,9 +1210,9 @@ public class BufferedImage extends java.awt.Image
|
||||
* <code>BufferedImage</code>.
|
||||
*/
|
||||
public String toString() {
|
||||
return new String("BufferedImage@"+Integer.toHexString(hashCode())
|
||||
+": type = "+imageType
|
||||
+" "+colorModel+" "+raster);
|
||||
return "BufferedImage@"+Integer.toHexString(hashCode())
|
||||
+": type = "+imageType
|
||||
+" "+colorModel+" "+raster;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -384,7 +384,7 @@ class DictionaryBasedBreakIterator extends RuleBasedBreakIterator {
|
||||
// on the last character of a legal word. Push that position onto
|
||||
// the possible-break-positions stack
|
||||
if (dictionary.getNextState(state, 0) == -1) {
|
||||
possibleBreakPositions.push(new Integer(text.getIndex()));
|
||||
possibleBreakPositions.push(Integer.valueOf(text.getIndex()));
|
||||
}
|
||||
|
||||
// look up the new state to transition to in the dictionary
|
||||
@ -395,7 +395,7 @@ class DictionaryBasedBreakIterator extends RuleBasedBreakIterator {
|
||||
// and we've successfully traversed the whole range. Drop out
|
||||
// of the loop.
|
||||
if (state == -1) {
|
||||
currentBreakPositions.push(new Integer(text.getIndex()));
|
||||
currentBreakPositions.push(Integer.valueOf(text.getIndex()));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -496,7 +496,7 @@ class DictionaryBasedBreakIterator extends RuleBasedBreakIterator {
|
||||
if (!currentBreakPositions.isEmpty()) {
|
||||
currentBreakPositions.pop();
|
||||
}
|
||||
currentBreakPositions.push(new Integer(endPos));
|
||||
currentBreakPositions.push(Integer.valueOf(endPos));
|
||||
|
||||
// create a regular array to hold the break positions and copy
|
||||
// the break positions from the stack to the array (in addition,
|
||||
|
@ -1286,7 +1286,7 @@ public class MessageFormat extends Format {
|
||||
characterIterators.add(
|
||||
createAttributedCharacterIterator(
|
||||
subIterator, Field.ARGUMENT,
|
||||
new Integer(argumentNumber)));
|
||||
Integer.valueOf(argumentNumber)));
|
||||
last = result.length();
|
||||
}
|
||||
arg = null;
|
||||
@ -1296,7 +1296,7 @@ public class MessageFormat extends Format {
|
||||
characterIterators.add(
|
||||
createAttributedCharacterIterator(
|
||||
arg, Field.ARGUMENT,
|
||||
new Integer(argumentNumber)));
|
||||
Integer.valueOf(argumentNumber)));
|
||||
last = result.length();
|
||||
}
|
||||
}
|
||||
|
@ -778,8 +778,8 @@ public abstract class ImageInputStreamImpl implements ImageInputStream {
|
||||
*/
|
||||
public void mark() {
|
||||
try {
|
||||
markByteStack.push(new Long(getStreamPosition()));
|
||||
markBitStack.push(new Integer(getBitOffset()));
|
||||
markByteStack.push(Long.valueOf(getStreamPosition()));
|
||||
markBitStack.push(Integer.valueOf(getBitOffset()));
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
|
@ -2047,14 +2047,14 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
|
||||
null, AccessibleState.SELECTED);
|
||||
accessibleContext.firePropertyChange(
|
||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||
new Integer(0), new Integer(1));
|
||||
Integer.valueOf(0), Integer.valueOf(1));
|
||||
} else {
|
||||
accessibleContext.firePropertyChange(
|
||||
AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
|
||||
AccessibleState.SELECTED, null);
|
||||
accessibleContext.firePropertyChange(
|
||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||
new Integer(1), new Integer(0));
|
||||
Integer.valueOf(1), Integer.valueOf(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2552,9 +2552,9 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
|
||||
*/
|
||||
public Number getCurrentAccessibleValue() {
|
||||
if (isSelected()) {
|
||||
return new Integer(1);
|
||||
return Integer.valueOf(1);
|
||||
} else {
|
||||
return new Integer(0);
|
||||
return Integer.valueOf(0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2583,7 +2583,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
|
||||
* @return an Integer of 0.
|
||||
*/
|
||||
public Number getMinimumAccessibleValue() {
|
||||
return new Integer(0);
|
||||
return Integer.valueOf(0);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2592,7 +2592,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
|
||||
* @return An Integer of 1.
|
||||
*/
|
||||
public Number getMaximumAccessibleValue() {
|
||||
return new Integer(1);
|
||||
return Integer.valueOf(1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@ class DebugGraphicsInfo {
|
||||
componentToDebug = new Hashtable();
|
||||
}
|
||||
if (debug > 0) {
|
||||
componentToDebug.put(component, new Integer(debug));
|
||||
componentToDebug.put(component, Integer.valueOf(debug));
|
||||
} else {
|
||||
componentToDebug.remove(component);
|
||||
}
|
||||
|
@ -1285,7 +1285,7 @@ public class JInternalFrame extends JComponent implements
|
||||
* description: Specifies what desktop layer is used.
|
||||
*/
|
||||
public void setLayer(int layer) {
|
||||
this.setLayer(new Integer(layer));
|
||||
this.setLayer(Integer.valueOf(layer));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2092,7 +2092,7 @@ public class JInternalFrame extends JComponent implements
|
||||
* have a value
|
||||
*/
|
||||
public Number getCurrentAccessibleValue() {
|
||||
return new Integer(getLayer());
|
||||
return Integer.valueOf(getLayer());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2116,7 +2116,7 @@ public class JInternalFrame extends JComponent implements
|
||||
* have a minimum value
|
||||
*/
|
||||
public Number getMinimumAccessibleValue() {
|
||||
return new Integer(Integer.MIN_VALUE);
|
||||
return Integer.MIN_VALUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2126,7 +2126,7 @@ public class JInternalFrame extends JComponent implements
|
||||
* have a maximum value
|
||||
*/
|
||||
public Number getMaximumAccessibleValue() {
|
||||
return new Integer(Integer.MAX_VALUE);
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
} // AccessibleJInternalFrame
|
||||
|
@ -1512,7 +1512,7 @@ public class JOptionPane extends JComponent implements Accessible
|
||||
|
||||
iFrame.putClientProperty("JInternalFrame.frameType", "optionDialog");
|
||||
iFrame.putClientProperty("JInternalFrame.messageType",
|
||||
new Integer(getMessageType()));
|
||||
Integer.valueOf(getMessageType()));
|
||||
|
||||
iFrame.addInternalFrameListener(new InternalFrameAdapter() {
|
||||
public void internalFrameClosing(InternalFrameEvent e) {
|
||||
|
@ -775,9 +775,9 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib
|
||||
accessibleContext.firePropertyChange(
|
||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||
(oldModel== null
|
||||
? null : new Integer(oldModel.getValue())),
|
||||
? null : Integer.valueOf(oldModel.getValue())),
|
||||
(newModel== null
|
||||
? null : new Integer(newModel.getValue())));
|
||||
? null : Integer.valueOf(newModel.getValue())));
|
||||
}
|
||||
|
||||
if (model != null) {
|
||||
@ -850,8 +850,8 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib
|
||||
if (accessibleContext != null) {
|
||||
accessibleContext.firePropertyChange(
|
||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||
new Integer(oldValue),
|
||||
new Integer(brm.getValue()));
|
||||
Integer.valueOf(oldValue),
|
||||
Integer.valueOf(brm.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1087,7 +1087,7 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib
|
||||
* @return the current value of this object
|
||||
*/
|
||||
public Number getCurrentAccessibleValue() {
|
||||
return new Integer(getValue());
|
||||
return Integer.valueOf(getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1110,7 +1110,7 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib
|
||||
* @return the minimum value of this object
|
||||
*/
|
||||
public Number getMinimumAccessibleValue() {
|
||||
return new Integer(getMinimum());
|
||||
return Integer.valueOf(getMinimum());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1120,7 +1120,7 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib
|
||||
*/
|
||||
public Number getMaximumAccessibleValue() {
|
||||
// TIGER - 4422362
|
||||
return new Integer(model.getMaximum() - model.getExtent());
|
||||
return Integer.valueOf(model.getMaximum() - model.getExtent());
|
||||
}
|
||||
|
||||
} // AccessibleJProgressBar
|
||||
|
@ -314,7 +314,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
|
||||
BoundedRangeModel oldModel = model;
|
||||
if (model != null) {
|
||||
model.removeChangeListener(fwdAdjustmentEvents);
|
||||
oldValue = new Integer(model.getValue());
|
||||
oldValue = Integer.valueOf(model.getValue());
|
||||
}
|
||||
model = newModel;
|
||||
if (model != null) {
|
||||
@ -465,8 +465,8 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
|
||||
if (accessibleContext != null) {
|
||||
accessibleContext.firePropertyChange(
|
||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||
new Integer(oldValue),
|
||||
new Integer(m.getValue()));
|
||||
Integer.valueOf(oldValue),
|
||||
Integer.valueOf(m.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -611,8 +611,8 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
|
||||
if (accessibleContext != null) {
|
||||
accessibleContext.firePropertyChange(
|
||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||
new Integer(oldValue),
|
||||
new Integer(m.getValue()));
|
||||
Integer.valueOf(oldValue),
|
||||
Integer.valueOf(m.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -880,7 +880,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
|
||||
* @return The current value of this object.
|
||||
*/
|
||||
public Number getCurrentAccessibleValue() {
|
||||
return new Integer(getValue());
|
||||
return Integer.valueOf(getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -903,7 +903,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
|
||||
* @return The minimum value of this object.
|
||||
*/
|
||||
public Number getMinimumAccessibleValue() {
|
||||
return new Integer(getMinimum());
|
||||
return Integer.valueOf(getMinimum());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -485,9 +485,9 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
|
||||
accessibleContext.firePropertyChange(
|
||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||
(oldModel == null
|
||||
? null : new Integer(oldModel.getValue())),
|
||||
? null : Integer.valueOf(oldModel.getValue())),
|
||||
(newModel == null
|
||||
? null : new Integer(newModel.getValue())));
|
||||
? null : Integer.valueOf(newModel.getValue())));
|
||||
}
|
||||
}
|
||||
|
||||
@ -538,8 +538,8 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
|
||||
if (accessibleContext != null) {
|
||||
accessibleContext.firePropertyChange(
|
||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||
new Integer(oldValue),
|
||||
new Integer(m.getValue()));
|
||||
Integer.valueOf(oldValue),
|
||||
Integer.valueOf(m.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -581,7 +581,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
|
||||
public void setMinimum(int minimum) {
|
||||
int oldMin = getModel().getMinimum();
|
||||
getModel().setMinimum(minimum);
|
||||
firePropertyChange( "minimum", new Integer( oldMin ), new Integer( minimum ) );
|
||||
firePropertyChange( "minimum", Integer.valueOf( oldMin ), Integer.valueOf( minimum ) );
|
||||
}
|
||||
|
||||
|
||||
@ -622,7 +622,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
|
||||
public void setMaximum(int maximum) {
|
||||
int oldMax = getModel().getMaximum();
|
||||
getModel().setMaximum(maximum);
|
||||
firePropertyChange( "maximum", new Integer( oldMax ), new Integer( maximum ) );
|
||||
firePropertyChange( "maximum", Integer.valueOf( oldMax ), Integer.valueOf( maximum ) );
|
||||
}
|
||||
|
||||
|
||||
@ -989,7 +989,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
|
||||
|
||||
void createLabels() {
|
||||
for ( int labelIndex = start; labelIndex <= getMaximum(); labelIndex += increment ) {
|
||||
put( new Integer( labelIndex ), new LabelUIResource( ""+labelIndex, JLabel.CENTER ) );
|
||||
put( Integer.valueOf( labelIndex ), new LabelUIResource( ""+labelIndex, JLabel.CENTER ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1463,7 +1463,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
|
||||
* @return The current value of this object.
|
||||
*/
|
||||
public Number getCurrentAccessibleValue() {
|
||||
return new Integer(getValue());
|
||||
return Integer.valueOf(getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1486,7 +1486,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
|
||||
* @return The minimum value of this object.
|
||||
*/
|
||||
public Number getMinimumAccessibleValue() {
|
||||
return new Integer(getMinimum());
|
||||
return Integer.valueOf(getMinimum());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1497,7 +1497,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
|
||||
public Number getMaximumAccessibleValue() {
|
||||
// TIGER - 4422362
|
||||
BoundedRangeModel model = JSlider.this.getModel();
|
||||
return new Integer(model.getMaximum() - model.getExtent());
|
||||
return Integer.valueOf(model.getMaximum() - model.getExtent());
|
||||
}
|
||||
} // AccessibleJSlider
|
||||
}
|
||||
|
@ -1195,7 +1195,7 @@ public class JSplitPane extends JComponent implements Accessible
|
||||
* @return a localized String describing the value of this object
|
||||
*/
|
||||
public Number getCurrentAccessibleValue() {
|
||||
return new Integer(getDividerLocation());
|
||||
return Integer.valueOf(getDividerLocation());
|
||||
}
|
||||
|
||||
|
||||
@ -1220,7 +1220,7 @@ public class JSplitPane extends JComponent implements Accessible
|
||||
* @return The minimum value of this object.
|
||||
*/
|
||||
public Number getMinimumAccessibleValue() {
|
||||
return new Integer(getUI().getMinimumDividerLocation(
|
||||
return Integer.valueOf(getUI().getMinimumDividerLocation(
|
||||
JSplitPane.this));
|
||||
}
|
||||
|
||||
@ -1231,7 +1231,7 @@ public class JSplitPane extends JComponent implements Accessible
|
||||
* @return The maximum value of this object.
|
||||
*/
|
||||
public Number getMaximumAccessibleValue() {
|
||||
return new Integer(getUI().getMaximumDividerLocation(
|
||||
return Integer.valueOf(getUI().getMaximumDividerLocation(
|
||||
JSplitPane.this));
|
||||
}
|
||||
|
||||
|
@ -967,7 +967,7 @@ public class JTabbedPane extends JComponent
|
||||
// currently no IndexPropertyChangeEvent. Once
|
||||
// IndexPropertyChangeEvents have been added this code should be
|
||||
// modified to use it.
|
||||
putClientProperty("__index_to_remove__", new Integer(index));
|
||||
putClientProperty("__index_to_remove__", Integer.valueOf(index));
|
||||
|
||||
/* if the selected tab is after the removal */
|
||||
if (selected > index) {
|
||||
|
@ -7680,7 +7680,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||
*/
|
||||
public Accessible getAccessibleRowDescription(int r) {
|
||||
if (r < 0 || r >= getAccessibleRowCount()) {
|
||||
throw new IllegalArgumentException(new Integer(r).toString());
|
||||
throw new IllegalArgumentException(Integer.toString(r));
|
||||
}
|
||||
if (rowDescription == null) {
|
||||
return null;
|
||||
@ -7698,7 +7698,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||
*/
|
||||
public void setAccessibleRowDescription(int r, Accessible a) {
|
||||
if (r < 0 || r >= getAccessibleRowCount()) {
|
||||
throw new IllegalArgumentException(new Integer(r).toString());
|
||||
throw new IllegalArgumentException(Integer.toString(r));
|
||||
}
|
||||
if (rowDescription == null) {
|
||||
int numRows = getAccessibleRowCount();
|
||||
@ -7716,7 +7716,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||
*/
|
||||
public Accessible getAccessibleColumnDescription(int c) {
|
||||
if (c < 0 || c >= getAccessibleColumnCount()) {
|
||||
throw new IllegalArgumentException(new Integer(c).toString());
|
||||
throw new IllegalArgumentException(Integer.toString(c));
|
||||
}
|
||||
if (columnDescription == null) {
|
||||
return null;
|
||||
@ -7734,7 +7734,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||
*/
|
||||
public void setAccessibleColumnDescription(int c, Accessible a) {
|
||||
if (c < 0 || c >= getAccessibleColumnCount()) {
|
||||
throw new IllegalArgumentException(new Integer(c).toString());
|
||||
throw new IllegalArgumentException(Integer.toString(c));
|
||||
}
|
||||
if (columnDescription == null) {
|
||||
int numColumns = getAccessibleColumnCount();
|
||||
|
@ -267,7 +267,7 @@ public class JTextArea extends JTextComponent {
|
||||
Document doc = getDocument();
|
||||
if (doc != null) {
|
||||
int old = getTabSize();
|
||||
doc.putProperty(PlainDocument.tabSizeAttribute, new Integer(size));
|
||||
doc.putProperty(PlainDocument.tabSizeAttribute, Integer.valueOf(size));
|
||||
firePropertyChange("tabSize", old, size);
|
||||
}
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel implements Serializ
|
||||
* <code>minimum <= value <= maximum</code>
|
||||
*/
|
||||
public SpinnerNumberModel(int value, int minimum, int maximum, int stepSize) {
|
||||
this(new Integer(value), new Integer(minimum), new Integer(maximum), new Integer(stepSize));
|
||||
this(Integer.valueOf(value), Integer.valueOf(minimum), Integer.valueOf(maximum), Integer.valueOf(stepSize));
|
||||
}
|
||||
|
||||
|
||||
@ -171,7 +171,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel implements Serializ
|
||||
* <code>stepSize</code> equal to one, and an initial value of zero.
|
||||
*/
|
||||
public SpinnerNumberModel() {
|
||||
this(new Integer(0), null, null, new Integer(1));
|
||||
this(Integer.valueOf(0), null, null, Integer.valueOf(1));
|
||||
}
|
||||
|
||||
|
||||
@ -333,16 +333,16 @@ public class SpinnerNumberModel extends AbstractSpinnerModel implements Serializ
|
||||
long v = value.longValue() + (stepSize.longValue() * (long)dir);
|
||||
|
||||
if (value instanceof Long) {
|
||||
newValue = new Long(v);
|
||||
newValue = Long.valueOf(v);
|
||||
}
|
||||
else if (value instanceof Integer) {
|
||||
newValue = new Integer((int)v);
|
||||
newValue = Integer.valueOf((int)v);
|
||||
}
|
||||
else if (value instanceof Short) {
|
||||
newValue = new Short((short)v);
|
||||
newValue = Short.valueOf((short)v);
|
||||
}
|
||||
else {
|
||||
newValue = new Byte((byte)v);
|
||||
newValue = Byte.valueOf((byte)v);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ class TablePrintable implements Printable {
|
||||
}
|
||||
|
||||
// to pass the page number when formatting the header and footer text
|
||||
Object[] pageNumber = new Object[]{new Integer(pageIndex + 1)};
|
||||
Object[] pageNumber = new Object[]{Integer.valueOf(pageIndex + 1)};
|
||||
|
||||
// fetch the formatted header text, if any
|
||||
String headerText = null;
|
||||
|
@ -109,7 +109,7 @@ public class BasicButtonUI extends ButtonUI{
|
||||
LookAndFeel.installProperty(b, "rolloverEnabled", rollover);
|
||||
}
|
||||
|
||||
LookAndFeel.installProperty(b, "iconTextGap", new Integer(4));
|
||||
LookAndFeel.installProperty(b, "iconTextGap", Integer.valueOf(4));
|
||||
}
|
||||
|
||||
protected void installListeners(AbstractButton b) {
|
||||
|
@ -654,7 +654,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
|
||||
"javax.swing.plaf.basic.BasicIconFactory",
|
||||
"getRadioButtonMenuItemIcon");
|
||||
|
||||
Object menuItemAcceleratorDelimiter = new String("+");
|
||||
Object menuItemAcceleratorDelimiter = "+";
|
||||
|
||||
// *** OptionPane value objects
|
||||
|
||||
|
@ -146,7 +146,7 @@ public class BasicMenuItemUI extends MenuItemUI
|
||||
menuItem.setMargin(UIManager.getInsets(prefix + ".margin"));
|
||||
}
|
||||
|
||||
LookAndFeel.installProperty(menuItem, "iconTextGap", new Integer(4));
|
||||
LookAndFeel.installProperty(menuItem, "iconTextGap", Integer.valueOf(4));
|
||||
defaultTextIconGap = menuItem.getIconTextGap();
|
||||
|
||||
LookAndFeel.installBorder(menuItem, prefix + ".border");
|
||||
|
@ -1195,10 +1195,10 @@ public class BasicOptionPaneUI extends OptionPaneUI {
|
||||
if (options == null) {
|
||||
if (optionType == JOptionPane.OK_CANCEL_OPTION &&
|
||||
buttonIndex == 1) {
|
||||
optionPane.setValue(new Integer(2));
|
||||
optionPane.setValue(Integer.valueOf(2));
|
||||
|
||||
} else {
|
||||
optionPane.setValue(new Integer(buttonIndex));
|
||||
optionPane.setValue(Integer.valueOf(buttonIndex));
|
||||
}
|
||||
} else {
|
||||
optionPane.setValue(options[buttonIndex]);
|
||||
@ -1393,7 +1393,7 @@ public class BasicOptionPaneUI extends OptionPaneUI {
|
||||
if (getName() == CLOSE) {
|
||||
JOptionPane optionPane = (JOptionPane)e.getSource();
|
||||
|
||||
optionPane.setValue(new Integer(JOptionPane.CLOSED_OPTION));
|
||||
optionPane.setValue(Integer.valueOf(JOptionPane.CLOSED_OPTION));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -539,7 +539,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
|
||||
}
|
||||
mnemonicInputMap.put(KeyStroke.getKeyStroke(mnemonic, Event.ALT_MASK),
|
||||
"setSelectedIndex");
|
||||
mnemonicToIndexMap.put(new Integer(mnemonic), new Integer(index));
|
||||
mnemonicToIndexMap.put(Integer.valueOf(mnemonic), Integer.valueOf(index));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2231,7 +2231,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants {
|
||||
mnemonic -= ('a' - 'A');
|
||||
}
|
||||
Integer index = (Integer)ui.mnemonicToIndexMap.
|
||||
get(new Integer(mnemonic));
|
||||
get(Integer.valueOf(mnemonic));
|
||||
if (index != null && pane.isEnabledAt(index.intValue())) {
|
||||
pane.setSelectedIndex(index.intValue());
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
|
||||
dragWindow = null;
|
||||
dockingSource = null;
|
||||
|
||||
c.putClientProperty( FOCUSED_COMP_INDEX, new Integer( focusedCompIndex ) );
|
||||
c.putClientProperty( FOCUSED_COMP_INDEX, Integer.valueOf( focusedCompIndex ) );
|
||||
}
|
||||
|
||||
protected void installDefaults( )
|
||||
|
@ -455,7 +455,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
|
||||
|
||||
Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0);
|
||||
|
||||
Integer zero = new Integer(0);
|
||||
Integer zero = Integer.valueOf(0);
|
||||
|
||||
Object textFieldBorder =
|
||||
new SwingLazyValue("javax.swing.plaf.metal.MetalBorders",
|
||||
@ -904,7 +904,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
|
||||
"ProgressBar.selectionBackground", primaryControlDarkShadow,
|
||||
"ProgressBar.border", progressBarBorder,
|
||||
"ProgressBar.cellSpacing", zero,
|
||||
"ProgressBar.cellLength", new Integer(1),
|
||||
"ProgressBar.cellLength", Integer.valueOf(1),
|
||||
|
||||
// Combo Box
|
||||
"ComboBox.background", control,
|
||||
@ -971,7 +971,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
|
||||
"DesktopIcon.font", controlTextValue,
|
||||
"DesktopIcon.foreground", controlTextColor,
|
||||
"DesktopIcon.background", control,
|
||||
"DesktopIcon.width", new Integer(160),
|
||||
"DesktopIcon.width", Integer.valueOf(160),
|
||||
|
||||
"Desktop.ancestorInputMap",
|
||||
new UIDefaults.LazyInputMap(new Object[] {
|
||||
|
@ -53,7 +53,7 @@ class SynthArrowButton extends JButton implements SwingConstants, UIResource {
|
||||
|
||||
public void setDirection(int dir) {
|
||||
direction = dir;
|
||||
putClientProperty("__arrow_direction__", new Integer(dir));
|
||||
putClientProperty("__arrow_direction__", Integer.valueOf(dir));
|
||||
repaint();
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ class SynthDesktopPaneUI extends BasicDesktopPaneUI implements
|
||||
}
|
||||
taskBar.setBackground(desktop.getBackground());
|
||||
desktop.add(taskBar,
|
||||
new Integer(JLayeredPane.PALETTE_LAYER.intValue() + 1));
|
||||
Integer.valueOf(JLayeredPane.PALETTE_LAYER.intValue() + 1));
|
||||
if (desktop.isShowing()) {
|
||||
taskBar.adjustSize();
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ class SynthSplitPaneUI extends BasicSplitPaneUI implements
|
||||
if (style != oldStyle) {
|
||||
Object value = style.get(context, "SplitPane.size");
|
||||
if (value == null) {
|
||||
value = new Integer(6);
|
||||
value = Integer.valueOf(6);
|
||||
}
|
||||
LookAndFeel.installProperty(splitPane, "dividerSize", value);
|
||||
|
||||
|
@ -281,7 +281,7 @@ public class TableColumn extends Object implements Serializable {
|
||||
|
||||
private void firePropertyChange(String propertyName, int oldValue, int newValue) {
|
||||
if (oldValue != newValue) {
|
||||
firePropertyChange(propertyName, new Integer(oldValue), new Integer(newValue));
|
||||
firePropertyChange(propertyName, Integer.valueOf(oldValue), Integer.valueOf(newValue));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -351,7 +351,7 @@ public abstract class AbstractDocument implements Document, Serializable {
|
||||
* loaded asynchronously
|
||||
*/
|
||||
public void setAsynchronousLoadPriority(int p) {
|
||||
Integer loadPriority = (p >= 0) ? new Integer(p) : null;
|
||||
Integer loadPriority = (p >= 0) ? Integer.valueOf(p) : null;
|
||||
putProperty(AbstractDocument.AsyncLoadPriority, loadPriority);
|
||||
}
|
||||
|
||||
@ -2675,7 +2675,7 @@ public abstract class AbstractDocument implements Document, Serializable {
|
||||
*/
|
||||
BidiElement(Element parent, int start, int end, int level) {
|
||||
super(parent, new SimpleAttributeSet(), start, end);
|
||||
addAttribute(StyleConstants.BidiLevel, new Integer(level));
|
||||
addAttribute(StyleConstants.BidiLevel, Integer.valueOf(level));
|
||||
//System.out.println("BidiElement: start = " + start
|
||||
// + " end = " + end + " level = " + level );
|
||||
}
|
||||
|
@ -173,23 +173,24 @@ public class NumberFormatter extends InternationalFormatter {
|
||||
*/
|
||||
private Object convertValueToValueClass(Object value, Class valueClass) {
|
||||
if (valueClass != null && (value instanceof Number)) {
|
||||
Number numberValue = (Number)value;
|
||||
if (valueClass == Integer.class) {
|
||||
return new Integer(((Number)value).intValue());
|
||||
return Integer.valueOf(numberValue.intValue());
|
||||
}
|
||||
else if (valueClass == Long.class) {
|
||||
return new Long(((Number)value).longValue());
|
||||
return Long.valueOf(numberValue.longValue());
|
||||
}
|
||||
else if (valueClass == Float.class) {
|
||||
return new Float(((Number)value).floatValue());
|
||||
return Float.valueOf(numberValue.floatValue());
|
||||
}
|
||||
else if (valueClass == Double.class) {
|
||||
return new Double(((Number)value).doubleValue());
|
||||
return Double.valueOf(numberValue.doubleValue());
|
||||
}
|
||||
else if (valueClass == Byte.class) {
|
||||
return new Byte(((Number)value).byteValue());
|
||||
return Byte.valueOf(numberValue.byteValue());
|
||||
}
|
||||
else if (valueClass == Short.class) {
|
||||
return new Short(((Number)value).shortValue());
|
||||
return Short.valueOf(numberValue.shortValue());
|
||||
}
|
||||
}
|
||||
return value;
|
||||
|
@ -89,7 +89,7 @@ public class PlainDocument extends AbstractDocument {
|
||||
*/
|
||||
public PlainDocument(Content c) {
|
||||
super(c);
|
||||
putProperty(tabSizeAttribute, new Integer(8));
|
||||
putProperty(tabSizeAttribute, Integer.valueOf(8));
|
||||
defaultRoot = createDefaultRoot();
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ public class Segment implements Cloneable, CharacterIterator, CharSequence {
|
||||
if (array != null) {
|
||||
return new String(array, offset, count);
|
||||
}
|
||||
return new String();
|
||||
return "";
|
||||
}
|
||||
|
||||
// --- CharacterIterator methods -------------------------------------
|
||||
|
@ -296,7 +296,7 @@ public class StyleConstants {
|
||||
* @param o the bidi level value
|
||||
*/
|
||||
public static void setBidiLevel(MutableAttributeSet a, int o) {
|
||||
a.addAttribute(BidiLevel, new Integer(o));
|
||||
a.addAttribute(BidiLevel, Integer.valueOf(o));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -386,7 +386,7 @@ public class StyleConstants {
|
||||
* @param s the font size
|
||||
*/
|
||||
public static void setFontSize(MutableAttributeSet a, int s) {
|
||||
a.addAttribute(FontSize, new Integer(s));
|
||||
a.addAttribute(FontSize, Integer.valueOf(s));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -753,7 +753,7 @@ public class StyleConstants {
|
||||
* @param align the alignment value
|
||||
*/
|
||||
public static void setAlignment(MutableAttributeSet a, int align) {
|
||||
a.addAttribute(Alignment, new Integer(align));
|
||||
a.addAttribute(Alignment, Integer.valueOf(align));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1970,7 +1970,7 @@ class AccessibleHTML implements Accessible {
|
||||
|
||||
for (int i = 0; i < nRows; i++) {
|
||||
if (isAccessibleRowSelected(i)) {
|
||||
vec.addElement(new Integer(i));
|
||||
vec.addElement(Integer.valueOf(i));
|
||||
}
|
||||
}
|
||||
int retval[] = new int[vec.size()];
|
||||
@ -1995,7 +1995,7 @@ class AccessibleHTML implements Accessible {
|
||||
|
||||
for (int i = 0; i < nColumns; i++) {
|
||||
if (isAccessibleColumnSelected(i)) {
|
||||
vec.addElement(new Integer(i));
|
||||
vec.addElement(Integer.valueOf(i));
|
||||
}
|
||||
}
|
||||
int retval[] = new int[vec.size()];
|
||||
@ -2139,7 +2139,7 @@ class AccessibleHTML implements Accessible {
|
||||
private int columnCount = 0;
|
||||
|
||||
public void addHeader(TableCellElementInfo cellInfo, int rowNumber) {
|
||||
Integer rowInteger = new Integer(rowNumber);
|
||||
Integer rowInteger = Integer.valueOf(rowNumber);
|
||||
ArrayList list = (ArrayList)headers.get(rowInteger);
|
||||
if (list == null) {
|
||||
list = new ArrayList();
|
||||
@ -2201,7 +2201,7 @@ class AccessibleHTML implements Accessible {
|
||||
}
|
||||
|
||||
private TableCellElementInfo getElementInfoAt(int r, int c) {
|
||||
ArrayList list = (ArrayList)headers.get(new Integer(r));
|
||||
ArrayList list = (ArrayList)headers.get(Integer.valueOf(r));
|
||||
if (list != null) {
|
||||
return (TableCellElementInfo)list.get(c);
|
||||
} else {
|
||||
|
@ -1099,7 +1099,7 @@ public class CSS implements Serializable {
|
||||
*/
|
||||
static String colorToHex(Color color) {
|
||||
|
||||
String colorstr = new String("#");
|
||||
String colorstr = "#";
|
||||
|
||||
// Red
|
||||
String str = Integer.toHexString(color.getRed());
|
||||
|
@ -1899,8 +1899,8 @@ public class HTMLEditorKit extends StyledEditorKit implements Accessible {
|
||||
// assistive technologies listening for such events.
|
||||
comp.getAccessibleContext().firePropertyChange(
|
||||
AccessibleContext.ACCESSIBLE_HYPERTEXT_OFFSET,
|
||||
new Integer(kit.prevHypertextOffset),
|
||||
new Integer(e.getDot()));
|
||||
Integer.valueOf(kit.prevHypertextOffset),
|
||||
Integer.valueOf(e.getDot()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ class AttributeList implements DTDConstants, Serializable {
|
||||
static Hashtable attributeTypes = new Hashtable();
|
||||
|
||||
static void defineAttributeType(String nm, int val) {
|
||||
Integer num = new Integer(val);
|
||||
Integer num = Integer.valueOf(val);
|
||||
attributeTypes.put(nm, num);
|
||||
attributeTypes.put(num, nm);
|
||||
}
|
||||
@ -154,11 +154,11 @@ class AttributeList implements DTDConstants, Serializable {
|
||||
defineAttributeType("NUTOKEN", NUTOKEN);
|
||||
defineAttributeType("NUTOKENS", NUTOKENS);
|
||||
|
||||
attributeTypes.put("fixed", new Integer(FIXED));
|
||||
attributeTypes.put("required", new Integer(REQUIRED));
|
||||
attributeTypes.put("current", new Integer(CURRENT));
|
||||
attributeTypes.put("conref", new Integer(CONREF));
|
||||
attributeTypes.put("implied", new Integer(IMPLIED));
|
||||
attributeTypes.put("fixed", Integer.valueOf(FIXED));
|
||||
attributeTypes.put("required", Integer.valueOf(REQUIRED));
|
||||
attributeTypes.put("current", Integer.valueOf(CURRENT));
|
||||
attributeTypes.put("conref", Integer.valueOf(CONREF));
|
||||
attributeTypes.put("implied", Integer.valueOf(IMPLIED));
|
||||
}
|
||||
|
||||
public static int name2type(String nm) {
|
||||
@ -167,6 +167,6 @@ class AttributeList implements DTDConstants, Serializable {
|
||||
}
|
||||
|
||||
public static String type2name(int tp) {
|
||||
return (String)attributeTypes.get(new Integer(tp));
|
||||
return (String)attributeTypes.get(Integer.valueOf(tp));
|
||||
}
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ class DTD implements DTDConstants {
|
||||
* <code>ch</code> character
|
||||
*/
|
||||
public Entity getEntity(int ch) {
|
||||
return (Entity)entityHash.get(new Integer(ch));
|
||||
return (Entity)entityHash.get(Integer.valueOf(ch));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -178,7 +178,7 @@ class DTD implements DTDConstants {
|
||||
switch (type & ~GENERAL) {
|
||||
case CDATA:
|
||||
case SDATA:
|
||||
entityHash.put(new Integer(data[0]), ent);
|
||||
entityHash.put(Integer.valueOf(data[0]), ent);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -162,10 +162,10 @@ class Element implements DTDConstants, Serializable {
|
||||
static Hashtable contentTypes = new Hashtable();
|
||||
|
||||
static {
|
||||
contentTypes.put("CDATA", new Integer(CDATA));
|
||||
contentTypes.put("RCDATA", new Integer(RCDATA));
|
||||
contentTypes.put("EMPTY", new Integer(EMPTY));
|
||||
contentTypes.put("ANY", new Integer(ANY));
|
||||
contentTypes.put("CDATA", Integer.valueOf(CDATA));
|
||||
contentTypes.put("RCDATA", Integer.valueOf(RCDATA));
|
||||
contentTypes.put("EMPTY", Integer.valueOf(EMPTY));
|
||||
contentTypes.put("ANY", Integer.valueOf(ANY));
|
||||
}
|
||||
|
||||
public static int name2type(String nm) {
|
||||
|
@ -110,15 +110,15 @@ class Entity implements DTDConstants {
|
||||
static Hashtable entityTypes = new Hashtable();
|
||||
|
||||
static {
|
||||
entityTypes.put("PUBLIC", new Integer(PUBLIC));
|
||||
entityTypes.put("CDATA", new Integer(CDATA));
|
||||
entityTypes.put("SDATA", new Integer(SDATA));
|
||||
entityTypes.put("PI", new Integer(PI));
|
||||
entityTypes.put("STARTTAG", new Integer(STARTTAG));
|
||||
entityTypes.put("ENDTAG", new Integer(ENDTAG));
|
||||
entityTypes.put("MS", new Integer(MS));
|
||||
entityTypes.put("MD", new Integer(MD));
|
||||
entityTypes.put("SYSTEM", new Integer(SYSTEM));
|
||||
entityTypes.put("PUBLIC", Integer.valueOf(PUBLIC));
|
||||
entityTypes.put("CDATA", Integer.valueOf(CDATA));
|
||||
entityTypes.put("SDATA", Integer.valueOf(SDATA));
|
||||
entityTypes.put("PI", Integer.valueOf(PI));
|
||||
entityTypes.put("STARTTAG", Integer.valueOf(STARTTAG));
|
||||
entityTypes.put("ENDTAG", Integer.valueOf(ENDTAG));
|
||||
entityTypes.put("MS", Integer.valueOf(MS));
|
||||
entityTypes.put("MD", Integer.valueOf(MD));
|
||||
entityTypes.put("SYSTEM", Integer.valueOf(SYSTEM));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1842,7 +1842,7 @@ class Parser implements DTDConstants {
|
||||
String elemStr = getString(0);
|
||||
|
||||
if (elemStr.equals("image")) {
|
||||
elemStr = new String("img");
|
||||
elemStr = "img";
|
||||
}
|
||||
|
||||
/* determine if this element is part of the dtd. */
|
||||
|
@ -281,7 +281,7 @@ class RTFAttributes
|
||||
public AssertiveAttribute(int d, Object s, String r, int v)
|
||||
{
|
||||
super(d, s, r);
|
||||
swingValue = new Integer(v);
|
||||
swingValue = Integer.valueOf(v);
|
||||
}
|
||||
|
||||
public boolean set(MutableAttributeSet target)
|
||||
@ -343,7 +343,7 @@ class RTFAttributes
|
||||
public NumericAttribute(int d, Object s,
|
||||
String r, int ds, int dr)
|
||||
{
|
||||
this(d, s, r, new Integer(ds), dr, 1f);
|
||||
this(d, s, r, Integer.valueOf(ds), dr, 1f);
|
||||
}
|
||||
|
||||
public NumericAttribute(int d, Object s,
|
||||
@ -377,7 +377,7 @@ class RTFAttributes
|
||||
Number swingValue;
|
||||
|
||||
if (scale == 1f)
|
||||
swingValue = new Integer(parameter);
|
||||
swingValue = Integer.valueOf(parameter);
|
||||
else
|
||||
swingValue = new Float(parameter / scale);
|
||||
target.addAttribute(swingName, swingValue);
|
||||
|
@ -83,11 +83,7 @@ class RTFGenerator extends Object
|
||||
static public final String defaultFontFamily = "Helvetica";
|
||||
|
||||
/* constants so we can avoid allocating objects in inner loops */
|
||||
/* these should all be final, but javac seems to be a bit buggy */
|
||||
static protected Integer One, Zero;
|
||||
static protected Boolean False;
|
||||
static protected Float ZeroPointZero;
|
||||
static private Object MagicToken;
|
||||
final static private Object MagicToken;
|
||||
|
||||
/* An array of character-keyword pairs. This could be done
|
||||
as a dictionary (and lookup would be quicker), but that
|
||||
@ -98,11 +94,7 @@ class RTFGenerator extends Object
|
||||
static protected CharacterKeywordPair[] textKeywords;
|
||||
|
||||
static {
|
||||
One = new Integer(1);
|
||||
Zero = new Integer(0);
|
||||
False = Boolean.valueOf(false);
|
||||
MagicToken = new Object();
|
||||
ZeroPointZero = new Float(0);
|
||||
|
||||
Dictionary textKeywordDictionary = RTFReader.textKeywords;
|
||||
Enumeration keys = textKeywordDictionary.keys();
|
||||
@ -142,7 +134,7 @@ static public void writeDocument(Document d, OutputStream to)
|
||||
public RTFGenerator(OutputStream to)
|
||||
{
|
||||
colorTable = new Hashtable();
|
||||
colorTable.put(defaultRTFColor, new Integer(0));
|
||||
colorTable.put(defaultRTFColor, Integer.valueOf(0));
|
||||
colorCount = 1;
|
||||
|
||||
fontTable = new Hashtable();
|
||||
@ -693,7 +685,7 @@ protected void resetParagraphAttributes(MutableAttributeSet currentAttributes)
|
||||
{
|
||||
writeControlWord("pard");
|
||||
|
||||
currentAttributes.addAttribute(StyleConstants.Alignment, Zero);
|
||||
currentAttributes.addAttribute(StyleConstants.Alignment, Integer.valueOf(0));
|
||||
|
||||
int wordIndex;
|
||||
int wordCount = RTFAttributes.attributes.length;
|
||||
|
@ -157,8 +157,8 @@ public class DefaultTreeSelectionModel extends Object implements Cloneable, Seri
|
||||
selectionMode = TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION;
|
||||
if(oldMode != selectionMode && changeSupport != null)
|
||||
changeSupport.firePropertyChange(SELECTION_MODE_PROPERTY,
|
||||
new Integer(oldMode),
|
||||
new Integer(selectionMode));
|
||||
Integer.valueOf(oldMode),
|
||||
Integer.valueOf(selectionMode));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -285,7 +285,7 @@ abstract class AppletPanel extends Panel implements AppletStub, Runnable {
|
||||
//System.out.println("SEND0= " + id);
|
||||
queue = new Queue();
|
||||
}
|
||||
Integer eventId = new Integer(id);
|
||||
Integer eventId = Integer.valueOf(id);
|
||||
queue.enqueue(eventId);
|
||||
notifyAll();
|
||||
}
|
||||
|
@ -587,9 +587,9 @@ public class AppletViewer extends Frame implements AppletContext,
|
||||
Dimension d = panel.size();
|
||||
Insets in = panel.insets();
|
||||
panel.atts.put("width",
|
||||
new Integer(d.width - (in.left + in.right)).toString());
|
||||
Integer.toString(d.width - (in.left + in.right)));
|
||||
panel.atts.put("height",
|
||||
new Integer(d.height - (in.top + in.bottom)).toString());
|
||||
Integer.toString(d.height - (in.top + in.bottom)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1956,7 +1956,7 @@ public abstract class FontConfiguration {
|
||||
/*Init these tables to allow componentFontNameID, fontfileNameIDs
|
||||
to start from "1".
|
||||
*/
|
||||
componentFontNameIDs.put("", new Short((short)0));
|
||||
componentFontNameIDs.put("", Short.valueOf((short)0));
|
||||
|
||||
fontfileNameIDs = new HashMap<String, Short>();
|
||||
filenames = new HashMap<Short, Short>();
|
||||
|
@ -556,7 +556,7 @@ public class InputContext extends java.awt.im.InputContext
|
||||
}
|
||||
usedInputMethods.put(inputMethodLocator.deriveLocator(null), inputMethod);
|
||||
perInputMethodState.put(inputMethod,
|
||||
new Boolean(clientWindowNotificationEnabled));
|
||||
Boolean.valueOf(clientWindowNotificationEnabled));
|
||||
enableClientWindowNotification(inputMethod, false);
|
||||
if (this == inputMethodWindowContext) {
|
||||
inputMethod.hideWindows();
|
||||
@ -921,7 +921,7 @@ public class InputContext extends java.awt.im.InputContext
|
||||
if (perInputMethodState == null) {
|
||||
perInputMethodState = new HashMap(5);
|
||||
}
|
||||
perInputMethodState.put(requester, new Boolean(enable));
|
||||
perInputMethodState.put(requester, Boolean.valueOf(enable));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -657,7 +657,7 @@ public class FileFontStrike extends PhysicalStrike {
|
||||
* we first obtain this information, then the image, and never
|
||||
* will access this value again.
|
||||
*/
|
||||
Integer key = new Integer(glyphCode);
|
||||
Integer key = Integer.valueOf(glyphCode);
|
||||
Point2D.Float value = null;
|
||||
ConcurrentHashMap<Integer, Point2D.Float> glyphMetricsMap = null;
|
||||
if (glyphMetricsMapRef != null) {
|
||||
@ -724,7 +724,7 @@ public class FileFontStrike extends PhysicalStrike {
|
||||
boundsMap = new ConcurrentHashMap<Integer, Rectangle2D.Float>();
|
||||
}
|
||||
|
||||
Integer key = new Integer(glyphCode);
|
||||
Integer key = Integer.valueOf(glyphCode);
|
||||
Rectangle2D.Float bounds = boundsMap.get(key);
|
||||
|
||||
if (bounds == null) {
|
||||
|
@ -2124,7 +2124,7 @@ public final class FontManager {
|
||||
|
||||
private static void addLCIDMapEntry(Map<String, Short> map,
|
||||
String key, short value) {
|
||||
map.put(key, new Short(value));
|
||||
map.put(key, Short.valueOf(value));
|
||||
}
|
||||
|
||||
private static synchronized void createLCIDMap() {
|
||||
|
@ -117,7 +117,7 @@ public final class FontResolver {
|
||||
Font2D font2D = FontManager.getFont2D(font);
|
||||
if (font2D.hasSupplementaryChars()) {
|
||||
fonts.add(font);
|
||||
indices.add(new Integer(i));
|
||||
indices.add(Integer.valueOf(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ public abstract class PhysicalStrike extends FontStrike {
|
||||
*/
|
||||
Point2D.Float getGlyphPoint(int glyphCode, int ptNumber) {
|
||||
Point2D.Float gp = null;
|
||||
Integer ptKey = new Integer(glyphCode<<16|ptNumber);
|
||||
Integer ptKey = Integer.valueOf(glyphCode<<16|ptNumber);
|
||||
if (glyphPointMapCache == null) {
|
||||
synchronized (this) {
|
||||
if (glyphPointMapCache == null) {
|
||||
|
@ -1374,7 +1374,7 @@ public final class SunGraphics2D
|
||||
SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS,
|
||||
fractionalMetricsHint));
|
||||
model.put(SunHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST,
|
||||
new Integer(lcdTextContrast));
|
||||
Integer.valueOf(lcdTextContrast));
|
||||
Object value;
|
||||
switch (interpolationHint) {
|
||||
case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR:
|
||||
|
@ -408,7 +408,7 @@ public final class SurfaceType {
|
||||
if (unusedUID > 255) {
|
||||
throw new InternalError("surface type id overflow");
|
||||
}
|
||||
i = new Integer(unusedUID++);
|
||||
i = Integer.valueOf(unusedUID++);
|
||||
surfaceUIDMap.put(desc, i);
|
||||
}
|
||||
return i.intValue();
|
||||
|
@ -1536,16 +1536,16 @@ public class PSPrinterJob extends RasterPrinterJob {
|
||||
execCmd = new String[ncomps];
|
||||
execCmd[n++] = "/usr/bin/lpr";
|
||||
if ((pFlags & PRINTER) != 0) {
|
||||
execCmd[n++] = new String("-P" + printer);
|
||||
execCmd[n++] = "-P" + printer;
|
||||
}
|
||||
if ((pFlags & BANNER) != 0) {
|
||||
execCmd[n++] = new String("-J" + banner);
|
||||
execCmd[n++] = "-J" + banner;
|
||||
}
|
||||
if ((pFlags & COPIES) != 0) {
|
||||
execCmd[n++] = new String("-#" + new Integer(copies).toString());
|
||||
execCmd[n++] = "-#" + copies;
|
||||
}
|
||||
if ((pFlags & NOSHEET) != 0) {
|
||||
execCmd[n++] = new String("-h");
|
||||
execCmd[n++] = "-h";
|
||||
}
|
||||
if ((pFlags & OPTIONS) != 0) {
|
||||
execCmd[n++] = new String(options);
|
||||
@ -1556,19 +1556,19 @@ public class PSPrinterJob extends RasterPrinterJob {
|
||||
execCmd[n++] = "/usr/bin/lp";
|
||||
execCmd[n++] = "-c"; // make a copy of the spool file
|
||||
if ((pFlags & PRINTER) != 0) {
|
||||
execCmd[n++] = new String("-d" + printer);
|
||||
execCmd[n++] = "-d" + printer;
|
||||
}
|
||||
if ((pFlags & BANNER) != 0) {
|
||||
execCmd[n++] = new String("-t" + banner);
|
||||
execCmd[n++] = "-t" + banner;
|
||||
}
|
||||
if ((pFlags & COPIES) != 0) {
|
||||
execCmd[n++] = new String("-n" + new Integer(copies).toString());
|
||||
execCmd[n++] = "-n" + copies;
|
||||
}
|
||||
if ((pFlags & NOSHEET) != 0) {
|
||||
execCmd[n++] = new String("-o nobanner");
|
||||
execCmd[n++] = "-o nobanner";
|
||||
}
|
||||
if ((pFlags & OPTIONS) != 0) {
|
||||
execCmd[n++] = new String("-o" + options);
|
||||
execCmd[n++] = "-o" + options;
|
||||
}
|
||||
}
|
||||
execCmd[n++] = spoolFile;
|
||||
|
@ -245,7 +245,7 @@ public abstract class RasterPrinterJob extends PrinterJob {
|
||||
/**
|
||||
* The name of the job being printed.
|
||||
*/
|
||||
private String mDocName = new String("Java Printing");
|
||||
private String mDocName = "Java Printing";
|
||||
|
||||
|
||||
/**
|
||||
|
@ -116,7 +116,7 @@ public final class VersionInfo
|
||||
throw new IllegalArgumentException(INVALID_VERSION_NUMBER_);
|
||||
}
|
||||
int version = getInt(major, minor, milli, micro);
|
||||
Integer key = new Integer(version);
|
||||
Integer key = Integer.valueOf(version);
|
||||
Object result = MAP_.get(key);
|
||||
if (result == null) {
|
||||
result = new VersionInfo(version);
|
||||
|
@ -317,7 +317,7 @@ abstract class XDropTargetProtocol {
|
||||
|
||||
protected final void removeEmbedderRegistryEntry(long embedder) {
|
||||
synchronized (this) {
|
||||
embedderRegistry.remove(new Long(embedder));
|
||||
embedderRegistry.remove(Long.valueOf(embedder));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ final class XDropTargetRegistry {
|
||||
|
||||
embedderProtocols = Collections.unmodifiableList(embedderProtocols);
|
||||
|
||||
Long lToplevel = new Long(embedder);
|
||||
Long lToplevel = Long.valueOf(embedder);
|
||||
boolean isXEmbedServer = false;
|
||||
synchronized (this) {
|
||||
EmbeddedDropSiteEntry entry =
|
||||
|
@ -383,11 +383,11 @@ public class XEmbedServerTester implements XEventDispatcher {
|
||||
try {
|
||||
XCreateWindowParams params =
|
||||
new XCreateWindowParams(new Object[] {
|
||||
XBaseWindow.PARENT_WINDOW, new Long(reparent?XToolkit.getDefaultRootWindow():parent),
|
||||
XBaseWindow.PARENT_WINDOW, Long.valueOf(reparent?XToolkit.getDefaultRootWindow():parent),
|
||||
XBaseWindow.BOUNDS, initialBounds,
|
||||
XBaseWindow.EMBEDDED, Boolean.TRUE,
|
||||
XBaseWindow.VISIBLE, Boolean.valueOf(mapped == XEmbedHelper.XEMBED_MAPPED),
|
||||
XBaseWindow.EVENT_MASK, new Long(VisibilityChangeMask | StructureNotifyMask |
|
||||
XBaseWindow.EVENT_MASK, Long.valueOf(VisibilityChangeMask | StructureNotifyMask |
|
||||
SubstructureNotifyMask | KeyPressMask)});
|
||||
window = new XBaseWindow(params);
|
||||
|
||||
|
@ -908,7 +908,7 @@ class FileDialogFilter implements FilenameFilter {
|
||||
* Converts the filter into the form which is acceptable by Java's regexps
|
||||
*/
|
||||
private String convert(String filter) {
|
||||
String regex = new String("^" + filter + "$");
|
||||
String regex = "^" + filter + "$";
|
||||
regex = regex.replaceAll("\\.", "\\\\.");
|
||||
regex = regex.replaceAll("\\?", ".");
|
||||
regex = regex.replaceAll("\\*", ".*");
|
||||
|
@ -458,16 +458,16 @@ abstract class XScrollbar {
|
||||
String type;
|
||||
switch (id) {
|
||||
case MouseEvent.MOUSE_PRESSED:
|
||||
type = new String("press");
|
||||
type = "press";
|
||||
break;
|
||||
case MouseEvent.MOUSE_RELEASED:
|
||||
type = new String("release");
|
||||
type = "release";
|
||||
break;
|
||||
case MouseEvent.MOUSE_DRAGGED:
|
||||
type = new String("drag");
|
||||
type = "drag";
|
||||
break;
|
||||
default:
|
||||
type = new String("other");
|
||||
type = "other";
|
||||
}
|
||||
log.finer("Mouse " + type + " event in scroll bar " + this +
|
||||
"x = " + x + ", y = " + y +
|
||||
|
@ -421,7 +421,7 @@ public class X11GraphicsConfig extends GraphicsConfiguration
|
||||
{
|
||||
return new SunVolatileImage(target,
|
||||
target.getWidth(), target.getHeight(),
|
||||
new Long(backBuffer));
|
||||
Long.valueOf(backBuffer));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -164,7 +164,7 @@ public class X11GraphicsDevice
|
||||
if (ret[i] == null) {
|
||||
boolean doubleBuffer =
|
||||
(dbeSupported &&
|
||||
doubleBufferVisuals.contains(new Integer(visNum)));
|
||||
doubleBufferVisuals.contains(Integer.valueOf(visNum)));
|
||||
ret[i] = X11GraphicsConfig.getConfig(this, visNum, depth,
|
||||
getConfigColormap(i, screen),
|
||||
doubleBuffer);
|
||||
@ -199,7 +199,7 @@ public class X11GraphicsDevice
|
||||
public static native boolean isDBESupported();
|
||||
// Callback for adding a new double buffer visual into our set
|
||||
private void addDoubleBufferVisual(int visNum) {
|
||||
doubleBufferVisuals.add(new Integer(visNum));
|
||||
doubleBufferVisuals.add(Integer.valueOf(visNum));
|
||||
}
|
||||
// Enumerates all visuals that support double buffering
|
||||
private native void getDoubleBufferVisuals(int screen);
|
||||
@ -239,7 +239,7 @@ public class X11GraphicsDevice
|
||||
doubleBufferVisuals = new HashSet();
|
||||
getDoubleBufferVisuals(screen);
|
||||
doubleBuffer =
|
||||
doubleBufferVisuals.contains(new Integer(visNum));
|
||||
doubleBufferVisuals.contains(Integer.valueOf(visNum));
|
||||
}
|
||||
defaultConfig = X11GraphicsConfig.getConfig(this, visNum,
|
||||
depth, getConfigColormap(0, screen),
|
||||
|
@ -867,39 +867,38 @@ public class UnixPrintJob implements CancelablePrintJob {
|
||||
execCmd[n++] = "/usr/bin/lp";
|
||||
execCmd[n++] = "-c"; // make a copy of the spool file
|
||||
if ((pFlags & PRINTER) != 0) {
|
||||
execCmd[n++] = new String("-d" + printer);
|
||||
execCmd[n++] = "-d" + printer;
|
||||
}
|
||||
if ((pFlags & BANNER) != 0) {
|
||||
String quoteChar = "\"";
|
||||
execCmd[n++] = new String("-t " + quoteChar+banner+quoteChar);
|
||||
execCmd[n++] = "-t " + quoteChar+banner+quoteChar;
|
||||
}
|
||||
if ((pFlags & COPIES) != 0) {
|
||||
execCmd[n++] = new String("-n " +
|
||||
new Integer(copies).toString());
|
||||
execCmd[n++] = "-n " + copies;
|
||||
}
|
||||
if ((pFlags & NOSHEET) != 0) {
|
||||
execCmd[n++] = new String("-o nobanner");
|
||||
execCmd[n++] = "-o nobanner";
|
||||
}
|
||||
if ((pFlags & OPTIONS) != 0) {
|
||||
execCmd[n++] = new String("-o " + options);
|
||||
execCmd[n++] = "-o " + options;
|
||||
}
|
||||
} else {
|
||||
execCmd = new String[ncomps];
|
||||
execCmd[n++] = "/usr/bin/lpr";
|
||||
if ((pFlags & PRINTER) != 0) {
|
||||
execCmd[n++] = new String("-P" + printer);
|
||||
execCmd[n++] = "-P" + printer;
|
||||
}
|
||||
if ((pFlags & BANNER) != 0) {
|
||||
execCmd[n++] = new String("-J " + banner);
|
||||
execCmd[n++] = "-J " + banner;
|
||||
}
|
||||
if ((pFlags & COPIES) != 0) {
|
||||
execCmd[n++] = new String("-#" + new Integer(copies).toString());
|
||||
execCmd[n++] = "-#" + copies;
|
||||
}
|
||||
if ((pFlags & NOSHEET) != 0) {
|
||||
execCmd[n++] = new String("-h");
|
||||
execCmd[n++] = "-h";
|
||||
}
|
||||
if ((pFlags & OPTIONS) != 0) {
|
||||
execCmd[n++] = new String("-o" + options);
|
||||
execCmd[n++] = "-o" + options;
|
||||
}
|
||||
}
|
||||
execCmd[n++] = spoolFile;
|
||||
|
@ -568,7 +568,7 @@ class HTMLCodec extends InputStream {
|
||||
byte[] headerBytes = null, trailerBytes = null;
|
||||
|
||||
try {
|
||||
headerBytes = new String(header).getBytes(ENCODING);
|
||||
headerBytes = header.toString().getBytes(ENCODING);
|
||||
trailerBytes = htmlSuffix.getBytes(ENCODING);
|
||||
} catch (UnsupportedEncodingException cannotHappen) {
|
||||
}
|
||||
|
@ -488,7 +488,7 @@ public class WInputMethod extends InputMethodAdapter
|
||||
attrStr.addAttribute(Attribute.INPUT_METHOD_SEGMENT,
|
||||
new Annotation(null), 0, text.length());
|
||||
attrStr.addAttribute(Attribute.READING,
|
||||
new Annotation(new String("")), 0, text.length());
|
||||
new Annotation(""), 0, text.length());
|
||||
}
|
||||
|
||||
// set Hilight Information
|
||||
|
@ -123,7 +123,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer {
|
||||
public void setTitle(String title) {
|
||||
// allow a null title to pass as an empty string.
|
||||
if (title == null) {
|
||||
title = new String("");
|
||||
title = "";
|
||||
}
|
||||
_setTitle(title);
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ public class Win32PrintService implements PrintService, AttributeUpdater,
|
||||
|
||||
idList = new ArrayList();
|
||||
for (int i=0; i < media.length; i++) {
|
||||
idList.add(new Integer(media[i]));
|
||||
idList.add(Integer.valueOf(media[i]));
|
||||
}
|
||||
|
||||
mediaSizes = getMediaSizes(idList, media);
|
||||
@ -517,7 +517,7 @@ public class Win32PrintService implements PrintService, AttributeUpdater,
|
||||
if ((wid <= 0) || (ht <= 0)) {
|
||||
//Remove corresponding ID from list
|
||||
if (nMedia == media.length) {
|
||||
Integer remObj = new Integer(media[i]);
|
||||
Integer remObj = Integer.valueOf(media[i]);
|
||||
idList.remove(idList.indexOf(remObj));
|
||||
}
|
||||
continue;
|
||||
@ -539,7 +539,7 @@ public class Win32PrintService implements PrintService, AttributeUpdater,
|
||||
msList.add(ms);
|
||||
} catch(IllegalArgumentException e) {
|
||||
if (nMedia == media.length) {
|
||||
Integer remObj = new Integer(media[i]);
|
||||
Integer remObj = Integer.valueOf(media[i]);
|
||||
idList.remove(idList.indexOf(remObj));
|
||||
}
|
||||
}
|
||||
@ -984,7 +984,7 @@ public class Win32PrintService implements PrintService, AttributeUpdater,
|
||||
// cannot be null but to be safe, add a check
|
||||
if ((idList != null) && (mediaSizes != null) &&
|
||||
(idList.size() == mediaSizes.length)) {
|
||||
Integer defIdObj = new Integer(defPaper);
|
||||
Integer defIdObj = Integer.valueOf(defPaper);
|
||||
int index = idList.indexOf(defIdObj);
|
||||
if (index>=0 && index<mediaSizes.length) {
|
||||
return mediaSizes[index].getMediaSizeName();
|
||||
|
Loading…
Reference in New Issue
Block a user