mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
Merge
This commit is contained in:
commit
b2827492a6
203 changed files with 6802 additions and 1720 deletions
|
@ -504,7 +504,7 @@ public class GIFImageReader extends ImageReader {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Found position of metadata for image 0
|
// Found position of metadata for image 0
|
||||||
imageStartPosition.add(new Long(stream.getStreamPosition()));
|
imageStartPosition.add(Long.valueOf(stream.getStreamPosition()));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new IIOException("I/O error reading header!", e);
|
throw new IIOException("I/O error reading header!", e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ class GIFWritableImageMetadata extends GIFImageMetadata {
|
||||||
try {
|
try {
|
||||||
return data.getBytes("ISO-8859-1");
|
return data.getBytes("ISO-8859-1");
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
return (new String("")).getBytes();
|
return "".getBytes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -328,7 +328,7 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
|
||||||
setHSB(hue, saturation, brightness);
|
setHSB(hue, saturation, brightness);
|
||||||
if (update) {
|
if (update) {
|
||||||
settingColor = true;
|
settingColor = true;
|
||||||
hueSpinner.setValue(new Integer((int)(hue * 360)));
|
hueSpinner.setValue(Integer.valueOf((int)(hue * 360)));
|
||||||
settingColor = false;
|
settingColor = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -376,8 +376,8 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
|
||||||
setHSB(hue, s, b);
|
setHSB(hue, s, b);
|
||||||
if (update) {
|
if (update) {
|
||||||
settingColor = true;
|
settingColor = true;
|
||||||
saturationSpinner.setValue(new Integer((int)(s * 255)));
|
saturationSpinner.setValue(Integer.valueOf((int)(s * 255)));
|
||||||
valueSpinner.setValue(new Integer((int)(b * 255)));
|
valueSpinner.setValue(Integer.valueOf((int)(b * 255)));
|
||||||
settingColor = false;
|
settingColor = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -391,9 +391,9 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
|
||||||
setColor(color, false, true, true);
|
setColor(color, false, true, true);
|
||||||
|
|
||||||
settingColor = true;
|
settingColor = true;
|
||||||
hueSpinner.setValue(new Integer((int)(hue * 360)));
|
hueSpinner.setValue(Integer.valueOf((int)(hue * 360)));
|
||||||
saturationSpinner.setValue(new Integer((int)(saturation * 255)));
|
saturationSpinner.setValue(Integer.valueOf((int)(saturation * 255)));
|
||||||
valueSpinner.setValue(new Integer((int)(brightness * 255)));
|
valueSpinner.setValue(Integer.valueOf((int)(brightness * 255)));
|
||||||
settingColor = false;
|
settingColor = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,9 +409,9 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
|
||||||
setColor(color, false, false, true);
|
setColor(color, false, false, true);
|
||||||
|
|
||||||
settingColor = true;
|
settingColor = true;
|
||||||
redSpinner.setValue(new Integer(color.getRed()));
|
redSpinner.setValue(Integer.valueOf(color.getRed()));
|
||||||
greenSpinner.setValue(new Integer(color.getGreen()));
|
greenSpinner.setValue(Integer.valueOf(color.getGreen()));
|
||||||
blueSpinner.setValue(new Integer(color.getBlue()));
|
blueSpinner.setValue(Integer.valueOf(color.getBlue()));
|
||||||
settingColor = false;
|
settingColor = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -454,13 +454,13 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements
|
||||||
colorNameTF.setText("#" + hexString.substring(1));
|
colorNameTF.setText("#" + hexString.substring(1));
|
||||||
|
|
||||||
if (updateSpinners) {
|
if (updateSpinners) {
|
||||||
redSpinner.setValue(new Integer(color.getRed()));
|
redSpinner.setValue(Integer.valueOf(color.getRed()));
|
||||||
greenSpinner.setValue(new Integer(color.getGreen()));
|
greenSpinner.setValue(Integer.valueOf(color.getGreen()));
|
||||||
blueSpinner.setValue(new Integer(color.getBlue()));
|
blueSpinner.setValue(Integer.valueOf(color.getBlue()));
|
||||||
|
|
||||||
hueSpinner.setValue(new Integer((int)(hue * 360)));
|
hueSpinner.setValue(Integer.valueOf((int)(hue * 360)));
|
||||||
saturationSpinner.setValue(new Integer((int)(saturation * 255)));
|
saturationSpinner.setValue(Integer.valueOf((int)(saturation * 255)));
|
||||||
valueSpinner.setValue(new Integer((int)(brightness * 255)));
|
valueSpinner.setValue(Integer.valueOf((int)(brightness * 255)));
|
||||||
}
|
}
|
||||||
settingColor = false;
|
settingColor = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -336,7 +336,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||||
// populate the table with the values from basic.
|
// populate the table with the values from basic.
|
||||||
super.initComponentDefaults(table);
|
super.initComponentDefaults(table);
|
||||||
|
|
||||||
Integer zero = new Integer(0);
|
Integer zero = Integer.valueOf(0);
|
||||||
Object zeroBorder = new sun.swing.SwingLazyValue(
|
Object zeroBorder = new sun.swing.SwingLazyValue(
|
||||||
"javax.swing.plaf.BorderUIResource$EmptyBorderUIResource",
|
"javax.swing.plaf.BorderUIResource$EmptyBorderUIResource",
|
||||||
new Object[] {zero, zero, zero, zero});
|
new Object[] {zero, zero, zero, zero});
|
||||||
|
@ -371,7 +371,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||||
int vProgWidth = 22 - (progXThickness * 2);
|
int vProgWidth = 22 - (progXThickness * 2);
|
||||||
int vProgHeight = 80 - (progYThickness * 2);
|
int vProgHeight = 80 - (progYThickness * 2);
|
||||||
|
|
||||||
Integer caretBlinkRate = new Integer(500);
|
Integer caretBlinkRate = Integer.valueOf(500);
|
||||||
Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0);
|
Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0);
|
||||||
|
|
||||||
Double defaultCaretAspectRatio = new Double(0.025);
|
Double defaultCaretAspectRatio = new Double(0.025);
|
||||||
|
@ -540,7 +540,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||||
}
|
}
|
||||||
|
|
||||||
Object[] defaults = new Object[] {
|
Object[] defaults = new Object[] {
|
||||||
"ArrowButton.size", new Integer(13),
|
"ArrowButton.size", Integer.valueOf(13),
|
||||||
|
|
||||||
|
|
||||||
"Button.defaultButtonFollowsFocus", Boolean.FALSE,
|
"Button.defaultButtonFollowsFocus", Boolean.FALSE,
|
||||||
|
@ -893,8 +893,8 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||||
|
|
||||||
|
|
||||||
"ScrollBar.squareButtons", Boolean.FALSE,
|
"ScrollBar.squareButtons", Boolean.FALSE,
|
||||||
"ScrollBar.thumbHeight", new Integer(14),
|
"ScrollBar.thumbHeight", Integer.valueOf(14),
|
||||||
"ScrollBar.width", new Integer(16),
|
"ScrollBar.width", Integer.valueOf(16),
|
||||||
"ScrollBar.minimumThumbSize", new Dimension(8, 8),
|
"ScrollBar.minimumThumbSize", new Dimension(8, 8),
|
||||||
"ScrollBar.maximumThumbSize", new Dimension(4096, 4096),
|
"ScrollBar.maximumThumbSize", new Dimension(4096, 4096),
|
||||||
"ScrollBar.allowsAbsolutePositioning", Boolean.TRUE,
|
"ScrollBar.allowsAbsolutePositioning", Boolean.TRUE,
|
||||||
|
@ -954,12 +954,12 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||||
|
|
||||||
|
|
||||||
"Separator.insets", zeroInsets,
|
"Separator.insets", zeroInsets,
|
||||||
"Separator.thickness", new Integer(2),
|
"Separator.thickness", Integer.valueOf(2),
|
||||||
|
|
||||||
|
|
||||||
"Slider.paintValue", Boolean.TRUE,
|
"Slider.paintValue", Boolean.TRUE,
|
||||||
"Slider.thumbWidth", new Integer(30),
|
"Slider.thumbWidth", Integer.valueOf(30),
|
||||||
"Slider.thumbHeight", new Integer(14),
|
"Slider.thumbHeight", Integer.valueOf(14),
|
||||||
"Slider.focusInputMap",
|
"Slider.focusInputMap",
|
||||||
new UIDefaults.LazyInputMap(new Object[] {
|
new UIDefaults.LazyInputMap(new Object[] {
|
||||||
"RIGHT", "positiveUnitIncrement",
|
"RIGHT", "positiveUnitIncrement",
|
||||||
|
@ -1013,9 +1013,9 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|
||||||
"SplitPane.size", new Integer(7),
|
"SplitPane.size", Integer.valueOf(7),
|
||||||
"SplitPane.oneTouchOffset", new Integer(2),
|
"SplitPane.oneTouchOffset", Integer.valueOf(2),
|
||||||
"SplitPane.oneTouchButtonSize", new Integer(5),
|
"SplitPane.oneTouchButtonSize", Integer.valueOf(5),
|
||||||
"SplitPane.supportsOneTouchButtons", Boolean.FALSE,
|
"SplitPane.supportsOneTouchButtons", Boolean.FALSE,
|
||||||
|
|
||||||
|
|
||||||
|
@ -1223,13 +1223,13 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||||
|
|
||||||
"ToolTip.font", new FontLazyValue(Region.TOOL_TIP),
|
"ToolTip.font", new FontLazyValue(Region.TOOL_TIP),
|
||||||
|
|
||||||
"Tree.padding", new Integer(4),
|
"Tree.padding", Integer.valueOf(4),
|
||||||
"Tree.background", tableBg,
|
"Tree.background", tableBg,
|
||||||
"Tree.drawHorizontalLines", Boolean.FALSE,
|
"Tree.drawHorizontalLines", Boolean.FALSE,
|
||||||
"Tree.drawVerticalLines", Boolean.FALSE,
|
"Tree.drawVerticalLines", Boolean.FALSE,
|
||||||
"Tree.rowHeight", new Integer(-1),
|
"Tree.rowHeight", Integer.valueOf(-1),
|
||||||
"Tree.scrollsOnExpand", Boolean.FALSE,
|
"Tree.scrollsOnExpand", Boolean.FALSE,
|
||||||
"Tree.expanderSize", new Integer(10),
|
"Tree.expanderSize", Integer.valueOf(10),
|
||||||
"Tree.repaintWholeRow", Boolean.TRUE,
|
"Tree.repaintWholeRow", Boolean.TRUE,
|
||||||
"Tree.closedIcon", null,
|
"Tree.closedIcon", null,
|
||||||
"Tree.leafIcon", null,
|
"Tree.leafIcon", null,
|
||||||
|
@ -1240,8 +1240,8 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||||
"Tree.collapsedIcon", new GTKStyle.GTKLazyValue(
|
"Tree.collapsedIcon", new GTKStyle.GTKLazyValue(
|
||||||
"com.sun.java.swing.plaf.gtk.GTKIconFactory",
|
"com.sun.java.swing.plaf.gtk.GTKIconFactory",
|
||||||
"getTreeCollapsedIcon"),
|
"getTreeCollapsedIcon"),
|
||||||
"Tree.leftChildIndent", new Integer(2),
|
"Tree.leftChildIndent", Integer.valueOf(2),
|
||||||
"Tree.rightChildIndent", new Integer(12),
|
"Tree.rightChildIndent", Integer.valueOf(12),
|
||||||
"Tree.scrollsHorizontallyAndVertically", Boolean.FALSE,
|
"Tree.scrollsHorizontallyAndVertically", Boolean.FALSE,
|
||||||
"Tree.drawsFocusBorder", Boolean.TRUE,
|
"Tree.drawsFocusBorder", Boolean.TRUE,
|
||||||
"Tree.focusInputMap",
|
"Tree.focusInputMap",
|
||||||
|
|
|
@ -851,7 +851,7 @@ class GTKStyle extends SynthStyle implements GTKConstants {
|
||||||
int focusLineWidth = getClassSpecificIntValue(context,
|
int focusLineWidth = getClassSpecificIntValue(context,
|
||||||
"focus-line-width", 0);
|
"focus-line-width", 0);
|
||||||
if (value == null && focusLineWidth > 0) {
|
if (value == null && focusLineWidth > 0) {
|
||||||
value = new Integer(16 + 2 * focusLineWidth);
|
value = Integer.valueOf(16 + 2 * focusLineWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
|
@ -975,12 +975,12 @@ class GTKStyle extends SynthStyle implements GTKConstants {
|
||||||
|
|
||||||
private static void initIconTypeMap() {
|
private static void initIconTypeMap() {
|
||||||
ICON_TYPE_MAP = new HashMap<String,Integer>();
|
ICON_TYPE_MAP = new HashMap<String,Integer>();
|
||||||
ICON_TYPE_MAP.put("gtk-menu", new Integer(1));
|
ICON_TYPE_MAP.put("gtk-menu", Integer.valueOf(1));
|
||||||
ICON_TYPE_MAP.put("gtk-small-toolbar", new Integer(2));
|
ICON_TYPE_MAP.put("gtk-small-toolbar", Integer.valueOf(2));
|
||||||
ICON_TYPE_MAP.put("gtk-large-toolbar", new Integer(3));
|
ICON_TYPE_MAP.put("gtk-large-toolbar", Integer.valueOf(3));
|
||||||
ICON_TYPE_MAP.put("gtk-button", new Integer(4));
|
ICON_TYPE_MAP.put("gtk-button", Integer.valueOf(4));
|
||||||
ICON_TYPE_MAP.put("gtk-dnd", new Integer(5));
|
ICON_TYPE_MAP.put("gtk-dnd", Integer.valueOf(5));
|
||||||
ICON_TYPE_MAP.put("gtk-dialog", new Integer(6));
|
ICON_TYPE_MAP.put("gtk-dialog", Integer.valueOf(6));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,7 @@ class Metacity implements SynthConstants {
|
||||||
name = child.getNodeName();
|
name = child.getNodeName();
|
||||||
Object value = null;
|
Object value = null;
|
||||||
if ("distance".equals(name)) {
|
if ("distance".equals(name)) {
|
||||||
value = new Integer(getIntAttr(child, "value", 0));
|
value = Integer.valueOf(getIntAttr(child, "value", 0));
|
||||||
} else if ("border".equals(name)) {
|
} else if ("border".equals(name)) {
|
||||||
value = new Insets(getIntAttr(child, "top", 0),
|
value = new Insets(getIntAttr(child, "top", 0),
|
||||||
getIntAttr(child, "left", 0),
|
getIntAttr(child, "left", 0),
|
||||||
|
@ -808,7 +808,7 @@ class Metacity implements SynthConstants {
|
||||||
protected void setFrameGeometry(JComponent titlePane, Map gm) {
|
protected void setFrameGeometry(JComponent titlePane, Map gm) {
|
||||||
this.frameGeometry = gm;
|
this.frameGeometry = gm;
|
||||||
if (getInt("top_height") == 0 && titlePane != null) {
|
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.selectionBackground", table.get("controlText"),
|
||||||
"ProgressBar.border", loweredBevelBorder,
|
"ProgressBar.border", loweredBevelBorder,
|
||||||
"ProgressBar.cellLength", new Integer(6),
|
"ProgressBar.cellLength", new Integer(6),
|
||||||
"ProgressBar.cellSpacing", new Integer(0),
|
"ProgressBar.cellSpacing", Integer.valueOf(0),
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
"Button.margin", new InsetsUIResource(2, 4, 2, 4),
|
"Button.margin", new InsetsUIResource(2, 4, 2, 4),
|
||||||
|
@ -859,7 +859,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||||
"SplitPane.background", table.get("control"),
|
"SplitPane.background", table.get("control"),
|
||||||
"SplitPane.highlight", table.get("controlHighlight"),
|
"SplitPane.highlight", table.get("controlHighlight"),
|
||||||
"SplitPane.shadow", table.get("controlShadow"),
|
"SplitPane.shadow", table.get("controlShadow"),
|
||||||
"SplitPane.dividerSize", new Integer(20),
|
"SplitPane.dividerSize", Integer.valueOf(20),
|
||||||
"SplitPane.activeThumb", table.get("activeCaptionBorder"),
|
"SplitPane.activeThumb", table.get("activeCaptionBorder"),
|
||||||
"SplitPane.ancestorInputMap",
|
"SplitPane.ancestorInputMap",
|
||||||
new UIDefaults.LazyInputMap(new Object[] {
|
new UIDefaults.LazyInputMap(new Object[] {
|
||||||
|
@ -1160,7 +1160,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||||
}),
|
}),
|
||||||
|
|
||||||
"TextField.caretForeground", black,
|
"TextField.caretForeground", black,
|
||||||
"TextField.caretBlinkRate", new Integer(500),
|
"TextField.caretBlinkRate", Integer.valueOf(500),
|
||||||
"TextField.inactiveForeground", table.get("textInactiveText"),
|
"TextField.inactiveForeground", table.get("textInactiveText"),
|
||||||
"TextField.selectionBackground", table.get("textHighlight"),
|
"TextField.selectionBackground", table.get("textHighlight"),
|
||||||
"TextField.selectionForeground", table.get("textHighlightText"),
|
"TextField.selectionForeground", table.get("textHighlightText"),
|
||||||
|
@ -1171,7 +1171,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||||
"TextField.focusInputMap", fieldInputMap,
|
"TextField.focusInputMap", fieldInputMap,
|
||||||
|
|
||||||
"PasswordField.caretForeground", black,
|
"PasswordField.caretForeground", black,
|
||||||
"PasswordField.caretBlinkRate", new Integer(500),
|
"PasswordField.caretBlinkRate", Integer.valueOf(500),
|
||||||
"PasswordField.inactiveForeground", table.get("textInactiveText"),
|
"PasswordField.inactiveForeground", table.get("textInactiveText"),
|
||||||
"PasswordField.selectionBackground", table.get("textHighlight"),
|
"PasswordField.selectionBackground", table.get("textHighlight"),
|
||||||
"PasswordField.selectionForeground", table.get("textHighlightText"),
|
"PasswordField.selectionForeground", table.get("textHighlightText"),
|
||||||
|
@ -1182,7 +1182,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||||
"PasswordField.focusInputMap", passwordInputMap,
|
"PasswordField.focusInputMap", passwordInputMap,
|
||||||
|
|
||||||
"TextArea.caretForeground", black,
|
"TextArea.caretForeground", black,
|
||||||
"TextArea.caretBlinkRate", new Integer(500),
|
"TextArea.caretBlinkRate", Integer.valueOf(500),
|
||||||
"TextArea.inactiveForeground", table.get("textInactiveText"),
|
"TextArea.inactiveForeground", table.get("textInactiveText"),
|
||||||
"TextArea.selectionBackground", table.get("textHighlight"),
|
"TextArea.selectionBackground", table.get("textHighlight"),
|
||||||
"TextArea.selectionForeground", table.get("textHighlightText"),
|
"TextArea.selectionForeground", table.get("textHighlightText"),
|
||||||
|
@ -1193,7 +1193,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||||
"TextArea.focusInputMap", multilineInputMap,
|
"TextArea.focusInputMap", multilineInputMap,
|
||||||
|
|
||||||
"TextPane.caretForeground", black,
|
"TextPane.caretForeground", black,
|
||||||
"TextPane.caretBlinkRate", new Integer(500),
|
"TextPane.caretBlinkRate", Integer.valueOf(500),
|
||||||
"TextPane.inactiveForeground", table.get("textInactiveText"),
|
"TextPane.inactiveForeground", table.get("textInactiveText"),
|
||||||
"TextPane.selectionBackground", lightGray,
|
"TextPane.selectionBackground", lightGray,
|
||||||
"TextPane.selectionForeground", table.get("textHighlightText"),
|
"TextPane.selectionForeground", table.get("textHighlightText"),
|
||||||
|
@ -1204,7 +1204,7 @@ public class MotifLookAndFeel extends BasicLookAndFeel
|
||||||
"TextPane.focusInputMap", multilineInputMap,
|
"TextPane.focusInputMap", multilineInputMap,
|
||||||
|
|
||||||
"EditorPane.caretForeground", red,
|
"EditorPane.caretForeground", red,
|
||||||
"EditorPane.caretBlinkRate", new Integer(500),
|
"EditorPane.caretBlinkRate", Integer.valueOf(500),
|
||||||
"EditorPane.inactiveForeground", table.get("textInactiveText"),
|
"EditorPane.inactiveForeground", table.get("textInactiveText"),
|
||||||
"EditorPane.selectionBackground", lightGray,
|
"EditorPane.selectionBackground", lightGray,
|
||||||
"EditorPane.selectionForeground", table.get("textHighlightText"),
|
"EditorPane.selectionForeground", table.get("textHighlightText"),
|
||||||
|
|
|
@ -299,9 +299,9 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||||
initResourceBundle(table);
|
initResourceBundle(table);
|
||||||
|
|
||||||
// *** Shared Fonts
|
// *** Shared Fonts
|
||||||
Integer twelve = new Integer(12);
|
Integer twelve = Integer.valueOf(12);
|
||||||
Integer fontPlain = new Integer(Font.PLAIN);
|
Integer fontPlain = Integer.valueOf(Font.PLAIN);
|
||||||
Integer fontBold = new Integer(Font.BOLD);
|
Integer fontBold = Integer.valueOf(Font.BOLD);
|
||||||
|
|
||||||
Object dialogPlain12 = new SwingLazyValue(
|
Object dialogPlain12 = new SwingLazyValue(
|
||||||
"javax.swing.plaf.FontUIResource",
|
"javax.swing.plaf.FontUIResource",
|
||||||
|
@ -522,19 +522,19 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||||
toolkit);
|
toolkit);
|
||||||
Object WindowBorderWidth = new DesktopProperty(
|
Object WindowBorderWidth = new DesktopProperty(
|
||||||
"win.frame.sizingBorderWidth",
|
"win.frame.sizingBorderWidth",
|
||||||
new Integer(1),
|
Integer.valueOf(1),
|
||||||
toolkit);
|
toolkit);
|
||||||
Object TitlePaneHeight = new DesktopProperty(
|
Object TitlePaneHeight = new DesktopProperty(
|
||||||
"win.frame.captionHeight",
|
"win.frame.captionHeight",
|
||||||
new Integer(18),
|
Integer.valueOf(18),
|
||||||
toolkit);
|
toolkit);
|
||||||
Object TitleButtonWidth = new DesktopProperty(
|
Object TitleButtonWidth = new DesktopProperty(
|
||||||
"win.frame.captionButtonWidth",
|
"win.frame.captionButtonWidth",
|
||||||
new Integer(16),
|
Integer.valueOf(16),
|
||||||
toolkit);
|
toolkit);
|
||||||
Object TitleButtonHeight = new DesktopProperty(
|
Object TitleButtonHeight = new DesktopProperty(
|
||||||
"win.frame.captionButtonHeight",
|
"win.frame.captionButtonHeight",
|
||||||
new Integer(16),
|
Integer.valueOf(16),
|
||||||
toolkit);
|
toolkit);
|
||||||
Object InactiveTextColor = new DesktopProperty(
|
Object InactiveTextColor = new DesktopProperty(
|
||||||
"win.text.grayedTextColor",
|
"win.text.grayedTextColor",
|
||||||
|
@ -567,7 +567,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||||
Object IconFont = ControlFont;
|
Object IconFont = ControlFont;
|
||||||
|
|
||||||
Object scrollBarWidth = new DesktopProperty("win.scrollbar.width",
|
Object scrollBarWidth = new DesktopProperty("win.scrollbar.width",
|
||||||
new Integer(16), toolkit);
|
Integer.valueOf(16), toolkit);
|
||||||
|
|
||||||
Object menuBarHeight = new DesktopProperty("win.menu.height",
|
Object menuBarHeight = new DesktopProperty("win.menu.height",
|
||||||
null, toolkit);
|
null, toolkit);
|
||||||
|
@ -673,12 +673,12 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||||
"Button.disabledForeground", InactiveTextColor,
|
"Button.disabledForeground", InactiveTextColor,
|
||||||
"Button.disabledShadow", ControlHighlightColor,
|
"Button.disabledShadow", ControlHighlightColor,
|
||||||
"Button.focus", black,
|
"Button.focus", black,
|
||||||
"Button.dashedRectGapX", new XPValue(new Integer(3), new Integer(5)),
|
"Button.dashedRectGapX", new XPValue(Integer.valueOf(3), Integer.valueOf(5)),
|
||||||
"Button.dashedRectGapY", new XPValue(new Integer(3), new Integer(4)),
|
"Button.dashedRectGapY", new XPValue(Integer.valueOf(3), Integer.valueOf(4)),
|
||||||
"Button.dashedRectGapWidth", new XPValue(new Integer(6), new Integer(10)),
|
"Button.dashedRectGapWidth", new XPValue(Integer.valueOf(6), Integer.valueOf(10)),
|
||||||
"Button.dashedRectGapHeight", new XPValue(new Integer(6), new Integer(8)),
|
"Button.dashedRectGapHeight", new XPValue(Integer.valueOf(6), Integer.valueOf(8)),
|
||||||
"Button.textShiftOffset", new XPValue(new Integer(0),
|
"Button.textShiftOffset", new XPValue(Integer.valueOf(0),
|
||||||
new Integer(1)),
|
Integer.valueOf(1)),
|
||||||
// W2K keyboard navigation hidding.
|
// W2K keyboard navigation hidding.
|
||||||
"Button.showMnemonics", showMnemonics,
|
"Button.showMnemonics", showMnemonics,
|
||||||
"Button.focusInputMap",
|
"Button.focusInputMap",
|
||||||
|
@ -780,7 +780,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// DesktopIcon
|
// DesktopIcon
|
||||||
"DesktopIcon.width", new Integer(160),
|
"DesktopIcon.width", Integer.valueOf(160),
|
||||||
|
|
||||||
"EditorPane.font", ControlFont,
|
"EditorPane.font", ControlFont,
|
||||||
"EditorPane.background", WindowBackgroundColor,
|
"EditorPane.background", WindowBackgroundColor,
|
||||||
|
@ -814,9 +814,9 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||||
"icons/NewFolder.gif"),
|
"icons/NewFolder.gif"),
|
||||||
"FileChooser.useSystemExtensionHiding", Boolean.TRUE,
|
"FileChooser.useSystemExtensionHiding", Boolean.TRUE,
|
||||||
|
|
||||||
"FileChooser.lookInLabelMnemonic", new Integer(KeyEvent.VK_I),
|
"FileChooser.lookInLabelMnemonic", Integer.valueOf(KeyEvent.VK_I),
|
||||||
"FileChooser.fileNameLabelMnemonic", new Integer(KeyEvent.VK_N),
|
"FileChooser.fileNameLabelMnemonic", Integer.valueOf(KeyEvent.VK_N),
|
||||||
"FileChooser.filesOfTypeLabelMnemonic", new Integer(KeyEvent.VK_T),
|
"FileChooser.filesOfTypeLabelMnemonic", Integer.valueOf(KeyEvent.VK_T),
|
||||||
"FileChooser.usesSingleFilePane", Boolean.TRUE,
|
"FileChooser.usesSingleFilePane", Boolean.TRUE,
|
||||||
"FileChooser.noPlacesBar", new DesktopProperty("win.comdlg.noPlacesBar",
|
"FileChooser.noPlacesBar", new DesktopProperty("win.comdlg.noPlacesBar",
|
||||||
Boolean.FALSE, toolkit),
|
Boolean.FALSE, toolkit),
|
||||||
|
@ -1021,10 +1021,10 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||||
"Menu.selectionBackground", SelectionBackgroundColor,
|
"Menu.selectionBackground", SelectionBackgroundColor,
|
||||||
"Menu.acceleratorForeground", MenuTextColor,
|
"Menu.acceleratorForeground", MenuTextColor,
|
||||||
"Menu.acceleratorSelectionForeground", SelectionTextColor,
|
"Menu.acceleratorSelectionForeground", SelectionTextColor,
|
||||||
"Menu.menuPopupOffsetX", new Integer(0),
|
"Menu.menuPopupOffsetX", Integer.valueOf(0),
|
||||||
"Menu.menuPopupOffsetY", new Integer(0),
|
"Menu.menuPopupOffsetY", Integer.valueOf(0),
|
||||||
"Menu.submenuPopupOffsetX", new Integer(-4),
|
"Menu.submenuPopupOffsetX", Integer.valueOf(-4),
|
||||||
"Menu.submenuPopupOffsetY", new Integer(-3),
|
"Menu.submenuPopupOffsetY", Integer.valueOf(-3),
|
||||||
"Menu.crossMenuMnemonic", Boolean.FALSE,
|
"Menu.crossMenuMnemonic", Boolean.FALSE,
|
||||||
"Menu.preserveTopLevelSelection", Boolean.TRUE,
|
"Menu.preserveTopLevelSelection", Boolean.TRUE,
|
||||||
|
|
||||||
|
@ -1184,8 +1184,8 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||||
"ProgressBar.highlight", ControlHighlightColor,
|
"ProgressBar.highlight", ControlHighlightColor,
|
||||||
"ProgressBar.selectionForeground", ControlBackgroundColor,
|
"ProgressBar.selectionForeground", ControlBackgroundColor,
|
||||||
"ProgressBar.selectionBackground", SelectionBackgroundColor,
|
"ProgressBar.selectionBackground", SelectionBackgroundColor,
|
||||||
"ProgressBar.cellLength", new Integer(7),
|
"ProgressBar.cellLength", Integer.valueOf(7),
|
||||||
"ProgressBar.cellSpacing", new Integer(2),
|
"ProgressBar.cellSpacing", Integer.valueOf(2),
|
||||||
"ProgressBar.indeterminateInsets", new Insets(3, 3, 3, 3),
|
"ProgressBar.indeterminateInsets", new Insets(3, 3, 3, 3),
|
||||||
|
|
||||||
// *** RootPane.
|
// *** RootPane.
|
||||||
|
@ -1292,7 +1292,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||||
"SplitPane.highlight", ControlHighlightColor,
|
"SplitPane.highlight", ControlHighlightColor,
|
||||||
"SplitPane.shadow", ControlShadowColor,
|
"SplitPane.shadow", ControlShadowColor,
|
||||||
"SplitPane.darkShadow", ControlDarkShadowColor,
|
"SplitPane.darkShadow", ControlDarkShadowColor,
|
||||||
"SplitPane.dividerSize", new Integer(5),
|
"SplitPane.dividerSize", Integer.valueOf(5),
|
||||||
"SplitPane.ancestorInputMap",
|
"SplitPane.ancestorInputMap",
|
||||||
new UIDefaults.LazyInputMap(new Object[] {
|
new UIDefaults.LazyInputMap(new Object[] {
|
||||||
"UP", "negativeIncrement",
|
"UP", "negativeIncrement",
|
||||||
|
@ -1496,7 +1496,7 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||||
"ToggleButton.light", ControlLightColor,
|
"ToggleButton.light", ControlLightColor,
|
||||||
"ToggleButton.highlight", ControlHighlightColor,
|
"ToggleButton.highlight", ControlHighlightColor,
|
||||||
"ToggleButton.focus", ControlTextColor,
|
"ToggleButton.focus", ControlTextColor,
|
||||||
"ToggleButton.textShiftOffset", new Integer(1),
|
"ToggleButton.textShiftOffset", Integer.valueOf(1),
|
||||||
"ToggleButton.focusInputMap",
|
"ToggleButton.focusInputMap",
|
||||||
new UIDefaults.LazyInputMap(new Object[] {
|
new UIDefaults.LazyInputMap(new Object[] {
|
||||||
"SPACE", "pressed",
|
"SPACE", "pressed",
|
||||||
|
@ -1548,8 +1548,8 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||||
"Tree.background", WindowBackgroundColor,
|
"Tree.background", WindowBackgroundColor,
|
||||||
"Tree.foreground", WindowTextColor,
|
"Tree.foreground", WindowTextColor,
|
||||||
"Tree.hash", gray,
|
"Tree.hash", gray,
|
||||||
"Tree.leftChildIndent", new Integer(8),
|
"Tree.leftChildIndent", Integer.valueOf(8),
|
||||||
"Tree.rightChildIndent", new Integer(11),
|
"Tree.rightChildIndent", Integer.valueOf(11),
|
||||||
"Tree.textForeground", WindowTextColor,
|
"Tree.textForeground", WindowTextColor,
|
||||||
"Tree.textBackground", WindowBackgroundColor,
|
"Tree.textBackground", WindowBackgroundColor,
|
||||||
"Tree.selectionForeground", SelectionTextColor,
|
"Tree.selectionForeground", SelectionTextColor,
|
||||||
|
@ -2488,18 +2488,18 @@ public class WindowsLookAndFeel extends BasicLookAndFeel
|
||||||
private int direction;
|
private int direction;
|
||||||
|
|
||||||
XPDLUValue(int xpdlu, int classicdlu, 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;
|
this.direction = direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getXPValue(UIDefaults table) {
|
public Object getXPValue(UIDefaults table) {
|
||||||
int px = dluToPixels(((Integer)xpValue).intValue(), direction);
|
int px = dluToPixels(((Integer)xpValue).intValue(), direction);
|
||||||
return new Integer(px);
|
return Integer.valueOf(px);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getClassicValue(UIDefaults table) {
|
public Object getClassicValue(UIDefaults table) {
|
||||||
int px = dluToPixels(((Integer)classicValue).intValue(), direction);
|
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) {
|
public String getAccessibleActionDescription(int i) {
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
// [[[PENDING: WDW -- need to provide a localized string]]]
|
// [[[PENDING: WDW -- need to provide a localized string]]]
|
||||||
return new String("click");
|
return "click";
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@ import java.awt.color.ColorSpace;
|
||||||
* http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html
|
* http://www.w3.org/pub/WWW/Graphics/Color/sRGB.html
|
||||||
* </A>.
|
* </A>.
|
||||||
* <p>
|
* <p>
|
||||||
|
* @version 10 Feb 1997
|
||||||
* @author Sami Shaio
|
* @author Sami Shaio
|
||||||
* @author Arthur van Hoff
|
* @author Arthur van Hoff
|
||||||
* @see ColorSpace
|
* @see ColorSpace
|
||||||
|
@ -1176,23 +1177,32 @@ public class Color implements Paint, java.io.Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and returns a {@link PaintContext} used to generate a solid
|
* Creates and returns a {@link PaintContext} used to
|
||||||
* color pattern. This enables a <code>Color</code> object to be used
|
* generate a solid color field pattern.
|
||||||
* as an argument to any method requiring an object implementing the
|
* See the {@link Paint#createContext specification} of the
|
||||||
* {@link Paint} interface.
|
* method in the {@link Paint} interface for information
|
||||||
* The same <code>PaintContext</code> is returned, regardless of
|
* on null parameter handling.
|
||||||
* whether or not <code>r</code>, <code>r2d</code>,
|
*
|
||||||
* <code>xform</code>, or <code>hints</code> are <code>null</code>.
|
* @param cm the preferred {@link ColorModel} which represents the most convenient
|
||||||
* @param cm the specified <code>ColorModel</code>
|
* format for the caller to receive the pixel data, or {@code null}
|
||||||
* @param r the specified {@link Rectangle}
|
* if there is no preference.
|
||||||
* @param r2d the specified {@link Rectangle2D}
|
* @param r the device space bounding box
|
||||||
* @param xform the specified {@link AffineTransform}
|
* of the graphics primitive being rendered.
|
||||||
* @param hints the specified {@link RenderingHints}
|
* @param r2d the user space bounding box
|
||||||
* @return a <code>PaintContext</code> that is used to generate a
|
* of the graphics primitive being rendered.
|
||||||
* solid color pattern.
|
* @param xform the {@link AffineTransform} from user
|
||||||
|
* space into device space.
|
||||||
|
* @param hints the set of hints that the context object can use to
|
||||||
|
* choose between rendering alternatives.
|
||||||
|
* @return the {@code PaintContext} for
|
||||||
|
* generating color patterns.
|
||||||
* @see Paint
|
* @see Paint
|
||||||
* @see PaintContext
|
* @see PaintContext
|
||||||
* @see Graphics2D#setPaint
|
* @see ColorModel
|
||||||
|
* @see Rectangle
|
||||||
|
* @see Rectangle2D
|
||||||
|
* @see AffineTransform
|
||||||
|
* @see RenderingHints
|
||||||
*/
|
*/
|
||||||
public synchronized PaintContext createContext(ColorModel cm, Rectangle r,
|
public synchronized PaintContext createContext(ColorModel cm, Rectangle r,
|
||||||
Rectangle2D r2d,
|
Rectangle2D r2d,
|
||||||
|
|
|
@ -635,7 +635,9 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
*/
|
*/
|
||||||
private PropertyChangeSupport changeSupport;
|
private PropertyChangeSupport changeSupport;
|
||||||
|
|
||||||
private transient final Object changeSupportLock = new Object();
|
// Note: this field is considered final, though readObject() prohibits
|
||||||
|
// initializing final fields.
|
||||||
|
private transient Object changeSupportLock = new Object();
|
||||||
private Object getChangeSupportLock() {
|
private Object getChangeSupportLock() {
|
||||||
return changeSupportLock;
|
return changeSupportLock;
|
||||||
}
|
}
|
||||||
|
@ -1004,7 +1006,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets this component's locking object (the object that owns the thread
|
* Gets this component's locking object (the object that owns the thread
|
||||||
* sychronization monitor) for AWT component-tree and layout
|
* synchronization monitor) for AWT component-tree and layout
|
||||||
* operations.
|
* operations.
|
||||||
* @return this component's locking object
|
* @return this component's locking object
|
||||||
*/
|
*/
|
||||||
|
@ -1327,12 +1329,15 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
KeyboardFocusManager.clearMostRecentFocusOwner(this);
|
KeyboardFocusManager.clearMostRecentFocusOwner(this);
|
||||||
synchronized (getTreeLock()) {
|
synchronized (getTreeLock()) {
|
||||||
enabled = false;
|
enabled = false;
|
||||||
if (isFocusOwner()) {
|
// A disabled lw container is allowed to contain a focus owner.
|
||||||
|
if ((isFocusOwner() || (containsFocus() && !isLightweight())) &&
|
||||||
|
KeyboardFocusManager.isAutoFocusTransferEnabled())
|
||||||
|
{
|
||||||
// Don't clear the global focus owner. If transferFocus
|
// Don't clear the global focus owner. If transferFocus
|
||||||
// fails, we want the focus to stay on the disabled
|
// fails, we want the focus to stay on the disabled
|
||||||
// Component so that keyboard traversal, et. al. still
|
// Component so that keyboard traversal, et. al. still
|
||||||
// makes sense to the user.
|
// makes sense to the user.
|
||||||
autoTransferFocus(false);
|
transferFocus(false);
|
||||||
}
|
}
|
||||||
ComponentPeer peer = this.peer;
|
ComponentPeer peer = this.peer;
|
||||||
if (peer != null) {
|
if (peer != null) {
|
||||||
|
@ -1493,8 +1498,8 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
synchronized (getTreeLock()) {
|
synchronized (getTreeLock()) {
|
||||||
visible = false;
|
visible = false;
|
||||||
mixOnHiding(isLightweight());
|
mixOnHiding(isLightweight());
|
||||||
if (containsFocus()) {
|
if (containsFocus() && KeyboardFocusManager.isAutoFocusTransferEnabled()) {
|
||||||
autoTransferFocus(true);
|
transferFocus(true);
|
||||||
}
|
}
|
||||||
ComponentPeer peer = this.peer;
|
ComponentPeer peer = this.peer;
|
||||||
if (peer != null) {
|
if (peer != null) {
|
||||||
|
@ -6581,12 +6586,8 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized (getTreeLock()) {
|
synchronized (getTreeLock()) {
|
||||||
if (isFocusOwner()
|
if (isFocusOwner() && KeyboardFocusManager.isAutoFocusTransferEnabledFor(this)) {
|
||||||
&& KeyboardFocusManager.isAutoFocusTransferEnabled()
|
transferFocus(true);
|
||||||
&& !nextFocusHelper())
|
|
||||||
{
|
|
||||||
KeyboardFocusManager.getCurrentKeyboardFocusManager().
|
|
||||||
clearGlobalFocusOwner();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getContainer() != null && isAddNotifyComplete) {
|
if (getContainer() != null && isAddNotifyComplete) {
|
||||||
|
@ -6721,8 +6722,8 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
|
|
||||||
firePropertyChange("focusable", oldFocusable, focusable);
|
firePropertyChange("focusable", oldFocusable, focusable);
|
||||||
if (oldFocusable && !focusable) {
|
if (oldFocusable && !focusable) {
|
||||||
if (isFocusOwner()) {
|
if (isFocusOwner() && KeyboardFocusManager.isAutoFocusTransferEnabled()) {
|
||||||
autoTransferFocus(true);
|
transferFocus(true);
|
||||||
}
|
}
|
||||||
KeyboardFocusManager.clearMostRecentFocusOwner(this);
|
KeyboardFocusManager.clearMostRecentFocusOwner(this);
|
||||||
}
|
}
|
||||||
|
@ -7376,69 +7377,6 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void autoTransferFocus(boolean clearOnFailure) {
|
|
||||||
Component toTest = KeyboardFocusManager.
|
|
||||||
getCurrentKeyboardFocusManager().getFocusOwner();
|
|
||||||
if (toTest != this) {
|
|
||||||
if (toTest != null) {
|
|
||||||
toTest.autoTransferFocus(clearOnFailure);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if there are pending focus requests. We shouldn't do
|
|
||||||
// auto-transfer if user has already took care of this
|
|
||||||
// component becoming ineligible to hold focus.
|
|
||||||
if (!KeyboardFocusManager.isAutoFocusTransferEnabled()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// the following code will execute only if this Component is the focus
|
|
||||||
// owner
|
|
||||||
|
|
||||||
if (!(isDisplayable() && isVisible() && isEnabled() && isFocusable())) {
|
|
||||||
doAutoTransfer(clearOnFailure);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
toTest = getParent();
|
|
||||||
|
|
||||||
while (toTest != null && !(toTest instanceof Window)) {
|
|
||||||
if (!(toTest.isDisplayable() && toTest.isVisible() &&
|
|
||||||
(toTest.isEnabled() || toTest.isLightweight()))) {
|
|
||||||
doAutoTransfer(clearOnFailure);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
toTest = toTest.getParent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void doAutoTransfer(boolean clearOnFailure) {
|
|
||||||
if (focusLog.isLoggable(Level.FINER)) {
|
|
||||||
focusLog.log(Level.FINER, "this = " + this + ", clearOnFailure = " + clearOnFailure);
|
|
||||||
}
|
|
||||||
if (clearOnFailure) {
|
|
||||||
if (!nextFocusHelper()) {
|
|
||||||
if (focusLog.isLoggable(Level.FINER)) {
|
|
||||||
focusLog.log(Level.FINER, "clear global focus owner");
|
|
||||||
}
|
|
||||||
KeyboardFocusManager.getCurrentKeyboardFocusManager().
|
|
||||||
clearGlobalFocusOwner();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
transferFocus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Transfers the focus to the next component, as though this Component were
|
|
||||||
* the focus owner.
|
|
||||||
* @see #requestFocus()
|
|
||||||
* @since JDK1.1
|
|
||||||
*/
|
|
||||||
public void transferFocus() {
|
|
||||||
nextFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Container which is the focus cycle root of this Component's
|
* Returns the Container which is the focus cycle root of this Component's
|
||||||
* focus traversal cycle. Each focus traversal cycle has only a single
|
* focus traversal cycle. Each focus traversal cycle has only a single
|
||||||
|
@ -7478,31 +7416,51 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
return (rootAncestor == container);
|
return (rootAncestor == container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Container getTraversalRoot() {
|
||||||
|
return getFocusCycleRootAncestor();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transfers the focus to the next component, as though this Component were
|
||||||
|
* the focus owner.
|
||||||
|
* @see #requestFocus()
|
||||||
|
* @since JDK1.1
|
||||||
|
*/
|
||||||
|
public void transferFocus() {
|
||||||
|
nextFocus();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated As of JDK version 1.1,
|
* @deprecated As of JDK version 1.1,
|
||||||
* replaced by transferFocus().
|
* replaced by transferFocus().
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void nextFocus() {
|
public void nextFocus() {
|
||||||
nextFocusHelper();
|
transferFocus(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean nextFocusHelper() {
|
boolean transferFocus(boolean clearOnFailure) {
|
||||||
Component toFocus = preNextFocusHelper();
|
|
||||||
if (focusLog.isLoggable(Level.FINER)) {
|
if (focusLog.isLoggable(Level.FINER)) {
|
||||||
focusLog.log(Level.FINER, "toFocus = " + toFocus);
|
focusLog.finer("clearOnFailure = " + clearOnFailure);
|
||||||
}
|
}
|
||||||
if (isFocusOwner() && toFocus == this) {
|
Component toFocus = getNextFocusCandidate();
|
||||||
return false;
|
boolean res = false;
|
||||||
|
if (toFocus != null && !toFocus.isFocusOwner() && toFocus != this) {
|
||||||
|
res = toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_FORWARD);
|
||||||
}
|
}
|
||||||
return postNextFocusHelper(toFocus, CausedFocusEvent.Cause.TRAVERSAL_FORWARD);
|
if (clearOnFailure && !res) {
|
||||||
|
if (focusLog.isLoggable(Level.FINER)) {
|
||||||
|
focusLog.finer("clear global focus owner");
|
||||||
|
}
|
||||||
|
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
|
||||||
|
}
|
||||||
|
if (focusLog.isLoggable(Level.FINER)) {
|
||||||
|
focusLog.finer("returning result: " + res);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
Container getTraversalRoot() {
|
final Component getNextFocusCandidate() {
|
||||||
return getFocusCycleRootAncestor();
|
|
||||||
}
|
|
||||||
|
|
||||||
final Component preNextFocusHelper() {
|
|
||||||
Container rootAncestor = getTraversalRoot();
|
Container rootAncestor = getTraversalRoot();
|
||||||
Component comp = this;
|
Component comp = this;
|
||||||
while (rootAncestor != null &&
|
while (rootAncestor != null &&
|
||||||
|
@ -7514,18 +7472,19 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
rootAncestor = comp.getFocusCycleRootAncestor();
|
rootAncestor = comp.getFocusCycleRootAncestor();
|
||||||
}
|
}
|
||||||
if (focusLog.isLoggable(Level.FINER)) {
|
if (focusLog.isLoggable(Level.FINER)) {
|
||||||
focusLog.log(Level.FINER, "comp = " + comp + ", root = " + rootAncestor);
|
focusLog.finer("comp = " + comp + ", root = " + rootAncestor);
|
||||||
}
|
}
|
||||||
|
Component candidate = null;
|
||||||
if (rootAncestor != null) {
|
if (rootAncestor != null) {
|
||||||
FocusTraversalPolicy policy = rootAncestor.getFocusTraversalPolicy();
|
FocusTraversalPolicy policy = rootAncestor.getFocusTraversalPolicy();
|
||||||
Component toFocus = policy.getComponentAfter(rootAncestor, comp);
|
Component toFocus = policy.getComponentAfter(rootAncestor, comp);
|
||||||
if (focusLog.isLoggable(Level.FINER)) {
|
if (focusLog.isLoggable(Level.FINER)) {
|
||||||
focusLog.log(Level.FINER, "component after is " + toFocus);
|
focusLog.finer("component after is " + toFocus);
|
||||||
}
|
}
|
||||||
if (toFocus == null) {
|
if (toFocus == null) {
|
||||||
toFocus = policy.getDefaultComponent(rootAncestor);
|
toFocus = policy.getDefaultComponent(rootAncestor);
|
||||||
if (focusLog.isLoggable(Level.FINER)) {
|
if (focusLog.isLoggable(Level.FINER)) {
|
||||||
focusLog.log(Level.FINER, "default component is " + toFocus);
|
focusLog.finer("default component is " + toFocus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (toFocus == null) {
|
if (toFocus == null) {
|
||||||
|
@ -7534,23 +7493,12 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
toFocus = applet;
|
toFocus = applet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return toFocus;
|
candidate = toFocus;
|
||||||
}
|
}
|
||||||
return null;
|
if (focusLog.isLoggable(Level.FINER)) {
|
||||||
}
|
focusLog.finer("Focus transfer candidate: " + candidate);
|
||||||
|
|
||||||
static boolean postNextFocusHelper(Component toFocus, CausedFocusEvent.Cause cause) {
|
|
||||||
if (toFocus != null) {
|
|
||||||
if (focusLog.isLoggable(Level.FINER)) {
|
|
||||||
focusLog.log(Level.FINER, "Next component " + toFocus);
|
|
||||||
}
|
|
||||||
boolean res = toFocus.requestFocusInWindow(cause);
|
|
||||||
if (focusLog.isLoggable(Level.FINER)) {
|
|
||||||
focusLog.log(Level.FINER, "Request focus returned " + res);
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
return false;
|
return candidate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7560,6 +7508,10 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
public void transferFocusBackward() {
|
public void transferFocusBackward() {
|
||||||
|
transferFocusBackward(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean transferFocusBackward(boolean clearOnFailure) {
|
||||||
Container rootAncestor = getTraversalRoot();
|
Container rootAncestor = getTraversalRoot();
|
||||||
Component comp = this;
|
Component comp = this;
|
||||||
while (rootAncestor != null &&
|
while (rootAncestor != null &&
|
||||||
|
@ -7570,6 +7522,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
comp = rootAncestor;
|
comp = rootAncestor;
|
||||||
rootAncestor = comp.getFocusCycleRootAncestor();
|
rootAncestor = comp.getFocusCycleRootAncestor();
|
||||||
}
|
}
|
||||||
|
boolean res = false;
|
||||||
if (rootAncestor != null) {
|
if (rootAncestor != null) {
|
||||||
FocusTraversalPolicy policy = rootAncestor.getFocusTraversalPolicy();
|
FocusTraversalPolicy policy = rootAncestor.getFocusTraversalPolicy();
|
||||||
Component toFocus = policy.getComponentBefore(rootAncestor, comp);
|
Component toFocus = policy.getComponentBefore(rootAncestor, comp);
|
||||||
|
@ -7577,9 +7530,19 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
toFocus = policy.getDefaultComponent(rootAncestor);
|
toFocus = policy.getDefaultComponent(rootAncestor);
|
||||||
}
|
}
|
||||||
if (toFocus != null) {
|
if (toFocus != null) {
|
||||||
toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_BACKWARD);
|
res = toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_BACKWARD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!res) {
|
||||||
|
if (focusLog.isLoggable(Level.FINER)) {
|
||||||
|
focusLog.finer("clear global focus owner");
|
||||||
|
}
|
||||||
|
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
|
||||||
|
}
|
||||||
|
if (focusLog.isLoggable(Level.FINER)) {
|
||||||
|
focusLog.finer("returning result: " + res);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7654,6 +7617,20 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
return hasFocus();
|
return hasFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Used to disallow auto-focus-transfer on disposal of the focus owner
|
||||||
|
* in the process of disposing its parent container.
|
||||||
|
*/
|
||||||
|
private boolean autoFocusTransferOnDisposal = true;
|
||||||
|
|
||||||
|
void setAutoFocusTransferOnDisposal(boolean value) {
|
||||||
|
autoFocusTransferOnDisposal = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean isAutoFocusTransferOnDisposal() {
|
||||||
|
return autoFocusTransferOnDisposal;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the specified popup menu to the component.
|
* Adds the specified popup menu to the component.
|
||||||
* @param popup the popup menu to be added to the component.
|
* @param popup the popup menu to be added to the component.
|
||||||
|
@ -8315,6 +8292,8 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||||
private void readObject(ObjectInputStream s)
|
private void readObject(ObjectInputStream s)
|
||||||
throws ClassNotFoundException, IOException
|
throws ClassNotFoundException, IOException
|
||||||
{
|
{
|
||||||
|
changeSupportLock = new Object();
|
||||||
|
|
||||||
s.defaultReadObject();
|
s.defaultReadObject();
|
||||||
|
|
||||||
appContext = AppContext.getAppContext();
|
appContext = AppContext.getAppContext();
|
||||||
|
|
|
@ -2660,9 +2660,26 @@ public class Container extends Component {
|
||||||
synchronized (getTreeLock()) {
|
synchronized (getTreeLock()) {
|
||||||
int ncomponents = this.ncomponents;
|
int ncomponents = this.ncomponents;
|
||||||
Component component[] = this.component;
|
Component component[] = this.component;
|
||||||
for (int i = ncomponents-1 ; i >= 0 ; i--) {
|
for (int i = ncomponents - 1; i >= 0; i--) {
|
||||||
if( component[i] != null )
|
if( component[i] != null ) {
|
||||||
component[i].removeNotify();
|
// Fix for 6607170.
|
||||||
|
// We want to suppress focus change on disposal
|
||||||
|
// of the focused component. But because of focus
|
||||||
|
// is asynchronous, we should suppress focus change
|
||||||
|
// on every component in case it receives native focus
|
||||||
|
// in the process of disposal.
|
||||||
|
component[i].setAutoFocusTransferOnDisposal(false);
|
||||||
|
component[i].removeNotify();
|
||||||
|
component[i].setAutoFocusTransferOnDisposal(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If some of the children had focus before disposal then it still has.
|
||||||
|
// Auto-transfer focus to the next (or previous) component if auto-transfer
|
||||||
|
// is enabled.
|
||||||
|
if (containsFocus() && KeyboardFocusManager.isAutoFocusTransferEnabledFor(this)) {
|
||||||
|
if (!transferFocus(false)) {
|
||||||
|
transferFocusBackward(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( dispatcher != null ) {
|
if ( dispatcher != null ) {
|
||||||
dispatcher.dispose();
|
dispatcher.dispose();
|
||||||
|
|
|
@ -155,12 +155,13 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
|
||||||
boolean clearOnFailure)
|
boolean clearOnFailure)
|
||||||
{
|
{
|
||||||
if (toFocus != vetoedComponent && toFocus.isShowing() && toFocus.isFocusable() &&
|
if (toFocus != vetoedComponent && toFocus.isShowing() && toFocus.isFocusable() &&
|
||||||
toFocus.requestFocus(false, CausedFocusEvent.Cause.ROLLBACK)) {
|
toFocus.requestFocus(false, CausedFocusEvent.Cause.ROLLBACK))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
Component nextFocus = toFocus.preNextFocusHelper();
|
Component nextFocus = toFocus.getNextFocusCandidate();
|
||||||
if (nextFocus != vetoedComponent
|
if (nextFocus != null && nextFocus != vetoedComponent &&
|
||||||
&& Component.postNextFocusHelper(nextFocus, CausedFocusEvent.Cause.ROLLBACK))
|
nextFocus.requestFocusInWindow(CausedFocusEvent.Cause.ROLLBACK))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
} else if (clearOnFailure) {
|
} else if (clearOnFailure) {
|
||||||
|
@ -504,9 +505,16 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
|
||||||
{
|
{
|
||||||
// we should not accept focus on such component, so reject it.
|
// we should not accept focus on such component, so reject it.
|
||||||
dequeueKeyEvents(-1, newFocusOwner);
|
dequeueKeyEvents(-1, newFocusOwner);
|
||||||
if (KeyboardFocusManager.isAutoFocusTransferEnabled())
|
if (KeyboardFocusManager.isAutoFocusTransferEnabled()) {
|
||||||
{
|
// If FOCUS_GAINED is for a disposed component (however
|
||||||
restoreFocus(fe, newFocusedWindow);
|
// it shouldn't happen) its toplevel parent is null. In this
|
||||||
|
// case we have to try to restore focus in the current focused
|
||||||
|
// window (for the details: 6607170).
|
||||||
|
if (newFocusedWindow == null) {
|
||||||
|
restoreFocus(fe, currentFocusedWindow);
|
||||||
|
} else {
|
||||||
|
restoreFocus(fe, newFocusedWindow);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1078,6 +1086,9 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
|
||||||
focusNextComponent(focusedComponent);
|
focusNextComponent(focusedComponent);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
} else if (e.getID() == KeyEvent.KEY_PRESSED) {
|
||||||
|
// Fix for 6637607: consumeNextKeyTyped should be reset.
|
||||||
|
consumeNextKeyTyped = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
toTest = focusedComponent.getFocusTraversalKeys(
|
toTest = focusedComponent.getFocusTraversalKeys(
|
||||||
|
|
|
@ -53,6 +53,7 @@ import java.awt.image.ColorModel;
|
||||||
*
|
*
|
||||||
* @see Paint
|
* @see Paint
|
||||||
* @see Graphics2D#setPaint
|
* @see Graphics2D#setPaint
|
||||||
|
* @version 10 Feb 1997
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class GradientPaint implements Paint {
|
public class GradientPaint implements Paint {
|
||||||
|
@ -223,19 +224,32 @@ public class GradientPaint implements Paint {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and returns a context used to generate the color pattern.
|
* Creates and returns a {@link PaintContext} used to
|
||||||
* @param cm {@link ColorModel} that receives
|
* generate a linear color gradient pattern.
|
||||||
* the <code>Paint</code> data. This is used only as a hint.
|
* See the {@link Paint#createContext specification} of the
|
||||||
* @param deviceBounds the device space bounding box of the
|
* method in the {@link Paint} interface for information
|
||||||
* graphics primitive being rendered
|
* on null parameter handling.
|
||||||
* @param userBounds the user space bounding box of the
|
*
|
||||||
* graphics primitive being rendered
|
* @param cm the preferred {@link ColorModel} which represents the most convenient
|
||||||
|
* format for the caller to receive the pixel data, or {@code null}
|
||||||
|
* if there is no preference.
|
||||||
|
* @param deviceBounds the device space bounding box
|
||||||
|
* of the graphics primitive being rendered.
|
||||||
|
* @param userBounds the user space bounding box
|
||||||
|
* of the graphics primitive being rendered.
|
||||||
* @param xform the {@link AffineTransform} from user
|
* @param xform the {@link AffineTransform} from user
|
||||||
* space into device space
|
* space into device space.
|
||||||
* @param hints the hints that the context object uses to choose
|
* @param hints the set of hints that the context object can use to
|
||||||
* between rendering alternatives
|
* choose between rendering alternatives.
|
||||||
* @return the {@link PaintContext} that generates color patterns.
|
* @return the {@code PaintContext} for
|
||||||
|
* generating color patterns.
|
||||||
|
* @see Paint
|
||||||
* @see PaintContext
|
* @see PaintContext
|
||||||
|
* @see ColorModel
|
||||||
|
* @see Rectangle
|
||||||
|
* @see Rectangle2D
|
||||||
|
* @see AffineTransform
|
||||||
|
* @see RenderingHints
|
||||||
*/
|
*/
|
||||||
public PaintContext createContext(ColorModel cm,
|
public PaintContext createContext(ColorModel cm,
|
||||||
Rectangle deviceBounds,
|
Rectangle deviceBounds,
|
||||||
|
|
|
@ -2578,6 +2578,10 @@ public abstract class KeyboardFocusManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static boolean isAutoFocusTransferEnabledFor(Component comp) {
|
||||||
|
return isAutoFocusTransferEnabled() && comp.isAutoFocusTransferOnDisposal();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Used to process exceptions in dispatching focus event (in focusLost/focusGained callbacks).
|
* Used to process exceptions in dispatching focus event (in focusLost/focusGained callbacks).
|
||||||
* @param ex previously caught exception that may be processed right here, or null
|
* @param ex previously caught exception that may be processed right here, or null
|
||||||
|
|
|
@ -296,7 +296,32 @@ public final class LinearGradientPaint extends MultipleGradientPaint {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* Creates and returns a {@link PaintContext} used to
|
||||||
|
* generate a linear color gradient pattern.
|
||||||
|
* See the {@link Paint#createContext specification} of the
|
||||||
|
* method in the {@link Paint} interface for information
|
||||||
|
* on null parameter handling.
|
||||||
|
*
|
||||||
|
* @param cm the preferred {@link ColorModel} which represents the most convenient
|
||||||
|
* format for the caller to receive the pixel data, or {@code null}
|
||||||
|
* if there is no preference.
|
||||||
|
* @param deviceBounds the device space bounding box
|
||||||
|
* of the graphics primitive being rendered.
|
||||||
|
* @param userBounds the user space bounding box
|
||||||
|
* of the graphics primitive being rendered.
|
||||||
|
* @param transform the {@link AffineTransform} from user
|
||||||
|
* space into device space.
|
||||||
|
* @param hints the set of hints that the context object can use to
|
||||||
|
* choose between rendering alternatives.
|
||||||
|
* @return the {@code PaintContext} for
|
||||||
|
* generating color patterns.
|
||||||
|
* @see Paint
|
||||||
|
* @see PaintContext
|
||||||
|
* @see ColorModel
|
||||||
|
* @see Rectangle
|
||||||
|
* @see Rectangle2D
|
||||||
|
* @see AffineTransform
|
||||||
|
* @see RenderingHints
|
||||||
*/
|
*/
|
||||||
public PaintContext createContext(ColorModel cm,
|
public PaintContext createContext(ColorModel cm,
|
||||||
Rectangle deviceBounds,
|
Rectangle deviceBounds,
|
||||||
|
|
|
@ -847,7 +847,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
||||||
public String getAccessibleActionDescription(int i) {
|
public String getAccessibleActionDescription(int i) {
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
// [[[PENDING: WDW -- need to provide a localized string]]]
|
// [[[PENDING: WDW -- need to provide a localized string]]]
|
||||||
return new String("click");
|
return "click";
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,42 +46,58 @@ import java.awt.geom.Rectangle2D;
|
||||||
* @see GradientPaint
|
* @see GradientPaint
|
||||||
* @see TexturePaint
|
* @see TexturePaint
|
||||||
* @see Graphics2D#setPaint
|
* @see Graphics2D#setPaint
|
||||||
|
* @version 1.36, 06/05/07
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public interface Paint extends Transparency {
|
public interface Paint extends Transparency {
|
||||||
/**
|
/**
|
||||||
* Creates and returns a {@link PaintContext} used to
|
* Creates and returns a {@link PaintContext} used to
|
||||||
* generate the color pattern.
|
* generate the color pattern.
|
||||||
* Since the ColorModel argument to createContext is only a
|
* The arguments to this method convey additional information
|
||||||
* hint, implementations of Paint should accept a null argument
|
* about the rendering operation that may be
|
||||||
* for ColorModel. Note that if the application does not
|
* used or ignored on various implementations of the {@code Paint} interface.
|
||||||
* prefer a specific ColorModel, the null ColorModel argument
|
* A caller must pass non-{@code null} values for all of the arguments
|
||||||
* will give the Paint implementation full leeway in using the
|
* except for the {@code ColorModel} argument which may be {@code null} to
|
||||||
* most efficient ColorModel it prefers for its raster processing.
|
* indicate that no specific {@code ColorModel} type is preferred.
|
||||||
* <p>
|
* Implementations of the {@code Paint} interface are allowed to use or ignore
|
||||||
* Since the API documentation was not specific about this in
|
* any of the arguments as makes sense for their function, and are
|
||||||
* releases before 1.4, there may be implementations of
|
* not constrained to use the specified {@code ColorModel} for the returned
|
||||||
* <code>Paint</code> that do not accept a null
|
* {@code PaintContext}, even if it is not {@code null}.
|
||||||
* <code>ColorModel</code> argument.
|
* Implementations are allowed to throw {@code NullPointerException} for
|
||||||
* If a developer is writing code which passes a null
|
* any {@code null} argument other than the {@code ColorModel} argument,
|
||||||
* <code>ColorModel</code> argument to the
|
* but are not required to do so.
|
||||||
* <code>createContext</code> method of <code>Paint</code>
|
*
|
||||||
* objects from arbitrary sources it would be wise to code defensively
|
* @param cm the preferred {@link ColorModel} which represents the most convenient
|
||||||
* by manufacturing a non-null <code>ColorModel</code> for those
|
* format for the caller to receive the pixel data, or {@code null}
|
||||||
* objects which throw a <code>NullPointerException</code>.
|
* if there is no preference.
|
||||||
* @param cm the {@link ColorModel} that receives the
|
|
||||||
* <code>Paint</code> data. This is used only as a hint.
|
|
||||||
* @param deviceBounds the device space bounding box
|
* @param deviceBounds the device space bounding box
|
||||||
* of the graphics primitive being rendered
|
* of the graphics primitive being rendered.
|
||||||
|
* Implementations of the {@code Paint} interface
|
||||||
|
* are allowed to throw {@code NullPointerException}
|
||||||
|
* for a {@code null} {@code deviceBounds}.
|
||||||
* @param userBounds the user space bounding box
|
* @param userBounds the user space bounding box
|
||||||
* of the graphics primitive being rendered
|
* of the graphics primitive being rendered.
|
||||||
|
* Implementations of the {@code Paint} interface
|
||||||
|
* are allowed to throw {@code NullPointerException}
|
||||||
|
* for a {@code null} {@code userBounds}.
|
||||||
* @param xform the {@link AffineTransform} from user
|
* @param xform the {@link AffineTransform} from user
|
||||||
* space into device space
|
* space into device space.
|
||||||
* @param hints the hint that the context object uses to
|
* Implementations of the {@code Paint} interface
|
||||||
* choose between rendering alternatives
|
* are allowed to throw {@code NullPointerException}
|
||||||
* @return the <code>PaintContext</code> for
|
* for a {@code null} {@code xform}.
|
||||||
* generating color patterns
|
* @param hints the set of hints that the context object can use to
|
||||||
|
* choose between rendering alternatives.
|
||||||
|
* Implementations of the {@code Paint} interface
|
||||||
|
* are allowed to throw {@code NullPointerException}
|
||||||
|
* for a {@code null} {@code hints}.
|
||||||
|
* @return the {@code PaintContext} for
|
||||||
|
* generating color patterns.
|
||||||
* @see PaintContext
|
* @see PaintContext
|
||||||
|
* @see ColorModel
|
||||||
|
* @see Rectangle
|
||||||
|
* @see Rectangle2D
|
||||||
|
* @see AffineTransform
|
||||||
|
* @see RenderingHints
|
||||||
*/
|
*/
|
||||||
public PaintContext createContext(ColorModel cm,
|
public PaintContext createContext(ColorModel cm,
|
||||||
Rectangle deviceBounds,
|
Rectangle deviceBounds,
|
||||||
|
|
|
@ -543,7 +543,31 @@ public final class RadialGradientPaint extends MultipleGradientPaint {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* Creates and returns a {@link PaintContext} used to
|
||||||
|
* generate a circular radial color gradient pattern.
|
||||||
|
* See the description of the {@link Paint#createContext createContext} method
|
||||||
|
* for information on null parameter handling.
|
||||||
|
*
|
||||||
|
* @param cm the preferred {@link ColorModel} which represents the most convenient
|
||||||
|
* format for the caller to receive the pixel data, or {@code null}
|
||||||
|
* if there is no preference.
|
||||||
|
* @param deviceBounds the device space bounding box
|
||||||
|
* of the graphics primitive being rendered.
|
||||||
|
* @param userBounds the user space bounding box
|
||||||
|
* of the graphics primitive being rendered.
|
||||||
|
* @param transform the {@link AffineTransform} from user
|
||||||
|
* space into device space.
|
||||||
|
* @param hints the set of hints that the context object can use to
|
||||||
|
* choose between rendering alternatives.
|
||||||
|
* @return the {@code PaintContext} for
|
||||||
|
* generating color patterns.
|
||||||
|
* @see Paint
|
||||||
|
* @see PaintContext
|
||||||
|
* @see ColorModel
|
||||||
|
* @see Rectangle
|
||||||
|
* @see Rectangle2D
|
||||||
|
* @see AffineTransform
|
||||||
|
* @see RenderingHints
|
||||||
*/
|
*/
|
||||||
public PaintContext createContext(ColorModel cm,
|
public PaintContext createContext(ColorModel cm,
|
||||||
Rectangle deviceBounds,
|
Rectangle deviceBounds,
|
||||||
|
|
|
@ -45,6 +45,7 @@ import java.awt.image.ColorModel;
|
||||||
* replicated <code>Rectangle2D</code>.
|
* replicated <code>Rectangle2D</code>.
|
||||||
* @see Paint
|
* @see Paint
|
||||||
* @see Graphics2D#setPaint
|
* @see Graphics2D#setPaint
|
||||||
|
* @version 1.48, 06/05/07
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class TexturePaint implements Paint {
|
public class TexturePaint implements Paint {
|
||||||
|
@ -93,20 +94,32 @@ public class TexturePaint implements Paint {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates and returns a context used to generate the color pattern.
|
* Creates and returns a {@link PaintContext} used to
|
||||||
* @param cm the {@link ColorModel} that receives the
|
* generate a tiled image pattern.
|
||||||
* <code>Paint</code> data. This is used only as a hint.
|
* See the {@link Paint#createContext specification} of the
|
||||||
* @param deviceBounds the device space bounding box of the graphics
|
* method in the {@link Paint} interface for information
|
||||||
* primitive being rendered
|
* on null parameter handling.
|
||||||
* @param userBounds the user space bounding box of the graphics
|
*
|
||||||
* primitive being rendered
|
* @param cm the preferred {@link ColorModel} which represents the most convenient
|
||||||
* @param xform the {@link AffineTransform} from user space
|
* format for the caller to receive the pixel data, or {@code null}
|
||||||
* into device space
|
* if there is no preference.
|
||||||
* @param hints a {@link RenderingHints} object that can be used to
|
* @param deviceBounds the device space bounding box
|
||||||
* specify how the pattern is ultimately rendered
|
* of the graphics primitive being rendered.
|
||||||
* @return the {@link PaintContext} used for generating color
|
* @param userBounds the user space bounding box
|
||||||
* patterns.
|
* of the graphics primitive being rendered.
|
||||||
|
* @param xform the {@link AffineTransform} from user
|
||||||
|
* space into device space.
|
||||||
|
* @param hints the set of hints that the context object can use to
|
||||||
|
* choose between rendering alternatives.
|
||||||
|
* @return the {@code PaintContext} for
|
||||||
|
* generating color patterns.
|
||||||
|
* @see Paint
|
||||||
* @see PaintContext
|
* @see PaintContext
|
||||||
|
* @see ColorModel
|
||||||
|
* @see Rectangle
|
||||||
|
* @see Rectangle2D
|
||||||
|
* @see AffineTransform
|
||||||
|
* @see RenderingHints
|
||||||
*/
|
*/
|
||||||
public PaintContext createContext(ColorModel cm,
|
public PaintContext createContext(ColorModel cm,
|
||||||
Rectangle deviceBounds,
|
Rectangle deviceBounds,
|
||||||
|
|
|
@ -298,7 +298,7 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable {
|
||||||
while (continueLine(line)) {
|
while (continueLine(line)) {
|
||||||
String nextLine = in.readLine();
|
String nextLine = in.readLine();
|
||||||
if (nextLine == null) {
|
if (nextLine == null) {
|
||||||
nextLine = new String("");
|
nextLine = "";
|
||||||
}
|
}
|
||||||
String loppedLine =
|
String loppedLine =
|
||||||
line.substring(0, line.length() - 1);
|
line.substring(0, line.length() - 1);
|
||||||
|
@ -313,7 +313,7 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable {
|
||||||
}
|
}
|
||||||
nextLine = nextLine.substring(startIndex,
|
nextLine = nextLine.substring(startIndex,
|
||||||
nextLine.length());
|
nextLine.length());
|
||||||
line = new String(loppedLine+nextLine);
|
line = loppedLine+nextLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find start of key
|
// Find start of key
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -55,9 +55,19 @@ import java.io.ObjectOutputStream;
|
||||||
* platform dependent drag initiating gesture has occurred
|
* platform dependent drag initiating gesture has occurred
|
||||||
* on the <code>Component</code> that it is tracking.
|
* on the <code>Component</code> that it is tracking.
|
||||||
*
|
*
|
||||||
|
* The {@code action} field of any {@code DragGestureEvent} instance should take one of the following
|
||||||
|
* values:
|
||||||
|
* <ul>
|
||||||
|
* <li> {@code DnDConstants.ACTION_COPY}
|
||||||
|
* <li> {@code DnDConstants.ACTION_MOVE}
|
||||||
|
* <li> {@code DnDConstants.ACTION_LINK}
|
||||||
|
* </ul>
|
||||||
|
* Assigning the value different from listed above will cause an unspecified behavior.
|
||||||
|
*
|
||||||
* @see java.awt.dnd.DragGestureRecognizer
|
* @see java.awt.dnd.DragGestureRecognizer
|
||||||
* @see java.awt.dnd.DragGestureListener
|
* @see java.awt.dnd.DragGestureListener
|
||||||
* @see java.awt.dnd.DragSource
|
* @see java.awt.dnd.DragSource
|
||||||
|
* @see java.awt.dnd.DnDConstants
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class DragGestureEvent extends EventObject {
|
public class DragGestureEvent extends EventObject {
|
||||||
|
@ -65,19 +75,25 @@ public class DragGestureEvent extends EventObject {
|
||||||
private static final long serialVersionUID = 9080172649166731306L;
|
private static final long serialVersionUID = 9080172649166731306L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>DragGestureEvent</code> given the
|
* Constructs a <code>DragGestureEvent</code> object given by the
|
||||||
* <code>DragGestureRecognizer</code> firing this event,
|
* <code>DragGestureRecognizer</code> instance firing this event,
|
||||||
* an <code>int</code> representing
|
* an {@code act} parameter representing
|
||||||
* the user's preferred action, a <code>Point</code>
|
* the user's preferred action, an {@code ori} parameter
|
||||||
* indicating the origin of the drag, and a <code>List</code>
|
* indicating the origin of the drag, and a {@code List} of
|
||||||
* of events that comprise the gesture.
|
* events that comprise the gesture({@code evs} parameter).
|
||||||
* <P>
|
* <P>
|
||||||
* @param dgr The <code>DragGestureRecognizer</code> firing this event
|
* @param dgr The <code>DragGestureRecognizer</code> firing this event
|
||||||
* @param act The the user's preferred action
|
* @param act The user's preferred action.
|
||||||
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link DragGestureEvent}
|
||||||
* @param ori The origin of the drag
|
* @param ori The origin of the drag
|
||||||
* @param evs The <code>List</code> of events that comprise the gesture
|
* @param evs The <code>List</code> of events that comprise the gesture
|
||||||
* <P>
|
* <P>
|
||||||
* @throws IllegalArgumentException if input parameters are {@code null}
|
* @throws IllegalArgumentException if any parameter equals {@code null}
|
||||||
|
* @throws IllegalArgumentException if the act parameter does not comply with
|
||||||
|
* the values given in the class
|
||||||
|
* description for {@link DragGestureEvent}
|
||||||
|
* @see java.awt.dnd.DnDConstants
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori,
|
public DragGestureEvent(DragGestureRecognizer dgr, int act, Point ori,
|
||||||
|
|
|
@ -45,10 +45,13 @@ public class DropTargetEvent extends java.util.EventObject {
|
||||||
private static final long serialVersionUID = 2821229066521922993L;
|
private static final long serialVersionUID = 2821229066521922993L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a <code>DropTargetEvent</code> with
|
* Construct a <code>DropTargetEvent</code> object with
|
||||||
* a specified <code>DropTargetContext</code>.
|
* the specified <code>DropTargetContext</code>.
|
||||||
* <P>
|
* <P>
|
||||||
* @param dtc the <code>DropTargetContext</code>
|
* @param dtc The <code>DropTargetContext</code>
|
||||||
|
* @throws NullPointerException if {@code dtc} equals {@code null}.
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getDropTargetContext()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public DropTargetEvent(DropTargetContext dtc) {
|
public DropTargetEvent(DropTargetContext dtc) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -45,6 +45,10 @@ import java.awt.Event;
|
||||||
* is therefore spared the details of processing individual mouse movements
|
* is therefore spared the details of processing individual mouse movements
|
||||||
* and mouse clicks, and can instead process a "meaningful" (semantic)
|
* and mouse clicks, and can instead process a "meaningful" (semantic)
|
||||||
* event like "button pressed".
|
* event like "button pressed".
|
||||||
|
* <p>
|
||||||
|
* An unspecified behavior will be caused if the {@code id} parameter
|
||||||
|
* of any particular {@code ActionEvent} instance is not
|
||||||
|
* in the range from {@code ACTION_FIRST} to {@code ACTION_LAST}.
|
||||||
*
|
*
|
||||||
* @see ActionListener
|
* @see ActionListener
|
||||||
* @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/eventmodel.html">Tutorial: Java 1.1 Event Model</a>
|
* @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/eventmodel.html">Tutorial: Java 1.1 Event Model</a>
|
||||||
|
@ -134,18 +138,22 @@ public class ActionEvent extends AWTEvent {
|
||||||
/**
|
/**
|
||||||
* Constructs an <code>ActionEvent</code> object.
|
* Constructs an <code>ActionEvent</code> object.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that passing in an invalid <code>id</code> results in
|
* This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
* A <code>null</code> <code>command</code> string is legal,
|
* A <code>null</code> <code>command</code> string is legal,
|
||||||
* but not recommended.
|
* but not recommended.
|
||||||
*
|
*
|
||||||
* @param source the object that originated the event
|
* @param source The object that originated the event
|
||||||
* @param id an integer that identifies the event
|
* @param id An integer that identifies the event.
|
||||||
* @param command a string that may specify a command (possibly one
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link ActionEvent}
|
||||||
|
* @param command A string that may specify a command (possibly one
|
||||||
* of several) associated with the event
|
* of several) associated with the event
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getActionCommand()
|
||||||
*/
|
*/
|
||||||
public ActionEvent(Object source, int id, String command) {
|
public ActionEvent(Object source, int id, String command) {
|
||||||
this(source, id, command, 0);
|
this(source, id, command, 0);
|
||||||
|
@ -154,19 +162,27 @@ public class ActionEvent extends AWTEvent {
|
||||||
/**
|
/**
|
||||||
* Constructs an <code>ActionEvent</code> object with modifier keys.
|
* Constructs an <code>ActionEvent</code> object with modifier keys.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that passing in an invalid <code>id</code> results in
|
* This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
* A <code>null</code> <code>command</code> string is legal,
|
* A <code>null</code> <code>command</code> string is legal,
|
||||||
* but not recommended.
|
* but not recommended.
|
||||||
*
|
*
|
||||||
* @param source the object that originated the event
|
* @param source The object that originated the event
|
||||||
* @param id an integer that identifies the event
|
* @param id An integer that identifies the event.
|
||||||
* @param command a string that may specify a command (possibly one
|
* For information on allowable values, see
|
||||||
* of several) associated with the event
|
* the class description for {@link ActionEvent}
|
||||||
* @param modifiers the modifier keys held down during this action
|
* @param command A string that may specify a command (possibly one
|
||||||
|
* of several) associated with the event
|
||||||
|
* @param modifiers The modifier keys down during event
|
||||||
|
* (shift, ctrl, alt, meta).
|
||||||
|
* Passing negative parameter is not recommended.
|
||||||
|
* Zero value means that no modifiers were passed
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getActionCommand()
|
||||||
|
* @see #getModifiers()
|
||||||
*/
|
*/
|
||||||
public ActionEvent(Object source, int id, String command, int modifiers) {
|
public ActionEvent(Object source, int id, String command, int modifiers) {
|
||||||
this(source, id, command, 0, modifiers);
|
this(source, id, command, 0, modifiers);
|
||||||
|
@ -176,20 +192,31 @@ public class ActionEvent extends AWTEvent {
|
||||||
* Constructs an <code>ActionEvent</code> object with the specified
|
* Constructs an <code>ActionEvent</code> object with the specified
|
||||||
* modifier keys and timestamp.
|
* modifier keys and timestamp.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that passing in an invalid <code>id</code> results in
|
* This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
* A <code>null</code> <code>command</code> string is legal,
|
* A <code>null</code> <code>command</code> string is legal,
|
||||||
* but not recommended.
|
* but not recommended.
|
||||||
*
|
*
|
||||||
* @param source the object that originated the event
|
* @param source The object that originated the event
|
||||||
* @param id an integer that identifies the event
|
* @param id An integer that identifies the event.
|
||||||
* @param command a string that may specify a command (possibly one
|
* For information on allowable values, see
|
||||||
* of several) associated with the event
|
* the class description for {@link ActionEvent}
|
||||||
* @param when the time the event occurred
|
* @param command A string that may specify a command (possibly one
|
||||||
* @param modifiers the modifier keys held down during this action
|
* of several) associated with the event
|
||||||
|
* @param modifiers The modifier keys down during event
|
||||||
|
* (shift, ctrl, alt, meta).
|
||||||
|
* Passing negative parameter is not recommended.
|
||||||
|
* Zero value means that no modifiers were passed
|
||||||
|
* @param when A long that gives the time the event occurred.
|
||||||
|
* Passing negative or zero value
|
||||||
|
* is not recommended
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getActionCommand()
|
||||||
|
* @see #getModifiers()
|
||||||
|
* @see #getWhen()
|
||||||
*
|
*
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -29,7 +29,25 @@ import java.awt.Adjustable;
|
||||||
import java.awt.AWTEvent;
|
import java.awt.AWTEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The adjustment event emitted by Adjustable objects.
|
* The adjustment event emitted by Adjustable objects like
|
||||||
|
* {@link java.awt.Scrollbar} and {@link java.awt.ScrollPane}.
|
||||||
|
* When the user changes the value of the scrolling component,
|
||||||
|
* it receives an instance of {@code AdjustmentEvent}.
|
||||||
|
* <p>
|
||||||
|
* An unspecified behavior will be caused if the {@code id} parameter
|
||||||
|
* of any particular {@code AdjustmentEvent} instance is not
|
||||||
|
* in the range from {@code ADJUSTMENT_FIRST} to {@code ADJUSTMENT_LAST}.
|
||||||
|
* <p>
|
||||||
|
* The {@code type} of any {@code AdjustmentEvent} instance takes one of the following
|
||||||
|
* values:
|
||||||
|
* <ul>
|
||||||
|
* <li> {@code UNIT_INCREMENT}
|
||||||
|
* <li> {@code UNIT_DECREMENT}
|
||||||
|
* <li> {@code BLOCK_INCREMENT}
|
||||||
|
* <li> {@code BLOCK_DECREMENT}
|
||||||
|
* <li> {@code TRACK}
|
||||||
|
* </ul>
|
||||||
|
* Assigning the value different from listed above will cause an unspecified behavior.
|
||||||
* @see java.awt.Adjustable
|
* @see java.awt.Adjustable
|
||||||
* @see AdjustmentListener
|
* @see AdjustmentListener
|
||||||
*
|
*
|
||||||
|
@ -130,17 +148,24 @@ public class AdjustmentEvent extends AWTEvent {
|
||||||
* Constructs an <code>AdjustmentEvent</code> object with the
|
* Constructs an <code>AdjustmentEvent</code> object with the
|
||||||
* specified <code>Adjustable</code> source, event type,
|
* specified <code>Adjustable</code> source, event type,
|
||||||
* adjustment type, and value.
|
* adjustment type, and value.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p> This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Adjustable</code> object where the
|
* @param source The <code>Adjustable</code> object where the
|
||||||
* event originated
|
* event originated
|
||||||
* @param id the event type
|
* @param id An integer indicating the type of event.
|
||||||
* @param type the adjustment type
|
* For information on allowable values, see
|
||||||
* @param value the current value of the adjustment
|
* the class description for {@link AdjustmentEvent}
|
||||||
|
* @param type An integer indicating the adjustment type.
|
||||||
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link AdjustmentEvent}
|
||||||
|
* @param value The current value of the adjustment
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getAdjustmentType()
|
||||||
|
* @see #getValue()
|
||||||
*/
|
*/
|
||||||
public AdjustmentEvent(Adjustable source, int id, int type, int value) {
|
public AdjustmentEvent(Adjustable source, int id, int type, int value) {
|
||||||
this(source, id, type, value, false);
|
this(source, id, type, value, false);
|
||||||
|
@ -149,22 +174,29 @@ public class AdjustmentEvent extends AWTEvent {
|
||||||
/**
|
/**
|
||||||
* Constructs an <code>AdjustmentEvent</code> object with the
|
* Constructs an <code>AdjustmentEvent</code> object with the
|
||||||
* specified Adjustable source, event type, adjustment type, and value.
|
* specified Adjustable source, event type, adjustment type, and value.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p> This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
|
|
||||||
*
|
*
|
||||||
* @param source the <code>Adjustable</code> object where the
|
* @param source The <code>Adjustable</code> object where the
|
||||||
* event originated
|
* event originated
|
||||||
* @param id the event type
|
* @param id An integer indicating the type of event.
|
||||||
* @param type the adjustment type
|
* For information on allowable values, see
|
||||||
* @param value the current value of the adjustment
|
* the class description for {@link AdjustmentEvent}
|
||||||
* @param isAdjusting <code>true</code> if the event is one
|
* @param type An integer indicating the adjustment type.
|
||||||
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link AdjustmentEvent}
|
||||||
|
* @param value The current value of the adjustment
|
||||||
|
* @param isAdjusting A boolean that equals <code>true</code> if the event is one
|
||||||
* of a series of multiple adjusting events,
|
* of a series of multiple adjusting events,
|
||||||
* otherwise <code>false</code>
|
* otherwise <code>false</code>
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getAdjustmentType()
|
||||||
|
* @see #getValue()
|
||||||
|
* @see #getValueIsAdjusting()
|
||||||
*/
|
*/
|
||||||
public AdjustmentEvent(Adjustable source, int id, int type, int value, boolean isAdjusting) {
|
public AdjustmentEvent(Adjustable source, int id, int type, int value, boolean isAdjusting) {
|
||||||
super(source, id);
|
super(source, id);
|
||||||
|
|
|
@ -52,6 +52,10 @@ import java.awt.Rectangle;
|
||||||
* (<code>ComponentAdapter</code> objects implement the
|
* (<code>ComponentAdapter</code> objects implement the
|
||||||
* <code>ComponentListener</code> interface.) Each such listener object
|
* <code>ComponentListener</code> interface.) Each such listener object
|
||||||
* gets this <code>ComponentEvent</code> when the event occurs.
|
* gets this <code>ComponentEvent</code> when the event occurs.
|
||||||
|
* <p>
|
||||||
|
* An unspecified behavior will be caused if the {@code id} parameter
|
||||||
|
* of any particular {@code ComponentEvent} instance is not
|
||||||
|
* in the range from {@code COMPONENT_FIRST} to {@code COMPONENT_LAST}.
|
||||||
*
|
*
|
||||||
* @see ComponentAdapter
|
* @see ComponentAdapter
|
||||||
* @see ComponentListener
|
* @see ComponentListener
|
||||||
|
@ -99,14 +103,17 @@ public class ComponentEvent extends AWTEvent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>ComponentEvent</code> object.
|
* Constructs a <code>ComponentEvent</code> object.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p> This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Component</code> that originated the event
|
* @param source The <code>Component</code> that originated the event
|
||||||
* @param id an integer indicating the type of event
|
* @param id An integer indicating the type of event.
|
||||||
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link ComponentEvent}
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getComponent()
|
||||||
|
* @see #getID()
|
||||||
*/
|
*/
|
||||||
public ComponentEvent(Component source, int id) {
|
public ComponentEvent(Component source, int id) {
|
||||||
super(source, id);
|
super(source, id);
|
||||||
|
|
|
@ -45,6 +45,10 @@ import java.awt.Component;
|
||||||
* (<code>ContainerAdapter</code> objects implement the
|
* (<code>ContainerAdapter</code> objects implement the
|
||||||
* <code>ContainerListener</code> interface.) Each such listener object
|
* <code>ContainerListener</code> interface.) Each such listener object
|
||||||
* gets this <code>ContainerEvent</code> when the event occurs.
|
* gets this <code>ContainerEvent</code> when the event occurs.
|
||||||
|
* <p>
|
||||||
|
* An unspecified behavior will be caused if the {@code id} parameter
|
||||||
|
* of any particular {@code ContainerEvent} instance is not
|
||||||
|
* in the range from {@code CONTAINER_FIRST} to {@code CONTAINER_LAST}.
|
||||||
*
|
*
|
||||||
* @see ContainerAdapter
|
* @see ContainerAdapter
|
||||||
* @see ContainerListener
|
* @see ContainerListener
|
||||||
|
@ -92,16 +96,20 @@ public class ContainerEvent extends ComponentEvent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>ContainerEvent</code> object.
|
* Constructs a <code>ContainerEvent</code> object.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p> This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Component</code> object (container)
|
* @param source The <code>Component</code> object (container)
|
||||||
* that originated the event
|
* that originated the event
|
||||||
* @param id an integer indicating the type of event
|
* @param id An integer indicating the type of event.
|
||||||
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link ContainerEvent}
|
||||||
* @param child the component that was added or removed
|
* @param child the component that was added or removed
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getContainer()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getChild()
|
||||||
*/
|
*/
|
||||||
public ContainerEvent(Component source, int id, Component child) {
|
public ContainerEvent(Component source, int id, Component child) {
|
||||||
super(source, id);
|
super(source, id);
|
||||||
|
|
|
@ -50,6 +50,10 @@ import sun.awt.SunToolkit;
|
||||||
* reactivated. Both permanent and temporary focus events are delivered using
|
* reactivated. Both permanent and temporary focus events are delivered using
|
||||||
* the FOCUS_GAINED and FOCUS_LOST event ids; the level may be distinguished in
|
* the FOCUS_GAINED and FOCUS_LOST event ids; the level may be distinguished in
|
||||||
* the event using the isTemporary() method.
|
* the event using the isTemporary() method.
|
||||||
|
* <p>
|
||||||
|
* An unspecified behavior will be caused if the {@code id} parameter
|
||||||
|
* of any particular {@code FocusEvent} instance is not
|
||||||
|
* in the range from {@code FOCUS_FIRST} to {@code FOCUS_LAST}.
|
||||||
*
|
*
|
||||||
* @see FocusAdapter
|
* @see FocusAdapter
|
||||||
* @see FocusListener
|
* @see FocusListener
|
||||||
|
@ -121,18 +125,23 @@ public class FocusEvent extends ComponentEvent {
|
||||||
* application, with a Java application in a different VM,
|
* application, with a Java application in a different VM,
|
||||||
* or with no other <code>Component</code>, then the opposite
|
* or with no other <code>Component</code>, then the opposite
|
||||||
* <code>Component</code> is <code>null</code>.
|
* <code>Component</code> is <code>null</code>.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p> This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Component</code> that originated the event
|
* @param source The <code>Component</code> that originated the event
|
||||||
* @param id <code>FOCUS_GAINED</code> or <code>FOCUS_LOST</code>
|
* @param id An integer indicating the type of event.
|
||||||
* @param temporary <code>true</code> if the focus change is temporary;
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link FocusEvent}
|
||||||
|
* @param temporary Equals <code>true</code> if the focus change is temporary;
|
||||||
* <code>false</code> otherwise
|
* <code>false</code> otherwise
|
||||||
* @param opposite the other Component involved in the focus change,
|
* @param opposite The other Component involved in the focus change,
|
||||||
* or <code>null</code>
|
* or <code>null</code>
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> equals {@code null}
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #isTemporary()
|
||||||
|
* @see #getOppositeComponent()
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
public FocusEvent(Component source, int id, boolean temporary,
|
public FocusEvent(Component source, int id, boolean temporary,
|
||||||
|
@ -145,16 +154,20 @@ public class FocusEvent extends ComponentEvent {
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>FocusEvent</code> object and identifies
|
* Constructs a <code>FocusEvent</code> object and identifies
|
||||||
* whether or not the change is temporary.
|
* whether or not the change is temporary.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p> This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Component</code> that originated the event
|
* @param source The <code>Component</code> that originated the event
|
||||||
* @param id an integer indicating the type of event
|
* @param id An integer indicating the type of event.
|
||||||
* @param temporary <code>true</code> if the focus change is temporary;
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link FocusEvent}
|
||||||
|
* @param temporary Equals <code>true</code> if the focus change is temporary;
|
||||||
* <code>false</code> otherwise
|
* <code>false</code> otherwise
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> equals {@code null}
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #isTemporary()
|
||||||
*/
|
*/
|
||||||
public FocusEvent(Component source, int id, boolean temporary) {
|
public FocusEvent(Component source, int id, boolean temporary) {
|
||||||
this(source, id, temporary, null);
|
this(source, id, temporary, null);
|
||||||
|
@ -163,14 +176,17 @@ public class FocusEvent extends ComponentEvent {
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>FocusEvent</code> object and identifies it
|
* Constructs a <code>FocusEvent</code> object and identifies it
|
||||||
* as a permanent change in focus.
|
* as a permanent change in focus.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p> This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Component</code> that originated the event
|
* @param source The <code>Component</code> that originated the event
|
||||||
* @param id an integer indicating the type of event
|
* @param id An integer indicating the type of event.
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link FocusEvent}
|
||||||
|
* @throws IllegalArgumentException if <code>source</code> equals {@code null}
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
*/
|
*/
|
||||||
public FocusEvent(Component source, int id) {
|
public FocusEvent(Component source, int id) {
|
||||||
this(source, id, false);
|
this(source, id, false);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -31,7 +31,7 @@ import java.awt.Container;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An event which indicates a change to the <code>Component</code>
|
* An event which indicates a change to the <code>Component</code>
|
||||||
* hierarchy to which a <code>Component</code> belongs.
|
* hierarchy to which <code>Component</code> belongs.
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>Hierarchy Change Events (HierarchyListener)
|
* <li>Hierarchy Change Events (HierarchyListener)
|
||||||
* <ul>
|
* <ul>
|
||||||
|
@ -58,16 +58,30 @@ import java.awt.Container;
|
||||||
* Container is added, removed, moved, or resized, and passed down the
|
* Container is added, removed, moved, or resized, and passed down the
|
||||||
* hierarchy. It is also generated by a Component object when that object's
|
* hierarchy. It is also generated by a Component object when that object's
|
||||||
* <code>addNotify</code>, <code>removeNotify</code>, <code>show</code>, or
|
* <code>addNotify</code>, <code>removeNotify</code>, <code>show</code>, or
|
||||||
* <code>hide</code> method is called. ANCESTOR_MOVED and ANCESTOR_RESIZED
|
* <code>hide</code> method is called. The {@code ANCESTOR_MOVED} and
|
||||||
|
* {@code ANCESTOR_RESIZED}
|
||||||
* events are dispatched to every <code>HierarchyBoundsListener</code> or
|
* events are dispatched to every <code>HierarchyBoundsListener</code> or
|
||||||
* <code>HierarchyBoundsAdapter</code> object which registered to receive
|
* <code>HierarchyBoundsAdapter</code> object which registered to receive
|
||||||
* such events using the Component's <code>addHierarchyBoundsListener</code>
|
* such events using the Component's <code>addHierarchyBoundsListener</code>
|
||||||
* method. (<code>HierarchyBoundsAdapter</code> objects implement the <code>
|
* method. (<code>HierarchyBoundsAdapter</code> objects implement the <code>
|
||||||
* HierarchyBoundsListener</code> interface.) HIERARCHY_CHANGED events are
|
* HierarchyBoundsListener</code> interface.) The {@code HIERARCHY_CHANGED} events are
|
||||||
* dispatched to every <code>HierarchyListener</code> object which registered
|
* dispatched to every <code>HierarchyListener</code> object which registered
|
||||||
* to receive such events using the Component's <code>addHierarchyListener
|
* to receive such events using the Component's <code>addHierarchyListener
|
||||||
* </code> method. Each such listener object gets this <code>HierarchyEvent
|
* </code> method. Each such listener object gets this <code>HierarchyEvent
|
||||||
* </code> when the event occurs.
|
* </code> when the event occurs.
|
||||||
|
* <p>
|
||||||
|
* An unspecified behavior will be caused if the {@code id} parameter
|
||||||
|
* of any particular {@code HierarchyEvent} instance is not
|
||||||
|
* in the range from {@code HIERARCHY_FIRST} to {@code HIERARCHY_LAST}.
|
||||||
|
* <br>
|
||||||
|
* The {@code changeFlags} parameter of any {@code HierarchyEvent} instance takes one of the following
|
||||||
|
* values:
|
||||||
|
* <ul>
|
||||||
|
* <li> {@code HierarchyEvent.PARENT_CHANGED}
|
||||||
|
* <li> {@code HierarchyEvent.DISPLAYABILITY_CHANGED}
|
||||||
|
* <li> {@code HierarchyEvent.SHOWING_CHANGED}
|
||||||
|
* </ul>
|
||||||
|
* Assigning the value different from listed above will cause unspecified behavior.
|
||||||
*
|
*
|
||||||
* @author David Mendenhall
|
* @author David Mendenhall
|
||||||
* @see HierarchyListener
|
* @see HierarchyListener
|
||||||
|
@ -108,20 +122,20 @@ public class HierarchyEvent extends AWTEvent {
|
||||||
public static final int HIERARCHY_LAST = ANCESTOR_RESIZED;
|
public static final int HIERARCHY_LAST = ANCESTOR_RESIZED;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates that the <code>HIERARCHY_CHANGED</code> event
|
* A change flag indicates that the <code>HIERARCHY_CHANGED</code> event
|
||||||
* was generated by a reparenting operation.
|
* was generated by a reparenting operation.
|
||||||
*/
|
*/
|
||||||
public static final int PARENT_CHANGED = 0x1;
|
public static final int PARENT_CHANGED = 0x1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates that the <code>HIERARCHY_CHANGED</code> event
|
* A change flag indicates that the <code>HIERARCHY_CHANGED</code> event
|
||||||
* was generated due to a change in the displayability
|
* was generated due to the changing of the hierarchy displayability.
|
||||||
* of the hierarchy. To discern the
|
* To discern the
|
||||||
* current displayability of the hierarchy, call
|
* current displayability of the hierarchy, call the
|
||||||
* <code>Component.isDisplayable</code>. Displayability changes occur
|
* <code>Component.isDisplayable</code> method. Displayability changes occur
|
||||||
* in response to explicit or implicit calls to
|
* in response to explicit or implicit calls of the
|
||||||
* <code>Component.addNotify</code> and
|
* <code>Component.addNotify</code> and
|
||||||
* <code>Component.removeNotify</code>.
|
* <code>Component.removeNotify</code> methods.
|
||||||
*
|
*
|
||||||
* @see java.awt.Component#isDisplayable()
|
* @see java.awt.Component#isDisplayable()
|
||||||
* @see java.awt.Component#addNotify()
|
* @see java.awt.Component#addNotify()
|
||||||
|
@ -130,15 +144,15 @@ public class HierarchyEvent extends AWTEvent {
|
||||||
public static final int DISPLAYABILITY_CHANGED = 0x2;
|
public static final int DISPLAYABILITY_CHANGED = 0x2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates that the <code>HIERARCHY_CHANGED</code> event
|
* A change flag indicates that the <code>HIERARCHY_CHANGED</code> event
|
||||||
* was generated due to a change in the showing state
|
* was generated due to the changing of the hierarchy showing state.
|
||||||
* of the hierarchy. To discern the
|
* To discern the
|
||||||
* current showing state of the hierarchy, call
|
* current showing state of the hierarchy, call the
|
||||||
* <code>Component.isShowing</code>. Showing state changes occur
|
* <code>Component.isShowing</code> method. Showing state changes occur
|
||||||
* when either the displayability or visibility of the
|
* when either the displayability or visibility of the
|
||||||
* hierarchy occurs. Visibility changes occur in response to explicit
|
* hierarchy occurs. Visibility changes occur in response to explicit
|
||||||
* or implicit calls to <code>Component.show</code> and
|
* or implicit calls of the <code>Component.show</code> and
|
||||||
* <code>Component.hide</code>.
|
* <code>Component.hide</code> methods.
|
||||||
*
|
*
|
||||||
* @see java.awt.Component#isShowing()
|
* @see java.awt.Component#isShowing()
|
||||||
* @see java.awt.Component#addNotify()
|
* @see java.awt.Component#addNotify()
|
||||||
|
@ -155,20 +169,26 @@ public class HierarchyEvent extends AWTEvent {
|
||||||
/**
|
/**
|
||||||
* Constructs an <code>HierarchyEvent</code> object to identify a
|
* Constructs an <code>HierarchyEvent</code> object to identify a
|
||||||
* change in the <code>Component</code> hierarchy.
|
* change in the <code>Component</code> hierarchy.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p>This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Component</code> object that
|
* @param source The <code>Component</code> object that
|
||||||
* originated the event
|
* originated the event
|
||||||
* @param id an integer indicating the type of event
|
* @param id An integer indicating the type of event.
|
||||||
* @param changed the <code>Component</code> at the top of
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link HierarchyEvent}
|
||||||
|
* @param changed The <code>Component</code> at the top of
|
||||||
* the hierarchy which was changed
|
* the hierarchy which was changed
|
||||||
* @param changedParent the parent of <code>changed</code>; this
|
* @param changedParent The parent of the <code>changed</code> component.
|
||||||
|
* This
|
||||||
* may be the parent before or after the
|
* may be the parent before or after the
|
||||||
* change, depending on the type of change
|
* change, depending on the type of change
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is {@code null}
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getChanged()
|
||||||
|
* @see #getChangedParent()
|
||||||
*/
|
*/
|
||||||
public HierarchyEvent(Component source, int id, Component changed,
|
public HierarchyEvent(Component source, int id, Component changed,
|
||||||
Container changedParent) {
|
Container changedParent) {
|
||||||
|
@ -180,23 +200,32 @@ public class HierarchyEvent extends AWTEvent {
|
||||||
/**
|
/**
|
||||||
* Constructs an <code>HierarchyEvent</code> object to identify
|
* Constructs an <code>HierarchyEvent</code> object to identify
|
||||||
* a change in the <code>Component</code> hierarchy.
|
* a change in the <code>Component</code> hierarchy.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p> This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Component</code> object that
|
* @param source The <code>Component</code> object that
|
||||||
* originated the event
|
* originated the event
|
||||||
* @param id an integer indicating the type of event
|
* @param id An integer indicating the type of event.
|
||||||
* @param changed the <code>Component</code> at the top
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link HierarchyEvent}
|
||||||
|
* @param changed The <code>Component</code> at the top
|
||||||
* of the hierarchy which was changed
|
* of the hierarchy which was changed
|
||||||
* @param changedParent the parent of <code>changed</code>; this
|
* @param changedParent The parent of the <code>changed</code> component.
|
||||||
|
* This
|
||||||
* may be the parent before or after the
|
* may be the parent before or after the
|
||||||
* change, depending on the type of change
|
* change, depending on the type of change
|
||||||
* @param changeFlags a bitmask which indicates the type(s) of
|
* @param changeFlags A bitmask which indicates the type(s) of
|
||||||
* <code>HIERARCHY_CHANGED</code> events
|
* the <code>HIERARCHY_CHANGED</code> events
|
||||||
* represented in this event object
|
* represented in this event object.
|
||||||
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link HierarchyEvent}
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getChanged()
|
||||||
|
* @see #getChangedParent()
|
||||||
|
* @see #getChangeFlags()
|
||||||
*/
|
*/
|
||||||
public HierarchyEvent(Component source, int id, Component changed,
|
public HierarchyEvent(Component source, int id, Component changed,
|
||||||
Container changedParent, long changeFlags) {
|
Container changedParent, long changeFlags) {
|
||||||
|
|
|
@ -208,17 +208,32 @@ public abstract class InputEvent extends ComponentEvent {
|
||||||
/**
|
/**
|
||||||
* Constructs an InputEvent object with the specified source component,
|
* Constructs an InputEvent object with the specified source component,
|
||||||
* modifiers, and type.
|
* modifiers, and type.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p> This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the object where the event originated
|
* @param source the object where the event originated
|
||||||
* @param id the event type
|
* @param id the integer that identifies the event type.
|
||||||
* @param when the time the event occurred
|
* It is allowed to pass as parameter any value that
|
||||||
* @param modifiers represents the modifier keys and mouse buttons down
|
* allowed for some subclass of {@code InputEvent} class.
|
||||||
* while the event occurred
|
* Passing in the value different from those values result
|
||||||
|
* in unspecified behavior
|
||||||
|
* @param when a long int that gives the time the event occurred.
|
||||||
|
* Passing negative or zero value
|
||||||
|
* is not recommended
|
||||||
|
* @param modifiers the modifier keys down during event (e.g. shift, ctrl,
|
||||||
|
* alt, meta)
|
||||||
|
* Passing negative parameter is not recommended.
|
||||||
|
* Zero value means no modifiers.
|
||||||
|
* Either extended _DOWN_MASK or old _MASK modifiers
|
||||||
|
* should be used, but both models should not be mixed
|
||||||
|
* in one event. Use of the extended modifiers is
|
||||||
|
* preferred
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getWhen()
|
||||||
|
* @see #getModifiers()
|
||||||
*/
|
*/
|
||||||
InputEvent(Component source, int id, long when, int modifiers) {
|
InputEvent(Component source, int id, long when, int modifiers) {
|
||||||
super(source, id);
|
super(source, id);
|
||||||
|
@ -285,7 +300,8 @@ public abstract class InputEvent extends ComponentEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the timestamp of when this event occurred.
|
* Returns the difference in milliseconds between the timestamp of when this event occurred and
|
||||||
|
* midnight, January 1, 1970 UTC.
|
||||||
*/
|
*/
|
||||||
public long getWhen() {
|
public long getWhen() {
|
||||||
return when;
|
return when;
|
||||||
|
@ -358,7 +374,12 @@ public abstract class InputEvent extends ComponentEvent {
|
||||||
* Returns a String describing the extended modifier keys and
|
* Returns a String describing the extended modifier keys and
|
||||||
* mouse buttons, such as "Shift", "Button1", or "Ctrl+Shift".
|
* mouse buttons, such as "Shift", "Button1", or "Ctrl+Shift".
|
||||||
* These strings can be localized by changing the
|
* These strings can be localized by changing the
|
||||||
* awt.properties file.
|
* <code>awt.properties</code> file.
|
||||||
|
* <p>
|
||||||
|
* Note that passing negative parameter is incorrect,
|
||||||
|
* and will cause the returning an unspecified string.
|
||||||
|
* Zero parameter means that no modifiers were passed and will
|
||||||
|
* cause the returning an empty string.
|
||||||
*
|
*
|
||||||
* @param modifiers a modifier mask describing the extended
|
* @param modifiers a modifier mask describing the extended
|
||||||
* modifier keys and mouse buttons for the event
|
* modifier keys and mouse buttons for the event
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -39,6 +39,10 @@ import java.awt.AWTEvent;
|
||||||
* can use this fact to write replacement functions for <code>invokeLater
|
* can use this fact to write replacement functions for <code>invokeLater
|
||||||
* </code> and <code>invokeAndWait</code> without writing special-case code
|
* </code> and <code>invokeAndWait</code> without writing special-case code
|
||||||
* in any <code>AWTEventListener</code> objects.
|
* in any <code>AWTEventListener</code> objects.
|
||||||
|
* <p>
|
||||||
|
* An unspecified behavior will be caused if the {@code id} parameter
|
||||||
|
* of any particular {@code InvocationEvent} instance is not
|
||||||
|
* in the range from {@code INVOCATION_FIRST} to {@code INVOCATION_LAST}.
|
||||||
*
|
*
|
||||||
* @author Fred Ecks
|
* @author Fred Ecks
|
||||||
* @author David Mendenhall
|
* @author David Mendenhall
|
||||||
|
@ -123,12 +127,13 @@ public class InvocationEvent extends AWTEvent implements ActiveEvent {
|
||||||
* <p> This method throws an <code>IllegalArgumentException</code>
|
* <p> This method throws an <code>IllegalArgumentException</code>
|
||||||
* if <code>source</code> is <code>null</code>.
|
* if <code>source</code> is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Object</code> that originated the event
|
* @param source The <code>Object</code> that originated the event
|
||||||
* @param runnable the <code>Runnable</code> whose <code>run</code>
|
* @param runnable The <code>Runnable</code> whose <code>run</code>
|
||||||
* method will be executed
|
* method will be executed
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
*
|
*
|
||||||
* @see #InvocationEvent(Object, Runnable, Object, boolean)
|
* @see #getSource()
|
||||||
|
* @see #InvocationEvent(Object, Runnable, Object, boolean)
|
||||||
*/
|
*/
|
||||||
public InvocationEvent(Object source, Runnable runnable) {
|
public InvocationEvent(Object source, Runnable runnable) {
|
||||||
this(source, runnable, null, false);
|
this(source, runnable, null, false);
|
||||||
|
@ -147,15 +152,15 @@ public class InvocationEvent extends AWTEvent implements ActiveEvent {
|
||||||
* <p>This method throws an <code>IllegalArgumentException</code>
|
* <p>This method throws an <code>IllegalArgumentException</code>
|
||||||
* if <code>source</code> is <code>null</code>.
|
* if <code>source</code> is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Object</code> that originated
|
* @param source The <code>Object</code> that originated
|
||||||
* the event
|
* the event
|
||||||
* @param runnable the <code>Runnable</code> whose
|
* @param runnable The <code>Runnable</code> whose
|
||||||
* <code>run</code> method will be
|
* <code>run</code> method will be
|
||||||
* executed
|
* executed
|
||||||
* @param notifier the Object whose <code>notifyAll</code>
|
* @param notifier The {@code Object} whose <code>notifyAll</code>
|
||||||
* method will be called after
|
* method will be called after
|
||||||
* <code>Runnable.run</code> has returned
|
* <code>Runnable.run</code> has returned
|
||||||
* @param catchThrowables specifies whether <code>dispatch</code>
|
* @param catchThrowables Specifies whether <code>dispatch</code>
|
||||||
* should catch Throwable when executing
|
* should catch Throwable when executing
|
||||||
* the <code>Runnable</code>'s <code>run</code>
|
* the <code>Runnable</code>'s <code>run</code>
|
||||||
* method, or should instead propagate those
|
* method, or should instead propagate those
|
||||||
|
@ -163,6 +168,7 @@ public class InvocationEvent extends AWTEvent implements ActiveEvent {
|
||||||
* dispatch loop
|
* dispatch loop
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
*
|
*
|
||||||
|
* @see #getSource()
|
||||||
* @see #InvocationEvent(Object, int, Runnable, Object, boolean)
|
* @see #InvocationEvent(Object, int, Runnable, Object, boolean)
|
||||||
*/
|
*/
|
||||||
public InvocationEvent(Object source, Runnable runnable, Object notifier,
|
public InvocationEvent(Object source, Runnable runnable, Object notifier,
|
||||||
|
@ -176,26 +182,29 @@ public class InvocationEvent extends AWTEvent implements ActiveEvent {
|
||||||
* method when dispatched. If notifier is non-<code>null</code>,
|
* method when dispatched. If notifier is non-<code>null</code>,
|
||||||
* <code>notifyAll</code> will be called on it
|
* <code>notifyAll</code> will be called on it
|
||||||
* immediately after <code>run</code> returns.
|
* immediately after <code>run</code> returns.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p>This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Object</code> that originated
|
* @param source The <code>Object</code> that originated
|
||||||
* the event
|
* the event
|
||||||
* @param id the ID for the event
|
* @param id An integer indicating the type of event.
|
||||||
* @param runnable the <code>Runnable</code> whose
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link InvocationEvent}
|
||||||
|
* @param runnable The <code>Runnable</code> whose
|
||||||
* <code>run</code> method will be executed
|
* <code>run</code> method will be executed
|
||||||
* @param notifier the <code>Object</code> whose <code>notifyAll</code>
|
* @param notifier The <code>Object</code> whose <code>notifyAll</code>
|
||||||
* method will be called after
|
* method will be called after
|
||||||
* <code>Runnable.run</code> has returned
|
* <code>Runnable.run</code> has returned
|
||||||
* @param catchThrowables specifies whether <code>dispatch</code>
|
* @param catchThrowables Specifies whether <code>dispatch</code>
|
||||||
* should catch Throwable when executing the
|
* should catch Throwable when executing the
|
||||||
* <code>Runnable</code>'s <code>run</code>
|
* <code>Runnable</code>'s <code>run</code>
|
||||||
* method, or should instead propagate those
|
* method, or should instead propagate those
|
||||||
* Throwables to the EventDispatchThread's
|
* Throwables to the EventDispatchThread's
|
||||||
* dispatch loop
|
* dispatch loop
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
*/
|
*/
|
||||||
protected InvocationEvent(Object source, int id, Runnable runnable,
|
protected InvocationEvent(Object source, int id, Runnable runnable,
|
||||||
Object notifier, boolean catchThrowables) {
|
Object notifier, boolean catchThrowables) {
|
||||||
|
|
|
@ -41,6 +41,18 @@ import java.awt.ItemSelectable;
|
||||||
* spared the details of processing individual mouse movements and mouse
|
* spared the details of processing individual mouse movements and mouse
|
||||||
* clicks, and can instead process a "meaningful" (semantic) event like
|
* clicks, and can instead process a "meaningful" (semantic) event like
|
||||||
* "item selected" or "item deselected".
|
* "item selected" or "item deselected".
|
||||||
|
* <p>
|
||||||
|
* An unspecified behavior will be caused if the {@code id} parameter
|
||||||
|
* of any particular {@code ItemEvent} instance is not
|
||||||
|
* in the range from {@code ITEM_FIRST} to {@code ITEM_LAST}.
|
||||||
|
* <p>
|
||||||
|
* The {@code stateChange} of any {@code ItemEvent} instance takes one of the following
|
||||||
|
* values:
|
||||||
|
* <ul>
|
||||||
|
* <li> {@code ItemEvent.SELECTED}
|
||||||
|
* <li> {@code ItemEvent.DESELECTED}
|
||||||
|
* </ul>
|
||||||
|
* Assigning the value different from listed above will cause an unspecified behavior.
|
||||||
*
|
*
|
||||||
* @author Carl Quinn
|
* @author Carl Quinn
|
||||||
*
|
*
|
||||||
|
@ -101,19 +113,24 @@ public class ItemEvent extends AWTEvent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs an <code>ItemEvent</code> object.
|
* Constructs an <code>ItemEvent</code> object.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p> This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>ItemSelectable</code> object
|
* @param source The <code>ItemSelectable</code> object
|
||||||
* that originated the event
|
* that originated the event
|
||||||
* @param id an integer that identifies the event type
|
* @param id The integer that identifies the event type.
|
||||||
* @param item an object -- the item affected by the event
|
* For information on allowable values, see
|
||||||
* @param stateChange
|
* the class description for {@link ItemEvent}
|
||||||
* an integer that indicates whether the item was
|
* @param item An object -- the item affected by the event
|
||||||
* selected or deselected
|
* @param stateChange An integer that indicates whether the item was
|
||||||
|
* selected or deselected.
|
||||||
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link ItemEvent}
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getItemSelectable()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getStateChange()
|
||||||
*/
|
*/
|
||||||
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
|
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
|
||||||
super(source, id);
|
super(source, id);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -128,6 +128,10 @@ import java.io.ObjectInputStream;
|
||||||
* (VK_ENTER, VK_BACK_SPACE, and VK_TAB), do not rely on the values of the VK_
|
* (VK_ENTER, VK_BACK_SPACE, and VK_TAB), do not rely on the values of the VK_
|
||||||
* constants. Sun reserves the right to change these values as needed
|
* constants. Sun reserves the right to change these values as needed
|
||||||
* to accomodate a wider range of keyboards in the future.
|
* to accomodate a wider range of keyboards in the future.
|
||||||
|
* <p>
|
||||||
|
* An unspecified behavior will be caused if the {@code id} parameter
|
||||||
|
* of any particular {@code KeyEvent} instance is not
|
||||||
|
* in the range from {@code KEY_FIRST} to {@code KEY_LAST}.
|
||||||
*
|
*
|
||||||
* @author Carl Quinn
|
* @author Carl Quinn
|
||||||
* @author Amy Fowler
|
* @author Amy Fowler
|
||||||
|
@ -914,27 +918,32 @@ public class KeyEvent extends InputEvent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>KeyEvent</code> object.
|
* Constructs a <code>KeyEvent</code> object.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p>This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Component</code> that originated the event
|
* @param source The <code>Component</code> that originated the event
|
||||||
* @param id an integer identifying the type of event
|
* @param id An integer indicating the type of event.
|
||||||
* @param when a long integer that specifies the time the event
|
* For information on allowable values, see
|
||||||
* occurred
|
* the class description for {@link KeyEvent}
|
||||||
* @param modifiers the modifier keys down during event (shift, ctrl,
|
* @param when A long integer that specifies the time the event
|
||||||
* alt, meta)
|
* occurred.
|
||||||
* Either extended _DOWN_MASK or old _MASK modifiers
|
* Passing negative or zero value
|
||||||
* should be used, but both models should not be mixed
|
* is not recommended
|
||||||
* in one event. Use of the extended modifiers is
|
* @param modifiers The modifier keys down during event (shift, ctrl,
|
||||||
* preferred.
|
* alt, meta).
|
||||||
* @param keyCode the integer code for an actual key, or VK_UNDEFINED
|
* Passing negative value
|
||||||
|
* is not recommended.
|
||||||
|
* Zero value means that no modifiers were passed.
|
||||||
|
* Use either an extended _DOWN_MASK or old _MASK modifiers,
|
||||||
|
* however do not mix models in the one event.
|
||||||
|
* The extended modifiers are preferred for using
|
||||||
|
* @param keyCode The integer code for an actual key, or VK_UNDEFINED
|
||||||
* (for a key-typed event)
|
* (for a key-typed event)
|
||||||
* @param keyChar the Unicode character generated by this event, or
|
* @param keyChar The Unicode character generated by this event, or
|
||||||
* CHAR_UNDEFINED (for key-pressed and key-released
|
* CHAR_UNDEFINED (for key-pressed and key-released
|
||||||
* events which do not map to a valid Unicode character)
|
* events which do not map to a valid Unicode character)
|
||||||
* @param keyLocation identifies the key location. The only legal
|
* @param keyLocation Identifies the key location. The only legal
|
||||||
* values are <code>KEY_LOCATION_UNKNOWN</code>,
|
* values are <code>KEY_LOCATION_UNKNOWN</code>,
|
||||||
* <code>KEY_LOCATION_STANDARD</code>, <code>KEY_LOCATION_LEFT</code>,
|
* <code>KEY_LOCATION_STANDARD</code>, <code>KEY_LOCATION_LEFT</code>,
|
||||||
* <code>KEY_LOCATION_RIGHT</code>, and <code>KEY_LOCATION_NUMPAD</code>.
|
* <code>KEY_LOCATION_RIGHT</code>, and <code>KEY_LOCATION_NUMPAD</code>.
|
||||||
|
@ -948,6 +957,13 @@ public class KeyEvent extends InputEvent {
|
||||||
* or if <code>keyLocation</code> is not one of the legal
|
* or if <code>keyLocation</code> is not one of the legal
|
||||||
* values enumerated above.
|
* values enumerated above.
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getWhen()
|
||||||
|
* @see #getModifiers()
|
||||||
|
* @see #getKeyCode()
|
||||||
|
* @see #getKeyChar()
|
||||||
|
* @see #getKeyLocation()
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
public KeyEvent(Component source, int id, long when, int modifiers,
|
public KeyEvent(Component source, int id, long when, int modifiers,
|
||||||
|
@ -982,24 +998,29 @@ public class KeyEvent extends InputEvent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>KeyEvent</code> object.
|
* Constructs a <code>KeyEvent</code> object.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p> This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Component</code> that originated the event
|
* @param source The <code>Component</code> that originated the event
|
||||||
* @param id an integer identifying the type of event
|
* @param id An integer indicating the type of event.
|
||||||
* @param when a long integer that specifies the time the event
|
* For information on allowable values, see
|
||||||
* occurred
|
* the class description for {@link KeyEvent}
|
||||||
* @param modifiers the modifier keys down during event (shift, ctrl,
|
* @param when A long integer that specifies the time the event
|
||||||
* alt, meta)
|
* occurred.
|
||||||
* Either extended _DOWN_MASK or old _MASK modifiers
|
* Passing negative or zero value
|
||||||
* should be used, but both models should not be mixed
|
* is not recommended
|
||||||
* in one event. Use of the extended modifiers is
|
* @param modifiers The modifier keys down during event (shift, ctrl,
|
||||||
* preferred.
|
* alt, meta).
|
||||||
* @param keyCode the integer code for an actual key, or VK_UNDEFINED
|
* Passing negative value
|
||||||
|
* is not recommended.
|
||||||
|
* Zero value means that no modifiers were passed.
|
||||||
|
* Use either an extended _DOWN_MASK or old _MASK modifiers,
|
||||||
|
* however do not mix models in the one event.
|
||||||
|
* The extended modifiers are preferred for using
|
||||||
|
* @param keyCode The integer code for an actual key, or VK_UNDEFINED
|
||||||
* (for a key-typed event)
|
* (for a key-typed event)
|
||||||
* @param keyChar the Unicode character generated by this event, or
|
* @param keyChar The Unicode character generated by this event, or
|
||||||
* CHAR_UNDEFINED (for key-pressed and key-released
|
* CHAR_UNDEFINED (for key-pressed and key-released
|
||||||
* events which do not map to a valid Unicode character)
|
* events which do not map to a valid Unicode character)
|
||||||
* @throws IllegalArgumentException if <code>id</code> is
|
* @throws IllegalArgumentException if <code>id</code> is
|
||||||
|
@ -1008,6 +1029,12 @@ public class KeyEvent extends InputEvent {
|
||||||
* <code>KEY_TYPED</code> and <code>keyCode</code> is not
|
* <code>KEY_TYPED</code> and <code>keyCode</code> is not
|
||||||
* <code>VK_UNDEFINED</code>
|
* <code>VK_UNDEFINED</code>
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getWhen()
|
||||||
|
* @see #getModifiers()
|
||||||
|
* @see #getKeyCode()
|
||||||
|
* @see #getKeyChar()
|
||||||
*/
|
*/
|
||||||
public KeyEvent(Component source, int id, long when, int modifiers,
|
public KeyEvent(Component source, int id, long when, int modifiers,
|
||||||
int keyCode, char keyChar) {
|
int keyCode, char keyChar) {
|
||||||
|
|
|
@ -159,6 +159,11 @@ import java.awt.IllegalComponentStateException;
|
||||||
* The reported coordinates for mouse drag events are clipped to fit within the
|
* The reported coordinates for mouse drag events are clipped to fit within the
|
||||||
* bounds of the virtual device associated with the <code>Component</code>.
|
* bounds of the virtual device associated with the <code>Component</code>.
|
||||||
* </ul>
|
* </ul>
|
||||||
|
* <p>
|
||||||
|
* An unspecified behavior will be caused if the {@code id} parameter
|
||||||
|
* of any particular {@code MouseEvent} instance is not
|
||||||
|
* in the range from {@code MOUSE_FIRST} to {@code MOUSE_LAST}-1
|
||||||
|
* ({@code MOUSE_WHEEL} is not acceptable).
|
||||||
*
|
*
|
||||||
* @author Carl Quinn
|
* @author Carl Quinn
|
||||||
*
|
*
|
||||||
|
@ -418,8 +423,7 @@ public class MouseEvent extends InputEvent {
|
||||||
* specified source component,
|
* specified source component,
|
||||||
* type, modifiers, coordinates, and click count.
|
* type, modifiers, coordinates, and click count.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that passing in an invalid <code>id</code> results in
|
* Creating an invalid event (such
|
||||||
* unspecified behavior. Creating an invalid event (such
|
|
||||||
* as by using more than one of the old _MASKs, or modifier/button
|
* as by using more than one of the old _MASKs, or modifier/button
|
||||||
* values which don't match) results in unspecified behavior.
|
* values which don't match) results in unspecified behavior.
|
||||||
* An invocation of the form
|
* An invocation of the form
|
||||||
|
@ -435,28 +439,44 @@ public class MouseEvent extends InputEvent {
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Component</code> that originated the event
|
* @param source The <code>Component</code> that originated the event
|
||||||
* @param id the integer that identifies the event
|
* @param id An integer indicating the type of event.
|
||||||
* @param when a long int that gives the time the event occurred
|
* For information on allowable values, see
|
||||||
* @param modifiers the modifier keys down during event (e.g. shift, ctrl,
|
* the class description for {@link MouseEvent}
|
||||||
|
* @param when A long integer that gives the time the event occurred.
|
||||||
|
* Passing negative or zero value
|
||||||
|
* is not recommended
|
||||||
|
* @param modifiers The modifier keys down during event (e.g. shift, ctrl,
|
||||||
* alt, meta)
|
* alt, meta)
|
||||||
* Either extended _DOWN_MASK or old _MASK modifiers
|
* Passing negative parameter
|
||||||
* should be used, but both models should not be mixed
|
* is not recommended.
|
||||||
* in one event. Use of the extended modifiers is
|
* Zero value means that no modifiers were passed.
|
||||||
* preferred.
|
* Use either an extended _DOWN_MASK or old _MASK modifiers,
|
||||||
* @param x the horizontal x coordinate for the mouse location
|
* however do not mix models in the one event.
|
||||||
* @param y the vertical y coordinate for the mouse location
|
* The extended modifiers are preferred for using
|
||||||
* @param clickCount the number of mouse clicks associated with event
|
* @param x The horizontal x coordinate for the mouse location.
|
||||||
* @param popupTrigger a boolean, true if this event is a trigger for a
|
* It is allowed to pass negative values
|
||||||
* popup menu
|
* @param y The vertical y coordinate for the mouse location.
|
||||||
* @param button which of the mouse buttons has changed state.
|
* It is allowed to pass negative values
|
||||||
* <code>NOBUTTON</code>,
|
* @param clickCount The number of mouse clicks associated with event.
|
||||||
* <code>BUTTON1</code>,
|
* Passing negative value
|
||||||
* <code>BUTTON2</code> or
|
* is not recommended
|
||||||
* <code>BUTTON3</code>.
|
* @param popupTrigger A boolean that equals {@code true} if this event
|
||||||
|
* is a trigger for a popup menu
|
||||||
|
* @param button An integer that indicates, which of the mouse buttons has
|
||||||
|
* changed its state
|
||||||
* @throws IllegalArgumentException if an invalid <code>button</code>
|
* @throws IllegalArgumentException if an invalid <code>button</code>
|
||||||
* value is passed in
|
* value is passed in
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getWhen()
|
||||||
|
* @see #getModifiers()
|
||||||
|
* @see #getX()
|
||||||
|
* @see #getY()
|
||||||
|
* @see #getClickCount()
|
||||||
|
* @see #isPopupTrigger()
|
||||||
|
* @see #getButton()
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
public MouseEvent(Component source, int id, long when, int modifiers,
|
public MouseEvent(Component source, int id, long when, int modifiers,
|
||||||
|
@ -479,8 +499,6 @@ public class MouseEvent extends InputEvent {
|
||||||
* Constructs a <code>MouseEvent</code> object with the
|
* Constructs a <code>MouseEvent</code> object with the
|
||||||
* specified source component,
|
* specified source component,
|
||||||
* type, modifiers, coordinates, and click count.
|
* type, modifiers, coordinates, and click count.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
|
||||||
* unspecified behavior.
|
|
||||||
* An invocation of the form
|
* An invocation of the form
|
||||||
* <tt>MouseEvent(source, id, when, modifiers, x, y, clickCount, popupTrigger)</tt>
|
* <tt>MouseEvent(source, id, when, modifiers, x, y, clickCount, popupTrigger)</tt>
|
||||||
* behaves in exactly the same way as the invocation
|
* behaves in exactly the same way as the invocation
|
||||||
|
@ -493,21 +511,39 @@ public class MouseEvent extends InputEvent {
|
||||||
* This method throws an <code>IllegalArgumentException</code>
|
* This method throws an <code>IllegalArgumentException</code>
|
||||||
* if <code>source</code> is <code>null</code>.
|
* if <code>source</code> is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Component</code> that originated the event
|
* @param source The <code>Component</code> that originated the event
|
||||||
* @param id the integer that identifies the event
|
* @param id An integer indicating the type of event.
|
||||||
* @param when a long int that gives the time the event occurred
|
* For information on allowable values, see
|
||||||
* @param modifiers the modifier keys down during event (e.g. shift, ctrl,
|
* the class description for {@link MouseEvent}
|
||||||
|
* @param when A long integer that gives the time the event occurred.
|
||||||
|
* Passing negative or zero value
|
||||||
|
* is not recommended
|
||||||
|
* @param modifiers The modifier keys down during event (e.g. shift, ctrl,
|
||||||
* alt, meta)
|
* alt, meta)
|
||||||
* Either extended _DOWN_MASK or old _MASK modifiers
|
* Passing negative parameter
|
||||||
* should be used, but both models should not be mixed
|
* is not recommended.
|
||||||
* in one event. Use of the extended modifiers is
|
* Zero value means that no modifiers were passed.
|
||||||
* preferred.
|
* Use either an extended _DOWN_MASK or old _MASK modifiers,
|
||||||
* @param x the horizontal x coordinate for the mouse location
|
* however do not mix models in the one event.
|
||||||
* @param y the vertical y coordinate for the mouse location
|
* The extended modifiers are preferred for using
|
||||||
* @param clickCount the number of mouse clicks associated with event
|
* @param x The horizontal x coordinate for the mouse location.
|
||||||
* @param popupTrigger a boolean, true if this event is a trigger for a
|
* It is allowed to pass negative values
|
||||||
* popup menu
|
* @param y The vertical y coordinate for the mouse location.
|
||||||
|
* It is allowed to pass negative values
|
||||||
|
* @param clickCount The number of mouse clicks associated with event.
|
||||||
|
* Passing negative value
|
||||||
|
* is not recommended
|
||||||
|
* @param popupTrigger A boolean that equals {@code true} if this event
|
||||||
|
* is a trigger for a popup menu
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getWhen()
|
||||||
|
* @see #getModifiers()
|
||||||
|
* @see #getX()
|
||||||
|
* @see #getY()
|
||||||
|
* @see #getClickCount()
|
||||||
|
* @see #isPopupTrigger()
|
||||||
*/
|
*/
|
||||||
public MouseEvent(Component source, int id, long when, int modifiers,
|
public MouseEvent(Component source, int id, long when, int modifiers,
|
||||||
int x, int y, int clickCount, boolean popupTrigger) {
|
int x, int y, int clickCount, boolean popupTrigger) {
|
||||||
|
@ -520,8 +556,7 @@ public class MouseEvent extends InputEvent {
|
||||||
* specified source component,
|
* specified source component,
|
||||||
* type, modifiers, coordinates, absolute coordinates, and click count.
|
* type, modifiers, coordinates, absolute coordinates, and click count.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that passing in an invalid <code>id</code> results in
|
* Creating an invalid event (such
|
||||||
* unspecified behavior. Creating an invalid event (such
|
|
||||||
* as by using more than one of the old _MASKs, or modifier/button
|
* as by using more than one of the old _MASKs, or modifier/button
|
||||||
* values which don't match) results in unspecified behavior.
|
* values which don't match) results in unspecified behavior.
|
||||||
* Even if inconsistent values for relative and absolute coordinates are
|
* Even if inconsistent values for relative and absolute coordinates are
|
||||||
|
@ -531,30 +566,50 @@ public class MouseEvent extends InputEvent {
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Component</code> that originated the event
|
* @param source The <code>Component</code> that originated the event
|
||||||
* @param id the integer that identifies the event
|
* @param id An integer indicating the type of event.
|
||||||
* @param when a long int that gives the time the event occurred
|
* For information on allowable values, see
|
||||||
* @param modifiers the modifier keys down during event (e.g. shift, ctrl,
|
* the class description for {@link MouseEvent}
|
||||||
|
* @param when A long integer that gives the time the event occurred.
|
||||||
|
* Passing negative or zero value
|
||||||
|
* is not recommended
|
||||||
|
* @param modifiers The modifier keys down during event (e.g. shift, ctrl,
|
||||||
* alt, meta)
|
* alt, meta)
|
||||||
* Either extended _DOWN_MASK or old _MASK modifiers
|
* Passing negative parameter
|
||||||
* should be used, but both models should not be mixed
|
* is not recommended.
|
||||||
* in one event. Use of the extended modifiers is
|
* Zero value means that no modifiers were passed.
|
||||||
* preferred.
|
* Use either an extended _DOWN_MASK or old _MASK modifiers,
|
||||||
* @param x the horizontal x coordinate for the mouse location
|
* however do not mix models in the one event.
|
||||||
* @param y the vertical y coordinate for the mouse location
|
* The extended modifiers are preferred for using
|
||||||
* @param xAbs the absolute horizontal x coordinate for the mouse location
|
* @param x The horizontal x coordinate for the mouse location.
|
||||||
* @param yAbs the absolute vertical y coordinate for the mouse location
|
* It is allowed to pass negative values
|
||||||
* @param clickCount the number of mouse clicks associated with event
|
* @param y The vertical y coordinate for the mouse location.
|
||||||
* @param popupTrigger a boolean, true if this event is a trigger for a
|
* It is allowed to pass negative values
|
||||||
* popup menu
|
* @param xAbs The absolute horizontal x coordinate for the mouse location
|
||||||
* @param button which of the mouse buttons has changed state.
|
* It is allowed to pass negative values
|
||||||
* <code>NOBUTTON</code>,
|
* @param yAbs The absolute vertical y coordinate for the mouse location
|
||||||
* <code>BUTTON1</code>,
|
* It is allowed to pass negative values
|
||||||
* <code>BUTTON2</code> or
|
* @param clickCount The number of mouse clicks associated with event.
|
||||||
* <code>BUTTON3</code>.
|
* Passing negative value
|
||||||
|
* is not recommended
|
||||||
|
* @param popupTrigger A boolean that equals {@code true} if this event
|
||||||
|
* is a trigger for a popup menu
|
||||||
|
* @param button An integer that indicates, which of the mouse buttons has
|
||||||
|
* changed its state
|
||||||
* @throws IllegalArgumentException if an invalid <code>button</code>
|
* @throws IllegalArgumentException if an invalid <code>button</code>
|
||||||
* value is passed in
|
* value is passed in
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getWhen()
|
||||||
|
* @see #getModifiers()
|
||||||
|
* @see #getX()
|
||||||
|
* @see #getY()
|
||||||
|
* @see #getXOnScreen()
|
||||||
|
* @see #getYOnScreen()
|
||||||
|
* @see #getClickCount()
|
||||||
|
* @see #isPopupTrigger()
|
||||||
|
* @see #getButton()
|
||||||
* @since 1.6
|
* @since 1.6
|
||||||
*/
|
*/
|
||||||
public MouseEvent(Component source, int id, long when, int modifiers,
|
public MouseEvent(Component source, int id, long when, int modifiers,
|
||||||
|
@ -675,21 +730,26 @@ public class MouseEvent extends InputEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a <code>String</code> describing the modifier keys and
|
* Returns a <code>String</code> instance describing the modifier keys and
|
||||||
* mouse buttons that were down during the event, such as "Shift",
|
* mouse buttons that were down during the event, such as "Shift",
|
||||||
* or "Ctrl+Shift". These strings can be localized by changing
|
* or "Ctrl+Shift". These strings can be localized by changing
|
||||||
* the <code>awt.properties</code> file.
|
* the <code>awt.properties</code> file.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that <code>InputEvent.ALT_MASK</code> and
|
* Note that the <code>InputEvent.ALT_MASK</code> and
|
||||||
* <code>InputEvent.BUTTON2_MASK</code> have the same value,
|
* <code>InputEvent.BUTTON2_MASK</code> have equal values,
|
||||||
* so the string "Alt" is returned for both modifiers. Likewise,
|
* so the "Alt" string is returned for both modifiers. Likewise,
|
||||||
* <code>InputEvent.META_MASK</code> and
|
* the <code>InputEvent.META_MASK</code> and
|
||||||
* <code>InputEvent.BUTTON3_MASK</code> have the same value,
|
* <code>InputEvent.BUTTON3_MASK</code> have equal values,
|
||||||
* so the string "Meta" is returned for both modifiers.
|
* so the "Meta" string is returned for both modifiers.
|
||||||
|
* <p>
|
||||||
|
* Note that passing negative parameter is incorrect,
|
||||||
|
* and will cause the returning an unspecified string.
|
||||||
|
* Zero parameter means that no modifiers were passed and will
|
||||||
|
* cause the returning an empty string.
|
||||||
*
|
*
|
||||||
* @param modifiers a modifier mask describing the modifier keys and
|
* @param modifiers A modifier mask describing the modifier keys and
|
||||||
* mouse buttons that were down during the event
|
* mouse buttons that were down during the event
|
||||||
* @return string a text description of the combination of modifier
|
* @return string string text description of the combination of modifier
|
||||||
* keys and mouse buttons that were down during the event
|
* keys and mouse buttons that were down during the event
|
||||||
* @see InputEvent#getModifiersExText(int)
|
* @see InputEvent#getModifiersExText(int)
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
|
|
@ -36,6 +36,10 @@ import java.awt.Rectangle;
|
||||||
* designed to be used with the Event Listener model; programs
|
* designed to be used with the Event Listener model; programs
|
||||||
* should continue to override paint/update methods in order
|
* should continue to override paint/update methods in order
|
||||||
* render themselves properly.
|
* render themselves properly.
|
||||||
|
* <p>
|
||||||
|
* An unspecified behavior will be caused if the {@code id} parameter
|
||||||
|
* of any particular {@code PaintEvent} instance is not
|
||||||
|
* in the range from {@code PAINT_FIRST} to {@code PAINT_LAST}.
|
||||||
*
|
*
|
||||||
* @author Amy Fowler
|
* @author Amy Fowler
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
|
@ -82,15 +86,19 @@ public class PaintEvent extends ComponentEvent {
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>PaintEvent</code> object with the specified
|
* Constructs a <code>PaintEvent</code> object with the specified
|
||||||
* source component and type.
|
* source component and type.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p> This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the object where the event originated
|
* @param source The object where the event originated
|
||||||
* @param id the event type
|
* @param id The integer that identifies the event type.
|
||||||
* @param updateRect the rectangle area which needs to be repainted
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link PaintEvent}
|
||||||
|
* @param updateRect The rectangle area which needs to be repainted
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getUpdateRect()
|
||||||
*/
|
*/
|
||||||
public PaintEvent(Component source, int id, Rectangle updateRect) {
|
public PaintEvent(Component source, int id, Rectangle updateRect) {
|
||||||
super(source, id);
|
super(source, id);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -38,12 +38,15 @@ import java.awt.AWTEvent;
|
||||||
* this <code>TextEvent</code> when the event occurs. The listener is
|
* this <code>TextEvent</code> when the event occurs. The listener is
|
||||||
* spared the details of processing individual mouse movements and key strokes
|
* spared the details of processing individual mouse movements and key strokes
|
||||||
* Instead, it can process a "meaningful" (semantic) event like "text changed".
|
* Instead, it can process a "meaningful" (semantic) event like "text changed".
|
||||||
|
* <p>
|
||||||
|
* An unspecified behavior will be caused if the {@code id} parameter
|
||||||
|
* of any particular {@code TextEvent} instance is not
|
||||||
|
* in the range from {@code TEXT_FIRST} to {@code TEXT_LAST}.
|
||||||
*
|
*
|
||||||
* @author Georges Saab
|
* @author Georges Saab
|
||||||
*
|
*
|
||||||
* @see java.awt.TextComponent
|
* @see java.awt.TextComponent
|
||||||
* @see TextListener
|
* @see TextListener
|
||||||
* @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/textlistener.html">Tutorial: Writing a Text Listener</a>
|
|
||||||
*
|
*
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
@ -72,15 +75,18 @@ public class TextEvent extends AWTEvent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>TextEvent</code> object.
|
* Constructs a <code>TextEvent</code> object.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p> This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the (<code>TextComponent</code>) object that
|
* @param source The (<code>TextComponent</code>) object that
|
||||||
* originated the event
|
* originated the event
|
||||||
* @param id an integer that identifies the event type
|
* @param id An integer that identifies the event type.
|
||||||
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link TextEvent}
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getSource()
|
||||||
|
* @see #getID()
|
||||||
*/
|
*/
|
||||||
public TextEvent(Object source, int id) {
|
public TextEvent(Object source, int id) {
|
||||||
super(source, id);
|
super(source, id);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -40,7 +40,6 @@ import java.util.EventListener;
|
||||||
* @author Georges Saab
|
* @author Georges Saab
|
||||||
*
|
*
|
||||||
* @see TextEvent
|
* @see TextEvent
|
||||||
* @see <a href="http://java.sun.com/docs/books/tutorial/post1.0/ui/textlistener.html">Tutorial: Writing a Text Listener</a>
|
|
||||||
*
|
*
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -41,6 +41,10 @@ import sun.awt.SunToolkit;
|
||||||
* (<code>WindowAdapter</code> objects implement the
|
* (<code>WindowAdapter</code> objects implement the
|
||||||
* <code>WindowListener</code> interface.) Each such listener object
|
* <code>WindowListener</code> interface.) Each such listener object
|
||||||
* gets this <code>WindowEvent</code> when the event occurs.
|
* gets this <code>WindowEvent</code> when the event occurs.
|
||||||
|
* <p>
|
||||||
|
* An unspecified behavior will be caused if the {@code id} parameter
|
||||||
|
* of any particular {@code WindowEvent} instance is not
|
||||||
|
* in the range from {@code WINDOW_FIRST} to {@code WINDOW_LAST}.
|
||||||
*
|
*
|
||||||
* @author Carl Quinn
|
* @author Carl Quinn
|
||||||
* @author Amy Fowler
|
* @author Amy Fowler
|
||||||
|
@ -170,20 +174,27 @@ public class WindowEvent extends ComponentEvent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>WindowEvent</code> object.
|
* Constructs a <code>WindowEvent</code> object.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p>This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Window</code> object
|
* @param source The <code>Window</code> object
|
||||||
* that originated the event
|
* that originated the event
|
||||||
* @param id an integer indicating the type of event.
|
* @param id An integer indicating the type of event.
|
||||||
* @param opposite the other window involved in the focus or activation
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link WindowEvent}
|
||||||
|
* @param opposite The other window involved in the focus or activation
|
||||||
* change, or <code>null</code>
|
* change, or <code>null</code>
|
||||||
* @param oldState previous state of the window for window state
|
* @param oldState Previous state of the window for window state change event.
|
||||||
* change event
|
* See {@code #getOldState()} for allowable values
|
||||||
* @param newState new state of the window for window state change event
|
* @param newState New state of the window for window state change event.
|
||||||
|
* See {@code #getNewState()} for allowable values
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getWindow()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getOppositeWindow()
|
||||||
|
* @see #getOldState()
|
||||||
|
* @see #getNewState()
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
public WindowEvent(Window source, int id, Window opposite,
|
public WindowEvent(Window source, int id, Window opposite,
|
||||||
|
@ -209,24 +220,28 @@ public class WindowEvent extends ComponentEvent {
|
||||||
* If this focus change occurs with a native application, with a
|
* If this focus change occurs with a native application, with a
|
||||||
* Java application in a different VM, or with no other
|
* Java application in a different VM, or with no other
|
||||||
* <code>Window</code>, then the opposite Window is <code>null</code>.
|
* <code>Window</code>, then the opposite Window is <code>null</code>.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p>This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Window</code> object that
|
* @param source The <code>Window</code> object that
|
||||||
* originated the event
|
* originated the event
|
||||||
* @param id <code>WINDOW_ACTIVATED</code>,
|
* @param id An integer indicating the type of event.
|
||||||
* <code>WINDOW_DEACTIVATED</code>,
|
* For information on allowable values, see
|
||||||
* <code>WINDOW_GAINED_FOCUS</code>,
|
* the class description for {@link WindowEvent}.
|
||||||
* or <code>WINDOW_LOST_FOCUS</code>. It is
|
* It is expected that this constructor will not
|
||||||
* expected that this constructor will not be used for
|
* be used for other then
|
||||||
* other <code>WindowEvent</code> types because the
|
* {@code WINDOW_ACTIVATED},{@code WINDOW_DEACTIVATED},
|
||||||
* opposite <code>Window</code> of such events
|
* {@code WINDOW_GAINED_FOCUS}, or {@code WINDOW_LOST_FOCUS}.
|
||||||
* will always be <code>null</code>
|
* {@code WindowEvent} types,
|
||||||
* @param opposite the other <code>Window</code> involved in the
|
* because the opposite <code>Window</code> of other event types
|
||||||
|
* will always be {@code null}.
|
||||||
|
* @param opposite The other <code>Window</code> involved in the
|
||||||
* focus or activation change, or <code>null</code>
|
* focus or activation change, or <code>null</code>
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getWindow()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getOppositeWindow()
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
public WindowEvent(Window source, int id, Window opposite) {
|
public WindowEvent(Window source, int id, Window opposite) {
|
||||||
|
@ -236,21 +251,30 @@ public class WindowEvent extends ComponentEvent {
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>WindowEvent</code> object with the specified
|
* Constructs a <code>WindowEvent</code> object with the specified
|
||||||
* previous and new window states.
|
* previous and new window states.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p>This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Window</code> object
|
* @param source The <code>Window</code> object
|
||||||
* that originated the event
|
* that originated the event
|
||||||
* @param id <code>WINDOW_STATE_CHANGED</code> event type.
|
* @param id An integer indicating the type of event.
|
||||||
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link WindowEvent}.
|
||||||
* It is expected that this constructor will not
|
* It is expected that this constructor will not
|
||||||
* be used for other <code>WindowEvent</code>
|
* be used for other then
|
||||||
|
* {@code WINDOW_STATE_CHANGED}
|
||||||
|
* {@code WindowEvent}
|
||||||
* types, because the previous and new window
|
* types, because the previous and new window
|
||||||
* states are meaningless for other event types.
|
* states are meaningless for other event types.
|
||||||
* @param oldState an integer representing the previous window state
|
* @param oldState An integer representing the previous window state.
|
||||||
* @param newState an integer representing the new window state
|
* See {@code #getOldState()} for allowable values
|
||||||
|
* @param newState An integer representing the new window state.
|
||||||
|
* See {@code #getNewState()} for allowable values
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getWindow()
|
||||||
|
* @see #getID()
|
||||||
|
* @see #getOldState()
|
||||||
|
* @see #getNewState()
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
public WindowEvent(Window source, int id, int oldState, int newState) {
|
public WindowEvent(Window source, int id, int oldState, int newState) {
|
||||||
|
@ -259,14 +283,17 @@ public class WindowEvent extends ComponentEvent {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>WindowEvent</code> object.
|
* Constructs a <code>WindowEvent</code> object.
|
||||||
* <p>Note that passing in an invalid <code>id</code> results in
|
* <p>This method throws an
|
||||||
* unspecified behavior. This method throws an
|
|
||||||
* <code>IllegalArgumentException</code> if <code>source</code>
|
* <code>IllegalArgumentException</code> if <code>source</code>
|
||||||
* is <code>null</code>.
|
* is <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param source the <code>Window</code> object that originated the event
|
* @param source The <code>Window</code> object that originated the event
|
||||||
* @param id an integer indicating the type of event
|
* @param id An integer indicating the type of event.
|
||||||
|
* For information on allowable values, see
|
||||||
|
* the class description for {@link WindowEvent}.
|
||||||
* @throws IllegalArgumentException if <code>source</code> is null
|
* @throws IllegalArgumentException if <code>source</code> is null
|
||||||
|
* @see #getWindow()
|
||||||
|
* @see #getID()
|
||||||
*/
|
*/
|
||||||
public WindowEvent(Window source, int id) {
|
public WindowEvent(Window source, int id) {
|
||||||
this(source, id, null, 0, 0);
|
this(source, id, null, 0, 0);
|
||||||
|
|
|
@ -1210,9 +1210,9 @@ public class BufferedImage extends java.awt.Image
|
||||||
* <code>BufferedImage</code>.
|
* <code>BufferedImage</code>.
|
||||||
*/
|
*/
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new String("BufferedImage@"+Integer.toHexString(hashCode())
|
return "BufferedImage@"+Integer.toHexString(hashCode())
|
||||||
+": type = "+imageType
|
+": type = "+imageType
|
||||||
+" "+colorModel+" "+raster);
|
+" "+colorModel+" "+raster;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -384,7 +384,7 @@ class DictionaryBasedBreakIterator extends RuleBasedBreakIterator {
|
||||||
// on the last character of a legal word. Push that position onto
|
// on the last character of a legal word. Push that position onto
|
||||||
// the possible-break-positions stack
|
// the possible-break-positions stack
|
||||||
if (dictionary.getNextState(state, 0) == -1) {
|
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
|
// 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
|
// and we've successfully traversed the whole range. Drop out
|
||||||
// of the loop.
|
// of the loop.
|
||||||
if (state == -1) {
|
if (state == -1) {
|
||||||
currentBreakPositions.push(new Integer(text.getIndex()));
|
currentBreakPositions.push(Integer.valueOf(text.getIndex()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ class DictionaryBasedBreakIterator extends RuleBasedBreakIterator {
|
||||||
if (!currentBreakPositions.isEmpty()) {
|
if (!currentBreakPositions.isEmpty()) {
|
||||||
currentBreakPositions.pop();
|
currentBreakPositions.pop();
|
||||||
}
|
}
|
||||||
currentBreakPositions.push(new Integer(endPos));
|
currentBreakPositions.push(Integer.valueOf(endPos));
|
||||||
|
|
||||||
// create a regular array to hold the break positions and copy
|
// create a regular array to hold the break positions and copy
|
||||||
// the break positions from the stack to the array (in addition,
|
// the break positions from the stack to the array (in addition,
|
||||||
|
|
|
@ -1286,7 +1286,7 @@ public class MessageFormat extends Format {
|
||||||
characterIterators.add(
|
characterIterators.add(
|
||||||
createAttributedCharacterIterator(
|
createAttributedCharacterIterator(
|
||||||
subIterator, Field.ARGUMENT,
|
subIterator, Field.ARGUMENT,
|
||||||
new Integer(argumentNumber)));
|
Integer.valueOf(argumentNumber)));
|
||||||
last = result.length();
|
last = result.length();
|
||||||
}
|
}
|
||||||
arg = null;
|
arg = null;
|
||||||
|
@ -1296,7 +1296,7 @@ public class MessageFormat extends Format {
|
||||||
characterIterators.add(
|
characterIterators.add(
|
||||||
createAttributedCharacterIterator(
|
createAttributedCharacterIterator(
|
||||||
arg, Field.ARGUMENT,
|
arg, Field.ARGUMENT,
|
||||||
new Integer(argumentNumber)));
|
Integer.valueOf(argumentNumber)));
|
||||||
last = result.length();
|
last = result.length();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -778,8 +778,8 @@ public abstract class ImageInputStreamImpl implements ImageInputStream {
|
||||||
*/
|
*/
|
||||||
public void mark() {
|
public void mark() {
|
||||||
try {
|
try {
|
||||||
markByteStack.push(new Long(getStreamPosition()));
|
markByteStack.push(Long.valueOf(getStreamPosition()));
|
||||||
markBitStack.push(new Integer(getBitOffset()));
|
markBitStack.push(Integer.valueOf(getBitOffset()));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2050,14 +2050,14 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
|
||||||
null, AccessibleState.SELECTED);
|
null, AccessibleState.SELECTED);
|
||||||
accessibleContext.firePropertyChange(
|
accessibleContext.firePropertyChange(
|
||||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||||
new Integer(0), new Integer(1));
|
Integer.valueOf(0), Integer.valueOf(1));
|
||||||
} else {
|
} else {
|
||||||
accessibleContext.firePropertyChange(
|
accessibleContext.firePropertyChange(
|
||||||
AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
|
AccessibleContext.ACCESSIBLE_STATE_PROPERTY,
|
||||||
AccessibleState.SELECTED, null);
|
AccessibleState.SELECTED, null);
|
||||||
accessibleContext.firePropertyChange(
|
accessibleContext.firePropertyChange(
|
||||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||||
new Integer(1), new Integer(0));
|
Integer.valueOf(1), Integer.valueOf(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2555,9 +2555,9 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
|
||||||
*/
|
*/
|
||||||
public Number getCurrentAccessibleValue() {
|
public Number getCurrentAccessibleValue() {
|
||||||
if (isSelected()) {
|
if (isSelected()) {
|
||||||
return new Integer(1);
|
return Integer.valueOf(1);
|
||||||
} else {
|
} else {
|
||||||
return new Integer(0);
|
return Integer.valueOf(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2586,7 +2586,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
|
||||||
* @return an Integer of 0.
|
* @return an Integer of 0.
|
||||||
*/
|
*/
|
||||||
public Number getMinimumAccessibleValue() {
|
public Number getMinimumAccessibleValue() {
|
||||||
return new Integer(0);
|
return Integer.valueOf(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2595,7 +2595,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl
|
||||||
* @return An Integer of 1.
|
* @return An Integer of 1.
|
||||||
*/
|
*/
|
||||||
public Number getMaximumAccessibleValue() {
|
public Number getMaximumAccessibleValue() {
|
||||||
return new Integer(1);
|
return Integer.valueOf(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ class DebugGraphicsInfo {
|
||||||
componentToDebug = new Hashtable();
|
componentToDebug = new Hashtable();
|
||||||
}
|
}
|
||||||
if (debug > 0) {
|
if (debug > 0) {
|
||||||
componentToDebug.put(component, new Integer(debug));
|
componentToDebug.put(component, Integer.valueOf(debug));
|
||||||
} else {
|
} else {
|
||||||
componentToDebug.remove(component);
|
componentToDebug.remove(component);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1285,7 +1285,7 @@ public class JInternalFrame extends JComponent implements
|
||||||
* description: Specifies what desktop layer is used.
|
* description: Specifies what desktop layer is used.
|
||||||
*/
|
*/
|
||||||
public void setLayer(int layer) {
|
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
|
* have a value
|
||||||
*/
|
*/
|
||||||
public Number getCurrentAccessibleValue() {
|
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
|
* have a minimum value
|
||||||
*/
|
*/
|
||||||
public Number getMinimumAccessibleValue() {
|
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
|
* have a maximum value
|
||||||
*/
|
*/
|
||||||
public Number getMaximumAccessibleValue() {
|
public Number getMaximumAccessibleValue() {
|
||||||
return new Integer(Integer.MAX_VALUE);
|
return Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // AccessibleJInternalFrame
|
} // AccessibleJInternalFrame
|
||||||
|
|
|
@ -1512,7 +1512,7 @@ public class JOptionPane extends JComponent implements Accessible
|
||||||
|
|
||||||
iFrame.putClientProperty("JInternalFrame.frameType", "optionDialog");
|
iFrame.putClientProperty("JInternalFrame.frameType", "optionDialog");
|
||||||
iFrame.putClientProperty("JInternalFrame.messageType",
|
iFrame.putClientProperty("JInternalFrame.messageType",
|
||||||
new Integer(getMessageType()));
|
Integer.valueOf(getMessageType()));
|
||||||
|
|
||||||
iFrame.addInternalFrameListener(new InternalFrameAdapter() {
|
iFrame.addInternalFrameListener(new InternalFrameAdapter() {
|
||||||
public void internalFrameClosing(InternalFrameEvent e) {
|
public void internalFrameClosing(InternalFrameEvent e) {
|
||||||
|
|
|
@ -775,9 +775,9 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib
|
||||||
accessibleContext.firePropertyChange(
|
accessibleContext.firePropertyChange(
|
||||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||||
(oldModel== null
|
(oldModel== null
|
||||||
? null : new Integer(oldModel.getValue())),
|
? null : Integer.valueOf(oldModel.getValue())),
|
||||||
(newModel== null
|
(newModel== null
|
||||||
? null : new Integer(newModel.getValue())));
|
? null : Integer.valueOf(newModel.getValue())));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model != null) {
|
if (model != null) {
|
||||||
|
@ -850,8 +850,8 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib
|
||||||
if (accessibleContext != null) {
|
if (accessibleContext != null) {
|
||||||
accessibleContext.firePropertyChange(
|
accessibleContext.firePropertyChange(
|
||||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||||
new Integer(oldValue),
|
Integer.valueOf(oldValue),
|
||||||
new Integer(brm.getValue()));
|
Integer.valueOf(brm.getValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1087,7 +1087,7 @@ public class JProgressBar extends JComponent implements SwingConstants, Accessib
|
||||||
* @return the current value of this object
|
* @return the current value of this object
|
||||||
*/
|
*/
|
||||||
public Number getCurrentAccessibleValue() {
|
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
|
* @return the minimum value of this object
|
||||||
*/
|
*/
|
||||||
public Number getMinimumAccessibleValue() {
|
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() {
|
public Number getMaximumAccessibleValue() {
|
||||||
// TIGER - 4422362
|
// TIGER - 4422362
|
||||||
return new Integer(model.getMaximum() - model.getExtent());
|
return Integer.valueOf(model.getMaximum() - model.getExtent());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // AccessibleJProgressBar
|
} // AccessibleJProgressBar
|
||||||
|
|
|
@ -314,7 +314,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
|
||||||
BoundedRangeModel oldModel = model;
|
BoundedRangeModel oldModel = model;
|
||||||
if (model != null) {
|
if (model != null) {
|
||||||
model.removeChangeListener(fwdAdjustmentEvents);
|
model.removeChangeListener(fwdAdjustmentEvents);
|
||||||
oldValue = new Integer(model.getValue());
|
oldValue = Integer.valueOf(model.getValue());
|
||||||
}
|
}
|
||||||
model = newModel;
|
model = newModel;
|
||||||
if (model != null) {
|
if (model != null) {
|
||||||
|
@ -465,8 +465,8 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
|
||||||
if (accessibleContext != null) {
|
if (accessibleContext != null) {
|
||||||
accessibleContext.firePropertyChange(
|
accessibleContext.firePropertyChange(
|
||||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||||
new Integer(oldValue),
|
Integer.valueOf(oldValue),
|
||||||
new Integer(m.getValue()));
|
Integer.valueOf(m.getValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -611,8 +611,8 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
|
||||||
if (accessibleContext != null) {
|
if (accessibleContext != null) {
|
||||||
accessibleContext.firePropertyChange(
|
accessibleContext.firePropertyChange(
|
||||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||||
new Integer(oldValue),
|
Integer.valueOf(oldValue),
|
||||||
new Integer(m.getValue()));
|
Integer.valueOf(m.getValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -880,7 +880,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
|
||||||
* @return The current value of this object.
|
* @return The current value of this object.
|
||||||
*/
|
*/
|
||||||
public Number getCurrentAccessibleValue() {
|
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.
|
* @return The minimum value of this object.
|
||||||
*/
|
*/
|
||||||
public Number getMinimumAccessibleValue() {
|
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.firePropertyChange(
|
||||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||||
(oldModel == null
|
(oldModel == null
|
||||||
? null : new Integer(oldModel.getValue())),
|
? null : Integer.valueOf(oldModel.getValue())),
|
||||||
(newModel == null
|
(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) {
|
if (accessibleContext != null) {
|
||||||
accessibleContext.firePropertyChange(
|
accessibleContext.firePropertyChange(
|
||||||
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
|
||||||
new Integer(oldValue),
|
Integer.valueOf(oldValue),
|
||||||
new Integer(m.getValue()));
|
Integer.valueOf(m.getValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -581,7 +581,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible {
|
||||||
public void setMinimum(int minimum) {
|
public void setMinimum(int minimum) {
|
||||||
int oldMin = getModel().getMinimum();
|
int oldMin = getModel().getMinimum();
|
||||||
getModel().setMinimum(minimum);
|
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) {
|
public void setMaximum(int maximum) {
|
||||||
int oldMax = getModel().getMaximum();
|
int oldMax = getModel().getMaximum();
|
||||||
getModel().setMaximum(maximum);
|
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() {
|
void createLabels() {
|
||||||
for ( int labelIndex = start; labelIndex <= getMaximum(); labelIndex += increment ) {
|
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.
|
* @return The current value of this object.
|
||||||
*/
|
*/
|
||||||
public Number getCurrentAccessibleValue() {
|
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.
|
* @return The minimum value of this object.
|
||||||
*/
|
*/
|
||||||
public Number getMinimumAccessibleValue() {
|
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() {
|
public Number getMaximumAccessibleValue() {
|
||||||
// TIGER - 4422362
|
// TIGER - 4422362
|
||||||
BoundedRangeModel model = JSlider.this.getModel();
|
BoundedRangeModel model = JSlider.this.getModel();
|
||||||
return new Integer(model.getMaximum() - model.getExtent());
|
return Integer.valueOf(model.getMaximum() - model.getExtent());
|
||||||
}
|
}
|
||||||
} // AccessibleJSlider
|
} // AccessibleJSlider
|
||||||
}
|
}
|
||||||
|
|
|
@ -1195,7 +1195,7 @@ public class JSplitPane extends JComponent implements Accessible
|
||||||
* @return a localized String describing the value of this object
|
* @return a localized String describing the value of this object
|
||||||
*/
|
*/
|
||||||
public Number getCurrentAccessibleValue() {
|
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.
|
* @return The minimum value of this object.
|
||||||
*/
|
*/
|
||||||
public Number getMinimumAccessibleValue() {
|
public Number getMinimumAccessibleValue() {
|
||||||
return new Integer(getUI().getMinimumDividerLocation(
|
return Integer.valueOf(getUI().getMinimumDividerLocation(
|
||||||
JSplitPane.this));
|
JSplitPane.this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1231,7 +1231,7 @@ public class JSplitPane extends JComponent implements Accessible
|
||||||
* @return The maximum value of this object.
|
* @return The maximum value of this object.
|
||||||
*/
|
*/
|
||||||
public Number getMaximumAccessibleValue() {
|
public Number getMaximumAccessibleValue() {
|
||||||
return new Integer(getUI().getMaximumDividerLocation(
|
return Integer.valueOf(getUI().getMaximumDividerLocation(
|
||||||
JSplitPane.this));
|
JSplitPane.this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -969,7 +969,7 @@ public class JTabbedPane extends JComponent
|
||||||
// currently no IndexPropertyChangeEvent. Once
|
// currently no IndexPropertyChangeEvent. Once
|
||||||
// IndexPropertyChangeEvents have been added this code should be
|
// IndexPropertyChangeEvents have been added this code should be
|
||||||
// modified to use it.
|
// 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 the selected tab is after the removal */
|
||||||
if (selected > index) {
|
if (selected > index) {
|
||||||
|
|
|
@ -7680,7 +7680,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||||
*/
|
*/
|
||||||
public Accessible getAccessibleRowDescription(int r) {
|
public Accessible getAccessibleRowDescription(int r) {
|
||||||
if (r < 0 || r >= getAccessibleRowCount()) {
|
if (r < 0 || r >= getAccessibleRowCount()) {
|
||||||
throw new IllegalArgumentException(new Integer(r).toString());
|
throw new IllegalArgumentException(Integer.toString(r));
|
||||||
}
|
}
|
||||||
if (rowDescription == null) {
|
if (rowDescription == null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -7698,7 +7698,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||||
*/
|
*/
|
||||||
public void setAccessibleRowDescription(int r, Accessible a) {
|
public void setAccessibleRowDescription(int r, Accessible a) {
|
||||||
if (r < 0 || r >= getAccessibleRowCount()) {
|
if (r < 0 || r >= getAccessibleRowCount()) {
|
||||||
throw new IllegalArgumentException(new Integer(r).toString());
|
throw new IllegalArgumentException(Integer.toString(r));
|
||||||
}
|
}
|
||||||
if (rowDescription == null) {
|
if (rowDescription == null) {
|
||||||
int numRows = getAccessibleRowCount();
|
int numRows = getAccessibleRowCount();
|
||||||
|
@ -7716,7 +7716,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||||
*/
|
*/
|
||||||
public Accessible getAccessibleColumnDescription(int c) {
|
public Accessible getAccessibleColumnDescription(int c) {
|
||||||
if (c < 0 || c >= getAccessibleColumnCount()) {
|
if (c < 0 || c >= getAccessibleColumnCount()) {
|
||||||
throw new IllegalArgumentException(new Integer(c).toString());
|
throw new IllegalArgumentException(Integer.toString(c));
|
||||||
}
|
}
|
||||||
if (columnDescription == null) {
|
if (columnDescription == null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -7734,7 +7734,7 @@ public class JTable extends JComponent implements TableModelListener, Scrollable
|
||||||
*/
|
*/
|
||||||
public void setAccessibleColumnDescription(int c, Accessible a) {
|
public void setAccessibleColumnDescription(int c, Accessible a) {
|
||||||
if (c < 0 || c >= getAccessibleColumnCount()) {
|
if (c < 0 || c >= getAccessibleColumnCount()) {
|
||||||
throw new IllegalArgumentException(new Integer(c).toString());
|
throw new IllegalArgumentException(Integer.toString(c));
|
||||||
}
|
}
|
||||||
if (columnDescription == null) {
|
if (columnDescription == null) {
|
||||||
int numColumns = getAccessibleColumnCount();
|
int numColumns = getAccessibleColumnCount();
|
||||||
|
|
|
@ -267,7 +267,7 @@ public class JTextArea extends JTextComponent {
|
||||||
Document doc = getDocument();
|
Document doc = getDocument();
|
||||||
if (doc != null) {
|
if (doc != null) {
|
||||||
int old = getTabSize();
|
int old = getTabSize();
|
||||||
doc.putProperty(PlainDocument.tabSizeAttribute, new Integer(size));
|
doc.putProperty(PlainDocument.tabSizeAttribute, Integer.valueOf(size));
|
||||||
firePropertyChange("tabSize", old, size);
|
firePropertyChange("tabSize", old, size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,7 +144,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel implements Serializ
|
||||||
* <code>minimum <= value <= maximum</code>
|
* <code>minimum <= value <= maximum</code>
|
||||||
*/
|
*/
|
||||||
public SpinnerNumberModel(int value, int minimum, int maximum, int stepSize) {
|
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.
|
* <code>stepSize</code> equal to one, and an initial value of zero.
|
||||||
*/
|
*/
|
||||||
public SpinnerNumberModel() {
|
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);
|
long v = value.longValue() + (stepSize.longValue() * (long)dir);
|
||||||
|
|
||||||
if (value instanceof Long) {
|
if (value instanceof Long) {
|
||||||
newValue = new Long(v);
|
newValue = Long.valueOf(v);
|
||||||
}
|
}
|
||||||
else if (value instanceof Integer) {
|
else if (value instanceof Integer) {
|
||||||
newValue = new Integer((int)v);
|
newValue = Integer.valueOf((int)v);
|
||||||
}
|
}
|
||||||
else if (value instanceof Short) {
|
else if (value instanceof Short) {
|
||||||
newValue = new Short((short)v);
|
newValue = Short.valueOf((short)v);
|
||||||
}
|
}
|
||||||
else {
|
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
|
// 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
|
// fetch the formatted header text, if any
|
||||||
String headerText = null;
|
String headerText = null;
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class BasicButtonUI extends ButtonUI{
|
||||||
LookAndFeel.installProperty(b, "rolloverEnabled", rollover);
|
LookAndFeel.installProperty(b, "rolloverEnabled", rollover);
|
||||||
}
|
}
|
||||||
|
|
||||||
LookAndFeel.installProperty(b, "iconTextGap", new Integer(4));
|
LookAndFeel.installProperty(b, "iconTextGap", Integer.valueOf(4));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void installListeners(AbstractButton b) {
|
protected void installListeners(AbstractButton b) {
|
||||||
|
|
|
@ -654,7 +654,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel implements Serializab
|
||||||
"javax.swing.plaf.basic.BasicIconFactory",
|
"javax.swing.plaf.basic.BasicIconFactory",
|
||||||
"getRadioButtonMenuItemIcon");
|
"getRadioButtonMenuItemIcon");
|
||||||
|
|
||||||
Object menuItemAcceleratorDelimiter = new String("+");
|
Object menuItemAcceleratorDelimiter = "+";
|
||||||
|
|
||||||
// *** OptionPane value objects
|
// *** OptionPane value objects
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ public class BasicMenuItemUI extends MenuItemUI
|
||||||
menuItem.setMargin(UIManager.getInsets(prefix + ".margin"));
|
menuItem.setMargin(UIManager.getInsets(prefix + ".margin"));
|
||||||
}
|
}
|
||||||
|
|
||||||
LookAndFeel.installProperty(menuItem, "iconTextGap", new Integer(4));
|
LookAndFeel.installProperty(menuItem, "iconTextGap", Integer.valueOf(4));
|
||||||
defaultTextIconGap = menuItem.getIconTextGap();
|
defaultTextIconGap = menuItem.getIconTextGap();
|
||||||
|
|
||||||
LookAndFeel.installBorder(menuItem, prefix + ".border");
|
LookAndFeel.installBorder(menuItem, prefix + ".border");
|
||||||
|
|
|
@ -1195,10 +1195,10 @@ public class BasicOptionPaneUI extends OptionPaneUI {
|
||||||
if (options == null) {
|
if (options == null) {
|
||||||
if (optionType == JOptionPane.OK_CANCEL_OPTION &&
|
if (optionType == JOptionPane.OK_CANCEL_OPTION &&
|
||||||
buttonIndex == 1) {
|
buttonIndex == 1) {
|
||||||
optionPane.setValue(new Integer(2));
|
optionPane.setValue(Integer.valueOf(2));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
optionPane.setValue(new Integer(buttonIndex));
|
optionPane.setValue(Integer.valueOf(buttonIndex));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
optionPane.setValue(options[buttonIndex]);
|
optionPane.setValue(options[buttonIndex]);
|
||||||
|
@ -1393,7 +1393,7 @@ public class BasicOptionPaneUI extends OptionPaneUI {
|
||||||
if (getName() == CLOSE) {
|
if (getName() == CLOSE) {
|
||||||
JOptionPane optionPane = (JOptionPane)e.getSource();
|
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),
|
mnemonicInputMap.put(KeyStroke.getKeyStroke(mnemonic, Event.ALT_MASK),
|
||||||
"setSelectedIndex");
|
"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');
|
mnemonic -= ('a' - 'A');
|
||||||
}
|
}
|
||||||
Integer index = (Integer)ui.mnemonicToIndexMap.
|
Integer index = (Integer)ui.mnemonicToIndexMap.
|
||||||
get(new Integer(mnemonic));
|
get(Integer.valueOf(mnemonic));
|
||||||
if (index != null && pane.isEnabledAt(index.intValue())) {
|
if (index != null && pane.isEnabledAt(index.intValue())) {
|
||||||
pane.setSelectedIndex(index.intValue());
|
pane.setSelectedIndex(index.intValue());
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
|
||||||
dragWindow = null;
|
dragWindow = null;
|
||||||
dockingSource = null;
|
dockingSource = null;
|
||||||
|
|
||||||
c.putClientProperty( FOCUSED_COMP_INDEX, new Integer( focusedCompIndex ) );
|
c.putClientProperty( FOCUSED_COMP_INDEX, Integer.valueOf( focusedCompIndex ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void installDefaults( )
|
protected void installDefaults( )
|
||||||
|
|
|
@ -455,7 +455,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
|
||||||
|
|
||||||
Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0);
|
Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0);
|
||||||
|
|
||||||
Integer zero = new Integer(0);
|
Integer zero = Integer.valueOf(0);
|
||||||
|
|
||||||
Object textFieldBorder =
|
Object textFieldBorder =
|
||||||
new SwingLazyValue("javax.swing.plaf.metal.MetalBorders",
|
new SwingLazyValue("javax.swing.plaf.metal.MetalBorders",
|
||||||
|
@ -904,7 +904,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
|
||||||
"ProgressBar.selectionBackground", primaryControlDarkShadow,
|
"ProgressBar.selectionBackground", primaryControlDarkShadow,
|
||||||
"ProgressBar.border", progressBarBorder,
|
"ProgressBar.border", progressBarBorder,
|
||||||
"ProgressBar.cellSpacing", zero,
|
"ProgressBar.cellSpacing", zero,
|
||||||
"ProgressBar.cellLength", new Integer(1),
|
"ProgressBar.cellLength", Integer.valueOf(1),
|
||||||
|
|
||||||
// Combo Box
|
// Combo Box
|
||||||
"ComboBox.background", control,
|
"ComboBox.background", control,
|
||||||
|
@ -971,7 +971,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
|
||||||
"DesktopIcon.font", controlTextValue,
|
"DesktopIcon.font", controlTextValue,
|
||||||
"DesktopIcon.foreground", controlTextColor,
|
"DesktopIcon.foreground", controlTextColor,
|
||||||
"DesktopIcon.background", control,
|
"DesktopIcon.background", control,
|
||||||
"DesktopIcon.width", new Integer(160),
|
"DesktopIcon.width", Integer.valueOf(160),
|
||||||
|
|
||||||
"Desktop.ancestorInputMap",
|
"Desktop.ancestorInputMap",
|
||||||
new UIDefaults.LazyInputMap(new Object[] {
|
new UIDefaults.LazyInputMap(new Object[] {
|
||||||
|
|
|
@ -53,7 +53,7 @@ class SynthArrowButton extends JButton implements SwingConstants, UIResource {
|
||||||
|
|
||||||
public void setDirection(int dir) {
|
public void setDirection(int dir) {
|
||||||
direction = dir;
|
direction = dir;
|
||||||
putClientProperty("__arrow_direction__", new Integer(dir));
|
putClientProperty("__arrow_direction__", Integer.valueOf(dir));
|
||||||
repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ class SynthDesktopPaneUI extends BasicDesktopPaneUI implements
|
||||||
}
|
}
|
||||||
taskBar.setBackground(desktop.getBackground());
|
taskBar.setBackground(desktop.getBackground());
|
||||||
desktop.add(taskBar,
|
desktop.add(taskBar,
|
||||||
new Integer(JLayeredPane.PALETTE_LAYER.intValue() + 1));
|
Integer.valueOf(JLayeredPane.PALETTE_LAYER.intValue() + 1));
|
||||||
if (desktop.isShowing()) {
|
if (desktop.isShowing()) {
|
||||||
taskBar.adjustSize();
|
taskBar.adjustSize();
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,7 @@ class SynthSplitPaneUI extends BasicSplitPaneUI implements
|
||||||
if (style != oldStyle) {
|
if (style != oldStyle) {
|
||||||
Object value = style.get(context, "SplitPane.size");
|
Object value = style.get(context, "SplitPane.size");
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
value = new Integer(6);
|
value = Integer.valueOf(6);
|
||||||
}
|
}
|
||||||
LookAndFeel.installProperty(splitPane, "dividerSize", value);
|
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) {
|
private void firePropertyChange(String propertyName, int oldValue, int newValue) {
|
||||||
if (oldValue != 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
|
* loaded asynchronously
|
||||||
*/
|
*/
|
||||||
public void setAsynchronousLoadPriority(int p) {
|
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);
|
putProperty(AbstractDocument.AsyncLoadPriority, loadPriority);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2675,7 +2675,7 @@ public abstract class AbstractDocument implements Document, Serializable {
|
||||||
*/
|
*/
|
||||||
BidiElement(Element parent, int start, int end, int level) {
|
BidiElement(Element parent, int start, int end, int level) {
|
||||||
super(parent, new SimpleAttributeSet(), start, end);
|
super(parent, new SimpleAttributeSet(), start, end);
|
||||||
addAttribute(StyleConstants.BidiLevel, new Integer(level));
|
addAttribute(StyleConstants.BidiLevel, Integer.valueOf(level));
|
||||||
//System.out.println("BidiElement: start = " + start
|
//System.out.println("BidiElement: start = " + start
|
||||||
// + " end = " + end + " level = " + level );
|
// + " end = " + end + " level = " + level );
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,23 +173,24 @@ public class NumberFormatter extends InternationalFormatter {
|
||||||
*/
|
*/
|
||||||
private Object convertValueToValueClass(Object value, Class valueClass) {
|
private Object convertValueToValueClass(Object value, Class valueClass) {
|
||||||
if (valueClass != null && (value instanceof Number)) {
|
if (valueClass != null && (value instanceof Number)) {
|
||||||
|
Number numberValue = (Number)value;
|
||||||
if (valueClass == Integer.class) {
|
if (valueClass == Integer.class) {
|
||||||
return new Integer(((Number)value).intValue());
|
return Integer.valueOf(numberValue.intValue());
|
||||||
}
|
}
|
||||||
else if (valueClass == Long.class) {
|
else if (valueClass == Long.class) {
|
||||||
return new Long(((Number)value).longValue());
|
return Long.valueOf(numberValue.longValue());
|
||||||
}
|
}
|
||||||
else if (valueClass == Float.class) {
|
else if (valueClass == Float.class) {
|
||||||
return new Float(((Number)value).floatValue());
|
return Float.valueOf(numberValue.floatValue());
|
||||||
}
|
}
|
||||||
else if (valueClass == Double.class) {
|
else if (valueClass == Double.class) {
|
||||||
return new Double(((Number)value).doubleValue());
|
return Double.valueOf(numberValue.doubleValue());
|
||||||
}
|
}
|
||||||
else if (valueClass == Byte.class) {
|
else if (valueClass == Byte.class) {
|
||||||
return new Byte(((Number)value).byteValue());
|
return Byte.valueOf(numberValue.byteValue());
|
||||||
}
|
}
|
||||||
else if (valueClass == Short.class) {
|
else if (valueClass == Short.class) {
|
||||||
return new Short(((Number)value).shortValue());
|
return Short.valueOf(numberValue.shortValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
|
|
|
@ -89,7 +89,7 @@ public class PlainDocument extends AbstractDocument {
|
||||||
*/
|
*/
|
||||||
public PlainDocument(Content c) {
|
public PlainDocument(Content c) {
|
||||||
super(c);
|
super(c);
|
||||||
putProperty(tabSizeAttribute, new Integer(8));
|
putProperty(tabSizeAttribute, Integer.valueOf(8));
|
||||||
defaultRoot = createDefaultRoot();
|
defaultRoot = createDefaultRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ public class Segment implements Cloneable, CharacterIterator, CharSequence {
|
||||||
if (array != null) {
|
if (array != null) {
|
||||||
return new String(array, offset, count);
|
return new String(array, offset, count);
|
||||||
}
|
}
|
||||||
return new String();
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- CharacterIterator methods -------------------------------------
|
// --- CharacterIterator methods -------------------------------------
|
||||||
|
|
|
@ -296,7 +296,7 @@ public class StyleConstants {
|
||||||
* @param o the bidi level value
|
* @param o the bidi level value
|
||||||
*/
|
*/
|
||||||
public static void setBidiLevel(MutableAttributeSet a, int o) {
|
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
|
* @param s the font size
|
||||||
*/
|
*/
|
||||||
public static void setFontSize(MutableAttributeSet a, int s) {
|
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
|
* @param align the alignment value
|
||||||
*/
|
*/
|
||||||
public static void setAlignment(MutableAttributeSet a, int align) {
|
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++) {
|
for (int i = 0; i < nRows; i++) {
|
||||||
if (isAccessibleRowSelected(i)) {
|
if (isAccessibleRowSelected(i)) {
|
||||||
vec.addElement(new Integer(i));
|
vec.addElement(Integer.valueOf(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int retval[] = new int[vec.size()];
|
int retval[] = new int[vec.size()];
|
||||||
|
@ -1995,7 +1995,7 @@ class AccessibleHTML implements Accessible {
|
||||||
|
|
||||||
for (int i = 0; i < nColumns; i++) {
|
for (int i = 0; i < nColumns; i++) {
|
||||||
if (isAccessibleColumnSelected(i)) {
|
if (isAccessibleColumnSelected(i)) {
|
||||||
vec.addElement(new Integer(i));
|
vec.addElement(Integer.valueOf(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int retval[] = new int[vec.size()];
|
int retval[] = new int[vec.size()];
|
||||||
|
@ -2139,7 +2139,7 @@ class AccessibleHTML implements Accessible {
|
||||||
private int columnCount = 0;
|
private int columnCount = 0;
|
||||||
|
|
||||||
public void addHeader(TableCellElementInfo cellInfo, int rowNumber) {
|
public void addHeader(TableCellElementInfo cellInfo, int rowNumber) {
|
||||||
Integer rowInteger = new Integer(rowNumber);
|
Integer rowInteger = Integer.valueOf(rowNumber);
|
||||||
ArrayList list = (ArrayList)headers.get(rowInteger);
|
ArrayList list = (ArrayList)headers.get(rowInteger);
|
||||||
if (list == null) {
|
if (list == null) {
|
||||||
list = new ArrayList();
|
list = new ArrayList();
|
||||||
|
@ -2201,7 +2201,7 @@ class AccessibleHTML implements Accessible {
|
||||||
}
|
}
|
||||||
|
|
||||||
private TableCellElementInfo getElementInfoAt(int r, int c) {
|
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) {
|
if (list != null) {
|
||||||
return (TableCellElementInfo)list.get(c);
|
return (TableCellElementInfo)list.get(c);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1099,7 +1099,7 @@ public class CSS implements Serializable {
|
||||||
*/
|
*/
|
||||||
static String colorToHex(Color color) {
|
static String colorToHex(Color color) {
|
||||||
|
|
||||||
String colorstr = new String("#");
|
String colorstr = "#";
|
||||||
|
|
||||||
// Red
|
// Red
|
||||||
String str = Integer.toHexString(color.getRed());
|
String str = Integer.toHexString(color.getRed());
|
||||||
|
|
|
@ -1899,8 +1899,8 @@ public class HTMLEditorKit extends StyledEditorKit implements Accessible {
|
||||||
// assistive technologies listening for such events.
|
// assistive technologies listening for such events.
|
||||||
comp.getAccessibleContext().firePropertyChange(
|
comp.getAccessibleContext().firePropertyChange(
|
||||||
AccessibleContext.ACCESSIBLE_HYPERTEXT_OFFSET,
|
AccessibleContext.ACCESSIBLE_HYPERTEXT_OFFSET,
|
||||||
new Integer(kit.prevHypertextOffset),
|
Integer.valueOf(kit.prevHypertextOffset),
|
||||||
new Integer(e.getDot()));
|
Integer.valueOf(e.getDot()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,7 @@ class AttributeList implements DTDConstants, Serializable {
|
||||||
static Hashtable attributeTypes = new Hashtable();
|
static Hashtable attributeTypes = new Hashtable();
|
||||||
|
|
||||||
static void defineAttributeType(String nm, int val) {
|
static void defineAttributeType(String nm, int val) {
|
||||||
Integer num = new Integer(val);
|
Integer num = Integer.valueOf(val);
|
||||||
attributeTypes.put(nm, num);
|
attributeTypes.put(nm, num);
|
||||||
attributeTypes.put(num, nm);
|
attributeTypes.put(num, nm);
|
||||||
}
|
}
|
||||||
|
@ -154,11 +154,11 @@ class AttributeList implements DTDConstants, Serializable {
|
||||||
defineAttributeType("NUTOKEN", NUTOKEN);
|
defineAttributeType("NUTOKEN", NUTOKEN);
|
||||||
defineAttributeType("NUTOKENS", NUTOKENS);
|
defineAttributeType("NUTOKENS", NUTOKENS);
|
||||||
|
|
||||||
attributeTypes.put("fixed", new Integer(FIXED));
|
attributeTypes.put("fixed", Integer.valueOf(FIXED));
|
||||||
attributeTypes.put("required", new Integer(REQUIRED));
|
attributeTypes.put("required", Integer.valueOf(REQUIRED));
|
||||||
attributeTypes.put("current", new Integer(CURRENT));
|
attributeTypes.put("current", Integer.valueOf(CURRENT));
|
||||||
attributeTypes.put("conref", new Integer(CONREF));
|
attributeTypes.put("conref", Integer.valueOf(CONREF));
|
||||||
attributeTypes.put("implied", new Integer(IMPLIED));
|
attributeTypes.put("implied", Integer.valueOf(IMPLIED));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int name2type(String nm) {
|
public static int name2type(String nm) {
|
||||||
|
@ -167,6 +167,6 @@ class AttributeList implements DTDConstants, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String type2name(int tp) {
|
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
|
* <code>ch</code> character
|
||||||
*/
|
*/
|
||||||
public Entity getEntity(int ch) {
|
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) {
|
switch (type & ~GENERAL) {
|
||||||
case CDATA:
|
case CDATA:
|
||||||
case SDATA:
|
case SDATA:
|
||||||
entityHash.put(new Integer(data[0]), ent);
|
entityHash.put(Integer.valueOf(data[0]), ent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,10 +162,10 @@ class Element implements DTDConstants, Serializable {
|
||||||
static Hashtable contentTypes = new Hashtable();
|
static Hashtable contentTypes = new Hashtable();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
contentTypes.put("CDATA", new Integer(CDATA));
|
contentTypes.put("CDATA", Integer.valueOf(CDATA));
|
||||||
contentTypes.put("RCDATA", new Integer(RCDATA));
|
contentTypes.put("RCDATA", Integer.valueOf(RCDATA));
|
||||||
contentTypes.put("EMPTY", new Integer(EMPTY));
|
contentTypes.put("EMPTY", Integer.valueOf(EMPTY));
|
||||||
contentTypes.put("ANY", new Integer(ANY));
|
contentTypes.put("ANY", Integer.valueOf(ANY));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int name2type(String nm) {
|
public static int name2type(String nm) {
|
||||||
|
|
|
@ -110,15 +110,15 @@ class Entity implements DTDConstants {
|
||||||
static Hashtable entityTypes = new Hashtable();
|
static Hashtable entityTypes = new Hashtable();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
entityTypes.put("PUBLIC", new Integer(PUBLIC));
|
entityTypes.put("PUBLIC", Integer.valueOf(PUBLIC));
|
||||||
entityTypes.put("CDATA", new Integer(CDATA));
|
entityTypes.put("CDATA", Integer.valueOf(CDATA));
|
||||||
entityTypes.put("SDATA", new Integer(SDATA));
|
entityTypes.put("SDATA", Integer.valueOf(SDATA));
|
||||||
entityTypes.put("PI", new Integer(PI));
|
entityTypes.put("PI", Integer.valueOf(PI));
|
||||||
entityTypes.put("STARTTAG", new Integer(STARTTAG));
|
entityTypes.put("STARTTAG", Integer.valueOf(STARTTAG));
|
||||||
entityTypes.put("ENDTAG", new Integer(ENDTAG));
|
entityTypes.put("ENDTAG", Integer.valueOf(ENDTAG));
|
||||||
entityTypes.put("MS", new Integer(MS));
|
entityTypes.put("MS", Integer.valueOf(MS));
|
||||||
entityTypes.put("MD", new Integer(MD));
|
entityTypes.put("MD", Integer.valueOf(MD));
|
||||||
entityTypes.put("SYSTEM", new Integer(SYSTEM));
|
entityTypes.put("SYSTEM", Integer.valueOf(SYSTEM));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1842,7 +1842,7 @@ class Parser implements DTDConstants {
|
||||||
String elemStr = getString(0);
|
String elemStr = getString(0);
|
||||||
|
|
||||||
if (elemStr.equals("image")) {
|
if (elemStr.equals("image")) {
|
||||||
elemStr = new String("img");
|
elemStr = "img";
|
||||||
}
|
}
|
||||||
|
|
||||||
/* determine if this element is part of the dtd. */
|
/* 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)
|
public AssertiveAttribute(int d, Object s, String r, int v)
|
||||||
{
|
{
|
||||||
super(d, s, r);
|
super(d, s, r);
|
||||||
swingValue = new Integer(v);
|
swingValue = Integer.valueOf(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean set(MutableAttributeSet target)
|
public boolean set(MutableAttributeSet target)
|
||||||
|
@ -343,7 +343,7 @@ class RTFAttributes
|
||||||
public NumericAttribute(int d, Object s,
|
public NumericAttribute(int d, Object s,
|
||||||
String r, int ds, int dr)
|
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,
|
public NumericAttribute(int d, Object s,
|
||||||
|
@ -377,7 +377,7 @@ class RTFAttributes
|
||||||
Number swingValue;
|
Number swingValue;
|
||||||
|
|
||||||
if (scale == 1f)
|
if (scale == 1f)
|
||||||
swingValue = new Integer(parameter);
|
swingValue = Integer.valueOf(parameter);
|
||||||
else
|
else
|
||||||
swingValue = new Float(parameter / scale);
|
swingValue = new Float(parameter / scale);
|
||||||
target.addAttribute(swingName, swingValue);
|
target.addAttribute(swingName, swingValue);
|
||||||
|
|
|
@ -83,11 +83,7 @@ class RTFGenerator extends Object
|
||||||
static public final String defaultFontFamily = "Helvetica";
|
static public final String defaultFontFamily = "Helvetica";
|
||||||
|
|
||||||
/* constants so we can avoid allocating objects in inner loops */
|
/* constants so we can avoid allocating objects in inner loops */
|
||||||
/* these should all be final, but javac seems to be a bit buggy */
|
final static private Object MagicToken;
|
||||||
static protected Integer One, Zero;
|
|
||||||
static protected Boolean False;
|
|
||||||
static protected Float ZeroPointZero;
|
|
||||||
static private Object MagicToken;
|
|
||||||
|
|
||||||
/* An array of character-keyword pairs. This could be done
|
/* An array of character-keyword pairs. This could be done
|
||||||
as a dictionary (and lookup would be quicker), but that
|
as a dictionary (and lookup would be quicker), but that
|
||||||
|
@ -98,11 +94,7 @@ class RTFGenerator extends Object
|
||||||
static protected CharacterKeywordPair[] textKeywords;
|
static protected CharacterKeywordPair[] textKeywords;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
One = new Integer(1);
|
|
||||||
Zero = new Integer(0);
|
|
||||||
False = Boolean.valueOf(false);
|
|
||||||
MagicToken = new Object();
|
MagicToken = new Object();
|
||||||
ZeroPointZero = new Float(0);
|
|
||||||
|
|
||||||
Dictionary textKeywordDictionary = RTFReader.textKeywords;
|
Dictionary textKeywordDictionary = RTFReader.textKeywords;
|
||||||
Enumeration keys = textKeywordDictionary.keys();
|
Enumeration keys = textKeywordDictionary.keys();
|
||||||
|
@ -142,7 +134,7 @@ static public void writeDocument(Document d, OutputStream to)
|
||||||
public RTFGenerator(OutputStream to)
|
public RTFGenerator(OutputStream to)
|
||||||
{
|
{
|
||||||
colorTable = new Hashtable();
|
colorTable = new Hashtable();
|
||||||
colorTable.put(defaultRTFColor, new Integer(0));
|
colorTable.put(defaultRTFColor, Integer.valueOf(0));
|
||||||
colorCount = 1;
|
colorCount = 1;
|
||||||
|
|
||||||
fontTable = new Hashtable();
|
fontTable = new Hashtable();
|
||||||
|
@ -693,7 +685,7 @@ protected void resetParagraphAttributes(MutableAttributeSet currentAttributes)
|
||||||
{
|
{
|
||||||
writeControlWord("pard");
|
writeControlWord("pard");
|
||||||
|
|
||||||
currentAttributes.addAttribute(StyleConstants.Alignment, Zero);
|
currentAttributes.addAttribute(StyleConstants.Alignment, Integer.valueOf(0));
|
||||||
|
|
||||||
int wordIndex;
|
int wordIndex;
|
||||||
int wordCount = RTFAttributes.attributes.length;
|
int wordCount = RTFAttributes.attributes.length;
|
||||||
|
|
|
@ -157,8 +157,8 @@ public class DefaultTreeSelectionModel extends Object implements Cloneable, Seri
|
||||||
selectionMode = TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION;
|
selectionMode = TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION;
|
||||||
if(oldMode != selectionMode && changeSupport != null)
|
if(oldMode != selectionMode && changeSupport != null)
|
||||||
changeSupport.firePropertyChange(SELECTION_MODE_PROPERTY,
|
changeSupport.firePropertyChange(SELECTION_MODE_PROPERTY,
|
||||||
new Integer(oldMode),
|
Integer.valueOf(oldMode),
|
||||||
new Integer(selectionMode));
|
Integer.valueOf(selectionMode));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -285,7 +285,7 @@ abstract class AppletPanel extends Panel implements AppletStub, Runnable {
|
||||||
//System.out.println("SEND0= " + id);
|
//System.out.println("SEND0= " + id);
|
||||||
queue = new Queue();
|
queue = new Queue();
|
||||||
}
|
}
|
||||||
Integer eventId = new Integer(id);
|
Integer eventId = Integer.valueOf(id);
|
||||||
queue.enqueue(eventId);
|
queue.enqueue(eventId);
|
||||||
notifyAll();
|
notifyAll();
|
||||||
}
|
}
|
||||||
|
|
|
@ -587,9 +587,9 @@ public class AppletViewer extends Frame implements AppletContext,
|
||||||
Dimension d = panel.size();
|
Dimension d = panel.size();
|
||||||
Insets in = panel.insets();
|
Insets in = panel.insets();
|
||||||
panel.atts.put("width",
|
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",
|
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
|
/*Init these tables to allow componentFontNameID, fontfileNameIDs
|
||||||
to start from "1".
|
to start from "1".
|
||||||
*/
|
*/
|
||||||
componentFontNameIDs.put("", new Short((short)0));
|
componentFontNameIDs.put("", Short.valueOf((short)0));
|
||||||
|
|
||||||
fontfileNameIDs = new HashMap<String, Short>();
|
fontfileNameIDs = new HashMap<String, Short>();
|
||||||
filenames = new HashMap<Short, Short>();
|
filenames = new HashMap<Short, Short>();
|
||||||
|
|
|
@ -556,7 +556,7 @@ public class InputContext extends java.awt.im.InputContext
|
||||||
}
|
}
|
||||||
usedInputMethods.put(inputMethodLocator.deriveLocator(null), inputMethod);
|
usedInputMethods.put(inputMethodLocator.deriveLocator(null), inputMethod);
|
||||||
perInputMethodState.put(inputMethod,
|
perInputMethodState.put(inputMethod,
|
||||||
new Boolean(clientWindowNotificationEnabled));
|
Boolean.valueOf(clientWindowNotificationEnabled));
|
||||||
enableClientWindowNotification(inputMethod, false);
|
enableClientWindowNotification(inputMethod, false);
|
||||||
if (this == inputMethodWindowContext) {
|
if (this == inputMethodWindowContext) {
|
||||||
inputMethod.hideWindows();
|
inputMethod.hideWindows();
|
||||||
|
@ -921,7 +921,7 @@ public class InputContext extends java.awt.im.InputContext
|
||||||
if (perInputMethodState == null) {
|
if (perInputMethodState == null) {
|
||||||
perInputMethodState = new HashMap(5);
|
perInputMethodState = new HashMap(5);
|
||||||
}
|
}
|
||||||
perInputMethodState.put(requester, new Boolean(enable));
|
perInputMethodState.put(requester, Boolean.valueOf(enable));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -657,7 +657,7 @@ public class FileFontStrike extends PhysicalStrike {
|
||||||
* we first obtain this information, then the image, and never
|
* we first obtain this information, then the image, and never
|
||||||
* will access this value again.
|
* will access this value again.
|
||||||
*/
|
*/
|
||||||
Integer key = new Integer(glyphCode);
|
Integer key = Integer.valueOf(glyphCode);
|
||||||
Point2D.Float value = null;
|
Point2D.Float value = null;
|
||||||
ConcurrentHashMap<Integer, Point2D.Float> glyphMetricsMap = null;
|
ConcurrentHashMap<Integer, Point2D.Float> glyphMetricsMap = null;
|
||||||
if (glyphMetricsMapRef != null) {
|
if (glyphMetricsMapRef != null) {
|
||||||
|
@ -724,7 +724,7 @@ public class FileFontStrike extends PhysicalStrike {
|
||||||
boundsMap = new ConcurrentHashMap<Integer, Rectangle2D.Float>();
|
boundsMap = new ConcurrentHashMap<Integer, Rectangle2D.Float>();
|
||||||
}
|
}
|
||||||
|
|
||||||
Integer key = new Integer(glyphCode);
|
Integer key = Integer.valueOf(glyphCode);
|
||||||
Rectangle2D.Float bounds = boundsMap.get(key);
|
Rectangle2D.Float bounds = boundsMap.get(key);
|
||||||
|
|
||||||
if (bounds == null) {
|
if (bounds == null) {
|
||||||
|
|
|
@ -2124,7 +2124,7 @@ public final class FontManager {
|
||||||
|
|
||||||
private static void addLCIDMapEntry(Map<String, Short> map,
|
private static void addLCIDMapEntry(Map<String, Short> map,
|
||||||
String key, short value) {
|
String key, short value) {
|
||||||
map.put(key, new Short(value));
|
map.put(key, Short.valueOf(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static synchronized void createLCIDMap() {
|
private static synchronized void createLCIDMap() {
|
||||||
|
|
|
@ -117,7 +117,7 @@ public final class FontResolver {
|
||||||
Font2D font2D = FontManager.getFont2D(font);
|
Font2D font2D = FontManager.getFont2D(font);
|
||||||
if (font2D.hasSupplementaryChars()) {
|
if (font2D.hasSupplementaryChars()) {
|
||||||
fonts.add(font);
|
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 getGlyphPoint(int glyphCode, int ptNumber) {
|
||||||
Point2D.Float gp = null;
|
Point2D.Float gp = null;
|
||||||
Integer ptKey = new Integer(glyphCode<<16|ptNumber);
|
Integer ptKey = Integer.valueOf(glyphCode<<16|ptNumber);
|
||||||
if (glyphPointMapCache == null) {
|
if (glyphPointMapCache == null) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (glyphPointMapCache == null) {
|
if (glyphPointMapCache == null) {
|
||||||
|
|
|
@ -1374,7 +1374,7 @@ public final class SunGraphics2D
|
||||||
SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS,
|
SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS,
|
||||||
fractionalMetricsHint));
|
fractionalMetricsHint));
|
||||||
model.put(SunHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST,
|
model.put(SunHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST,
|
||||||
new Integer(lcdTextContrast));
|
Integer.valueOf(lcdTextContrast));
|
||||||
Object value;
|
Object value;
|
||||||
switch (interpolationHint) {
|
switch (interpolationHint) {
|
||||||
case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR:
|
case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR:
|
||||||
|
|
|
@ -408,7 +408,7 @@ public final class SurfaceType {
|
||||||
if (unusedUID > 255) {
|
if (unusedUID > 255) {
|
||||||
throw new InternalError("surface type id overflow");
|
throw new InternalError("surface type id overflow");
|
||||||
}
|
}
|
||||||
i = new Integer(unusedUID++);
|
i = Integer.valueOf(unusedUID++);
|
||||||
surfaceUIDMap.put(desc, i);
|
surfaceUIDMap.put(desc, i);
|
||||||
}
|
}
|
||||||
return i.intValue();
|
return i.intValue();
|
||||||
|
|
|
@ -1536,16 +1536,16 @@ public class PSPrinterJob extends RasterPrinterJob {
|
||||||
execCmd = new String[ncomps];
|
execCmd = new String[ncomps];
|
||||||
execCmd[n++] = "/usr/bin/lpr";
|
execCmd[n++] = "/usr/bin/lpr";
|
||||||
if ((pFlags & PRINTER) != 0) {
|
if ((pFlags & PRINTER) != 0) {
|
||||||
execCmd[n++] = new String("-P" + printer);
|
execCmd[n++] = "-P" + printer;
|
||||||
}
|
}
|
||||||
if ((pFlags & BANNER) != 0) {
|
if ((pFlags & BANNER) != 0) {
|
||||||
execCmd[n++] = new String("-J" + banner);
|
execCmd[n++] = "-J" + banner;
|
||||||
}
|
}
|
||||||
if ((pFlags & COPIES) != 0) {
|
if ((pFlags & COPIES) != 0) {
|
||||||
execCmd[n++] = new String("-#" + new Integer(copies).toString());
|
execCmd[n++] = "-#" + copies;
|
||||||
}
|
}
|
||||||
if ((pFlags & NOSHEET) != 0) {
|
if ((pFlags & NOSHEET) != 0) {
|
||||||
execCmd[n++] = new String("-h");
|
execCmd[n++] = "-h";
|
||||||
}
|
}
|
||||||
if ((pFlags & OPTIONS) != 0) {
|
if ((pFlags & OPTIONS) != 0) {
|
||||||
execCmd[n++] = new String(options);
|
execCmd[n++] = new String(options);
|
||||||
|
@ -1556,19 +1556,19 @@ public class PSPrinterJob extends RasterPrinterJob {
|
||||||
execCmd[n++] = "/usr/bin/lp";
|
execCmd[n++] = "/usr/bin/lp";
|
||||||
execCmd[n++] = "-c"; // make a copy of the spool file
|
execCmd[n++] = "-c"; // make a copy of the spool file
|
||||||
if ((pFlags & PRINTER) != 0) {
|
if ((pFlags & PRINTER) != 0) {
|
||||||
execCmd[n++] = new String("-d" + printer);
|
execCmd[n++] = "-d" + printer;
|
||||||
}
|
}
|
||||||
if ((pFlags & BANNER) != 0) {
|
if ((pFlags & BANNER) != 0) {
|
||||||
execCmd[n++] = new String("-t" + banner);
|
execCmd[n++] = "-t" + banner;
|
||||||
}
|
}
|
||||||
if ((pFlags & COPIES) != 0) {
|
if ((pFlags & COPIES) != 0) {
|
||||||
execCmd[n++] = new String("-n" + new Integer(copies).toString());
|
execCmd[n++] = "-n" + copies;
|
||||||
}
|
}
|
||||||
if ((pFlags & NOSHEET) != 0) {
|
if ((pFlags & NOSHEET) != 0) {
|
||||||
execCmd[n++] = new String("-o nobanner");
|
execCmd[n++] = "-o nobanner";
|
||||||
}
|
}
|
||||||
if ((pFlags & OPTIONS) != 0) {
|
if ((pFlags & OPTIONS) != 0) {
|
||||||
execCmd[n++] = new String("-o" + options);
|
execCmd[n++] = "-o" + options;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
execCmd[n++] = spoolFile;
|
execCmd[n++] = spoolFile;
|
||||||
|
|
|
@ -245,7 +245,7 @@ public abstract class RasterPrinterJob extends PrinterJob {
|
||||||
/**
|
/**
|
||||||
* The name of the job being printed.
|
* 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_);
|
throw new IllegalArgumentException(INVALID_VERSION_NUMBER_);
|
||||||
}
|
}
|
||||||
int version = getInt(major, minor, milli, micro);
|
int version = getInt(major, minor, milli, micro);
|
||||||
Integer key = new Integer(version);
|
Integer key = Integer.valueOf(version);
|
||||||
Object result = MAP_.get(key);
|
Object result = MAP_.get(key);
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
result = new VersionInfo(version);
|
result = new VersionInfo(version);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -26,7 +26,9 @@
|
||||||
|
|
||||||
package sun.awt.X11;
|
package sun.awt.X11;
|
||||||
|
|
||||||
public interface MWMConstants {
|
final public class MWMConstants {
|
||||||
|
|
||||||
|
private MWMConstants(){}
|
||||||
|
|
||||||
/* bit definitions for MwmHints.flags */
|
/* bit definitions for MwmHints.flags */
|
||||||
static final int MWM_HINTS_FUNCTIONS= (1 << 0);
|
static final int MWM_HINTS_FUNCTIONS= (1 << 0);
|
||||||
|
|
|
@ -118,11 +118,11 @@ class MotifDnDConstants {
|
||||||
XA_MOTIF_DRAG_WINDOW,
|
XA_MOTIF_DRAG_WINDOW,
|
||||||
0, 1,
|
0, 1,
|
||||||
false,
|
false,
|
||||||
XlibWrapper.AnyPropertyType);
|
XConstants.AnyPropertyType);
|
||||||
try {
|
try {
|
||||||
int status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
int status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
||||||
|
|
||||||
if (status == XlibWrapper.Success &&
|
if (status == XConstants.Success &&
|
||||||
wpg.getData() != 0 &&
|
wpg.getData() != 0 &&
|
||||||
wpg.getActualType() == XAtom.XA_WINDOW &&
|
wpg.getActualType() == XAtom.XA_WINDOW &&
|
||||||
wpg.getActualFormat() == 32 &&
|
wpg.getActualFormat() == 32 &&
|
||||||
|
@ -163,20 +163,20 @@ class MotifDnDConstants {
|
||||||
XlibWrapper.XGrabServer(newDisplay);
|
XlibWrapper.XGrabServer(newDisplay);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
XlibWrapper.XSetCloseDownMode(newDisplay, (int)XlibWrapper.RetainPermanent);
|
XlibWrapper.XSetCloseDownMode(newDisplay, (int)XConstants.RetainPermanent);
|
||||||
|
|
||||||
XSetWindowAttributes xwa = new XSetWindowAttributes();
|
XSetWindowAttributes xwa = new XSetWindowAttributes();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
xwa.set_override_redirect(true);
|
xwa.set_override_redirect(true);
|
||||||
xwa.set_event_mask(XlibWrapper.PropertyChangeMask);
|
xwa.set_event_mask(XConstants.PropertyChangeMask);
|
||||||
|
|
||||||
motifWindow = XlibWrapper.XCreateWindow(newDisplay, defaultRootWindow,
|
motifWindow = XlibWrapper.XCreateWindow(newDisplay, defaultRootWindow,
|
||||||
-10, -10, 1, 1, 0, 0,
|
-10, -10, 1, 1, 0, 0,
|
||||||
XlibWrapper.InputOnly,
|
XConstants.InputOnly,
|
||||||
XlibWrapper.CopyFromParent,
|
XConstants.CopyFromParent,
|
||||||
(XlibWrapper.CWOverrideRedirect |
|
(XConstants.CWOverrideRedirect |
|
||||||
XlibWrapper.CWEventMask),
|
XConstants.CWEventMask),
|
||||||
xwa.pData);
|
xwa.pData);
|
||||||
|
|
||||||
if (motifWindow == 0) {
|
if (motifWindow == 0) {
|
||||||
|
@ -195,13 +195,13 @@ class MotifDnDConstants {
|
||||||
defaultRootWindow,
|
defaultRootWindow,
|
||||||
XA_MOTIF_DRAG_WINDOW.getAtom(),
|
XA_MOTIF_DRAG_WINDOW.getAtom(),
|
||||||
XAtom.XA_WINDOW, 32,
|
XAtom.XA_WINDOW, 32,
|
||||||
XlibWrapper.PropModeReplace,
|
XConstants.PropModeReplace,
|
||||||
data, 1);
|
data, 1);
|
||||||
|
|
||||||
XToolkit.RESTORE_XERROR_HANDLER();
|
XToolkit.RESTORE_XERROR_HANDLER();
|
||||||
|
|
||||||
if (XToolkit.saved_error != null &&
|
if (XToolkit.saved_error != null &&
|
||||||
XToolkit.saved_error.get_error_code() != XlibWrapper.Success) {
|
XToolkit.saved_error.get_error_code() != XConstants.Success) {
|
||||||
throw new XException("Cannot write motif drag window handle.");
|
throw new XException("Cannot write motif drag window handle.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ class MotifDnDConstants {
|
||||||
try {
|
try {
|
||||||
int status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
int status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
||||||
|
|
||||||
if (status != XlibWrapper.Success
|
if (status != XConstants.Success
|
||||||
|| wpg.getActualType() != XA_MOTIF_DRAG_TARGETS.getAtom()
|
|| wpg.getActualType() != XA_MOTIF_DRAG_TARGETS.getAtom()
|
||||||
|| wpg.getData() == 0) {
|
|| wpg.getData() == 0) {
|
||||||
|
|
||||||
|
@ -399,13 +399,13 @@ class MotifDnDConstants {
|
||||||
motifWindow,
|
motifWindow,
|
||||||
XA_MOTIF_DRAG_TARGETS.getAtom(),
|
XA_MOTIF_DRAG_TARGETS.getAtom(),
|
||||||
XA_MOTIF_DRAG_TARGETS.getAtom(), 8,
|
XA_MOTIF_DRAG_TARGETS.getAtom(), 8,
|
||||||
XlibWrapper.PropModeReplace,
|
XConstants.PropModeReplace,
|
||||||
data, tableSize);
|
data, tableSize);
|
||||||
|
|
||||||
XToolkit.RESTORE_XERROR_HANDLER();
|
XToolkit.RESTORE_XERROR_HANDLER();
|
||||||
|
|
||||||
if (XToolkit.saved_error != null &&
|
if (XToolkit.saved_error != null &&
|
||||||
XToolkit.saved_error.get_error_code() != XlibWrapper.Success) {
|
XToolkit.saved_error.get_error_code() != XConstants.Success) {
|
||||||
|
|
||||||
// Create a new motif window and retry.
|
// Create a new motif window and retry.
|
||||||
motifWindow = createMotifWindow();
|
motifWindow = createMotifWindow();
|
||||||
|
@ -415,13 +415,13 @@ class MotifDnDConstants {
|
||||||
motifWindow,
|
motifWindow,
|
||||||
XA_MOTIF_DRAG_TARGETS.getAtom(),
|
XA_MOTIF_DRAG_TARGETS.getAtom(),
|
||||||
XA_MOTIF_DRAG_TARGETS.getAtom(), 8,
|
XA_MOTIF_DRAG_TARGETS.getAtom(), 8,
|
||||||
XlibWrapper.PropModeReplace,
|
XConstants.PropModeReplace,
|
||||||
data, tableSize);
|
data, tableSize);
|
||||||
|
|
||||||
XToolkit.RESTORE_XERROR_HANDLER();
|
XToolkit.RESTORE_XERROR_HANDLER();
|
||||||
|
|
||||||
if (XToolkit.saved_error != null &&
|
if (XToolkit.saved_error != null &&
|
||||||
XToolkit.saved_error.get_error_code() != XlibWrapper.Success) {
|
XToolkit.saved_error.get_error_code() != XConstants.Success) {
|
||||||
throw new XException("Cannot write motif drag targets property.");
|
throw new XException("Cannot write motif drag targets property.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -538,12 +538,12 @@ class MotifDnDConstants {
|
||||||
XlibWrapper.XChangeProperty(XToolkit.getDisplay(), window,
|
XlibWrapper.XChangeProperty(XToolkit.getDisplay(), window,
|
||||||
XA_MOTIF_ATOM_0.getAtom(),
|
XA_MOTIF_ATOM_0.getAtom(),
|
||||||
XA_MOTIF_DRAG_INITIATOR_INFO.getAtom(),
|
XA_MOTIF_DRAG_INITIATOR_INFO.getAtom(),
|
||||||
8, XlibWrapper.PropModeReplace,
|
8, XConstants.PropModeReplace,
|
||||||
structData, MOTIF_INITIATOR_INFO_SIZE);
|
structData, MOTIF_INITIATOR_INFO_SIZE);
|
||||||
XToolkit.RESTORE_XERROR_HANDLER();
|
XToolkit.RESTORE_XERROR_HANDLER();
|
||||||
|
|
||||||
if (XToolkit.saved_error != null &&
|
if (XToolkit.saved_error != null &&
|
||||||
XToolkit.saved_error.get_error_code() != XlibWrapper.Success) {
|
XToolkit.saved_error.get_error_code() != XConstants.Success) {
|
||||||
throw new XException("Cannot write drag initiator info");
|
throw new XException("Cannot write drag initiator info");
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -571,12 +571,12 @@ class MotifDnDConstants {
|
||||||
XlibWrapper.XChangeProperty(XToolkit.getDisplay(), window,
|
XlibWrapper.XChangeProperty(XToolkit.getDisplay(), window,
|
||||||
XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(),
|
XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(),
|
||||||
XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(),
|
XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(),
|
||||||
8, XlibWrapper.PropModeReplace,
|
8, XConstants.PropModeReplace,
|
||||||
data, dataSize);
|
data, dataSize);
|
||||||
XToolkit.RESTORE_XERROR_HANDLER();
|
XToolkit.RESTORE_XERROR_HANDLER();
|
||||||
|
|
||||||
if (XToolkit.saved_error != null &&
|
if (XToolkit.saved_error != null &&
|
||||||
XToolkit.saved_error.get_error_code() != XlibWrapper.Success) {
|
XToolkit.saved_error.get_error_code() != XConstants.Success) {
|
||||||
throw new XException("Cannot write Motif receiver info property");
|
throw new XException("Cannot write Motif receiver info property");
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
|
* Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -44,7 +44,7 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
|
|
||||||
private static final Unsafe unsafe = XlibWrapper.unsafe;
|
private static final Unsafe unsafe = XlibWrapper.unsafe;
|
||||||
|
|
||||||
private long targetEnterServerTime = XlibWrapper.CurrentTime;
|
private long targetEnterServerTime = XConstants.CurrentTime;
|
||||||
|
|
||||||
protected MotifDnDDragSourceProtocol(XDragSourceProtocolListener listener) {
|
protected MotifDnDDragSourceProtocol(XDragSourceProtocolListener listener) {
|
||||||
super(listener);
|
super(listener);
|
||||||
|
@ -86,7 +86,7 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
|
|
||||||
if (!MotifDnDConstants.MotifDnDSelection.setOwner(contents, formatMap,
|
if (!MotifDnDConstants.MotifDnDSelection.setOwner(contents, formatMap,
|
||||||
formats,
|
formats,
|
||||||
XlibWrapper.CurrentTime)) {
|
XConstants.CurrentTime)) {
|
||||||
cleanup();
|
cleanup();
|
||||||
throw new InvalidDnDOperationException("Cannot acquire selection ownership");
|
throw new InvalidDnDOperationException("Cannot acquire selection ownership");
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
long time = t;
|
long time = t;
|
||||||
|
|
||||||
/* Discard events from the previous receiver. */
|
/* Discard events from the previous receiver. */
|
||||||
if (targetEnterServerTime == XlibWrapper.CurrentTime ||
|
if (targetEnterServerTime == XConstants.CurrentTime ||
|
||||||
time < targetEnterServerTime) {
|
time < targetEnterServerTime) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
new WindowPropertyGetter(window,
|
new WindowPropertyGetter(window,
|
||||||
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO,
|
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO,
|
||||||
0, 0xFFFF, false,
|
0, 0xFFFF, false,
|
||||||
XlibWrapper.AnyPropertyType);
|
XConstants.AnyPropertyType);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
int status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
int status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
||||||
|
@ -200,7 +200,7 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
* CARD32 heap_offset B32;
|
* CARD32 heap_offset B32;
|
||||||
* } xmDragReceiverInfoStruct;
|
* } xmDragReceiverInfoStruct;
|
||||||
*/
|
*/
|
||||||
if (status == (int)XlibWrapper.Success && wpg.getData() != 0 &&
|
if (status == (int)XConstants.Success && wpg.getData() != 0 &&
|
||||||
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
|
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
|
||||||
wpg.getNumberOfItems() >=
|
wpg.getNumberOfItems() >=
|
||||||
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
|
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
|
||||||
|
@ -243,7 +243,7 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
|
|
||||||
XClientMessageEvent msg = new XClientMessageEvent();
|
XClientMessageEvent msg = new XClientMessageEvent();
|
||||||
try {
|
try {
|
||||||
msg.set_type(XlibWrapper.ClientMessage);
|
msg.set_type(XConstants.ClientMessage);
|
||||||
msg.set_window(getTargetWindow());
|
msg.set_window(getTargetWindow());
|
||||||
msg.set_format(8);
|
msg.set_format(8);
|
||||||
msg.set_message_type(MotifDnDConstants.XA_MOTIF_DRAG_AND_DROP_MESSAGE.getAtom());
|
msg.set_message_type(MotifDnDConstants.XA_MOTIF_DRAG_AND_DROP_MESSAGE.getAtom());
|
||||||
|
@ -267,7 +267,7 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
|
|
||||||
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
|
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
|
||||||
getTargetProxyWindow(),
|
getTargetProxyWindow(),
|
||||||
false, XlibWrapper.NoEventMask,
|
false, XConstants.NoEventMask,
|
||||||
msg.pData);
|
msg.pData);
|
||||||
} finally {
|
} finally {
|
||||||
msg.dispose();
|
msg.dispose();
|
||||||
|
@ -281,7 +281,7 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
|
|
||||||
XClientMessageEvent msg = new XClientMessageEvent();
|
XClientMessageEvent msg = new XClientMessageEvent();
|
||||||
try {
|
try {
|
||||||
msg.set_type(XlibWrapper.ClientMessage);
|
msg.set_type(XConstants.ClientMessage);
|
||||||
msg.set_window(getTargetWindow());
|
msg.set_window(getTargetWindow());
|
||||||
msg.set_format(8);
|
msg.set_format(8);
|
||||||
msg.set_message_type(MotifDnDConstants.XA_MOTIF_DRAG_AND_DROP_MESSAGE.getAtom());
|
msg.set_message_type(MotifDnDConstants.XA_MOTIF_DRAG_AND_DROP_MESSAGE.getAtom());
|
||||||
|
@ -305,7 +305,7 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
|
|
||||||
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
|
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
|
||||||
getTargetProxyWindow(),
|
getTargetProxyWindow(),
|
||||||
false, XlibWrapper.NoEventMask,
|
false, XConstants.NoEventMask,
|
||||||
msg.pData);
|
msg.pData);
|
||||||
} finally {
|
} finally {
|
||||||
msg.dispose();
|
msg.dispose();
|
||||||
|
@ -318,7 +318,7 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
|
|
||||||
XClientMessageEvent msg = new XClientMessageEvent();
|
XClientMessageEvent msg = new XClientMessageEvent();
|
||||||
try {
|
try {
|
||||||
msg.set_type(XlibWrapper.ClientMessage);
|
msg.set_type(XConstants.ClientMessage);
|
||||||
msg.set_window(getTargetWindow());
|
msg.set_window(getTargetWindow());
|
||||||
msg.set_format(8);
|
msg.set_format(8);
|
||||||
msg.set_message_type(MotifDnDConstants.XA_MOTIF_DRAG_AND_DROP_MESSAGE.getAtom());
|
msg.set_message_type(MotifDnDConstants.XA_MOTIF_DRAG_AND_DROP_MESSAGE.getAtom());
|
||||||
|
@ -336,7 +336,7 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
|
|
||||||
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
|
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
|
||||||
getTargetProxyWindow(),
|
getTargetProxyWindow(),
|
||||||
false, XlibWrapper.NoEventMask,
|
false, XConstants.NoEventMask,
|
||||||
msg.pData);
|
msg.pData);
|
||||||
} finally {
|
} finally {
|
||||||
msg.dispose();
|
msg.dispose();
|
||||||
|
@ -356,7 +356,7 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
|
|
||||||
XClientMessageEvent msg = new XClientMessageEvent();
|
XClientMessageEvent msg = new XClientMessageEvent();
|
||||||
try {
|
try {
|
||||||
msg.set_type(XlibWrapper.ClientMessage);
|
msg.set_type(XConstants.ClientMessage);
|
||||||
msg.set_window(getTargetWindow());
|
msg.set_window(getTargetWindow());
|
||||||
msg.set_format(8);
|
msg.set_format(8);
|
||||||
msg.set_message_type(MotifDnDConstants.XA_MOTIF_DRAG_AND_DROP_MESSAGE.getAtom());
|
msg.set_message_type(MotifDnDConstants.XA_MOTIF_DRAG_AND_DROP_MESSAGE.getAtom());
|
||||||
|
@ -382,7 +382,7 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
|
|
||||||
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
|
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
|
||||||
getTargetProxyWindow(),
|
getTargetProxyWindow(),
|
||||||
false, XlibWrapper.NoEventMask,
|
false, XConstants.NoEventMask,
|
||||||
msg.pData);
|
msg.pData);
|
||||||
} finally {
|
} finally {
|
||||||
msg.dispose();
|
msg.dispose();
|
||||||
|
@ -397,12 +397,12 @@ class MotifDnDDragSourceProtocol extends XDragSourceProtocol
|
||||||
|
|
||||||
public void cleanupTargetInfo() {
|
public void cleanupTargetInfo() {
|
||||||
super.cleanupTargetInfo();
|
super.cleanupTargetInfo();
|
||||||
targetEnterServerTime = XlibWrapper.CurrentTime;
|
targetEnterServerTime = XConstants.CurrentTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dispatchEvent(XEvent ev) {
|
public void dispatchEvent(XEvent ev) {
|
||||||
switch (ev.get_type()) {
|
switch (ev.get_type()) {
|
||||||
case XlibWrapper.SelectionRequest:
|
case XConstants.SelectionRequest:
|
||||||
XSelectionRequestEvent xsre = ev.get_xselectionrequest();
|
XSelectionRequestEvent xsre = ev.get_xselectionrequest();
|
||||||
long atom = xsre.get_selection();
|
long atom = xsre.get_selection();
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
new WindowPropertyGetter(embedder,
|
new WindowPropertyGetter(embedder,
|
||||||
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO,
|
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO,
|
||||||
0, 0xFFFF, false,
|
0, 0xFFFF, false,
|
||||||
XlibWrapper.AnyPropertyType);
|
XConstants.AnyPropertyType);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
||||||
|
@ -118,7 +118,7 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
* CARD32 heap_offset B32;
|
* CARD32 heap_offset B32;
|
||||||
* } xmDragReceiverInfoStruct;
|
* } xmDragReceiverInfoStruct;
|
||||||
*/
|
*/
|
||||||
if (status == (int)XlibWrapper.Success && wpg.getData() != 0 &&
|
if (status == (int)XConstants.Success && wpg.getData() != 0 &&
|
||||||
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
|
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
|
||||||
wpg.getNumberOfItems() >=
|
wpg.getNumberOfItems() >=
|
||||||
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
|
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
|
||||||
|
@ -166,12 +166,12 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
XlibWrapper.XChangeProperty(XToolkit.getDisplay(), embedder,
|
XlibWrapper.XChangeProperty(XToolkit.getDisplay(), embedder,
|
||||||
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(),
|
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(),
|
||||||
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(),
|
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(),
|
||||||
8, XlibWrapper.PropModeReplace,
|
8, XConstants.PropModeReplace,
|
||||||
data, dataSize);
|
data, dataSize);
|
||||||
XToolkit.RESTORE_XERROR_HANDLER();
|
XToolkit.RESTORE_XERROR_HANDLER();
|
||||||
|
|
||||||
if (XToolkit.saved_error != null &&
|
if (XToolkit.saved_error != null &&
|
||||||
XToolkit.saved_error.get_error_code() != XlibWrapper.Success) {
|
XToolkit.saved_error.get_error_code() != XConstants.Success) {
|
||||||
throw new XException("Cannot write Motif receiver info property");
|
throw new XException("Cannot write Motif receiver info property");
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -201,7 +201,7 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
new WindowPropertyGetter(embedder,
|
new WindowPropertyGetter(embedder,
|
||||||
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO,
|
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO,
|
||||||
0, 0xFFFF, false,
|
0, 0xFFFF, false,
|
||||||
XlibWrapper.AnyPropertyType);
|
XConstants.AnyPropertyType);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
||||||
|
@ -220,7 +220,7 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
* CARD32 heap_offset B32;
|
* CARD32 heap_offset B32;
|
||||||
* } xmDragReceiverInfoStruct;
|
* } xmDragReceiverInfoStruct;
|
||||||
*/
|
*/
|
||||||
if (status == (int)XlibWrapper.Success && wpg.getData() != 0 &&
|
if (status == (int)XConstants.Success && wpg.getData() != 0 &&
|
||||||
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
|
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
|
||||||
wpg.getNumberOfItems() >=
|
wpg.getNumberOfItems() >=
|
||||||
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
|
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
|
||||||
|
@ -240,12 +240,12 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
XlibWrapper.XChangeProperty(XToolkit.getDisplay(), embedder,
|
XlibWrapper.XChangeProperty(XToolkit.getDisplay(), embedder,
|
||||||
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(),
|
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(),
|
||||||
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(),
|
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO.getAtom(),
|
||||||
8, XlibWrapper.PropModeReplace,
|
8, XConstants.PropModeReplace,
|
||||||
data, dataSize);
|
data, dataSize);
|
||||||
XToolkit.RESTORE_XERROR_HANDLER();
|
XToolkit.RESTORE_XERROR_HANDLER();
|
||||||
|
|
||||||
if (XToolkit.saved_error != null &&
|
if (XToolkit.saved_error != null &&
|
||||||
XToolkit.saved_error.get_error_code() != XlibWrapper.Success) {
|
XToolkit.saved_error.get_error_code() != XConstants.Success) {
|
||||||
throw new XException("Cannot write Motif receiver info property");
|
throw new XException("Cannot write Motif receiver info property");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -273,7 +273,7 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
new WindowPropertyGetter(embedded,
|
new WindowPropertyGetter(embedded,
|
||||||
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO,
|
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO,
|
||||||
0, 0xFFFF, false,
|
0, 0xFFFF, false,
|
||||||
XlibWrapper.AnyPropertyType);
|
XConstants.AnyPropertyType);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
||||||
|
@ -292,7 +292,7 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
* CARD32 heap_offset B32;
|
* CARD32 heap_offset B32;
|
||||||
* } xmDragReceiverInfoStruct;
|
* } xmDragReceiverInfoStruct;
|
||||||
*/
|
*/
|
||||||
if (status == (int)XlibWrapper.Success && wpg.getData() != 0 &&
|
if (status == (int)XConstants.Success && wpg.getData() != 0 &&
|
||||||
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
|
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
|
||||||
wpg.getNumberOfItems() >=
|
wpg.getNumberOfItems() >=
|
||||||
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
|
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
|
||||||
|
@ -322,12 +322,12 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
new WindowPropertyGetter(window,
|
new WindowPropertyGetter(window,
|
||||||
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO,
|
MotifDnDConstants.XA_MOTIF_DRAG_RECEIVER_INFO,
|
||||||
0, 0xFFFF, false,
|
0, 0xFFFF, false,
|
||||||
XlibWrapper.AnyPropertyType);
|
XConstants.AnyPropertyType);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
int status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
int status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
||||||
|
|
||||||
if (status == (int)XlibWrapper.Success && wpg.getData() != 0 &&
|
if (status == (int)XConstants.Success && wpg.getData() != 0 &&
|
||||||
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
|
wpg.getActualType() != 0 && wpg.getActualFormat() == 8 &&
|
||||||
wpg.getNumberOfItems() >=
|
wpg.getNumberOfItems() >=
|
||||||
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
|
MotifDnDConstants.MOTIF_RECEIVER_INFO_SIZE) {
|
||||||
|
@ -377,7 +377,7 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
try {
|
try {
|
||||||
int status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
int status = wpg.execute(XToolkit.IgnoreBadWindowHandler);
|
||||||
|
|
||||||
if (status == XlibWrapper.Success && wpg.getData() != 0 &&
|
if (status == XConstants.Success && wpg.getData() != 0 &&
|
||||||
wpg.getActualType() ==
|
wpg.getActualType() ==
|
||||||
MotifDnDConstants.XA_MOTIF_DRAG_INITIATOR_INFO.getAtom() &&
|
MotifDnDConstants.XA_MOTIF_DRAG_INITIATOR_INFO.getAtom() &&
|
||||||
wpg.getActualFormat() == 8 &&
|
wpg.getActualFormat() == 8 &&
|
||||||
|
@ -420,7 +420,7 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
|
|
||||||
if (status == 0 ||
|
if (status == 0 ||
|
||||||
(XToolkit.saved_error != null &&
|
(XToolkit.saved_error != null &&
|
||||||
XToolkit.saved_error.get_error_code() != XlibWrapper.Success)) {
|
XToolkit.saved_error.get_error_code() != XConstants.Success)) {
|
||||||
throw new XException("XGetWindowAttributes failed");
|
throw new XException("XGetWindowAttributes failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -432,12 +432,12 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
XToolkit.WITH_XERROR_HANDLER(XToolkit.IgnoreBadWindowHandler);
|
XToolkit.WITH_XERROR_HANDLER(XToolkit.IgnoreBadWindowHandler);
|
||||||
XlibWrapper.XSelectInput(XToolkit.getDisplay(), source_win,
|
XlibWrapper.XSelectInput(XToolkit.getDisplay(), source_win,
|
||||||
source_win_mask |
|
source_win_mask |
|
||||||
XlibWrapper.StructureNotifyMask);
|
XConstants.StructureNotifyMask);
|
||||||
|
|
||||||
XToolkit.RESTORE_XERROR_HANDLER();
|
XToolkit.RESTORE_XERROR_HANDLER();
|
||||||
|
|
||||||
if (XToolkit.saved_error != null &&
|
if (XToolkit.saved_error != null &&
|
||||||
XToolkit.saved_error.get_error_code() != XlibWrapper.Success) {
|
XToolkit.saved_error.get_error_code() != XConstants.Success) {
|
||||||
throw new XException("XSelectInput failed");
|
throw new XException("XSelectInput failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -590,7 +590,7 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
XClientMessageEvent dummy = new XClientMessageEvent();
|
XClientMessageEvent dummy = new XClientMessageEvent();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
dummy.set_type(XlibWrapper.ClientMessage);
|
dummy.set_type(XConstants.ClientMessage);
|
||||||
dummy.set_window(xclient.get_window());
|
dummy.set_window(xclient.get_window());
|
||||||
dummy.set_format(32);
|
dummy.set_format(32);
|
||||||
dummy.set_message_type(0);
|
dummy.set_message_type(0);
|
||||||
|
@ -600,7 +600,7 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
dummy.set_data(3, 0);
|
dummy.set_data(3, 0);
|
||||||
dummy.set_data(4, 0);
|
dummy.set_data(4, 0);
|
||||||
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
|
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
|
||||||
proxy, false, XlibWrapper.NoEventMask,
|
proxy, false, XConstants.NoEventMask,
|
||||||
dummy.pData);
|
dummy.pData);
|
||||||
} finally {
|
} finally {
|
||||||
dummy.dispose();
|
dummy.dispose();
|
||||||
|
@ -821,7 +821,7 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
XClientMessageEvent msg = new XClientMessageEvent();
|
XClientMessageEvent msg = new XClientMessageEvent();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
msg.set_type(XlibWrapper.ClientMessage);
|
msg.set_type(XConstants.ClientMessage);
|
||||||
msg.set_window(MotifDnDConstants.Swapper.getInt(data + 12, eventByteOrder));
|
msg.set_window(MotifDnDConstants.Swapper.getInt(data + 12, eventByteOrder));
|
||||||
msg.set_format(8);
|
msg.set_format(8);
|
||||||
msg.set_message_type(MotifDnDConstants.XA_MOTIF_DRAG_AND_DROP_MESSAGE.getAtom());
|
msg.set_message_type(MotifDnDConstants.XA_MOTIF_DRAG_AND_DROP_MESSAGE.getAtom());
|
||||||
|
@ -878,7 +878,7 @@ class MotifDnDDropTargetProtocol extends XDropTargetProtocol {
|
||||||
try {
|
try {
|
||||||
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
|
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
|
||||||
msg.get_window(),
|
msg.get_window(),
|
||||||
false, XlibWrapper.NoEventMask,
|
false, XConstants.NoEventMask,
|
||||||
msg.pData);
|
msg.pData);
|
||||||
} finally {
|
} finally {
|
||||||
XToolkit.awtUnlock();
|
XToolkit.awtUnlock();
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue