Skip to content

Commit 2a799e5

Browse files
magicusAndrey Turbanov
and
Andrey Turbanov
committed
8285306: Fix typos in java.desktop
Co-authored-by: Andrey Turbanov <aturbanov@openjdk.org> Reviewed-by: aturbanov, prr
1 parent d1f7945 commit 2a799e5

File tree

483 files changed

+1017
-1017
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

483 files changed

+1017
-1017
lines changed

src/java.desktop/aix/classes/sun/awt/X11InputMethod.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public synchronized void deactivate(boolean isTemporary) {
125125
/* Usually as the client component, let's call it component A,
126126
loses the focus, this method is called. Then when another client
127127
component, let's call it component B, gets the focus, activate is first called on
128-
the previous focused compoent which is A, then endComposition is called on A,
128+
the previous focused component which is A, then endComposition is called on A,
129129
deactivate is called on A again. And finally activate is called on the newly
130130
focused component B. Here is the call sequence.
131131
@@ -466,7 +466,7 @@ public void setCompositionEnabled(boolean enable) {
466466
return.
467467
setCompositionEnabledNative may throw UnsupportedOperationException.
468468
Don't try to catch it since the method may be called by clients.
469-
Use package private mthod 'resetCompositionState' if you want the
469+
Use package private method 'resetCompositionState' if you want the
470470
exception to be caught.
471471
*/
472472
boolean pre, post;

src/java.desktop/aix/native/libawt/porting_aix.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
/*
2828
* Header file to contain porting-relevant code which does not have a
2929
* home anywhere else.
30-
* This is intially based on hotspot/src/os/aix/vm/{loadlib,porting}_aix.{hpp,cpp}
30+
* This is initially based on hotspot/src/os/aix/vm/{loadlib,porting}_aix.{hpp,cpp}
3131
*/
3232

3333
/*
3434
* Aix' own version of dladdr().
35-
* This function tries to mimick dladdr(3) on Linux
35+
* This function tries to mimic dladdr(3) on Linux
3636
* (see http://linux.die.net/man/3/dladdr)
3737
* dladdr(3) is not POSIX but a GNU extension, and is not available on AIX.
3838
*
@@ -50,7 +50,7 @@
5050

5151
typedef struct {
5252
const char *dli_fname; /* file path of loaded library */
53-
void *dli_fbase; /* doesn't make sence on AIX */
53+
void *dli_fbase; /* doesn't make sense on AIX */
5454
const char *dli_sname; /* symbol name; "" if not known */
5555
void *dli_saddr; /* address of *entry* of function; not function descriptor; */
5656
} Dl_info;

src/java.desktop/aix/native/libawt_xawt/awt/awt_InputMethod.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ createXIC(JNIEnv * env, X11InputMethodData *pX11IMData, Window w)
992992
pX11IMData->ic_passive = pX11IMData->ic_active;
993993
}
994994

995-
// The code set the IC mode that the preedit state is not initialied
995+
// The code set the IC mode that the preedit state is not initialized
996996
// at XmbResetIC. This attribute can be set at XCreateIC. I separately
997997
// set the attribute to avoid the failure of XCreateIC at some platform
998998
// which does not support the attribute.

src/java.desktop/linux/native/libjsound/PLATFORM_API_LinuxOS_ALSA_MidiIn.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ char* MIDI_IN_GetErrorStr(INT32 err) {
7979
INT32 MIDI_IN_GetNumDevices() {
8080
/* Workaround for 6842956: 32bit app on 64bit linux
8181
* gets assertion failure trying to open midiIn ports.
82-
* Untill the issue is fixed in ALSA
82+
* Until the issue is fixed in ALSA
8383
* (https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4807)
8484
* report no midi in devices in the configuration.
8585
*/

src/java.desktop/linux/native/libjsound/PLATFORM_API_LinuxOS_ALSA_MidiUtils.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ static int iterateRawmidiDevices(snd_rawmidi_stream_t direction,
106106
snd_ctl_close(handle);
107107
}
108108
}
109-
// call calback function for the device
109+
// call callback function for the device
110110
if (iterator != NULL) {
111111
doContinue = (*iterator)(ALSA_DEFAULT_DEVICE_ID, rawmidi_info,
112112
defcardinfo, userData);

src/java.desktop/linux/native/libjsound/PLATFORM_API_LinuxOS_ALSA_Ports.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ void PORT_GetControls(void* id, INT32 portIndex, PortControlCreator* creator) {
442442
control = createVolumeControl(creator, portControl, elem, isPlayback);
443443
// We wrap in a compound control to provide the channel name.
444444
if (control != NULL) {
445-
/* $$mp 2003-09-14: The following cast shouln't be necessary. Instead, the
445+
/* $$mp 2003-09-14: The following cast shouldn't be necessary. Instead, the
446446
declaration of PORT_NewCompoundControlPtr in Ports.h should be changed
447447
to take a const char* parameter. */
448448
control = (creator->newCompoundControl)(creator, (char*) snd_mixer_selem_channel_name(channel), &control, 1);
@@ -481,7 +481,7 @@ void PORT_GetControls(void* id, INT32 portIndex, PortControlCreator* creator) {
481481
}
482482
}
483483
}
484-
/* $$mp 2003-09-14: The following cast shouln't be necessary. Instead, the
484+
/* $$mp 2003-09-14: The following cast shouldn't be necessary. Instead, the
485485
declaration of PORT_NewCompoundControlPtr in Ports.h should be changed
486486
to take a const char* parameter. */
487487
portName = (char*) snd_mixer_selem_get_name(elem);

src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ protected void paintIcon(final Graphics g, final AbstractButton b, final Rectang
457457
}
458458

459459
/**
460-
* As of Java 2 platform v 1.4 this method should not be used or overriden.
460+
* As of Java 2 platform v 1.4 this method should not be used or overridden.
461461
* Use the paintText method which takes the AbstractButton argument.
462462
*/
463463
protected void paintText(final Graphics g, final JComponent c, final Rectangle localTextRect, final String text) {
@@ -549,8 +549,8 @@ protected void uninstallHierListener(final AbstractButton b) {
549549
}
550550

551551
static class AquaHierarchyButtonListener implements HierarchyListener {
552-
// Everytime a hierarchy is change we need to check if the button if moved on or from
553-
// a toolbar. If that is the case, we need to re-set the border of the button.
552+
// Every time a hierarchy is changed we need to check if the button is moved on or from
553+
// the toolbar. If that is the case, we need to re-set the border of the button.
554554
public void hierarchyChanged(final HierarchyEvent e) {
555555
if ((e.getChangeFlags() & HierarchyEvent.PARENT_CHANGED) == 0) return;
556556

src/java.desktop/macosx/classes/com/apple/laf/AquaCaret.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ protected synchronized void damage(final Rectangle r) {
209209
// See <rdar://problem/3833837> 1.4.2_05-141.3: JTextField performance with
210210
// Aqua L&F. We are getting into a circular condition with the BasicCaret
211211
// paint code since it doesn't know about the fact that our damage routine
212-
// above elminates the border. Sadly we can't easily change either one, so
212+
// above eliminates the border. Sadly we can't easily change either one, so
213213
// we will add a painting flag and not damage during a repaint.
214214
@Override
215215
public void paint(final Graphics g) {

src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxUI.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ public void actionPerformed(final ActionEvent e) {
348348
}
349349

350350
/**
351-
* Hilight _but do not select_ the next item in the list.
351+
* Highlight _but do not select_ the next item in the list.
352352
*/
353353
@SuppressWarnings("serial") // anonymous class
354354
private Action highlightNextAction = new ComboBoxAction() {
@@ -365,7 +365,7 @@ public void performComboBoxAction(AquaComboBoxUI ui) {
365365
};
366366

367367
/**
368-
* Hilight _but do not select_ the previous item in the list.
368+
* Highlight _but do not select_ the previous item in the list.
369369
*/
370370
@SuppressWarnings("serial") // anonymous class
371371
private Action highlightPreviousAction = new ComboBoxAction() {

src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public NineSliceMetrics(final int minWidth, final int minHeight, final int westC
328328

329329
/*
330330
* A "paintable" which holds nine images, which represent a sliced up initial
331-
* image that can be streched from its middles.
331+
* image that can be stretched from its middles.
332332
*/
333333
public static class SlicedImageControl {
334334
final BufferedImage NW, N, NE;

src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFramePaneUI.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public void deiconifyFrame(final JInternalFrame f) {
206206
removeIconFor(f);
207207
// <rdar://problem/3712485> removed f.show(). show() is now deprecated and
208208
// it wasn't sending our frame to front nor selecting it. Now, we move it
209-
// to front and select it manualy. (vm)
209+
// to front and select it manually. (vm)
210210
f.moveToFront();
211211
try {
212212
f.setSelected(true);

src/java.desktop/macosx/classes/com/apple/laf/AquaLookAndFeel.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ public Object createValue(UIDefaults defaultsTable) {
697697
"MenuItem.selectedBackgroundPainter",(LazyValue) t -> AquaMenuPainter.getSelectedMenuItemPainter(),
698698

699699
// *** OptionPane
700-
// You can additionaly define OptionPane.messageFont which will
700+
// You can additionally define OptionPane.messageFont which will
701701
// dictate the fonts used for the message, and
702702
// OptionPane.buttonFont, which defines the font for the buttons.
703703
"OptionPane.font", alertHeaderFont,

src/java.desktop/macosx/classes/com/apple/laf/AquaOptionPaneUI.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected Container createMessageArea() {
108108
* This class should be treated as a &quot;protected&quot; inner class.
109109
* Instantiate it only within subclasses of BasicOptionPaneUI.
110110
*
111-
* BasicOptionPaneUI expects that its buttons are layed out with
111+
* BasicOptionPaneUI expects that its buttons are laid out with
112112
* a subclass of ButtonAreaLayout
113113
*/
114114
public static class AquaButtonAreaLayout extends ButtonAreaLayout {

src/java.desktop/macosx/classes/com/apple/laf/AquaSpinnerUI.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ public void propertyChange(final PropertyChangeEvent e) {
866866
}
867867
}
868868

869-
// Syncronizes the ToolTip text for the components within the spinner
869+
// Synchronizes the ToolTip text for the components within the spinner
870870
// to be the same value as the spinner ToolTip text.
871871
void updateToolTipTextForChildren(final JComponent spinnerComponent) {
872872
final String toolTipText = spinnerComponent.getToolTipText();

src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public class AquaTabbedPaneCopyFromBasicUI extends TabbedPaneUI implements Swing
111111
@Deprecated
112112
protected KeyStroke rightKey;
113113

114-
// Transient variables (recalculated each time TabbedPane is layed out)
114+
// Transient variables (recalculated each time TabbedPane is laid out)
115115

116116
protected int[] tabRuns = new int[10];
117117
protected int runCount = 0;
@@ -2243,7 +2243,7 @@ public void layoutContainer(final Container parent) {
22432243

22442244
// In order to allow programs to use a single component
22452245
// as the display for multiple tabs, we will not change
2246-
// the visible compnent if the currently selected tab
2246+
// the visible component if the currently selected tab
22472247
// has a null component. This is a bit dicey, as we don't
22482248
// explicitly state we support this in the spec, but since
22492249
// programs are now depending on this, we're making it work.
@@ -2742,7 +2742,7 @@ public void layoutContainer(final Container parent) {
27422742

27432743
// In order to allow programs to use a single component
27442744
// as the display for multiple tabs, we will not change
2745-
// the visible compnent if the currently selected tab
2745+
// the visible component if the currently selected tab
27462746
// has a null component. This is a bit dicey, as we don't
27472747
// explicitly state we support this in the spec, but since
27482748
// programs are now depending on this, we're making it work.

src/java.desktop/macosx/classes/com/apple/laf/AquaTextFieldFormattedUI.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
/**
3535
* This class exists only as a hack to work around a Sun bug which parks the
36-
* insertion caret at the begining of a text field when it gets clicked on.
36+
* insertion caret at the beginning of a text field when it gets clicked on.
3737
*/
3838
public class AquaTextFieldFormattedUI extends AquaTextFieldUI implements MouseListener {
3939
public static ComponentUI createUI(final JComponent c) {

src/java.desktop/macosx/classes/com/apple/laf/AquaToolBarUI.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected RootPaneContainer createFloatingWindow(final JToolBar toolbar) {
5454
return window;
5555
}
5656

57-
/* ToolBarBorder and drag-off handle, based loosly on MetalBumps */
57+
/* ToolBarBorder and drag-off handle, based loosely on MetalBumps */
5858
@SuppressWarnings("serial") // Superclass is not serializable across versions
5959
static class ToolBarBorder extends AbstractBorder implements UIResource, javax.swing.SwingConstants {
6060
protected void fillHandle(final Graphics g, final int x1, final int y1, final int x2, final int y2, final boolean horizontal) {

src/java.desktop/macosx/classes/com/apple/laf/ScreenMenu.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public void run() {
177177
}
178178

179179
/**
180-
* Callback from JavaMenuUpdater.m -- called when menu item is hilighted.
180+
* Callback from JavaMenuUpdater.m -- called when menu item is highlighted.
181181
*
182182
* @param inWhichItem The menu item selected by the user. -1 if mouse moves off the menu.
183183
* @param itemRectTop

src/java.desktop/macosx/classes/sun/font/CCharToGlyphMapper.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public void put(final int index, final int value) {
219219
}
220220
}
221221

222-
public synchronized void get(int count, char[] indicies, int[] values)
222+
public synchronized void get(int count, char[] indices, int[] values)
223223
{
224224
// "missed" is the count of 'char' that are not mapped.
225225
// Surrogates count for 2.
@@ -230,11 +230,11 @@ public synchronized void get(int count, char[] indicies, int[] values)
230230
int [] unmappedCharIndices = null;
231231

232232
for (int i = 0; i < count; i++){
233-
int code = indicies[i];
233+
int code = indices[i];
234234
if (code >= HI_SURROGATE_START &&
235235
code <= HI_SURROGATE_END && i < count - 1)
236236
{
237-
char low = indicies[i + 1];
237+
char low = indices[i + 1];
238238
if (low >= LO_SURROGATE_START && low <= LO_SURROGATE_END) {
239239
code = (code - HI_SURROGATE_START) * 0x400 +
240240
low - LO_SURROGATE_START + 0x10000;
@@ -254,13 +254,13 @@ public synchronized void get(int count, char[] indicies, int[] values)
254254
if (unmappedChars == null) {
255255
// This is likely to be longer than we need,
256256
// but is the simplest and cheapest option.
257-
unmappedChars = new char[indicies.length];
258-
unmappedCharIndices = new int[indicies.length];
257+
unmappedChars = new char[indices.length];
258+
unmappedCharIndices = new int[indices.length];
259259
}
260-
unmappedChars[missed] = indicies[i];
260+
unmappedChars[missed] = indices[i];
261261
unmappedCharIndices[missed] = i;
262262
if (code >= 0x10000) { // was a surrogate pair
263-
unmappedChars[++missed] = indicies[++i];
263+
unmappedChars[++missed] = indices[++i];
264264
}
265265
missed++;
266266
}

src/java.desktop/macosx/classes/sun/font/CFontConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public CFontConfiguration(SunFontManager fm,
5151

5252
/*
5353
* On Mac OS X we essentially ignore the font.properties file, and do
54-
* it all programatically. The intention is end users will use things
54+
* it all programmatically. The intention is end users will use things
5555
* like the Font Book to manage fonts. Plus our fonts automatically do
5656
* unicode substitution, so a localized font is not required.
5757
*

src/java.desktop/macosx/classes/sun/java2d/CompositeCRenderer.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -362,20 +362,20 @@ void composite(SunGraphics2D sg2d, OSXSurfaceData surfaceData, BufferedImage src
362362
int w = (int) compositingBounds.getWidth();
363363
int h = (int) compositingBounds.getHeight();
364364

365-
boolean succeded = false;
365+
boolean succeeded = false;
366366

367367
Composite composite = sg2d.getComposite();
368368
if (composite instanceof XORComposite) {
369369
// 1st native XOR try
370370
// we try to perform XOR using surface pixels directly
371371
try {
372-
succeded = surfaceData.xorSurfacePixels(sg2d, srcPixels, x, y, w, h, ((XORComposite) composite).getXorColor().getRGB());
372+
succeeded = surfaceData.xorSurfacePixels(sg2d, srcPixels, x, y, w, h, ((XORComposite) composite).getXorColor().getRGB());
373373
} catch (Exception e) {
374-
succeded = false;
374+
succeeded = false;
375375
}
376376
}
377377

378-
if (succeded == false) {
378+
if (succeeded == false) {
379379
// create image with the original pixels of surface
380380
BufferedImage dstInPixels = getSurfacePixels(sg2d, surfaceData, x, y, w, h);
381381
BufferedImage dstOutPixels = null;
@@ -385,15 +385,15 @@ void composite(SunGraphics2D sg2d, OSXSurfaceData surfaceData, BufferedImage src
385385
// we try to perform XOR on image's pixels (which were copied from surface first)
386386
try {
387387
OSXSurfaceData osxsd = (OSXSurfaceData) (BufImgSurfaceData.createData(dstInPixels));
388-
succeded = osxsd.xorSurfacePixels(sg2d, srcPixels, 0, 0, w, h, ((XORComposite) composite).getXorColor().getRGB());
388+
succeeded = osxsd.xorSurfacePixels(sg2d, srcPixels, 0, 0, w, h, ((XORComposite) composite).getXorColor().getRGB());
389389
dstOutPixels = dstInPixels;
390390
} catch (Exception e) {
391-
succeded = false;
391+
succeeded = false;
392392
}
393393
}
394394

395395
// either 2nd native XOR failed OR we have a case of custom compositing
396-
if (succeded == false) {
396+
if (succeeded == false) {
397397
// create an image into which we'll composite result: we MUST use a different destination (compositing
398398
// is NOT "in place" operation)
399399
dstOutPixels = surfaceData.getCompositingDstOutImage(w, h);

src/java.desktop/macosx/classes/sun/java2d/OSXOffScreenSurfaceData.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class OSXOffScreenSurfaceData extends OSXSurfaceData // implements Raster
5757
// these are extra image types we can handle
5858
private static final int TYPE_3BYTE_RGB = BufferedImage.TYPE_BYTE_INDEXED + 1;
5959

60-
// these are for callbacks when pixes have been touched
60+
// these are for callbacks when pixels have been touched
6161
protected ByteBuffer fImageInfo;
6262
IntBuffer fImageInfoInt;
6363
private static final int kNeedToSyncFromJavaPixelsIndex = 0;
@@ -505,7 +505,7 @@ public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx,
505505
// src coordinates are in the coordinate space of the image)
506506
// sg2d.drawImage expects the destination rect to be in the coord space
507507
// of the graphics2d. <rdar://3746194> (vm)
508-
// we need to substract the transX and transY to move it
508+
// we need to subtract the transX and transY to move it
509509
// to the coordinate space of the graphics2d.
510510
int dstX = x + dx - sg2d.transX;
511511
int dstY = y + dy - sg2d.transY;

src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ void setupGraphicsState(SunGraphics2D sg2d, int primitiveType, int x, int y, int
837837
setupGraphicsState(sg2d, primitiveType, sg2d.font, x, y, w, h);
838838
}
839839

840-
// the method below is overriden by CPeerSurface to check the last peer used to draw
840+
// the method below is overridden by CPeerSurface to check the last peer used to draw
841841
// if the peer changed we finish lazy drawing
842842
void setupGraphicsState(SunGraphics2D sg2d, int primitiveType, Font font, int x, int y, int w, int h) {
843843
this.fChangeFlag = 0;

src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ public Point getLocationOnScreen() {
417417
/**
418418
* Overridden from LWContainerPeer to return the correct insets.
419419
* Insets are queried from the delegate and are kept up to date by
420-
* requiering when needed (i.e. when the window geometry is changed).
420+
* requerying when needed (i.e. when the window geometry is changed).
421421
*/
422422
@Override
423423
public Insets getInsets() {
@@ -1367,7 +1367,7 @@ private boolean isOneOfOwnersOf(LWWindowPeer peer) {
13671367
*/
13681368
protected void changeFocusedWindow(boolean becomesFocused, Window opposite) {
13691369
if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
1370-
focusLog.fine((becomesFocused?"gaining":"loosing") + " focus window: " + this);
1370+
focusLog.fine((becomesFocused?"gaining":"losing") + " focus window: " + this);
13711371
}
13721372
if (skipNextFocusChange) {
13731373
focusLog.fine("skipping focus change");
@@ -1405,7 +1405,7 @@ protected void changeFocusedWindow(boolean becomesFocused, Window opposite) {
14051405
KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
14061406

14071407
if (!becomesFocused && kfmPeer.getCurrentFocusedWindow() != getTarget()) {
1408-
// late window focus lost event - ingoring
1408+
// late window focus lost event - ignoring
14091409
return;
14101410
}
14111411

0 commit comments

Comments
 (0)