8285306: Fix typos in java.desktop

Co-authored-by: Andrey Turbanov <aturbanov@openjdk.org>
Reviewed-by: aturbanov, prr
This commit is contained in:
Magnus Ihse Bursie 2022-10-18 17:08:49 +00:00
parent d1f794587c
commit 2a799e5c82
483 changed files with 1017 additions and 1017 deletions

View File

@ -125,7 +125,7 @@ public abstract class X11InputMethod extends X11InputMethodBase {
/* Usually as the client component, let's call it component A,
loses the focus, this method is called. Then when another client
component, let's call it component B, gets the focus, activate is first called on
the previous focused compoent which is A, then endComposition is called on A,
the previous focused component which is A, then endComposition is called on A,
deactivate is called on A again. And finally activate is called on the newly
focused component B. Here is the call sequence.
@ -466,7 +466,7 @@ public abstract class X11InputMethod extends X11InputMethodBase {
return.
setCompositionEnabledNative may throw UnsupportedOperationException.
Don't try to catch it since the method may be called by clients.
Use package private mthod 'resetCompositionState' if you want the
Use package private method 'resetCompositionState' if you want the
exception to be caught.
*/
boolean pre, post;

View File

@ -27,12 +27,12 @@
/*
* Header file to contain porting-relevant code which does not have a
* home anywhere else.
* This is intially based on hotspot/src/os/aix/vm/{loadlib,porting}_aix.{hpp,cpp}
* This is initially based on hotspot/src/os/aix/vm/{loadlib,porting}_aix.{hpp,cpp}
*/
/*
* Aix' own version of dladdr().
* This function tries to mimick dladdr(3) on Linux
* This function tries to mimic dladdr(3) on Linux
* (see http://linux.die.net/man/3/dladdr)
* dladdr(3) is not POSIX but a GNU extension, and is not available on AIX.
*
@ -50,7 +50,7 @@
typedef struct {
const char *dli_fname; /* file path of loaded library */
void *dli_fbase; /* doesn't make sence on AIX */
void *dli_fbase; /* doesn't make sense on AIX */
const char *dli_sname; /* symbol name; "" if not known */
void *dli_saddr; /* address of *entry* of function; not function descriptor; */
} Dl_info;

View File

@ -992,7 +992,7 @@ createXIC(JNIEnv * env, X11InputMethodData *pX11IMData, Window w)
pX11IMData->ic_passive = pX11IMData->ic_active;
}
// The code set the IC mode that the preedit state is not initialied
// The code set the IC mode that the preedit state is not initialized
// at XmbResetIC. This attribute can be set at XCreateIC. I separately
// set the attribute to avoid the failure of XCreateIC at some platform
// which does not support the attribute.

View File

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

View File

@ -106,7 +106,7 @@ static int iterateRawmidiDevices(snd_rawmidi_stream_t direction,
snd_ctl_close(handle);
}
}
// call calback function for the device
// call callback function for the device
if (iterator != NULL) {
doContinue = (*iterator)(ALSA_DEFAULT_DEVICE_ID, rawmidi_info,
defcardinfo, userData);

View File

@ -442,7 +442,7 @@ void PORT_GetControls(void* id, INT32 portIndex, PortControlCreator* creator) {
control = createVolumeControl(creator, portControl, elem, isPlayback);
// We wrap in a compound control to provide the channel name.
if (control != NULL) {
/* $$mp 2003-09-14: The following cast shouln't be necessary. Instead, the
/* $$mp 2003-09-14: The following cast shouldn't be necessary. Instead, the
declaration of PORT_NewCompoundControlPtr in Ports.h should be changed
to take a const char* parameter. */
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) {
}
}
}
/* $$mp 2003-09-14: The following cast shouln't be necessary. Instead, the
/* $$mp 2003-09-14: The following cast shouldn't be necessary. Instead, the
declaration of PORT_NewCompoundControlPtr in Ports.h should be changed
to take a const char* parameter. */
portName = (char*) snd_mixer_selem_get_name(elem);

View File

@ -457,7 +457,7 @@ public class AquaButtonUI extends BasicButtonUI implements Sizeable {
}
/**
* As of Java 2 platform v 1.4 this method should not be used or overriden.
* As of Java 2 platform v 1.4 this method should not be used or overridden.
* Use the paintText method which takes the AbstractButton argument.
*/
protected void paintText(final Graphics g, final JComponent c, final Rectangle localTextRect, final String text) {
@ -549,8 +549,8 @@ public class AquaButtonUI extends BasicButtonUI implements Sizeable {
}
static class AquaHierarchyButtonListener implements HierarchyListener {
// Everytime a hierarchy is change we need to check if the button if moved on or from
// a toolbar. If that is the case, we need to re-set the border of the button.
// Every time a hierarchy is changed we need to check if the button is moved on or from
// the toolbar. If that is the case, we need to re-set the border of the button.
public void hierarchyChanged(final HierarchyEvent e) {
if ((e.getChangeFlags() & HierarchyEvent.PARENT_CHANGED) == 0) return;

View File

@ -209,7 +209,7 @@ public class AquaCaret extends DefaultCaret
// See <rdar://problem/3833837> 1.4.2_05-141.3: JTextField performance with
// Aqua L&F. We are getting into a circular condition with the BasicCaret
// paint code since it doesn't know about the fact that our damage routine
// above elminates the border. Sadly we can't easily change either one, so
// above eliminates the border. Sadly we can't easily change either one, so
// we will add a painting flag and not damage during a repaint.
@Override
public void paint(final Graphics g) {

View File

@ -348,7 +348,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
}
/**
* Hilight _but do not select_ the next item in the list.
* Highlight _but do not select_ the next item in the list.
*/
@SuppressWarnings("serial") // anonymous class
private Action highlightNextAction = new ComboBoxAction() {
@ -365,7 +365,7 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
};
/**
* Hilight _but do not select_ the previous item in the list.
* Highlight _but do not select_ the previous item in the list.
*/
@SuppressWarnings("serial") // anonymous class
private Action highlightPreviousAction = new ComboBoxAction() {

View File

@ -328,7 +328,7 @@ public class AquaImageFactory {
/*
* A "paintable" which holds nine images, which represent a sliced up initial
* image that can be streched from its middles.
* image that can be stretched from its middles.
*/
public static class SlicedImageControl {
final BufferedImage NW, N, NE;

View File

@ -206,7 +206,7 @@ public class AquaInternalFramePaneUI extends BasicDesktopPaneUI implements Mouse
removeIconFor(f);
// <rdar://problem/3712485> removed f.show(). show() is now deprecated and
// it wasn't sending our frame to front nor selecting it. Now, we move it
// to front and select it manualy. (vm)
// to front and select it manually. (vm)
f.moveToFront();
try {
f.setSelected(true);

View File

@ -697,7 +697,7 @@ public class AquaLookAndFeel extends BasicLookAndFeel {
"MenuItem.selectedBackgroundPainter",(LazyValue) t -> AquaMenuPainter.getSelectedMenuItemPainter(),
// *** OptionPane
// You can additionaly define OptionPane.messageFont which will
// You can additionally define OptionPane.messageFont which will
// dictate the fonts used for the message, and
// OptionPane.buttonFont, which defines the font for the buttons.
"OptionPane.font", alertHeaderFont,

View File

@ -108,7 +108,7 @@ public class AquaOptionPaneUI extends BasicOptionPaneUI {
* This class should be treated as a &quot;protected&quot; inner class.
* Instantiate it only within subclasses of BasicOptionPaneUI.
*
* BasicOptionPaneUI expects that its buttons are layed out with
* BasicOptionPaneUI expects that its buttons are laid out with
* a subclass of ButtonAreaLayout
*/
public static class AquaButtonAreaLayout extends ButtonAreaLayout {

View File

@ -866,7 +866,7 @@ public class AquaSpinnerUI extends SpinnerUI {
}
}
// Syncronizes the ToolTip text for the components within the spinner
// Synchronizes the ToolTip text for the components within the spinner
// to be the same value as the spinner ToolTip text.
void updateToolTipTextForChildren(final JComponent spinnerComponent) {
final String toolTipText = spinnerComponent.getToolTipText();

View File

@ -111,7 +111,7 @@ public class AquaTabbedPaneCopyFromBasicUI extends TabbedPaneUI implements Swing
@Deprecated
protected KeyStroke rightKey;
// Transient variables (recalculated each time TabbedPane is layed out)
// Transient variables (recalculated each time TabbedPane is laid out)
protected int[] tabRuns = new int[10];
protected int runCount = 0;
@ -2243,7 +2243,7 @@ public class AquaTabbedPaneCopyFromBasicUI extends TabbedPaneUI implements Swing
// In order to allow programs to use a single component
// as the display for multiple tabs, we will not change
// the visible compnent if the currently selected tab
// the visible component if the currently selected tab
// has a null component. This is a bit dicey, as we don't
// explicitly state we support this in the spec, but since
// programs are now depending on this, we're making it work.
@ -2742,7 +2742,7 @@ public class AquaTabbedPaneCopyFromBasicUI extends TabbedPaneUI implements Swing
// In order to allow programs to use a single component
// as the display for multiple tabs, we will not change
// the visible compnent if the currently selected tab
// the visible component if the currently selected tab
// has a null component. This is a bit dicey, as we don't
// explicitly state we support this in the spec, but since
// programs are now depending on this, we're making it work.

View File

@ -33,7 +33,7 @@ import javax.swing.text.JTextComponent;
/**
* This class exists only as a hack to work around a Sun bug which parks the
* insertion caret at the begining of a text field when it gets clicked on.
* insertion caret at the beginning of a text field when it gets clicked on.
*/
public class AquaTextFieldFormattedUI extends AquaTextFieldUI implements MouseListener {
public static ComponentUI createUI(final JComponent c) {

View File

@ -54,7 +54,7 @@ public class AquaToolBarUI extends BasicToolBarUI implements SwingConstants {
return window;
}
/* ToolBarBorder and drag-off handle, based loosly on MetalBumps */
/* ToolBarBorder and drag-off handle, based loosely on MetalBumps */
@SuppressWarnings("serial") // Superclass is not serializable across versions
static class ToolBarBorder extends AbstractBorder implements UIResource, javax.swing.SwingConstants {
protected void fillHandle(final Graphics g, final int x1, final int y1, final int x2, final int y2, final boolean horizontal) {

View File

@ -177,7 +177,7 @@ final class ScreenMenu extends Menu
}
/**
* Callback from JavaMenuUpdater.m -- called when menu item is hilighted.
* Callback from JavaMenuUpdater.m -- called when menu item is highlighted.
*
* @param inWhichItem The menu item selected by the user. -1 if mouse moves off the menu.
* @param itemRectTop

View File

@ -219,7 +219,7 @@ public class CCharToGlyphMapper extends CharToGlyphMapper {
}
}
public synchronized void get(int count, char[] indicies, int[] values)
public synchronized void get(int count, char[] indices, int[] values)
{
// "missed" is the count of 'char' that are not mapped.
// Surrogates count for 2.
@ -230,11 +230,11 @@ public class CCharToGlyphMapper extends CharToGlyphMapper {
int [] unmappedCharIndices = null;
for (int i = 0; i < count; i++){
int code = indicies[i];
int code = indices[i];
if (code >= HI_SURROGATE_START &&
code <= HI_SURROGATE_END && i < count - 1)
{
char low = indicies[i + 1];
char low = indices[i + 1];
if (low >= LO_SURROGATE_START && low <= LO_SURROGATE_END) {
code = (code - HI_SURROGATE_START) * 0x400 +
low - LO_SURROGATE_START + 0x10000;
@ -254,13 +254,13 @@ public class CCharToGlyphMapper extends CharToGlyphMapper {
if (unmappedChars == null) {
// This is likely to be longer than we need,
// but is the simplest and cheapest option.
unmappedChars = new char[indicies.length];
unmappedCharIndices = new int[indicies.length];
unmappedChars = new char[indices.length];
unmappedCharIndices = new int[indices.length];
}
unmappedChars[missed] = indicies[i];
unmappedChars[missed] = indices[i];
unmappedCharIndices[missed] = i;
if (code >= 0x10000) { // was a surrogate pair
unmappedChars[++missed] = indicies[++i];
unmappedChars[++missed] = indices[++i];
}
missed++;
}

View File

@ -51,7 +51,7 @@ class CFontConfiguration extends FontConfiguration {
/*
* On Mac OS X we essentially ignore the font.properties file, and do
* it all programatically. The intention is end users will use things
* it all programmatically. The intention is end users will use things
* like the Font Book to manage fonts. Plus our fonts automatically do
* unicode substitution, so a localized font is not required.
*

View File

@ -362,20 +362,20 @@ public class CompositeCRenderer extends CRenderer implements PixelDrawPipe, Pixe
int w = (int) compositingBounds.getWidth();
int h = (int) compositingBounds.getHeight();
boolean succeded = false;
boolean succeeded = false;
Composite composite = sg2d.getComposite();
if (composite instanceof XORComposite) {
// 1st native XOR try
// we try to perform XOR using surface pixels directly
try {
succeded = surfaceData.xorSurfacePixels(sg2d, srcPixels, x, y, w, h, ((XORComposite) composite).getXorColor().getRGB());
succeeded = surfaceData.xorSurfacePixels(sg2d, srcPixels, x, y, w, h, ((XORComposite) composite).getXorColor().getRGB());
} catch (Exception e) {
succeded = false;
succeeded = false;
}
}
if (succeded == false) {
if (succeeded == false) {
// create image with the original pixels of surface
BufferedImage dstInPixels = getSurfacePixels(sg2d, surfaceData, x, y, w, h);
BufferedImage dstOutPixels = null;
@ -385,15 +385,15 @@ public class CompositeCRenderer extends CRenderer implements PixelDrawPipe, Pixe
// we try to perform XOR on image's pixels (which were copied from surface first)
try {
OSXSurfaceData osxsd = (OSXSurfaceData) (BufImgSurfaceData.createData(dstInPixels));
succeded = osxsd.xorSurfacePixels(sg2d, srcPixels, 0, 0, w, h, ((XORComposite) composite).getXorColor().getRGB());
succeeded = osxsd.xorSurfacePixels(sg2d, srcPixels, 0, 0, w, h, ((XORComposite) composite).getXorColor().getRGB());
dstOutPixels = dstInPixels;
} catch (Exception e) {
succeded = false;
succeeded = false;
}
}
// either 2nd native XOR failed OR we have a case of custom compositing
if (succeded == false) {
if (succeeded == false) {
// create an image into which we'll composite result: we MUST use a different destination (compositing
// is NOT "in place" operation)
dstOutPixels = surfaceData.getCompositingDstOutImage(w, h);

View File

@ -57,7 +57,7 @@ public class OSXOffScreenSurfaceData extends OSXSurfaceData // implements Raster
// these are extra image types we can handle
private static final int TYPE_3BYTE_RGB = BufferedImage.TYPE_BYTE_INDEXED + 1;
// these are for callbacks when pixes have been touched
// these are for callbacks when pixels have been touched
protected ByteBuffer fImageInfo;
IntBuffer fImageInfoInt;
private static final int kNeedToSyncFromJavaPixelsIndex = 0;
@ -505,7 +505,7 @@ public class OSXOffScreenSurfaceData extends OSXSurfaceData // implements Raster
// src coordinates are in the coordinate space of the image)
// sg2d.drawImage expects the destination rect to be in the coord space
// of the graphics2d. <rdar://3746194> (vm)
// we need to substract the transX and transY to move it
// we need to subtract the transX and transY to move it
// to the coordinate space of the graphics2d.
int dstX = x + dx - sg2d.transX;
int dstY = y + dy - sg2d.transY;

View File

@ -837,7 +837,7 @@ public abstract class OSXSurfaceData extends BufImgSurfaceData {
setupGraphicsState(sg2d, primitiveType, sg2d.font, x, y, w, h);
}
// the method below is overriden by CPeerSurface to check the last peer used to draw
// the method below is overridden by CPeerSurface to check the last peer used to draw
// if the peer changed we finish lazy drawing
void setupGraphicsState(SunGraphics2D sg2d, int primitiveType, Font font, int x, int y, int w, int h) {
this.fChangeFlag = 0;

View File

@ -417,7 +417,7 @@ public class LWWindowPeer
/**
* Overridden from LWContainerPeer to return the correct insets.
* Insets are queried from the delegate and are kept up to date by
* requiering when needed (i.e. when the window geometry is changed).
* requerying when needed (i.e. when the window geometry is changed).
*/
@Override
public Insets getInsets() {
@ -1367,7 +1367,7 @@ public class LWWindowPeer
*/
protected void changeFocusedWindow(boolean becomesFocused, Window opposite) {
if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine((becomesFocused?"gaining":"loosing") + " focus window: " + this);
focusLog.fine((becomesFocused?"gaining":"losing") + " focus window: " + this);
}
if (skipNextFocusChange) {
focusLog.fine("skipping focus change");
@ -1405,7 +1405,7 @@ public class LWWindowPeer
KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
if (!becomesFocused && kfmPeer.getCurrentFocusedWindow() != getTarget()) {
// late window focus lost event - ingoring
// late window focus lost event - ignoring
return;
}

View File

@ -151,7 +151,7 @@ public class CDataTransferer extends DataTransferer {
if(isUriListFlavor(flavor) && format == CF_FILE) {
// dragQueryFile works fine with files and url,
// it parses and extracts values from property list.
// maxosx always returns property list for
// macosx always returns property list for
// CF_URL and CF_FILE
String[] strings = dragQueryFile(bytes);
if(strings == null) {
@ -160,7 +160,7 @@ public class CDataTransferer extends DataTransferer {
bytes = String.join(System.getProperty("line.separator"),
strings).getBytes();
// now we extracted uri from xml, now we should treat it as
// regular string that allows to translate data to target represantation
// regular string that allows to translate data to target representation
// class by base method
format = CF_STRING;
}

View File

@ -314,7 +314,7 @@ public final class CDragSourceContextPeer extends SunDragSourceContextPeer {
private void setDefaultDragImage(JList<?> component) {
Rectangle selectedOutline = null;
// This code actually works, even under the (non-existant) multiple-selections, because we only draw a union outline
// This code actually works, even under the (non-existent) multiple-selections, because we only draw a union outline
int[] selectedIndices = component.getSelectedIndices();
if (selectedIndices.length > 0)
selectedOutline = component.getCellBounds(selectedIndices[0], selectedIndices[selectedIndices.length-1]);

View File

@ -111,7 +111,7 @@ public class CEmbeddedFrame extends EmbeddedFrame {
responder.handleInputEvent(text);
}
// handleFocusEvent is called when the applet becames focused/unfocused.
// handleFocusEvent is called when the applet becomes focused/unfocused.
// This method can be called from different threads.
public void handleFocusEvent(boolean focused) {
synchronized (classLock) {
@ -123,7 +123,7 @@ public class CEmbeddedFrame extends EmbeddedFrame {
if (globalFocusedWindow == this) {
// see bug 8010925
// we can't put this to handleWindowFocusEvent because
// it won't be invoced if focuse is moved to a html element
// it won't be invoked if focus is moved to an html element
// on the same page.
CClipboard clipboard = (CClipboard) Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.checkPasteboardAndNotify();
@ -175,7 +175,7 @@ public class CEmbeddedFrame extends EmbeddedFrame {
}
private boolean isParentWindowChanged() {
// If globalFocusedWindow is located at inactive parent window or null, we have swithed to
// If globalFocusedWindow is located at inactive parent window or null, we have switched to
// another window.
return globalFocusedWindow != null ? !globalFocusedWindow.isParentWindowActive() : true;
}

View File

@ -122,7 +122,7 @@ public class CFRetainedResource {
* This is utility method which should be used instead of the direct access
* to the {@link #ptr}, because this method guaranteed that the pointer will
* not be zero and will be valid till the end of the operation.It is highly
* recomended to not use any external lock in action. If the current
* recommended to not use any external lock in action. If the current
* {@link #ptr} is {@code 0} then action will be ignored.
*
* @param action The native operation
@ -142,7 +142,7 @@ public class CFRetainedResource {
* This is utility method which should be used instead of the direct access
* to the {@link #ptr}, because this method guaranteed that the pointer will
* not be zero and will be valid till the end of the operation. It is highly
* recomended to not use any external lock in action. If the current
* recommended to not use any external lock in action. If the current
* {@link #ptr} is {@code 0} then action will be ignored and {@code} is
* returned.
*

View File

@ -201,7 +201,7 @@ public class CInputMethod extends InputMethodAdapter {
/**
* Dispatches the event to the input method. If input method support is
* enabled for the focussed component, incoming events of certain types
* enabled for the focused component, incoming events of certain types
* are dispatched to the current input method for this component before
* they are dispatched to the component's methods or event listeners.
* The input method decides whether it needs to handle the event. If it

View File

@ -96,7 +96,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
private static native void nativeExitFullScreenMode(long nsWindowPtr);
static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse();
// Loger to report issues happened during execution but that do not affect functionality
// Logger to report issues happened during execution but that do not affect functionality
private static final PlatformLogger logger = PlatformLogger.getLogger("sun.lwawt.macosx.CPlatformWindow");
private static final PlatformLogger focusLogger = PlatformLogger.getLogger("sun.lwawt.macosx.focus.CPlatformWindow");
@ -1106,7 +1106,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
* Callbacks from the AWTWindow and AWTView objc classes.
*************************************************************/
private void deliverWindowFocusEvent(boolean gained, CPlatformWindow opposite){
// Fix for 7150349: ingore "gained" notifications when the app is inactive.
// Fix for 7150349: ignore "gained" notifications when the app is inactive.
if (gained && !((LWCToolkit)Toolkit.getDefaultToolkit()).isApplicationActive()) {
focusLogger.fine("the app is inactive, so the notification is ignored");
return;

View File

@ -369,7 +369,7 @@ static BOOL shouldUsePressAndHold() {
NSPoint absP = [NSEvent mouseLocation];
// Convert global numbers between Cocoa's coordinate system and Java.
// TODO: need consitent way for doing that both with global as well as with local coordinates.
// TODO: need consistent way for doing that both with global as well as with local coordinates.
// The reason to do it here is one more native method for getting screen dimension otherwise.
NSRect screenRect = [[[NSScreen screens] objectAtIndex:0] frame];
@ -1050,7 +1050,7 @@ static jclass jc_CInputMethod = NULL;
// NSInputContext already did the analysis of the TSM event and created attributes indicating
// the underlining and color that should be done to the string. We need to look at the underline
// style and color to determine what kind of Java hilighting needs to be done.
// style and color to determine what kind of Java highlighting needs to be done.
jstring inProcessText = NSStringToJavaString(env, incomingString);
(*env)->CallVoidMethod(env, fInputMethodLOCKABLE, jm_startIMUpdate, inProcessText);
CHECK_EXCEPTION();
@ -1261,7 +1261,7 @@ static jclass jc_CInputMethod = NULL;
return range;
}
/* This method returns the first frame of rects for theRange in screen coordindate system.
/* This method returns the first frame of rects for theRange in screen coordinate system.
*/
- (NSRect) firstRectForCharacterRange:(NSRange)theRange actualRange:(NSRangePointer)actualRange
{

View File

@ -549,7 +549,7 @@ AWT_ASSERT_APPKIT_THREAD;
return isVisible;
}
// Orders window's childs based on the current focus state
// Orders window children based on the current focus state
- (void) orderChildWindows:(BOOL)focus {
AWT_ASSERT_APPKIT_THREAD;
@ -685,7 +685,7 @@ AWT_ASSERT_APPKIT_THREAD;
: [self standardFrame];
}
// Hides/shows window's childs during iconify/de-iconify operation
// Hides/shows window children during iconify/de-iconify operation
- (void) iconifyChildWindows:(BOOL)iconify {
AWT_ASSERT_APPKIT_THREAD;

View File

@ -71,7 +71,7 @@ JNI_COCOA_ENTER(env);
NSURL *url = [NSURL fileURLWithPath:(NSString *)path];
// This byzantine workaround is necesary, or else directories won't open in Finder
// This byzantine workaround is necessary, or else directories won't open in Finder
url = (NSURL *)CFURLCreateWithFileSystemPath(NULL, (CFStringRef)[url path], kCFURLPOSIXPathStyle, false);
LSLaunchFlags flags = kLSLaunchDefaults;

View File

@ -556,7 +556,7 @@ static BOOL sNeedsEnter;
// Convert drag operation to Java:
jint dragOp = [DnDUtilities mapNSDragOperationToJava:sDragOperation];
// Drag success must acount for DragOperationNone:
// Drag success must account for DragOperationNone:
jboolean success = (dragOp != java_awt_dnd_DnDConstants_ACTION_NONE);
// We have a problem here... we don't send DragSource dragEnter/Exit messages outside of our own process

View File

@ -36,7 +36,7 @@
#define DEFAULT_DEVICE_DPI 72
/*
* Convert the mode string to the more convinient bits per pixel value
* Convert the mode string to the more convenient bits per pixel value
*/
static int getBPPFromModeString(CFStringRef mode)
{

View File

@ -23,7 +23,7 @@
* questions.
*/
// Native side of the Quartz text pipe, paints on Quartz Surface Datas.
// Native side of the Quartz text pipe, paints on Quartz Surface Data.
// Interesting Docs : /Developer/Documentation/Cocoa/TasksAndConcepts/ProgrammingTopics/FontHandling/FontHandling.html
#import "sun_awt_SunHints.h"
@ -315,9 +315,9 @@ static void DrawTextContext
and improve accountability for JNI resources, malloc'd memory, and error handling.
Each stage of the pipeline is responsible for doing only one major thing, like allocating buffers,
aquiring transform arrays from JNI, filling buffers, or striking glyphs. All resources or memory
acquiring transform arrays from JNI, filling buffers, or striking glyphs. All resources or memory
acquired at a given stage, must be released in that stage. Any error that occurs (like a failed malloc)
is to be handled in the stage it occurs in, and is to return immediatly after freeing it's resources.
is to be handled in the stage it occurs in, and is to return immediately after freeing its resources.
-----------------------------------*/
@ -411,7 +411,7 @@ void JavaCT_GetAdvancesForUnichars
}
// Fills the glyph buffer with glyphs from the GlyphVector object. Also checks to see if the glyph's positions have been
// already caculated from GlyphVector, or we simply ask Core Graphics to make some advances for us. Pre-calculated positions
// already calculated from GlyphVector, or we simply ask Core Graphics to make some advances for us. Pre-calculated positions
// are translated into advances, since CG only understands advances.
static inline void doDrawGlyphsPipe_fillGlyphAndAdvanceBuffers
(JNIEnv *env, QuartzSDOps *qsdo, const AWTStrike *strike, jobject gVector, CGGlyph *glyphs, int *uniChars, CGSize *advances, size_t length, jintArray glyphsArray)

View File

@ -55,7 +55,7 @@
@end
// Global debugging flag (for drag-and-drop) - this can be overriden locally per file:
// Global debugging flag (for drag-and-drop) - this can be overridden locally per file:
#ifndef DND_DEBUG
// #define DND_DEBUG TRUE
#endif

View File

@ -90,12 +90,12 @@ struct _ImageSDOps
UInt32* lutData;
UInt32 lutDataSize;
// Used as a cached image ref created from the isdo.dataprovider. This is only a chached image, and it might become invalid
// Used as a cached image ref created from the isdo.dataprovider. This is only a cached image, and it might become invalid
// if somebody draws on the bitmap context, or the pixels are changed in java. In that case, we need to NULL out
// this image and recreate it from the data provider.
CGImageRef imgRef;
// Cached instance of CGDataProvider. dataProvider is alloced the first time a bitmap context is created, providing the
// Cached instance of CGDataProvider. dataProvider is allocated the first time a bitmap context is created, providing the
// native pixels as a source of the data. The dataProviders life cycle is the same as ISDO. The reference gets
// released when we are done with the ISDO.
CGDataProviderRef dataProvider;

View File

@ -767,7 +767,7 @@ PRINT(" copyARGB_PRE_32bitToGray_16bit")
// 1. first "dither" the true color down by creating a 16 bit value of the real color that will serve as an index into the cache of indexes
// 2. if the cache has a valid entry use it otherwise go through 3 and 4
// 3. go through the color table and calculate Euclidian distance between the true color and the indexed colors
// 3. go through the color table and calculate Euclidean distance between the true color and the indexed colors
// 4. map the shortest distance into the one and true index color and stick it into the dst (and cache)
IMAGE_SURFACE_INLINE UInt16* copyARGB_PRE_bitToIndexed_8bit(jint w, jint h, jint nativePixelsBytesPerRow, Pixel32bit *pixelsSrc, jint javaPixelsBytesPerRow, jint javaPixelBytes, Pixel8bit *pixelsDst, Pixel32bit* lutdata, UInt32 lutDataSize, UInt16 *indexedColorTable)
{
@ -1022,7 +1022,7 @@ PRINT("syncFromJavaPixels")
size_t bitsPerComponent = isdo->imageInfo.bitsPerComponent;
size_t bitsPerPixel = isdo->imageInfo.bitsPerPixel;
size_t bytesPerRow = 0;
size_t extraBytesPerRow = 0; // these are the extra bytesPerRow used for alignement
size_t extraBytesPerRow = 0; // these are the extra bytesPerRow used for alignment
switch (isdo->type)
{

View File

@ -92,8 +92,8 @@ void setCachedColor(QuartzSDOps *qsdo, UInt32 color)
CGColorRef cgColor = NULL;
// The colors passed have low randomness. That means we need to scramble the bits of the color
// to produce a good hash key. After some analysis, it looks like Thomas's Wang integer hasing algorithm
// seems a nice trade off between performance and effectivness.
// to produce a good hash key. After some analysis, it looks like Thomas's Wang integer hashing algorithm
// seems a nice trade-off between performance and effectiveness.
UInt32 index = color;
index += ~(index << 15);
index ^= (index >> 10);
@ -684,7 +684,7 @@ PRINT(" SetUpCGContext")
{
qsdo->graphicsStateInfo.ctm = ctm;
// In CG affine xforms y' = bx+dy+ty
// We need to flip both y coefficeints to flip the offset point into the java coordinate system.
// We need to flip both y coefficients to flip the offset point into the java coordinate system.
ctm.b = -ctm.b; ctm.d = -ctm.d; ctm.tx = 0.0f; ctm.ty = 0.0f;
CGPoint offsets = {kOffset, kOffset};
CGAffineTransform inverse = CGAffineTransformInvert(ctm);

View File

@ -404,7 +404,7 @@ CGGI_GetRenderingMode(const AWTStrike *strike)
}
#pragma mark --- Canvas Managment ---
#pragma mark --- Canvas Management ---
/*
* Creates a new canvas of a fixed size, and initializes the CGContext as
@ -728,7 +728,7 @@ CGGI_CreateImageForUnicode
}
#pragma mark --- GlyphInfo Filling and Canvas Managment ---
#pragma mark --- GlyphInfo Filling and Canvas Management ---
/*
* Sets all the per-run properties for the canvas, and then iterates through
@ -837,7 +837,7 @@ CGGI_FillImagesForGlyphs(jlong *glyphInfos, const AWTStrike *strike,
*
* Creates a GlyphInfo struct with a malloc that also encapsulates the
* image the struct points to. This is done to meet memory layout
* expectations in the Sun text rasterizer memory managment code.
* expectations in the Sun text rasterizer memory management code.
* The image immediately follows the struct physically in memory.
*/
static inline void

View File

@ -765,7 +765,7 @@ MTLBlitLoops_SurfaceToSwBlit(JNIEnv *env, MTLContext *mtlc,
} else {
// mtlbuf.contents have smaller dimensions than pDst
// copy each row from mtlbuf.contents at appropriate position in pDst
// Note : pDst is already addjusted for offsets using PtrAddBytes above
// Note : pDst is already adjusted for offsets using PtrAddBytes above
NSUInteger rowSize = w * dstInfo.pixelStride;
for (int y = 0; y < height; y++) {
@ -833,7 +833,7 @@ MTLBlitLoops_CopyArea(JNIEnv *env,
/*
* We need to consider common states like clipping while
* performing copyArea, thats why we use drawTex2Tex and
* performing copyArea, that's why we use drawTex2Tex and
* get encoder with appropriate state from EncoderManager
* and not directly use MTLBlitCommandEncoder for texture copy.
*/

View File

@ -60,7 +60,7 @@ Java_sun_java2d_metal_MTLGraphicsConfig_isMetalFrameworkAvailable
{
jboolean metalSupported = JNI_FALSE;
// It is guranteed that metal supported GPU is available macOS 10.14 onwards
// It is guaranteed that metal supported GPU is available since macOS 10.14
if (@available(macOS 10.14, *)) {
metalSupported = JNI_TRUE;
}
@ -135,7 +135,7 @@ JNI_COCOA_ENTER(env);
mtlc = nil;
}
} else {
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLGraphicsConfig_getMTLConfigInfo: could not initialze MTLContext.");
J2dRlsTraceLn(J2D_TRACE_ERROR, "MTLGraphicsConfig_getMTLConfigInfo: could not initialize MTLContext.");
}
}];

View File

@ -83,7 +83,7 @@
- (void) blitTexture {
if (self.ctx == NULL || self.javaLayer == NULL || self.buffer == nil || self.ctx.device == nil) {
J2dTraceLn4(J2D_TRACE_VERBOSE,
"MTLLayer.blitTexture: uninitialized (mtlc=%p, javaLayer=%p, buffer=%p, devide=%p)", self.ctx,
"MTLLayer.blitTexture: uninitialized (mtlc=%p, javaLayer=%p, buffer=%p, device=%p)", self.ctx,
self.javaLayer, self.buffer, ctx.device);
[self stopDisplayLink];
return;

View File

@ -946,7 +946,7 @@ MTLRenderQueue_GetCurrentDestination()
}
/**
* commit earlier encoded commmands
* commit earlier encoded commands
* these would be rendered to the back-buffer - which is read in shader while rendering in XOR mode
*/
void commitEncodedCommands() {

View File

@ -536,7 +536,7 @@ void MTLRenderer_FillSpans(MTLContext *mtlc, BMTLSDOps * dstOps, jint spanCount,
// MTLRenderCommandEncoder setVertexBytes usage is recommended if the data is of 4KB.
// We use a buffer that closely matches the 4KB limit size
// This buffer is resued multiple times to encode draw calls of a triangle list
// This buffer is reused multiple times to encode draw calls of a triangle list
// NOTE : Due to nature of *spans data - it is not possible to use triangle strip.
// We use triangle list to draw spans
@ -554,7 +554,7 @@ void MTLRenderer_FillSpans(MTLContext *mtlc, BMTLSDOps * dstOps, jint spanCount,
return;
}
// This is the max no of vertices (of struct Vertex - 8 bytes) we can accomodate in 4KB
// This is the max no of vertices (of struct Vertex - 8 bytes) we can accommodate in 4KB
const int TOTAL_VERTICES_IN_BLOCK = 510;
struct Vertex vertexList[TOTAL_VERTICES_IN_BLOCK]; // a total of 170 triangles ==> 85 spans

View File

@ -253,9 +253,9 @@ MTLVertexCache_AddMaskQuad(MTLContext *mtlc,
// we need to pick appropriate source subtexture. In repalceRegion
// we can give destination subtexturing properly but we can't
// subtexture from system memory glyph we have. So in such
// cases we are creating seperate tile and scan the source
// cases we are creating a separate tile and scan the source
// stride into destination using memcpy. In case of OpenGL we
// can update source pointers, in case of D3D we ar doing memcpy.
// can update source pointers, in case of D3D we are doing memcpy.
// We can use MTLBuffer and then copy source subtexture but that
// adds extra blitting logic.
// TODO : Research more and try removing memcpy logic.

View File

@ -29,7 +29,7 @@
#include <jni.h>
#include "MTLSurfaceDataBase.h"
// Utility struct to transfer rendering paramenters
// Utility struct to transfer rendering parameters
typedef struct {
jboolean isTexture;
jboolean isAA;

View File

@ -73,7 +73,7 @@ INT32 MIDI_OUT_CloseDevice(MidiDeviceHandle* handle) {
// issue a "SUSTAIN OFF" message to each MIDI channel, 0 to 15.
// "CONTROL CHANGE" is 176, "SUSTAIN CONTROLLER" is 64, and the value is 0.
// $$fb 2002-04-04: It is responsability of the application developer to
// $$fb 2002-04-04: It is the responsibility of the application developer to
// leave the device in a consistent state. So I put this in comments
/*
for (channel = 0; channel < 16; channel++)

View File

@ -57,7 +57,7 @@ static const char* strMIDIInvalidPort =
static const char* strMIDIWrongEndpointType =
"A source endpoint was passed to a function expecting a destination, or vice versa.";
static const char* strMIDINoConnection =
"Attempt to close a non-existant connection.";
"Attempt to close a non-existent connection.";
static const char* strMIDIUnknownEndpoint =
"An invalid MIDIEndpointRef was passed.";
static const char* strMIDIUnknownProperty =

View File

@ -175,7 +175,7 @@ void DAUDIO_GetFormats(INT32 mixerIndex, INT32 deviceID, int isSource, void* cre
defSampleRate, // sample rate
DAUDIO_PCM, // PCM
TRUE, // signed
UTIL_IsBigEndianPlatform()); // native endianess
UTIL_IsBigEndianPlatform()); // native endianness
}
TRACE0("<<DAUDIO_GetFormats\n");
@ -848,7 +848,7 @@ void* DAUDIO_Open(INT32 mixerIndex, INT32 deviceID, int isSource,
if (fabs(sampleRate - hardwareSampleRate) > 1) {
device->resampler = new Resampler();
// request HAL for Float32 with native endianess
// request HAL for Float32 with native endianness
FillASBDForNonInterleavedPCM(device->asbd, hardwareSampleRate, channels, 32, true, false, kAudioFormatFlagsNativeEndian != 0);
} else {
sampleRate = hardwareSampleRate; // in case sample rates are not exactly equal

View File

@ -324,7 +324,7 @@ SplashRedrawWindow(Splash * splash) {
// the 'wait cursor'. So that is undoable.
//TODO: only the first image in an animated gif preserves transparency.
// Loos like the splash->screenData contains inappropriate data
// Looks like the splash->screenData contains inappropriate data
// for all but the first frame.
[image release];

View File

@ -100,7 +100,7 @@ final class ArrayElementHandler extends NewElementHandler {
/**
* Calculates the value of this element
* if the lentgh attribute is set.
* if the length attribute is set.
*/
@Override
public void startElement() {

View File

@ -230,18 +230,18 @@ public final class DocumentHandler extends DefaultHandler {
}
/**
* Returns the array of readed objects.
* Returns the array of read objects.
*
* @return the array of readed objects
* @return the array of read objects
*/
public Object[] getObjects() {
return this.objects.toArray();
}
/**
* Adds the object to the list of readed objects.
* Adds the object to the list of read objects.
*
* @param object the object that is readed from XML document
* @param object the object that is read from XML document
*/
void addObject(Object object) {
this.objects.add(object);

View File

@ -151,7 +151,7 @@ final class FieldElementHandler extends AccessorElementHandler {
* @param bean the context bean that contains field
* @param name the name of the field
* @return the value of the field
* @throws IllegalAccessException if the field is not accesible
* @throws IllegalAccessException if the field is not accessible
* @throws NoSuchFieldException if the field is not found
*/
static Object getFieldValue(Object bean, String name) throws IllegalAccessException, NoSuchFieldException {
@ -165,7 +165,7 @@ final class FieldElementHandler extends AccessorElementHandler {
* @param bean the context bean that contains field
* @param name the name of the field
* @param value the new value for the field
* @throws IllegalAccessException if the field is not accesible
* @throws IllegalAccessException if the field is not accessible
* @throws NoSuchFieldException if the field is not found
*/
private static void setFieldValue(Object bean, String name, Object value) throws IllegalAccessException, NoSuchFieldException {

View File

@ -80,7 +80,7 @@ final class JavaElementHandler extends ElementHandler {
}
/**
* Adds the argument to the list of readed objects.
* Adds the argument to the list of read objects.
*
* @param argument the value of the element that contained in this one
*/

View File

@ -162,7 +162,7 @@ final class PropertyElementHandler extends AccessorElementHandler {
* @param name the name of the property
* @param index the index of the indexed property
* @return the value of the property
* @throws IllegalAccessException if the property is not accesible
* @throws IllegalAccessException if the property is not accessible
* @throws IntrospectionException if the bean introspection is failed
* @throws InvocationTargetException if the getter cannot be invoked
* @throws NoSuchMethodException if the getter is not found
@ -187,7 +187,7 @@ final class PropertyElementHandler extends AccessorElementHandler {
* @param name the name of the property
* @param index the index of the indexed property
* @param value the new value for the property
* @throws IllegalAccessException if the property is not accesible
* @throws IllegalAccessException if the property is not accessible
* @throws IntrospectionException if the bean introspection is failed
* @throws InvocationTargetException if the setter cannot be invoked
* @throws NoSuchMethodException if the setter is not found

View File

@ -62,7 +62,7 @@ public class StringElementHandler extends ElementHandler {
@Override
public final void addCharacter(char ch) {
if (this.sb == null) {
throw new IllegalStateException("Could not add chararcter to evaluated string element");
throw new IllegalStateException("Could not add character to evaluated string element");
}
this.sb.append(ch);
}

View File

@ -67,13 +67,13 @@ public class ColorEditor extends Panel implements PropertyEditor {
text.reshape(ourWidth,0,100,30);
ourWidth += 100 + hPad;
choser = new Choice();
chooser = new Choice();
int active = 0;
for (int i = 0; i < colorNames.length; i++) {
choser.addItem(colorNames[i]);
chooser.addItem(colorNames[i]);
}
add(choser);
choser.reshape(ourWidth,0,100,30);
add(chooser);
chooser.reshape(ourWidth,0,100,30);
ourWidth += 100 + hPad;
resize(ourWidth,40);
@ -126,8 +126,8 @@ public class ColorEditor extends Panel implements PropertyEditor {
@SuppressWarnings("deprecation")
public boolean action(Event e, Object arg) {
if (e.target == choser) {
changeColor(colors[choser.getSelectedIndex()]);
if (e.target == chooser) {
changeColor(colors[chooser.getSelectedIndex()]);
}
return false;
}
@ -157,7 +157,7 @@ public class ColorEditor extends Panel implements PropertyEditor {
active = i;
}
}
choser.select(active);
chooser.select(active);
sample.setBackground(color);
sample.repaint();
@ -226,7 +226,7 @@ public class ColorEditor extends Panel implements PropertyEditor {
private Color color;
private TextField text;
private Choice choser;
private Choice chooser;
private PropertyChangeSupport support = new PropertyChangeSupport(this);
}

View File

@ -655,7 +655,7 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
if (bitsPerPixel == 0 ||
compression == BI_JPEG || compression == BI_PNG )
{
// the colorModel and sampleModel will be initialzed
// the colorModel and sampleModel will be initialized
// by the reader of embedded image
colorModel = null;
sampleModel = null;
@ -2082,7 +2082,7 @@ public class BMPImageReader extends ImageReader implements BMPConstants {
private static Boolean isWindowsPlatform = null;
/**
* Verifies whether the byte array contans a unc path.
* Verifies whether the byte array contains a unc path.
* Non-UNC path examples:
* c:\path\to\file - simple notation
* \\?\c:\path\to\file - long notation

View File

@ -39,7 +39,7 @@ public class BMPImageReaderSpi extends ImageReaderSpi {
private static String [] writerSpiNames =
{"com.sun.imageio.plugins.bmp.BMPImageWriterSpi"};
private static String[] formatNames = {"bmp", "BMP"};
private static String[] entensions = {"bmp"};
private static String[] extensions = {"bmp"};
private static String[] mimeType = {"image/bmp"};
private boolean registered = false;
@ -48,7 +48,7 @@ public class BMPImageReaderSpi extends ImageReaderSpi {
super("Oracle Corporation",
"1.0",
formatNames,
entensions,
extensions,
mimeType,
"com.sun.imageio.plugins.bmp.BMPImageReader",
new Class<?>[] { ImageInputStream.class },

View File

@ -986,7 +986,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
/// Absolute Encoding for less than 3
/// treated as regular encoding
/// Do not include the last element since it will
/// be inclued in the next encoding/run
/// be included in the next encoding/run
for (int b=0;b<absVal;b++){
stream.writeByte(1);
stream.writeByte(absBuf[b]);
@ -1145,7 +1145,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
}
} else {
// odd runlength and the run ends here
// runCount wont be > 254 since 256/255 case will
// runCount won't be > 254 since 256/255 case will
// be taken care of in above code.
runCount++;
pixel = ( runVal1 << 4) | runVal2;
@ -1418,8 +1418,8 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
/*
* Returns preferred compression type for given image.
* The default compression type is BI_RGB, but some image types can't be
* encodeed with using default compression without cahnge color resolution.
* For example, TYPE_USHORT_565_RGB may be encodeed only by using BI_BITFIELDS
* encoded using default compression without change of color resolution.
* For example, TYPE_USHORT_565_RGB may be encoded only by using BI_BITFIELDS
* compression type.
*
* NB: we probably need to extend this method if we encounter other image

View File

@ -44,7 +44,7 @@ public class BMPImageWriterSpi extends ImageWriterSpi {
private static String [] readerSpiNames =
{"com.sun.imageio.plugins.bmp.BMPImageReaderSpi"};
private static String[] formatNames = {"bmp", "BMP"};
private static String[] entensions = {"bmp"};
private static String[] extensions = {"bmp"};
private static String[] mimeType = {"image/bmp"};
private boolean registered = false;
@ -53,7 +53,7 @@ public class BMPImageWriterSpi extends ImageWriterSpi {
super("Oracle Corporation",
"1.0",
formatNames,
entensions,
extensions,
mimeType,
"com.sun.imageio.plugins.bmp.BMPImageWriter",
new Class<?>[] { ImageOutputStream.class },

View File

@ -32,7 +32,7 @@ import java.io.PrintStream;
* Extracted from GIFEncoder by Adam Doppelt
* Comments added by Robin Luiten
* {@code expandCode} added by Robin Luiten
* The strLen table to give quick access to the lenght of an expanded
* The strLen table to give quick access to the length of an expanded
* code for use by the {@code expandCode} method added by Robin.
**/
public class LZWStringTable {
@ -73,7 +73,7 @@ public class LZWStringTable {
* @param index value of -1 indicates no predecessor [used in initialisation]
* @param b the byte [character] to add to the string store which follows
* the predecessor string specified the index.
* @return 0xFFFF if no space in table left for addition of predecesor
* @return 0xFFFF if no space in table left for addition of predecessor
* index and byte b. Else return the code allocated for combination index + b.
*/
public int addCharString(short index, byte b) {
@ -103,7 +103,7 @@ public class LZWStringTable {
/*
* @param index index to prefix string
* @param b the character that follws the index prefix
* @param b the character that follows the index prefix
* @return b if param index is HASH_FREE. Else return the code
* for this prefix and byte successor
*/
@ -151,7 +151,7 @@ public class LZWStringTable {
* to buf and the return value indicates how much of the expanded code has
* been written to the buf. The next call to expandCode() should be with
* the same code and have the skip parameter set the negated value of the
* previous return. Succesive negative return values should be negated and
* previous return. Successive negative return values should be negated and
* added together for next skip parameter value with same code.
*
* @param buf buffer to place expanded data into

View File

@ -198,7 +198,7 @@ public class PaletteBuilder {
if (transparency != Transparency.OPAQUE &&
aColor.getAlpha() != 0xff)
{
return 0; // default transparnt pixel
return 0; // default transparent pixel
}
if (aNode.isLeaf) {

View File

@ -632,7 +632,7 @@ public class GIFImageWriter extends ImageWriter {
imageMetadata.transparentColorIndex = index;
}
/* NB: transparentColorFlag might have not beed reset for
greyscale images but explicitly reseting it here
greyscale images but explicitly resetting it here
is potentially not right thing to do until we have way
to find whether current value was explicitly set by
the user.
@ -659,7 +659,7 @@ public class GIFImageWriter extends ImageWriter {
streamMetadata.version = "89a";
}
// Set the Logical Screen Desriptor if not set.
// Set the Logical Screen Descriptor if not set.
if (streamMetadata.logicalScreenWidth ==
GIFMetadata.UNDEFINED_INTEGER_VALUE)
{

View File

@ -49,7 +49,7 @@ public class GIFStreamMetadataFormatResources extends ListResourceBundle {
{ "LogicalScreenDescriptor/logicalScreenHeight",
"The height in pixels of the whole picture" },
{ "LogicalScreenDescriptor/colorResolution",
"The number of bits of color resolution, beteen 1 and 8" },
"The number of bits of color resolution, between 1 and 8" },
{ "LogicalScreenDescriptor/pixelAspectRatio",
"If 0, indicates square pixels, else W/H = (value + 15)/64" },
{ "GlobalColorTable/sizeOfGlobalColorTable",

View File

@ -117,7 +117,7 @@ public class JPEG {
/** Define Restart Interval */
public static final int DRI = 0xDD;
/** Define Heirarchical progression */
/** Define Hierarchical progression */
public static final int DHP = 0xDE;
/** Expand reference image(s) */

View File

@ -1388,7 +1388,7 @@ public class JPEGImageWriter extends ImageWriter {
/**
* Collect all the scan info from the given metadata, and
* organize it into the scan info array required by the
* IJG libray. It is much simpler to parse out this
* IJG library. It is much simpler to parse out this
* data in Java and then just copy the data in C.
*/
private int [] collectScans(JPEGMetadata metadata,

View File

@ -332,13 +332,13 @@ public class PNGImageReader extends ImageReader {
if (metadata.PLTE_present) {
processWarningOccurred(
"A PNG image may not contain more than one PLTE chunk.\n" +
"The chunk wil be ignored.");
"The chunk will be ignored.");
return;
} else if (metadata.IHDR_colorType == PNG_COLOR_GRAY ||
metadata.IHDR_colorType == PNG_COLOR_GRAY_ALPHA) {
processWarningOccurred(
"A PNG gray or gray alpha image cannot have a PLTE chunk.\n" +
"The chunk wil be ignored.");
"The chunk will be ignored.");
return;
}
@ -1684,7 +1684,7 @@ public class PNGImageReader extends ImageReader {
* 2^bitDepth is legal in the view of PNG spec.
*
* However the spec of createIndexed() method demands the exact
* equality of the palette lengh and number of possible palette
* equality of the palette length and number of possible palette
* entries (2^bitDepth).
*
* {@link javax.imageio.ImageTypeSpecifier.html#createIndexed}
@ -1751,7 +1751,7 @@ public class PNGImageReader extends ImageReader {
case PNG_COLOR_RGB_ALPHA:
if (bitDepth == 8) {
// some standard types of buffered images
// wich can be used as destination
// which can be used as destination
l.add(ImageTypeSpecifier.createFromBufferedImageType(
BufferedImage.TYPE_4BYTE_ABGR));

View File

@ -1775,7 +1775,7 @@ public class PNGMetadata extends IIOMetadata implements Cloneable {
}
/*
* Accrding to PNG spec, keywords are restricted to 1 to 79 bytes
* According to PNG spec, keywords are restricted to 1 to 79 bytes
* in length. Keywords shall contain only printable Latin-1 characters
* and spaces; To reduce the chances for human misreading of a keyword,
* leading spaces, trailing spaces, and consecutive spaces are not

View File

@ -71,7 +71,7 @@ public abstract class TIFFCompressor {
* Creates a compressor object for use in compressing TIFF data.
*
* <p>The parameters {@code compressionTagValue} and
* {@code isCompressionLossless} are provided to accomodate
* {@code isCompressionLossless} are provided to accommodate
* compression types which are unknown. A compression type is
* "known" if it is either among those already supported by the
* TIFF writer (see {@link TIFFImageWriteParam}), or is listed in

View File

@ -1432,7 +1432,7 @@ class TIFFFaxDecompressor extends TIFFDecompressor {
int ces = this.changingElemSize;
// If the previous match was at an odd element, we still
// have to search the preceeding element.
// have to search the preceding element.
// int start = lastChangingElement & ~0x1;
int start = lastChangingElement > 0 ? lastChangingElement - 1 : 0;
if (isWhite) {

View File

@ -35,7 +35,7 @@ public class TIFFImageMetadataFormatResources extends ListResourceBundle {
{ "TIFFIFD/parentTagName",
"A mnemonic name for the field pointing to this IFD, if known" },
{ "TIFFField", "A field containing data" },
{ "TIFFField/number", "The tag number asociated with the field" },
{ "TIFFField/number", "The tag number associated with the field" },
{ "TIFFField/name",
"A mnemonic name associated with the field, if known" },

View File

@ -181,7 +181,7 @@ public class TIFFImageWriter extends ImageWriter {
private boolean isImageSimple; // Whether image can be copied into directly
private boolean isInverted; // Whether photometric inversion is required
private boolean isTiled; // Whether the image is tiled (true) or stipped (false).
private boolean isTiled; // Whether the image is tiled (true) or stripped (false).
private int nativePhotometricInterpretation;
private int photometricInterpretation;

View File

@ -173,7 +173,7 @@ public class TIFFJPEGCompressor extends TIFFBaseJPEGCompressor {
// Initialize JPEG writer to one supporting abbreviated streams.
if(JPEGTablesField != null) {
// Intialize the JPEG writer to one that supports stream
// Initialize the JPEG writer to one that supports stream
// metadata, i.e., abbreviated streams, and may or may not
// support image metadata.
initJPEGWriter(true, false);

View File

@ -78,7 +78,7 @@ public class TIFFOldJPEGDecompressor extends TIFFJPEGDecompressor {
public TIFFOldJPEGDecompressor() {}
//
// Intialize instance variables according to an analysis of the
// Initialize instance variables according to an analysis of the
// TIFF field content. See bug 4929147 for test image information.
//
// Case 1: Image contains a single strip or tile and the offset to

View File

@ -39,7 +39,7 @@ public class TIFFRLECompressor extends TIFFFaxCompressor {
/**
* Encode a row of data using Modified Huffman Compression also known as
* CCITT RLE (Run Lenth Encoding).
* CCITT RLE (Run Length Encoding).
*
* @param data The row of data to compress.
* @param rowOffset Starting index in {@code data}.

View File

@ -41,7 +41,7 @@ public class WBMPImageReaderSpi extends ImageReaderSpi {
private static String [] writerSpiNames =
{"com.sun.imageio.plugins.wbmp.WBMPImageWriterSpi"};
private static String[] formatNames = {"wbmp", "WBMP"};
private static String[] entensions = {"wbmp"};
private static String[] extensions = {"wbmp"};
private static String[] mimeType = {"image/vnd.wap.wbmp"};
private boolean registered = false;
@ -50,7 +50,7 @@ public class WBMPImageReaderSpi extends ImageReaderSpi {
super("Oracle Corporation",
"1.0",
formatNames,
entensions,
extensions,
mimeType,
"com.sun.imageio.plugins.wbmp.WBMPImageReader",
new Class<?>[] { ImageInputStream.class },

View File

@ -43,7 +43,7 @@ public class WBMPImageWriterSpi extends ImageWriterSpi {
private static String [] readerSpiNames =
{"com.sun.imageio.plugins.wbmp.WBMPImageReaderSpi"};
private static String[] formatNames = {"wbmp", "WBMP"};
private static String[] entensions = {"wbmp"};
private static String[] extensions = {"wbmp"};
private static String[] mimeType = {"image/vnd.wap.wbmp"};
private boolean registered = false;
@ -52,7 +52,7 @@ public class WBMPImageWriterSpi extends ImageWriterSpi {
super("Oracle Corporation",
"1.0",
formatNames,
entensions,
extensions,
mimeType,
"com.sun.imageio.plugins.wbmp.WBMPImageWriter",
new Class<?>[] { ImageOutputStream.class },

View File

@ -42,7 +42,7 @@ import javax.swing.RepaintManager;
* A collection of utility methods for Swing.
* <p>
* <b>WARNING:</b> While this class is public, it should not be treated as
* public API and its API may change in incompatable ways between dot dot
* public API and its API may change in incompatible ways between dot dot
* releases and even patch releases. You should not rely on this class even
* existing.
*

View File

@ -140,7 +140,7 @@ public class GTKColorType extends ColorType {
* @param color Color to alter
* @param hFactor Amount to scale the hue
* @param lFactor Amount to scale the lightness
* @param sFactor Amount to sacle saturation
* @param sFactor Amount to scale saturation
* @return newly created color
*/
static Color adjustColor(Color color, float hFactor, float lFactor,

View File

@ -291,7 +291,7 @@ class GTKEngine {
} else if (c instanceof JSeparator) {
JSeparator separator = (JSeparator)c;
/* We should return correrct WidgetType if the seperator is inserted
/* We should return correct WidgetType if the separator is inserted
* in Menu/PopupMenu/ToolBar. BugID: 6465603
*/
if (separator.getParent() instanceof JPopupMenu) {

View File

@ -1383,7 +1383,7 @@ class GTKFileChooserUI extends SynthFileChooserUI {
public class FilterComboBoxRenderer extends DefaultListCellRenderer {
public String getName() {
// As SynthComboBoxRenderer's are asked for a size BEFORE they
// are parented getName is overriden to force the name to be
// are parented getName is overridden to force the name to be
// ComboBox.renderer if it isn't set. If we didn't do this the
// wrong style could be used for size calculations.
String name = super.getName();

View File

@ -1356,7 +1356,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
// colors specific only for GTK
// It is impossible to create a simple GtkWidget without specifying the
// type. So for GtkWidget we can use any appropriate concrete type of
// wigdet. LABEL in this case.
// widget. LABEL in this case.
GTKStyle widgetStyle = (GTKStyle)factory.getStyle(null, Region.LABEL);
Color bg = widgetStyle.getGTKColor(SynthConstants.ENABLED,
GTKColorType.BACKGROUND);

View File

@ -94,7 +94,7 @@ public class MotifComboBoxUI extends BasicComboBoxUI implements Serializable {
}
/**
* Overriden to empty the MouseMotionListener.
* Overridden to empty the MouseMotionListener.
*/
@SuppressWarnings("serial") // Superclass is not serializable across versions
protected class MotifComboPopup extends BasicComboPopup {

View File

@ -77,7 +77,7 @@ public class MotifScrollPaneUI extends BasicScrollPaneUI
JScrollBar vsb = pane.getVerticalScrollBar();
if (vsb != null && vsbBorder != null &&
vsb.getBorder() == vsbBorder) {
// The Border on the verticall scrollbar matches
// The Border on the vertical scrollbar matches
// what we installed, reset it.
if (pane.getComponentOrientation().isLeftToRight()) {
vsbBorder = new CompoundBorder(vsbMarginBorderR,

View File

@ -82,7 +82,7 @@ public class MotifSplitPaneDivider extends BasicSplitPaneDivider
/**
* overrides to hardcode the size of the divider
* PENDING(jeff) - rewrite JSplitPane so that this ins't needed
* PENDING(jeff) - rewrite JSplitPane so that this isn't needed
*/
public void setDividerSize(int newSize) {
Insets insets = getInsets();
@ -185,7 +185,7 @@ public class MotifSplitPaneDivider extends BasicSplitPaneDivider
/**
* Sets the SplitPaneUI that is using the receiver. This is completely
* overriden from super to create a different MouseHandler.
* overridden from super to create a different MouseHandler.
*/
public void setBasicSplitPaneUI(BasicSplitPaneUI newUI) {
if (splitPane != null) {

View File

@ -69,7 +69,7 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
private volatile boolean open;
private int openRefCount;
/** List of Receivers and Transmitters that opened the device implicitely.
/** List of Receivers and Transmitters that opened the device implicitly.
*/
private List<Object> openKeepingObjects;
@ -127,7 +127,7 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
openRefCount++;
getOpenKeepingObjects().add(object);
}
// double calls to doOpens() will be catched by the open flag.
// double calls to doOpens() will be caught by the open flag.
doOpen();
}
}
@ -149,16 +149,16 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
}
}
/** Close the device for an object that implicitely opened it.
/** Close the device for an object that implicitly opened it.
* This method is intended to be used by Transmitter.close() and Receiver.close().
* Those methods should pass this for the object parameter. Since Transmitters or Receivers
* do not know if their device has been opened implicitely because of them, they call this
* method in any case. This method now is able to seperate Receivers/Transmitters that opened
* the device implicitely from those that didn't by looking up the R/T in the
* do not know if their device has been opened implicitly because of them, they call this
* method in any case. This method now is able to separate Receivers/Transmitters that opened
* the device implicitly from those that didn't by looking up the R/T in the
* openKeepingObjects list. Only if the R/T is contained there, the reference count is
* reduced.
*
* @param object The object that might have been opening the device implicitely (for now,
* @param object The object that might have been opening the device implicitly (for now,
* this may be a Transmitter or receiver).
*/
public final void closeInternal(Object object) {
@ -342,7 +342,7 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
return transmitter;
}
/** Return the list of objects that have opened the device implicitely.
/** Return the list of objects that have opened the device implicitly.
*/
private synchronized List<Object> getOpenKeepingObjects() {
if (openKeepingObjects == null) {
@ -434,7 +434,7 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
Subclasses that use Receivers must use this base class, since it
contains magic necessary to manage implicit closing the device.
This is necessary for Receivers retrieved via MidiSystem.getReceiver()
(which opens the device implicitely).
(which opens the device implicitly).
*/
abstract class AbstractReceiver implements MidiDeviceReceiver {
private volatile boolean open = true;

View File

@ -35,7 +35,7 @@ import javax.sound.sampled.AudioFormat.Encoding;
/**
* This class is used to convert between 8,16,24,32,32+ bit signed/unsigned
* big/litle endian fixed/floating point byte buffers and float buffers.
* big/little endian fixed/floating point byte buffers and float buffers.
*
* @author Karl Helgason
*/

View File

@ -39,7 +39,7 @@ import javax.sound.sampled.spi.FormatConversionProvider;
/**
* This class is used to convert between 8,16,24,32 bit signed/unsigned
* big/litle endian fixed/floating stereo/mono/multi-channel audio streams and
* big/little endian fixed/floating stereo/mono/multi-channel audio streams and
* perform sample-rate conversion if needed.
*
* @author Karl Helgason

View File

@ -71,7 +71,7 @@ public final class DLSInfo {
*/
public String artist = null;
/**
* (ICMS) Names of persons or orginizations who commissioned the file.
* (ICMS) Names of persons or organizations who commissioned the file.
*/
public String commissioned = null;
/**
@ -94,7 +94,7 @@ public final class DLSInfo {
*/
public String subject = null;
/**
* (ISRC) Name of person or orginization who supplied
* (ISRC) Name of person or organization who supplied
* original material for the file.
*/
public String source = null;

View File

@ -1019,7 +1019,7 @@ final class DirectAudioDevice extends AbstractMixer {
synchronized (mixer) {
if (isOpen()) {
throw new IllegalStateException("Clip is already open with format " + getFormat() +
" and frame lengh of " + getFrameLength());
" and frame length of " + getFrameLength());
} else {
// if the line is not currently open, try to open it with this format and buffer size
this.audioData = data;
@ -1041,7 +1041,7 @@ final class DirectAudioDevice extends AbstractMixer {
throw e;
}
// if we got this far, we can instanciate the thread
// if we got this far, we can instantiate the thread
int priority = Thread.NORM_PRIORITY
+ (Thread.MAX_PRIORITY - Thread.NORM_PRIORITY) / 3;
thread = JSSecurityManager.createThread(this,
@ -1071,7 +1071,7 @@ final class DirectAudioDevice extends AbstractMixer {
if (isOpen()) {
throw new IllegalStateException("Clip is already open with format " + getFormat() +
" and frame lengh of " + getFrameLength());
" and frame length of " + getFrameLength());
}
int lengthInFrames = (int)stream.getFrameLength();
int bytesRead = 0;
@ -1212,7 +1212,7 @@ final class DirectAudioDevice extends AbstractMixer {
// if the end position is less than the start position, throw IllegalArgumentException
if (end < start) {
throw new IllegalArgumentException("End position " + end + " preceeds start position " + start);
throw new IllegalArgumentException("End position " + end + " precedes start position " + start);
}
// slight race condition with the run() method, but not a big problem

View File

@ -79,7 +79,7 @@ public final class JavaSoundAudioClip implements AudioClip, MetaEventListener, L
/**
* used for determining how many samples is the
* threshhold between playing as a Clip and streaming
* threshold between playing as a Clip and streaming
* from the file.
*
* $$jb: 11.07.99: the engine has a limit of 1M

View File

@ -54,7 +54,7 @@ final class Printer {
* And in fact if should be implemented as an assertion, but for
* compatibility reason it just print an error only in case of "internal"
* build. In time its usage should be replaced by some kind of assertion or
* dropped completly.
* dropped completely.
*/
public static void err(String str) {
if (err) {

View File

@ -782,7 +782,7 @@ final class RealTimeSequencer extends AbstractMidiDevice
@Override
protected synchronized void implClose() {
if (playThread == null) {
if (Printer.err) Printer.err("RealTimeSequencer.implClose() called, but playThread not instanciated!");
if (Printer.err) Printer.err("RealTimeSequencer.implClose() called, but playThread not instantiated!");
} else {
// Interrupt playback loop.
playThread.close();
@ -816,7 +816,7 @@ final class RealTimeSequencer extends AbstractMidiDevice
void implStart() {
if (playThread == null) {
if (Printer.err) Printer.err("RealTimeSequencer.implStart() called, but playThread not instanciated!");
if (Printer.err) Printer.err("RealTimeSequencer.implStart() called, but playThread not instantiated!");
return;
}
@ -829,7 +829,7 @@ final class RealTimeSequencer extends AbstractMidiDevice
void implStop() {
if (playThread == null) {
if (Printer.err) Printer.err("RealTimeSequencer.implStop() called, but playThread not instanciated!");
if (Printer.err) Printer.err("RealTimeSequencer.implStop() called, but playThread not instantiated!");
return;
}

View File

@ -1473,7 +1473,7 @@ public final class SoftChannel implements MidiChannel, ModelDirectedPlayer {
for (int controller : co_midi_nrpn_nrpn.keySet())
nrpnChange(controller, 0);
rpnChange(0, 2 << 7); // Pitch Bend sensitivity
rpnChange(1, 64 << 7); // Channel fine tunning
rpnChange(1, 64 << 7); // Channel fine tuning
rpnChange(2, 64 << 7); // Channel Coarse Tuning
rpnChange(5, 64); // Modulation Depth, +/- 50 cent

View File

@ -53,7 +53,7 @@ public final class SoftLinearResampler2 extends SoftAbstractResampler {
if (!(ix < ix_end && ox < ox_end))
return;
// 15 bit shift was choosed because
// 15 bit shift was chosen because
// it resulted in no drift between p_ix and ix.
int p_ix = (int) (ix * (1 << 15));
int p_ix_end = (int) (ix_end * (1 << 15));

View File

@ -46,7 +46,7 @@ import javax.sound.sampled.AudioSystem;
*/
public final class SoftMainMixer {
// A private class thats contains a ModelChannelMixer and it's private buffers.
// A private class that contains a ModelChannelMixer and it's private buffers.
// This becomes necessary when we want to have separate delay buffers for each channel mixer.
private static class SoftChannelMixerContainer {
ModelChannelMixer mixer;

View File

@ -315,7 +315,7 @@ public final class SoftMixingClip extends SoftMixingDataLine implements Clip {
IOException {
if (isOpen()) {
throw new IllegalStateException("Clip is already open with format "
+ getFormat() + " and frame lengh of " + getFrameLength());
+ getFormat() + " and frame length of " + getFrameLength());
}
if (AudioFloatConverter.getConverter(stream.getFormat()) == null)
throw new IllegalArgumentException("Invalid format : "
@ -358,7 +358,7 @@ public final class SoftMixingClip extends SoftMixingDataLine implements Clip {
if (isOpen()) {
throw new IllegalStateException(
"Clip is already open with format " + getFormat()
+ " and frame lengh of " + getFrameLength());
+ " and frame length of " + getFrameLength());
}
if (AudioFloatConverter.getConverter(format) == null)
throw new IllegalArgumentException("Invalid format : "

Some files were not shown because too many files have changed in this diff Show More