Merge
This commit is contained in:
commit
22fa775a7e
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -204,7 +204,8 @@ class AquaComboBoxPopup extends BasicComboPopup {
|
||||
if ((p.x + comboBoxBounds.width < 0) || (p.y + comboBoxBounds.height < 0) || (p.x > scrSize.width) || (p.y > scrSize.height)) {
|
||||
return null;
|
||||
}
|
||||
return new Rectangle(0, 22, scrSize.width, scrSize.height - 22);
|
||||
Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(comboBox.getGraphicsConfiguration());
|
||||
return new Rectangle(0, insets.top, scrSize.width, scrSize.height - insets.top - insets.bottom);
|
||||
}
|
||||
|
||||
for (final GraphicsDevice gd : gs) {
|
||||
@ -314,10 +315,17 @@ class AquaComboBoxPopup extends BasicComboPopup {
|
||||
}
|
||||
|
||||
final Rectangle r = new Rectangle(px, py, pw, ph);
|
||||
// Check whether it goes below the bottom of the screen, if so flip it
|
||||
if (r.y + r.height < top.y + scrBounds.y + scrBounds.height) return r;
|
||||
|
||||
return new Rectangle(px, -r.height + comboBoxInsets.top, r.width, r.height);
|
||||
if (py + ph > scrBounds.y + scrBounds.height) {
|
||||
if (ph <= -scrBounds.y ) {
|
||||
// popup goes above
|
||||
r.y = -ph ;
|
||||
} else {
|
||||
// a full screen height popup
|
||||
r.y = scrBounds.y + Math.max(0, (scrBounds.height - ph) / 2 );
|
||||
r.height = Math.min(scrBounds.height, ph);
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
// The one to use when itemCount <= maxRowCount. Size never adjusts for arrows
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -232,12 +232,12 @@ public class AquaSpinnerUI extends SpinnerUI {
|
||||
editor.setInheritsPopupMenu(true);
|
||||
|
||||
if (editor.getFont() instanceof UIResource) {
|
||||
editor.setFont(spinner.getFont());
|
||||
editor.setFont(new FontUIResource(spinner.getFont()));
|
||||
}
|
||||
|
||||
final JFormattedTextField editorTextField = ((DefaultEditor)editor).getTextField();
|
||||
if (editorTextField.getFont() instanceof UIResource) {
|
||||
editorTextField.setFont(spinner.getFont());
|
||||
editorTextField.setFont(new FontUIResource(spinner.getFont()));
|
||||
}
|
||||
final InputMap spinnerInputMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
|
||||
final InputMap editorInputMap = editorTextField.getInputMap();
|
||||
@ -648,12 +648,12 @@ public class AquaSpinnerUI extends SpinnerUI {
|
||||
ui.updateToolTipTextForChildren(spinner);
|
||||
} else if ("font".equals(propertyName)) {
|
||||
JComponent editor = spinner.getEditor();
|
||||
if (editor != null && editor instanceof JSpinner.DefaultEditor) {
|
||||
if (editor instanceof JSpinner.DefaultEditor) {
|
||||
JTextField tf =
|
||||
((JSpinner.DefaultEditor) editor).getTextField();
|
||||
if (tf != null) {
|
||||
if (tf.getFont() instanceof UIResource) {
|
||||
tf.setFont(spinner.getFont());
|
||||
tf.setFont(new FontUIResource(spinner.getFont()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -51,8 +51,12 @@ public class LWMouseInfoPeer implements MouseInfoPeer {
|
||||
return false;
|
||||
}
|
||||
|
||||
final Object windowPeer = AWTAccessor.getComponentAccessor().getPeer(w);
|
||||
return LWWindowPeer.getWindowUnderCursor() == windowPeer;
|
||||
LWWindowPeer windowPeer = AWTAccessor.getComponentAccessor().getPeer(w);
|
||||
if (windowPeer == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return LWToolkit.getLWToolkit().getPlatformWindowUnderMouse() == windowPeer.getPlatformWindow();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,7 +23,6 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
|
||||
package sun.lwawt;
|
||||
|
||||
import java.awt.Component;
|
||||
@ -40,7 +39,6 @@ import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextArea;
|
||||
import javax.swing.ScrollPaneConstants;
|
||||
import javax.swing.text.Document;
|
||||
import javax.swing.text.JTextComponent;
|
||||
|
||||
/**
|
||||
* Lightweight implementation of {@link TextAreaPeer}. Delegates most of the
|
||||
@ -75,12 +73,13 @@ final class LWTextAreaPeer
|
||||
super.initializeImpl();
|
||||
final int visibility = getTarget().getScrollbarVisibility();
|
||||
synchronized (getDelegateLock()) {
|
||||
getTextComponent().setWrapStyleWord(true);
|
||||
setScrollBarVisibility(visibility);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
JTextComponent getTextComponent() {
|
||||
JTextArea getTextComponent() {
|
||||
return getDelegate().getView();
|
||||
}
|
||||
|
||||
@ -165,7 +164,7 @@ final class LWTextAreaPeer
|
||||
// JTextArea.replaceRange() is called.
|
||||
final Document document = getTextComponent().getDocument();
|
||||
document.removeDocumentListener(this);
|
||||
getDelegate().getView().replaceRange(text, start, end);
|
||||
getTextComponent().replaceRange(text, start, end);
|
||||
revalidate();
|
||||
postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
|
||||
document.addDocumentListener(this);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -396,6 +396,8 @@ public abstract class LWToolkit extends SunToolkit implements Runnable {
|
||||
return new LWMouseInfoPeer();
|
||||
}
|
||||
|
||||
protected abstract PlatformWindow getPlatformWindowUnderMouse();
|
||||
|
||||
@Override
|
||||
public final PrintJob getPrintJob(Frame frame, String doctitle,
|
||||
Properties props) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -61,6 +61,7 @@ public class LWWindowPeer
|
||||
private static final int MINIMUM_HEIGHT = 1;
|
||||
|
||||
private Insets insets = new Insets(0, 0, 0, 0);
|
||||
private Rectangle maximizedBounds;
|
||||
|
||||
private GraphicsDevice graphicsDevice;
|
||||
private GraphicsConfiguration graphicsConfig;
|
||||
@ -176,8 +177,10 @@ public class LWWindowPeer
|
||||
|
||||
|
||||
if (getTarget() instanceof Frame) {
|
||||
setTitle(((Frame) getTarget()).getTitle());
|
||||
setState(((Frame) getTarget()).getExtendedState());
|
||||
Frame frame = (Frame) getTarget();
|
||||
setTitle(frame.getTitle());
|
||||
setState(frame.getExtendedState());
|
||||
setMaximizedBounds(frame.getMaximizedBounds());
|
||||
} else if (getTarget() instanceof Dialog) {
|
||||
setTitle(((Dialog) getTarget()).getTitle());
|
||||
}
|
||||
@ -543,9 +546,40 @@ public class LWWindowPeer
|
||||
return windowState;
|
||||
}
|
||||
|
||||
private boolean isMaximizedBoundsSet() {
|
||||
synchronized (getStateLock()) {
|
||||
return maximizedBounds != null;
|
||||
}
|
||||
}
|
||||
|
||||
private Rectangle getDefaultMaximizedBounds() {
|
||||
GraphicsConfiguration config = getGraphicsConfiguration();
|
||||
Insets screenInsets = ((CGraphicsDevice) config.getDevice())
|
||||
.getScreenInsets();
|
||||
Rectangle gcBounds = config.getBounds();
|
||||
return new Rectangle(
|
||||
gcBounds.x + screenInsets.left,
|
||||
gcBounds.y + screenInsets.top,
|
||||
gcBounds.width - screenInsets.left - screenInsets.right,
|
||||
gcBounds.height - screenInsets.top - screenInsets.bottom);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMaximizedBounds(Rectangle bounds) {
|
||||
// TODO: not implemented
|
||||
boolean isMaximizedBoundsSet;
|
||||
synchronized (getStateLock()) {
|
||||
this.maximizedBounds = (isMaximizedBoundsSet = (bounds != null))
|
||||
? constrainBounds(bounds) : null;
|
||||
}
|
||||
|
||||
setPlatformMaximizedBounds(isMaximizedBoundsSet ? maximizedBounds
|
||||
: getDefaultMaximizedBounds());
|
||||
}
|
||||
|
||||
private void setPlatformMaximizedBounds(Rectangle bounds) {
|
||||
platformWindow.setMaximizedBounds(
|
||||
bounds.x, bounds.y,
|
||||
bounds.width, bounds.height);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -635,6 +669,10 @@ public class LWWindowPeer
|
||||
|
||||
// Second, update the graphics config and surface data
|
||||
final boolean isNewDevice = updateGraphicsDevice();
|
||||
if (isNewDevice && !isMaximizedBoundsSet()) {
|
||||
setPlatformMaximizedBounds(getDefaultMaximizedBounds());
|
||||
}
|
||||
|
||||
if (resized || isNewDevice) {
|
||||
replaceSurfaceData();
|
||||
updateMinimumSize();
|
||||
@ -749,11 +787,10 @@ public class LWWindowPeer
|
||||
lastMouseEventPeer = targetPeer;
|
||||
}
|
||||
} else {
|
||||
PlatformWindow topmostPlatforWindow =
|
||||
platformWindow.getTopmostPlatformWindowUnderMouse();
|
||||
PlatformWindow topmostPlatformWindow = LWToolkit.getLWToolkit().getPlatformWindowUnderMouse();
|
||||
|
||||
LWWindowPeer topmostWindowPeer =
|
||||
topmostPlatforWindow != null ? topmostPlatforWindow.getPeer() : null;
|
||||
topmostPlatformWindow != null ? topmostPlatformWindow.getPeer() : null;
|
||||
|
||||
// topmostWindowPeer == null condition is added for the backward
|
||||
// compatibility with applets. It can be removed when the
|
||||
@ -764,8 +801,7 @@ public class LWWindowPeer
|
||||
screenX, screenY, modifiers, clickCount, popupTrigger,
|
||||
targetPeer);
|
||||
} else {
|
||||
LWComponentPeer<?, ?> topmostTargetPeer =
|
||||
topmostWindowPeer != null ? topmostWindowPeer.findPeerAt(r.x + x, r.y + y) : null;
|
||||
LWComponentPeer<?, ?> topmostTargetPeer = topmostWindowPeer.findPeerAt(r.x + x, r.y + y);
|
||||
topmostWindowPeer.generateMouseEnterExitEventsForComponents(when, button, x, y,
|
||||
screenX, screenY, modifiers, clickCount, popupTrigger,
|
||||
topmostTargetPeer);
|
||||
@ -1057,6 +1093,9 @@ public class LWWindowPeer
|
||||
public final void displayChanged() {
|
||||
if (updateGraphicsDevice()) {
|
||||
updateMinimumSize();
|
||||
if (!isMaximizedBoundsSet()) {
|
||||
setPlatformMaximizedBounds(getDefaultMaximizedBounds());
|
||||
}
|
||||
}
|
||||
// Replace surface unconditionally, because internal state of the
|
||||
// GraphicsDevice could be changed.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -66,6 +66,11 @@ public interface PlatformWindow {
|
||||
*/
|
||||
public void setBounds(int x, int y, int w, int h);
|
||||
|
||||
/*
|
||||
* Sets the maximized bounds.
|
||||
*/
|
||||
public default void setMaximizedBounds(int x, int y, int w, int h){}
|
||||
|
||||
/*
|
||||
* Returns the graphics device where the window is.
|
||||
*/
|
||||
@ -107,8 +112,6 @@ public interface PlatformWindow {
|
||||
|
||||
public void setAlwaysOnTop(boolean value);
|
||||
|
||||
public PlatformWindow getTopmostPlatformWindowUnderMouse();
|
||||
|
||||
public void updateFocusableWindowState();
|
||||
|
||||
public boolean rejectFocusRequest(CausedFocusEvent.Cause cause);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -630,7 +630,7 @@ class CAccessibility implements PropertyChangeListener {
|
||||
|
||||
if (!allowIgnored) {
|
||||
final AccessibleRole role = context.getAccessibleRole();
|
||||
if (role != null && ignoredRoles.contains(roleKey(role))) {
|
||||
if (role != null && ignoredRoles != null && ignoredRoles.contains(roleKey(role))) {
|
||||
// Get the child's unignored children.
|
||||
_addChildren(child, whichChildren, false, childrenAndRoles);
|
||||
} else {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -129,11 +129,6 @@ public class CPlatformEmbeddedFrame implements PlatformWindow {
|
||||
@Override
|
||||
public void setAlwaysOnTop(boolean value) {}
|
||||
|
||||
// This method should be properly implemented for applets.
|
||||
// It returns null just as a stub.
|
||||
@Override
|
||||
public PlatformWindow getTopmostPlatformWindowUnderMouse() { return null; }
|
||||
|
||||
@Override
|
||||
public void updateFocusableWindowState() {}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -161,11 +161,6 @@ public class CPlatformLWWindow extends CPlatformWindow {
|
||||
public void setAlwaysOnTop(boolean isAlwaysOnTop) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlatformWindow getTopmostPlatformWindowUnderMouse(){
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOpacity(float opacity) {
|
||||
}
|
||||
|
@ -51,6 +51,8 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr);
|
||||
private static native Insets nativeGetNSWindowInsets(long nsWindowPtr);
|
||||
private static native void nativeSetNSWindowBounds(long nsWindowPtr, double x, double y, double w, double h);
|
||||
private static native void nativeSetNSWindowStandardFrame(long nsWindowPtr,
|
||||
double x, double y, double w, double h);
|
||||
private static native void nativeSetNSWindowMinMax(long nsWindowPtr, double minW, double minH, double maxW, double maxH);
|
||||
private static native void nativePushNSWindowToBack(long nsWindowPtr);
|
||||
private static native void nativePushNSWindowToFront(long nsWindowPtr);
|
||||
@ -61,9 +63,9 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
private static native void nativeSetEnabled(long nsWindowPtr, boolean isEnabled);
|
||||
private static native void nativeSynthesizeMouseEnteredExitedEvents();
|
||||
private static native void nativeDispose(long nsWindowPtr);
|
||||
private static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse();
|
||||
private static native void nativeEnterFullScreenMode(long nsWindowPtr);
|
||||
private static native void nativeExitFullScreenMode(long nsWindowPtr);
|
||||
static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse();
|
||||
|
||||
// Loger to report issues happened during execution but that do not affect functionality
|
||||
private static final PlatformLogger logger = PlatformLogger.getLogger("sun.lwawt.macosx.CPlatformWindow");
|
||||
@ -474,6 +476,10 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
nativeSetNSWindowBounds(getNSWindowPtr(), x, y, w, h);
|
||||
}
|
||||
|
||||
public void setMaximizedBounds(int x, int y, int w, int h) {
|
||||
nativeSetNSWindowStandardFrame(getNSWindowPtr(), x, y, w, h);
|
||||
}
|
||||
|
||||
private boolean isMaximized() {
|
||||
return undecorated ? this.normalBounds != null
|
||||
: CWrapper.NSWindow.isZoomed(getNSWindowPtr());
|
||||
@ -750,10 +756,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
setStyleBits(ALWAYS_ON_TOP, isAlwaysOnTop);
|
||||
}
|
||||
|
||||
public PlatformWindow getTopmostPlatformWindowUnderMouse(){
|
||||
return CPlatformWindow.nativeGetTopmostPlatformWindowUnderMouse();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOpacity(float opacity) {
|
||||
CWrapper.NSWindow.setAlphaValue(getNSWindowPtr(), opacity);
|
||||
@ -983,13 +985,11 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
|
||||
}
|
||||
|
||||
private void checkZoom() {
|
||||
if (target instanceof Frame && isVisible()) {
|
||||
Frame targetFrame = (Frame)target;
|
||||
if (targetFrame.getExtendedState() != Frame.MAXIMIZED_BOTH && isMaximized()) {
|
||||
deliverZoom(true);
|
||||
} else if (targetFrame.getExtendedState() == Frame.MAXIMIZED_BOTH && !isMaximized()) {
|
||||
deliverZoom(false);
|
||||
}
|
||||
int state = peer.getState();
|
||||
if (state != Frame.MAXIMIZED_BOTH && isMaximized()) {
|
||||
deliverZoom(true);
|
||||
} else if (state == Frame.MAXIMIZED_BOTH && !isMaximized()) {
|
||||
deliverZoom(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -78,7 +78,7 @@ class CRobot implements RobotPeer {
|
||||
@Override
|
||||
public void mousePress(int buttons) {
|
||||
mouseButtonsState |= buttons;
|
||||
|
||||
checkMousePos();
|
||||
mouseEvent(fDevice.getCGDisplayID(), mouseLastX, mouseLastY,
|
||||
buttons, true, false);
|
||||
}
|
||||
@ -92,11 +92,40 @@ class CRobot implements RobotPeer {
|
||||
@Override
|
||||
public void mouseRelease(int buttons) {
|
||||
mouseButtonsState &= ~buttons;
|
||||
|
||||
checkMousePos();
|
||||
mouseEvent(fDevice.getCGDisplayID(), mouseLastX, mouseLastY,
|
||||
buttons, false, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set unknown mouse location, if needed.
|
||||
*/
|
||||
private void checkMousePos() {
|
||||
if (mouseLastX == MOUSE_LOCATION_UNKNOWN ||
|
||||
mouseLastY == MOUSE_LOCATION_UNKNOWN) {
|
||||
|
||||
Rectangle deviceBounds = fDevice.getDefaultConfiguration().getBounds();
|
||||
Point mousePos = CCursorManager.getInstance().getCursorPosition();
|
||||
|
||||
if (mousePos.x < deviceBounds.x) {
|
||||
mousePos.x = deviceBounds.x;
|
||||
}
|
||||
else if (mousePos.x > deviceBounds.x + deviceBounds.width) {
|
||||
mousePos.x = deviceBounds.x + deviceBounds.width;
|
||||
}
|
||||
|
||||
if (mousePos.y < deviceBounds.y) {
|
||||
mousePos.y = deviceBounds.y;
|
||||
}
|
||||
else if (mousePos.y > deviceBounds.y + deviceBounds.height) {
|
||||
mousePos.y = deviceBounds.y + deviceBounds.height;
|
||||
}
|
||||
|
||||
mouseLastX = mousePos.x;
|
||||
mouseLastY = mousePos.y;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public native void mouseWheel(int wheelAmt);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -143,11 +143,6 @@ public class CViewPlatformEmbeddedFrame implements PlatformWindow {
|
||||
public void setAlwaysOnTop(boolean value) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlatformWindow getTopmostPlatformWindowUnderMouse() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFocusableWindowState() {
|
||||
}
|
||||
|
@ -929,4 +929,9 @@ public final class LWCToolkit extends LWToolkit {
|
||||
!path.endsWith("/") &&
|
||||
!path.endsWith(".");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PlatformWindow getPlatformWindowUnderMouse() {
|
||||
return CPlatformWindow.nativeGetTopmostPlatformWindowUnderMouse();
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2013 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -46,6 +46,7 @@
|
||||
NSWindow *nsWindow;
|
||||
AWTWindow *ownerWindow;
|
||||
jint preFullScreenLevel;
|
||||
NSRect standardFrame;
|
||||
}
|
||||
|
||||
// An instance of either AWTWindow_Normal or AWTWindow_Panel
|
||||
@ -59,7 +60,7 @@
|
||||
@property (nonatomic) jint styleBits;
|
||||
@property (nonatomic) BOOL isEnabled;
|
||||
@property (nonatomic) jint preFullScreenLevel;
|
||||
|
||||
@property (nonatomic) NSRect standardFrame;
|
||||
|
||||
- (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)javaPlatformWindow
|
||||
ownerWindow:owner
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -184,6 +184,7 @@ AWT_NS_WINDOW_IMPLEMENTATION
|
||||
@synthesize isEnabled;
|
||||
@synthesize ownerWindow;
|
||||
@synthesize preFullScreenLevel;
|
||||
@synthesize standardFrame;
|
||||
|
||||
- (void) updateMinMaxSize:(BOOL)resizable {
|
||||
if (resizable) {
|
||||
@ -509,6 +510,12 @@ AWT_ASSERT_APPKIT_THREAD;
|
||||
// window exposing in _setVisible:(BOOL)
|
||||
}
|
||||
|
||||
- (NSRect)windowWillUseStandardFrame:(NSWindow *)window
|
||||
defaultFrame:(NSRect)newFrame {
|
||||
|
||||
return [self standardFrame];
|
||||
}
|
||||
|
||||
- (void) _deliverIconify:(BOOL)iconify {
|
||||
AWT_ASSERT_APPKIT_THREAD;
|
||||
|
||||
@ -951,6 +958,30 @@ JNF_COCOA_ENTER(env);
|
||||
JNF_COCOA_EXIT(env);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: sun_lwawt_macosx_CPlatformWindow
|
||||
* Method: nativeSetNSWindowStandardFrame
|
||||
* Signature: (JDDDD)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowStandardFrame
|
||||
(JNIEnv *env, jclass clazz, jlong windowPtr, jdouble originX, jdouble originY,
|
||||
jdouble width, jdouble height)
|
||||
{
|
||||
JNF_COCOA_ENTER(env);
|
||||
|
||||
NSRect jrect = NSMakeRect(originX, originY, width, height);
|
||||
|
||||
NSWindow *nsWindow = OBJC(windowPtr);
|
||||
[ThreadUtilities performOnMainThreadWaiting:NO block:^(){
|
||||
|
||||
NSRect rect = ConvertNSScreenRect(NULL, jrect);
|
||||
AWTWindow *window = (AWTWindow*)[nsWindow delegate];
|
||||
window.standardFrame = rect;
|
||||
}];
|
||||
|
||||
JNF_COCOA_EXIT(env);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: sun_lwawt_macosx_CPlatformWindow
|
||||
* Method: nativeSetNSWindowMinMax
|
||||
@ -1131,15 +1162,16 @@ JNIEXPORT jobject
|
||||
JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeGetTopmostPlatformWindowUnderMouse
|
||||
(JNIEnv *env, jclass clazz)
|
||||
{
|
||||
jobject topmostWindowUnderMouse = nil;
|
||||
__block jobject topmostWindowUnderMouse = nil;
|
||||
|
||||
JNF_COCOA_ENTER(env);
|
||||
AWT_ASSERT_APPKIT_THREAD;
|
||||
|
||||
AWTWindow *awtWindow = [AWTWindow getTopmostWindowUnderMouse];
|
||||
if (awtWindow != nil) {
|
||||
topmostWindowUnderMouse = [awtWindow.javaPlatformWindow jObject];
|
||||
}
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^{
|
||||
AWTWindow *awtWindow = [AWTWindow getTopmostWindowUnderMouse];
|
||||
if (awtWindow != nil) {
|
||||
topmostWindowUnderMouse = [awtWindow.javaPlatformWindow jObject];
|
||||
}
|
||||
}];
|
||||
|
||||
JNF_COCOA_EXIT(env);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -118,13 +118,11 @@ Java_sun_lwawt_macosx_CCursorManager_nativeGetCursorPosition
|
||||
|
||||
JNF_COCOA_ENTER(env);
|
||||
|
||||
__block NSPoint pt = NSZeroPoint;
|
||||
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
|
||||
pt = ConvertNSScreenPoint(env, [NSEvent mouseLocation]);
|
||||
}];
|
||||
|
||||
jpt = NSToJavaPoint(env, pt);
|
||||
CGEventRef event = CGEventCreate(NULL);
|
||||
CGPoint globalPos = CGEventGetLocation(event);
|
||||
CFRelease(event);
|
||||
|
||||
jpt = NSToJavaPoint(env, globalPos);
|
||||
|
||||
JNF_COCOA_EXIT(env);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -146,47 +146,10 @@ Java_sun_lwawt_macosx_CRobot_mouseEvent
|
||||
|
||||
// This is the native method called when Robot mouse events occur.
|
||||
// The CRobot tracks the mouse position, and which button was
|
||||
// pressed. If the mouse position is unknown it is obtained from
|
||||
// CGEvents. The peer also tracks the mouse button desired state,
|
||||
// pressed. The peer also tracks the mouse button desired state,
|
||||
// the appropriate key modifier state, and whether the mouse action
|
||||
// is simply a mouse move with no mouse button state changes.
|
||||
|
||||
CGError err = kCGErrorSuccess;
|
||||
|
||||
CGRect globalDeviceBounds = CGDisplayBounds(displayID);
|
||||
|
||||
// Set unknown mouse location, if needed.
|
||||
if ((mouseLastX == sun_lwawt_macosx_CRobot_MOUSE_LOCATION_UNKNOWN) ||
|
||||
(mouseLastY == sun_lwawt_macosx_CRobot_MOUSE_LOCATION_UNKNOWN))
|
||||
{
|
||||
CGEventRef event = CGEventCreate(NULL);
|
||||
if (event == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
CGPoint globalPos = CGEventGetLocation(event);
|
||||
CFRelease(event);
|
||||
|
||||
// Normalize the coords within this display device, as
|
||||
// per Robot rules.
|
||||
if (globalPos.x < CGRectGetMinX(globalDeviceBounds)) {
|
||||
globalPos.x = CGRectGetMinX(globalDeviceBounds);
|
||||
}
|
||||
else if (globalPos.x > CGRectGetMaxX(globalDeviceBounds)) {
|
||||
globalPos.x = CGRectGetMaxX(globalDeviceBounds);
|
||||
}
|
||||
|
||||
if (globalPos.y < CGRectGetMinY(globalDeviceBounds)) {
|
||||
globalPos.y = CGRectGetMinY(globalDeviceBounds);
|
||||
}
|
||||
else if (globalPos.y > CGRectGetMaxY(globalDeviceBounds)) {
|
||||
globalPos.y = CGRectGetMaxY(globalDeviceBounds);
|
||||
}
|
||||
|
||||
mouseLastX = (jint)globalPos.x;
|
||||
mouseLastY = (jint)globalPos.y;
|
||||
}
|
||||
|
||||
// volatile, otherwise it warns that it might be clobbered by 'longjmp'
|
||||
volatile CGPoint point;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2013 Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -93,7 +93,9 @@ class GTKEngine {
|
||||
*/
|
||||
static enum Settings {
|
||||
GTK_FONT_NAME,
|
||||
GTK_ICON_SIZES
|
||||
GTK_ICON_SIZES,
|
||||
GTK_CURSOR_BLINK,
|
||||
GTK_CURSOR_BLINK_TIME
|
||||
}
|
||||
|
||||
/* Custom regions are needed for representing regions that don't exist
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -371,7 +371,17 @@ public class GTKLookAndFeel extends SynthLookAndFeel {
|
||||
int vProgWidth = 22 - (progXThickness * 2);
|
||||
int vProgHeight = 80 - (progYThickness * 2);
|
||||
|
||||
Integer caretBlinkRate = Integer.valueOf(500);
|
||||
Integer caretBlinkRate;
|
||||
if (Boolean.FALSE.equals(GTKEngine.INSTANCE.getSetting(
|
||||
GTKEngine.Settings.GTK_CURSOR_BLINK))) {
|
||||
caretBlinkRate = Integer.valueOf(0);
|
||||
} else {
|
||||
caretBlinkRate = (Integer) GTKEngine.INSTANCE.getSetting(
|
||||
GTKEngine.Settings.GTK_CURSOR_BLINK_TIME);
|
||||
if (caretBlinkRate == null) {
|
||||
caretBlinkRate = Integer.valueOf(500);
|
||||
}
|
||||
}
|
||||
Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0);
|
||||
|
||||
Double defaultCaretAspectRatio = new Double(0.025);
|
||||
|
@ -34,9 +34,9 @@ FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Error
|
||||
FileChooser.newFolderNoDirectoryError.textAndMnemonic=Error creating directory "{0}": No such file or directory
|
||||
FileChooser.deleteFileButton.textAndMnemonic=De&lete File
|
||||
FileChooser.renameFileButton.textAndMnemonic=&Rename File
|
||||
FileChooser.cancelButton.textAndMnemonic=&Cancel
|
||||
FileChooser.saveButton.textAndMnemonic=&OK
|
||||
FileChooser.openButton.textAndMnemonic=&OK
|
||||
FileChooser.cancelButton.textAndMnemonic=Cancel
|
||||
FileChooser.saveButton.textAndMnemonic=OK
|
||||
FileChooser.openButton.textAndMnemonic=OK
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Save
|
||||
FileChooser.openDialogTitle.textAndMnemonic=Open
|
||||
FileChooser.pathLabel.textAndMnemonic=&Selection:
|
||||
|
@ -34,9 +34,9 @@ FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Fehler
|
||||
FileChooser.newFolderNoDirectoryError.textAndMnemonic=Fehler beim Erstellen von Verzeichnis "{0}": Datei oder Verzeichnis nicht vorhanden
|
||||
FileChooser.deleteFileButton.textAndMnemonic=Datei &l\u00F6schen
|
||||
FileChooser.renameFileButton.textAndMnemonic=Datei &umbenennen
|
||||
FileChooser.cancelButton.textAndMnemonic=&Abbrechen
|
||||
FileChooser.saveButton.textAndMnemonic=&OK
|
||||
FileChooser.openButton.textAndMnemonic=&OK
|
||||
FileChooser.cancelButton.textAndMnemonic=Abbrechen
|
||||
FileChooser.saveButton.textAndMnemonic=OK
|
||||
FileChooser.openButton.textAndMnemonic=OK
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Speichern
|
||||
FileChooser.openDialogTitle.textAndMnemonic=\u00D6ffnen
|
||||
FileChooser.pathLabel.textAndMnemonic=Aus&wahl:
|
||||
|
@ -34,9 +34,9 @@ FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Error
|
||||
FileChooser.newFolderNoDirectoryError.textAndMnemonic=Error al crear el directorio "{0}": no existe dicho archivo o directorio
|
||||
FileChooser.deleteFileButton.textAndMnemonic=Su&primir Archivo
|
||||
FileChooser.renameFileButton.textAndMnemonic=Cambiar Nomb&re de Archivo
|
||||
FileChooser.cancelButton.textAndMnemonic=&Cancelar
|
||||
FileChooser.saveButton.textAndMnemonic=&Aceptar
|
||||
FileChooser.openButton.textAndMnemonic=&Aceptar
|
||||
FileChooser.cancelButton.textAndMnemonic=Cancelar
|
||||
FileChooser.saveButton.textAndMnemonic=Aceptar
|
||||
FileChooser.openButton.textAndMnemonic=Aceptar
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Guardar
|
||||
FileChooser.openDialogTitle.textAndMnemonic=Abrir
|
||||
FileChooser.pathLabel.textAndMnemonic=&Selecci\u00F3n:
|
||||
|
@ -34,9 +34,9 @@ FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Erreur
|
||||
FileChooser.newFolderNoDirectoryError.textAndMnemonic=Erreur lors de la cr\u00E9ation du r\u00E9pertoire "{0}" : ce fichier ou r\u00E9pertoire n''existe pas
|
||||
FileChooser.deleteFileButton.textAndMnemonic=Supprimer &le fichier
|
||||
FileChooser.renameFileButton.textAndMnemonic=&Renommer le fichier
|
||||
FileChooser.cancelButton.textAndMnemonic=&Annuler
|
||||
FileChooser.saveButton.textAndMnemonic=&OK
|
||||
FileChooser.openButton.textAndMnemonic=&OK
|
||||
FileChooser.cancelButton.textAndMnemonic=Annuler
|
||||
FileChooser.saveButton.textAndMnemonic=OK
|
||||
FileChooser.openButton.textAndMnemonic=OK
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Enregistrer
|
||||
FileChooser.openDialogTitle.textAndMnemonic=Ouvrir
|
||||
FileChooser.pathLabel.textAndMnemonic=&S\u00E9lection :
|
||||
|
@ -34,9 +34,9 @@ FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Errore
|
||||
FileChooser.newFolderNoDirectoryError.textAndMnemonic=Errore durante la creazione della directory "{0}": file o directory inesistente
|
||||
FileChooser.deleteFileButton.textAndMnemonic=E&limina file
|
||||
FileChooser.renameFileButton.textAndMnemonic=&Rinomina file
|
||||
FileChooser.cancelButton.textAndMnemonic=&Annulla
|
||||
FileChooser.saveButton.textAndMnemonic=&OK
|
||||
FileChooser.openButton.textAndMnemonic=&OK
|
||||
FileChooser.cancelButton.textAndMnemonic=Annulla
|
||||
FileChooser.saveButton.textAndMnemonic=OK
|
||||
FileChooser.openButton.textAndMnemonic=OK
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Salva
|
||||
FileChooser.openDialogTitle.textAndMnemonic=Apri
|
||||
FileChooser.pathLabel.textAndMnemonic=&Selezione:
|
||||
|
@ -34,9 +34,9 @@ FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=\u30A8\u30E9\u30FC
|
||||
FileChooser.newFolderNoDirectoryError.textAndMnemonic=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA"{0}"\u306E\u4F5C\u6210\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F: \u3053\u306E\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\u5B58\u5728\u3057\u307E\u305B\u3093
|
||||
FileChooser.deleteFileButton.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u306E\u524A\u9664(&L)
|
||||
FileChooser.renameFileButton.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u306E\u540D\u524D\u5909\u66F4(&R)
|
||||
FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88(&C)
|
||||
FileChooser.saveButton.textAndMnemonic=OK(&O)
|
||||
FileChooser.openButton.textAndMnemonic=OK(&O)
|
||||
FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88
|
||||
FileChooser.saveButton.textAndMnemonic=OK
|
||||
FileChooser.openButton.textAndMnemonic=OK
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=\u4FDD\u5B58
|
||||
FileChooser.openDialogTitle.textAndMnemonic=\u958B\u304F
|
||||
FileChooser.pathLabel.textAndMnemonic=\u9078\u629E(&S):
|
||||
|
@ -34,9 +34,9 @@ FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=\uC624\uB958
|
||||
FileChooser.newFolderNoDirectoryError.textAndMnemonic="{0}" \uB514\uB809\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD558\uB294 \uC911 \uC624\uB958 \uBC1C\uC0DD: \uD574\uB2F9 \uD30C\uC77C \uB610\uB294 \uB514\uB809\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
|
||||
FileChooser.deleteFileButton.textAndMnemonic=\uD30C\uC77C \uC0AD\uC81C(&L)
|
||||
FileChooser.renameFileButton.textAndMnemonic=\uD30C\uC77C \uC774\uB984 \uBC14\uAFB8\uAE30(&R)
|
||||
FileChooser.cancelButton.textAndMnemonic=\uCDE8\uC18C(&C)
|
||||
FileChooser.saveButton.textAndMnemonic=\uD655\uC778(&O)
|
||||
FileChooser.openButton.textAndMnemonic=\uD655\uC778(&O)
|
||||
FileChooser.cancelButton.textAndMnemonic=\uCDE8\uC18C
|
||||
FileChooser.saveButton.textAndMnemonic=\uD655\uC778
|
||||
FileChooser.openButton.textAndMnemonic=\uD655\uC778
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=\uC800\uC7A5
|
||||
FileChooser.openDialogTitle.textAndMnemonic=\uC5F4\uAE30
|
||||
FileChooser.pathLabel.textAndMnemonic=\uC120\uD0DD \uC0AC\uD56D(&S):
|
||||
|
@ -34,9 +34,9 @@ FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Erro
|
||||
FileChooser.newFolderNoDirectoryError.textAndMnemonic=Erro ao criar o diret\u00F3rio "{0}": N\u00E3o h\u00E1 arquivo ou diret\u00F3rio
|
||||
FileChooser.deleteFileButton.textAndMnemonic=De&letar Arquivo
|
||||
FileChooser.renameFileButton.textAndMnemonic=&Renomear Arquivo
|
||||
FileChooser.cancelButton.textAndMnemonic=&Cancelar
|
||||
FileChooser.saveButton.textAndMnemonic=&OK
|
||||
FileChooser.openButton.textAndMnemonic=&OK
|
||||
FileChooser.cancelButton.textAndMnemonic=Cancelar
|
||||
FileChooser.saveButton.textAndMnemonic=OK
|
||||
FileChooser.openButton.textAndMnemonic=OK
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Salvar
|
||||
FileChooser.openDialogTitle.textAndMnemonic=Abrir
|
||||
FileChooser.pathLabel.textAndMnemonic=&Sele\u00E7\u00E3o:
|
||||
|
@ -34,9 +34,9 @@ FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=Fel
|
||||
FileChooser.newFolderNoDirectoryError.textAndMnemonic=Ett fel intr\u00E4ffade vid f\u00F6rs\u00F6k att skapa katalogen "{0}": Filen eller katalogen finns inte
|
||||
FileChooser.deleteFileButton.textAndMnemonic=Ta &bort fil
|
||||
FileChooser.renameFileButton.textAndMnemonic=&\u00C4ndra namn p\u00E5 filen
|
||||
FileChooser.cancelButton.textAndMnemonic=&Avbryt
|
||||
FileChooser.saveButton.textAndMnemonic=&OK
|
||||
FileChooser.openButton.textAndMnemonic=&OK
|
||||
FileChooser.cancelButton.textAndMnemonic=Avbryt
|
||||
FileChooser.saveButton.textAndMnemonic=OK
|
||||
FileChooser.openButton.textAndMnemonic=OK
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Spara
|
||||
FileChooser.openDialogTitle.textAndMnemonic=\u00D6ppna
|
||||
FileChooser.pathLabel.textAndMnemonic=&Urval:
|
||||
|
@ -34,9 +34,9 @@ FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=\u9519\u8BEF
|
||||
FileChooser.newFolderNoDirectoryError.textAndMnemonic=\u521B\u5EFA\u76EE\u5F55 "{0}" \u65F6\u51FA\u9519: \u6CA1\u6709\u6B64\u7C7B\u6587\u4EF6\u6216\u76EE\u5F55
|
||||
FileChooser.deleteFileButton.textAndMnemonic=\u5220\u9664\u6587\u4EF6(&L)
|
||||
FileChooser.renameFileButton.textAndMnemonic=\u91CD\u547D\u540D\u6587\u4EF6(&R)
|
||||
FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88(&C)
|
||||
FileChooser.saveButton.textAndMnemonic=\u786E\u5B9A(&O)
|
||||
FileChooser.openButton.textAndMnemonic=\u786E\u5B9A(&O)
|
||||
FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88
|
||||
FileChooser.saveButton.textAndMnemonic=\u786E\u5B9A
|
||||
FileChooser.openButton.textAndMnemonic=\u786E\u5B9A
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=\u4FDD\u5B58
|
||||
FileChooser.openDialogTitle.textAndMnemonic=\u6253\u5F00
|
||||
FileChooser.pathLabel.textAndMnemonic=\u9009\u5B9A\u5185\u5BB9(&S):
|
||||
|
@ -34,9 +34,9 @@ FileChooser.newFolderNoDirectoryErrorTitle.textAndMnemonic=\u932F\u8AA4
|
||||
FileChooser.newFolderNoDirectoryError.textAndMnemonic=\u5EFA\u7ACB\u76EE\u9304 "{0}" \u6642\u767C\u751F\u932F\u8AA4: \u6C92\u6709\u6B64\u6A94\u6848\u6216\u76EE\u9304
|
||||
FileChooser.deleteFileButton.textAndMnemonic=\u522A\u9664\u6A94\u6848(&L)
|
||||
FileChooser.renameFileButton.textAndMnemonic=\u91CD\u65B0\u547D\u540D\u6A94\u6848(&R)
|
||||
FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88(&C)
|
||||
FileChooser.saveButton.textAndMnemonic=\u78BA\u5B9A(&O)
|
||||
FileChooser.openButton.textAndMnemonic=\u78BA\u5B9A(&O)
|
||||
FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88
|
||||
FileChooser.saveButton.textAndMnemonic=\u78BA\u5B9A
|
||||
FileChooser.openButton.textAndMnemonic=\u78BA\u5B9A
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=\u5132\u5B58
|
||||
FileChooser.openDialogTitle.textAndMnemonic=\u958B\u555F
|
||||
FileChooser.pathLabel.textAndMnemonic=\u9078\u53D6(&S):
|
||||
|
@ -43,13 +43,13 @@ FileChooser.renameErrorFileExists.textAndMnemonic=Cannot rename {0}: A file with
|
||||
Specify a different file name.
|
||||
FileChooser.acceptAllFileFilter.textAndMnemonic=All Files
|
||||
FileChooser.cancelButton.textAndMnemonic=Cancel
|
||||
FileChooser.saveButton.textAndMnemonic=&Save
|
||||
FileChooser.openButton.textAndMnemonic=&Open
|
||||
FileChooser.saveButton.textAndMnemonic=Save
|
||||
FileChooser.openButton.textAndMnemonic=Open
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Save
|
||||
FileChooser.openDialogTitle.textAndMnemonic=Open
|
||||
FileChooser.updateButton.textAndMnemonic=&Update
|
||||
FileChooser.helpButton.textAndMnemonic=&Help
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=&Open
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=Open
|
||||
|
||||
# File Size Units
|
||||
FileChooser.fileSizeKiloBytes={0} KB
|
||||
|
@ -42,13 +42,13 @@ FileChooser.renameError.textAndMnemonic={0} kann nicht umbenannt werden
|
||||
FileChooser.renameErrorFileExists.textAndMnemonic={0} kann nicht umbenannt werden: Es ist bereits eine Datei mit dem angegebenen Namen vorhanden. Geben Sie einen anderen Dateinamen an.
|
||||
FileChooser.acceptAllFileFilter.textAndMnemonic=Alle Dateien
|
||||
FileChooser.cancelButton.textAndMnemonic=Abbrechen
|
||||
FileChooser.saveButton.textAndMnemonic=&Speichern
|
||||
FileChooser.openButton.textAndMnemonic=\u00D6&ffnen
|
||||
FileChooser.saveButton.textAndMnemonic=Speichern
|
||||
FileChooser.openButton.textAndMnemonic=\u00D6ffnen
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Speichern
|
||||
FileChooser.openDialogTitle.textAndMnemonic=\u00D6ffnen
|
||||
FileChooser.updateButton.textAndMnemonic=A&ktualisieren
|
||||
FileChooser.helpButton.textAndMnemonic=&Hilfe
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=\u00D6&ffnen
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=\u00D6ffnen
|
||||
|
||||
# File Size Units
|
||||
FileChooser.fileSizeKiloBytes={0} KB
|
||||
|
@ -42,13 +42,13 @@ FileChooser.renameError.textAndMnemonic=No se puede cambiar el nombre de {0}
|
||||
FileChooser.renameErrorFileExists.textAndMnemonic=No se puede cambiar el nombre de {0}: ya existe un archivo con el nombre especificado. Especifique otro nombre de archivo.
|
||||
FileChooser.acceptAllFileFilter.textAndMnemonic=Todos los Archivos
|
||||
FileChooser.cancelButton.textAndMnemonic=Cancelar
|
||||
FileChooser.saveButton.textAndMnemonic=&Guardar
|
||||
FileChooser.openButton.textAndMnemonic=&Abrir
|
||||
FileChooser.saveButton.textAndMnemonic=Guardar
|
||||
FileChooser.openButton.textAndMnemonic=Abrir
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Guardar
|
||||
FileChooser.openDialogTitle.textAndMnemonic=Abrir
|
||||
FileChooser.updateButton.textAndMnemonic=Act&ualizar
|
||||
FileChooser.helpButton.textAndMnemonic=A&yuda
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=&Abrir
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=Abrir
|
||||
|
||||
# File Size Units
|
||||
FileChooser.fileSizeKiloBytes={0} KB
|
||||
|
@ -42,13 +42,13 @@ FileChooser.renameError.textAndMnemonic=Impossible de renommer {0}
|
||||
FileChooser.renameErrorFileExists.textAndMnemonic=Impossible de renommer {0} : il existe d\u00E9j\u00E0 un fichier portant le nom indiqu\u00E9. Indiquez-en un autre.
|
||||
FileChooser.acceptAllFileFilter.textAndMnemonic=Tous les fichiers
|
||||
FileChooser.cancelButton.textAndMnemonic=Annuler
|
||||
FileChooser.saveButton.textAndMnemonic=Enregi&strer
|
||||
FileChooser.openButton.textAndMnemonic=&Ouvrir
|
||||
FileChooser.saveButton.textAndMnemonic=Enregistrer
|
||||
FileChooser.openButton.textAndMnemonic=Ouvrir
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Enregistrer
|
||||
FileChooser.openDialogTitle.textAndMnemonic=Ouvrir
|
||||
FileChooser.updateButton.textAndMnemonic=Mettre \u00E0 jo&ur
|
||||
FileChooser.helpButton.textAndMnemonic=&Aide
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=&Ouvrir
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=Ouvrir
|
||||
|
||||
# File Size Units
|
||||
FileChooser.fileSizeKiloBytes={0} KB
|
||||
|
@ -42,13 +42,13 @@ FileChooser.renameError.textAndMnemonic=Impossibile rinominare {0}
|
||||
FileChooser.renameErrorFileExists.textAndMnemonic=Impossibile rinominare {0}: esiste gi\u00E0 un file con il nome specificato. Specificare un altro nome.
|
||||
FileChooser.acceptAllFileFilter.textAndMnemonic=Tutti i file
|
||||
FileChooser.cancelButton.textAndMnemonic=Annulla
|
||||
FileChooser.saveButton.textAndMnemonic=Sal&va
|
||||
FileChooser.openButton.textAndMnemonic=&Apri
|
||||
FileChooser.saveButton.textAndMnemonic=Salva
|
||||
FileChooser.openButton.textAndMnemonic=Apri
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Salva
|
||||
FileChooser.openDialogTitle.textAndMnemonic=Apri
|
||||
FileChooser.updateButton.textAndMnemonic=Ag&giorna
|
||||
FileChooser.helpButton.textAndMnemonic=&?
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=&Apri
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=Apri
|
||||
|
||||
# File Size Units
|
||||
FileChooser.fileSizeKiloBytes={0} KB
|
||||
|
@ -42,13 +42,13 @@ FileChooser.renameError.textAndMnemonic=N\u00E3o \u00E9 poss\u00EDvel renomear {
|
||||
FileChooser.renameErrorFileExists.textAndMnemonic=N\u00E3o \u00E9 poss\u00EDvel renomear {0}: Um arquivo com o nome especificado j\u00E1 existe. Especifique outro nome de arquivo.
|
||||
FileChooser.acceptAllFileFilter.textAndMnemonic=Todos os Arquivos
|
||||
FileChooser.cancelButton.textAndMnemonic=Cancelar
|
||||
FileChooser.saveButton.textAndMnemonic=&Salvar
|
||||
FileChooser.openButton.textAndMnemonic=A&brir
|
||||
FileChooser.saveButton.textAndMnemonic=Salvar
|
||||
FileChooser.openButton.textAndMnemonic=Abrir
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Salvar
|
||||
FileChooser.openDialogTitle.textAndMnemonic=Abrir
|
||||
FileChooser.updateButton.textAndMnemonic=At&ualizar
|
||||
FileChooser.helpButton.textAndMnemonic=Aj&uda
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=A&brir
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=Abrir
|
||||
|
||||
# File Size Units
|
||||
FileChooser.fileSizeKiloBytes={0} KB
|
||||
|
@ -42,13 +42,13 @@ FileChooser.renameError.textAndMnemonic=Kan inte namn\u00E4ndra {0}
|
||||
FileChooser.renameErrorFileExists.textAndMnemonic=Kan inte namn\u00E4ndra {0}: En fil med angivet namn finns redan. Ange ett annat filnamn.
|
||||
FileChooser.acceptAllFileFilter.textAndMnemonic=Alla filer
|
||||
FileChooser.cancelButton.textAndMnemonic=Avbryt
|
||||
FileChooser.saveButton.textAndMnemonic=&Spara
|
||||
FileChooser.openButton.textAndMnemonic=&\u00D6ppna
|
||||
FileChooser.saveButton.textAndMnemonic=Spara
|
||||
FileChooser.openButton.textAndMnemonic=\u00D6ppna
|
||||
FileChooser.saveDialogTitle.textAndMnemonic=Spara
|
||||
FileChooser.openDialogTitle.textAndMnemonic=\u00D6ppna
|
||||
FileChooser.updateButton.textAndMnemonic=Upp&datera
|
||||
FileChooser.helpButton.textAndMnemonic=&Hj\u00E4lp
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=&\u00D6ppna
|
||||
FileChooser.directoryOpenButton.textAndMnemonic=\u00D6ppna
|
||||
|
||||
# File Size Units
|
||||
FileChooser.fileSizeKiloBytes={0} KB
|
||||
|
@ -43,8 +43,6 @@ FileChooser.fileSizeHeader.textAndMnemonic=Size
|
||||
FileChooser.fileTypeHeader.textAndMnemonic=Type
|
||||
FileChooser.fileDateHeader.textAndMnemonic=Modified
|
||||
FileChooser.fileAttrHeader.textAndMnemonic=Attributes
|
||||
FileChooser.saveButton.textAndMnemonic=Save
|
||||
FileChooser.openButton.textAndMnemonic=Open
|
||||
|
||||
############ Used by MetalTitlePane if rendering window decorations############
|
||||
MetalTitlePane.restore.titleAndMnemonic=&Restore
|
||||
|
@ -43,8 +43,6 @@ FileChooser.fileSizeHeader.textAndMnemonic=Gr\u00F6\u00DFe
|
||||
FileChooser.fileTypeHeader.textAndMnemonic=Typ
|
||||
FileChooser.fileDateHeader.textAndMnemonic=Ge\u00E4ndert
|
||||
FileChooser.fileAttrHeader.textAndMnemonic=Attribute
|
||||
FileChooser.saveButton.textAndMnemonic=Speichern
|
||||
FileChooser.openButton.textAndMnemonic=\u00D6ffnen
|
||||
|
||||
############ Used by MetalTitlePane if rendering window decorations############
|
||||
MetalTitlePane.restore.titleAndMnemonic=&Wiederherstellen
|
||||
|
@ -43,8 +43,6 @@ FileChooser.fileSizeHeader.textAndMnemonic=Tama\u00F1o
|
||||
FileChooser.fileTypeHeader.textAndMnemonic=Tipo
|
||||
FileChooser.fileDateHeader.textAndMnemonic=Modificado
|
||||
FileChooser.fileAttrHeader.textAndMnemonic=Atributos
|
||||
FileChooser.saveButton.textAndMnemonic=Guardar
|
||||
FileChooser.openButton.textAndMnemonic=Abrir
|
||||
|
||||
############ Used by MetalTitlePane if rendering window decorations############
|
||||
MetalTitlePane.restore.titleAndMnemonic=&Restaurar
|
||||
|
@ -43,8 +43,6 @@ FileChooser.fileSizeHeader.textAndMnemonic=Taille
|
||||
FileChooser.fileTypeHeader.textAndMnemonic=Type
|
||||
FileChooser.fileDateHeader.textAndMnemonic=Modifi\u00E9
|
||||
FileChooser.fileAttrHeader.textAndMnemonic=Attributs
|
||||
FileChooser.saveButton.textAndMnemonic=Enregistrer
|
||||
FileChooser.openButton.textAndMnemonic=Ouvrir
|
||||
|
||||
############ Used by MetalTitlePane if rendering window decorations############
|
||||
MetalTitlePane.restore.titleAndMnemonic=&Restaurer
|
||||
|
@ -43,8 +43,6 @@ FileChooser.fileSizeHeader.textAndMnemonic=Dimensioni
|
||||
FileChooser.fileTypeHeader.textAndMnemonic=Tipo
|
||||
FileChooser.fileDateHeader.textAndMnemonic=Modificato
|
||||
FileChooser.fileAttrHeader.textAndMnemonic=Attributi
|
||||
FileChooser.saveButton.textAndMnemonic=Salva
|
||||
FileChooser.openButton.textAndMnemonic=Apri
|
||||
|
||||
############ Used by MetalTitlePane if rendering window decorations############
|
||||
MetalTitlePane.restore.titleAndMnemonic=&Ripristina
|
||||
|
@ -43,8 +43,6 @@ FileChooser.fileSizeHeader.textAndMnemonic=\u30B5\u30A4\u30BA
|
||||
FileChooser.fileTypeHeader.textAndMnemonic=\u30BF\u30A4\u30D7
|
||||
FileChooser.fileDateHeader.textAndMnemonic=\u4FEE\u6B63\u65E5
|
||||
FileChooser.fileAttrHeader.textAndMnemonic=\u5C5E\u6027
|
||||
FileChooser.saveButton.textAndMnemonic=\u4FDD\u5B58
|
||||
FileChooser.openButton.textAndMnemonic=\u958B\u304F
|
||||
|
||||
############ Used by MetalTitlePane if rendering window decorations############
|
||||
MetalTitlePane.restore.titleAndMnemonic=\u5FA9\u5143(&R)
|
||||
|
@ -43,8 +43,6 @@ FileChooser.fileSizeHeader.textAndMnemonic=\uD06C\uAE30
|
||||
FileChooser.fileTypeHeader.textAndMnemonic=\uC720\uD615
|
||||
FileChooser.fileDateHeader.textAndMnemonic=\uC218\uC815 \uB0A0\uC9DC
|
||||
FileChooser.fileAttrHeader.textAndMnemonic=\uC18D\uC131
|
||||
FileChooser.saveButton.textAndMnemonic=\uC800\uC7A5
|
||||
FileChooser.openButton.textAndMnemonic=\uC5F4\uAE30
|
||||
|
||||
############ Used by MetalTitlePane if rendering window decorations############
|
||||
MetalTitlePane.restore.titleAndMnemonic=\uBCF5\uC6D0(&R)
|
||||
|
@ -43,8 +43,6 @@ FileChooser.fileSizeHeader.textAndMnemonic=Tamanho
|
||||
FileChooser.fileTypeHeader.textAndMnemonic=Tipo
|
||||
FileChooser.fileDateHeader.textAndMnemonic=Modificado
|
||||
FileChooser.fileAttrHeader.textAndMnemonic=Atributos
|
||||
FileChooser.saveButton.textAndMnemonic=Salvar
|
||||
FileChooser.openButton.textAndMnemonic=Abrir
|
||||
|
||||
############ Used by MetalTitlePane if rendering window decorations############
|
||||
MetalTitlePane.restore.titleAndMnemonic=&Restaurar
|
||||
|
@ -43,8 +43,6 @@ FileChooser.fileSizeHeader.textAndMnemonic=Storlek
|
||||
FileChooser.fileTypeHeader.textAndMnemonic=Typ
|
||||
FileChooser.fileDateHeader.textAndMnemonic=\u00C4ndrad
|
||||
FileChooser.fileAttrHeader.textAndMnemonic=Attribut
|
||||
FileChooser.saveButton.textAndMnemonic=Spara
|
||||
FileChooser.openButton.textAndMnemonic=\u00D6ppna
|
||||
|
||||
############ Used by MetalTitlePane if rendering window decorations############
|
||||
MetalTitlePane.restore.titleAndMnemonic=&\u00C5terst\u00E4ll
|
||||
|
@ -43,8 +43,6 @@ FileChooser.fileSizeHeader.textAndMnemonic=\u5927\u5C0F
|
||||
FileChooser.fileTypeHeader.textAndMnemonic=\u7C7B\u578B
|
||||
FileChooser.fileDateHeader.textAndMnemonic=\u4FEE\u6539\u65E5\u671F
|
||||
FileChooser.fileAttrHeader.textAndMnemonic=\u5C5E\u6027
|
||||
FileChooser.saveButton.textAndMnemonic=\u4FDD\u5B58
|
||||
FileChooser.openButton.textAndMnemonic=\u6253\u5F00
|
||||
|
||||
############ Used by MetalTitlePane if rendering window decorations############
|
||||
MetalTitlePane.restore.titleAndMnemonic=\u8FD8\u539F(&R)
|
||||
|
@ -43,8 +43,6 @@ FileChooser.fileSizeHeader.textAndMnemonic=\u5927\u5C0F
|
||||
FileChooser.fileTypeHeader.textAndMnemonic=\u985E\u578B
|
||||
FileChooser.fileDateHeader.textAndMnemonic=\u4FEE\u6539\u65E5\u671F
|
||||
FileChooser.fileAttrHeader.textAndMnemonic=\u5C6C\u6027
|
||||
FileChooser.saveButton.textAndMnemonic=\u5132\u5B58
|
||||
FileChooser.openButton.textAndMnemonic=\u958B\u555F
|
||||
|
||||
############ Used by MetalTitlePane if rendering window decorations############
|
||||
MetalTitlePane.restore.titleAndMnemonic=\u56DE\u5FA9(&R)
|
||||
|
@ -1311,6 +1311,25 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
return visible && (parent == null || parent.isRecursivelyVisible());
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines the bounds of a visible part of the component relative to its
|
||||
* parent.
|
||||
*
|
||||
* @return the visible part of bounds
|
||||
*/
|
||||
private Rectangle getRecursivelyVisibleBounds() {
|
||||
final Component container = getContainer();
|
||||
final Rectangle bounds = getBounds();
|
||||
if (container == null) {
|
||||
// we are top level window or haven't a container, return our bounds
|
||||
return bounds;
|
||||
}
|
||||
// translate the container's bounds to our coordinate space
|
||||
final Rectangle parentsBounds = container.getRecursivelyVisibleBounds();
|
||||
parentsBounds.setLocation(0, 0);
|
||||
return parentsBounds.intersection(bounds);
|
||||
}
|
||||
|
||||
/**
|
||||
* Translates absolute coordinates into coordinates in the coordinate
|
||||
* space of this component.
|
||||
@ -1487,7 +1506,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
ComponentPeer peer = this.peer;
|
||||
if (peer != null) {
|
||||
peer.setEnabled(true);
|
||||
if (visible) {
|
||||
if (visible && !getRecursivelyVisibleBounds().isEmpty()) {
|
||||
updateCursorImmediately();
|
||||
}
|
||||
}
|
||||
@ -1541,7 +1560,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
ComponentPeer peer = this.peer;
|
||||
if (peer != null) {
|
||||
peer.setEnabled(false);
|
||||
if (visible) {
|
||||
if (visible && !getRecursivelyVisibleBounds().isEmpty()) {
|
||||
updateCursorImmediately();
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ import java.io.PrintWriter;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.security.AccessController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EventListener;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@ -100,7 +101,7 @@ public class Container extends Component {
|
||||
* @see #add
|
||||
* @see #getComponents
|
||||
*/
|
||||
private java.util.List<Component> component = new java.util.ArrayList<Component>();
|
||||
private java.util.List<Component> component = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Layout manager for this container.
|
||||
@ -2568,28 +2569,24 @@ public class Container extends Component {
|
||||
if (!contains(x, y)) {
|
||||
return null;
|
||||
}
|
||||
Component lightweight = null;
|
||||
synchronized (getTreeLock()) {
|
||||
// Two passes: see comment in sun.awt.SunGraphicsCallback
|
||||
for (int i = 0; i < component.size(); i++) {
|
||||
Component comp = component.get(i);
|
||||
if (comp != null &&
|
||||
!(comp.peer instanceof LightweightPeer)) {
|
||||
if (comp.contains(x - comp.x, y - comp.y)) {
|
||||
// Optimized version of two passes:
|
||||
// see comment in sun.awt.SunGraphicsCallback
|
||||
for (final Component comp : component) {
|
||||
if (comp.contains(x - comp.x, y - comp.y)) {
|
||||
if (!comp.isLightweight()) {
|
||||
// return heavyweight component as soon as possible
|
||||
return comp;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < component.size(); i++) {
|
||||
Component comp = component.get(i);
|
||||
if (comp != null &&
|
||||
comp.peer instanceof LightweightPeer) {
|
||||
if (comp.contains(x - comp.x, y - comp.y)) {
|
||||
return comp;
|
||||
if (lightweight == null) {
|
||||
// save and return later the first lightweight component
|
||||
lightweight = comp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
return lightweight != null ? lightweight : this;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2693,52 +2690,54 @@ public class Container extends Component {
|
||||
return null;
|
||||
}
|
||||
|
||||
final Component findComponentAtImpl(int x, int y, boolean ignoreEnabled){
|
||||
checkTreeLock();
|
||||
final Component findComponentAtImpl(int x, int y, boolean ignoreEnabled) {
|
||||
// checkTreeLock(); commented for a performance reason
|
||||
|
||||
if (!(contains(x, y) && visible && (ignoreEnabled || enabled))) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Two passes: see comment in sun.awt.SunGraphicsCallback
|
||||
for (int i = 0; i < component.size(); i++) {
|
||||
Component comp = component.get(i);
|
||||
if (comp != null &&
|
||||
!(comp.peer instanceof LightweightPeer)) {
|
||||
if (comp instanceof Container) {
|
||||
comp = ((Container)comp).findComponentAtImpl(x - comp.x,
|
||||
y - comp.y,
|
||||
ignoreEnabled);
|
||||
} else {
|
||||
comp = comp.getComponentAt(x - comp.x, y - comp.y);
|
||||
Component lightweight = null;
|
||||
// Optimized version of two passes:
|
||||
// see comment in sun.awt.SunGraphicsCallback
|
||||
for (final Component comp : component) {
|
||||
final int x1 = x - comp.x;
|
||||
final int y1 = y - comp.y;
|
||||
if (!comp.contains(x1, y1)) {
|
||||
continue; // fast path
|
||||
}
|
||||
if (!comp.isLightweight()) {
|
||||
final Component child = getChildAt(comp, x1, y1, ignoreEnabled);
|
||||
if (child != null) {
|
||||
// return heavyweight component as soon as possible
|
||||
return child;
|
||||
}
|
||||
if (comp != null && comp.visible &&
|
||||
(ignoreEnabled || comp.enabled))
|
||||
{
|
||||
return comp;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < component.size(); i++) {
|
||||
Component comp = component.get(i);
|
||||
if (comp != null &&
|
||||
comp.peer instanceof LightweightPeer) {
|
||||
if (comp instanceof Container) {
|
||||
comp = ((Container)comp).findComponentAtImpl(x - comp.x,
|
||||
y - comp.y,
|
||||
ignoreEnabled);
|
||||
} else {
|
||||
comp = comp.getComponentAt(x - comp.x, y - comp.y);
|
||||
}
|
||||
if (comp != null && comp.visible &&
|
||||
(ignoreEnabled || comp.enabled))
|
||||
{
|
||||
return comp;
|
||||
} else {
|
||||
if (lightweight == null) {
|
||||
// save and return later the first lightweight component
|
||||
lightweight = getChildAt(comp, x1, y1, ignoreEnabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
return lightweight != null ? lightweight : this;
|
||||
}
|
||||
|
||||
return this;
|
||||
/**
|
||||
* Helper method for findComponentAtImpl. Finds a child component using
|
||||
* findComponentAtImpl for Container and getComponentAt for Component.
|
||||
*/
|
||||
private static Component getChildAt(Component comp, int x, int y,
|
||||
boolean ignoreEnabled) {
|
||||
if (comp instanceof Container) {
|
||||
comp = ((Container) comp).findComponentAtImpl(x, y,
|
||||
ignoreEnabled);
|
||||
} else {
|
||||
comp = comp.getComponentAt(x, y);
|
||||
}
|
||||
if (comp != null && comp.visible &&
|
||||
(ignoreEnabled || comp.enabled)) {
|
||||
return comp;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4420,6 +4419,18 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener {
|
||||
|
||||
private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.LightweightDispatcher");
|
||||
|
||||
private static final int BUTTONS_DOWN_MASK;
|
||||
|
||||
static {
|
||||
int[] buttonsDownMask = AWTAccessor.getInputEventAccessor().
|
||||
getButtonDownMasks();
|
||||
int mask = 0;
|
||||
for (int buttonDownMask : buttonsDownMask) {
|
||||
mask |= buttonDownMask;
|
||||
}
|
||||
BUTTONS_DOWN_MASK = mask;
|
||||
}
|
||||
|
||||
LightweightDispatcher(Container nativeContainer) {
|
||||
this.nativeContainer = nativeContainer;
|
||||
mouseEventTarget = new WeakReference<>(null);
|
||||
@ -4488,25 +4499,12 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener {
|
||||
private boolean isMouseGrab(MouseEvent e) {
|
||||
int modifiers = e.getModifiersEx();
|
||||
|
||||
if(e.getID() == MouseEvent.MOUSE_PRESSED
|
||||
|| e.getID() == MouseEvent.MOUSE_RELEASED)
|
||||
{
|
||||
switch (e.getButton()) {
|
||||
case MouseEvent.BUTTON1:
|
||||
modifiers ^= InputEvent.BUTTON1_DOWN_MASK;
|
||||
break;
|
||||
case MouseEvent.BUTTON2:
|
||||
modifiers ^= InputEvent.BUTTON2_DOWN_MASK;
|
||||
break;
|
||||
case MouseEvent.BUTTON3:
|
||||
modifiers ^= InputEvent.BUTTON3_DOWN_MASK;
|
||||
break;
|
||||
}
|
||||
if (e.getID() == MouseEvent.MOUSE_PRESSED
|
||||
|| e.getID() == MouseEvent.MOUSE_RELEASED) {
|
||||
modifiers ^= InputEvent.getMaskForButton(e.getButton());
|
||||
}
|
||||
/* modifiers now as just before event */
|
||||
return ((modifiers & (InputEvent.BUTTON1_DOWN_MASK
|
||||
| InputEvent.BUTTON2_DOWN_MASK
|
||||
| InputEvent.BUTTON3_DOWN_MASK)) != 0);
|
||||
return ((modifiers & BUTTONS_DOWN_MASK) != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -413,9 +413,9 @@ public class Menu extends MenuItem implements MenuContainer, Accessible {
|
||||
items.removeElementAt(index);
|
||||
MenuPeer peer = (MenuPeer)this.peer;
|
||||
if (peer != null) {
|
||||
peer.delItem(index);
|
||||
mi.removeNotify();
|
||||
mi.parent = null;
|
||||
peer.delItem(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -222,7 +222,6 @@ public class MenuBar extends MenuComponent implements MenuContainer, Accessible
|
||||
if (m.parent != null) {
|
||||
m.parent.remove(m);
|
||||
}
|
||||
menus.addElement(m);
|
||||
m.parent = this;
|
||||
|
||||
MenuBarPeer peer = (MenuBarPeer)this.peer;
|
||||
@ -232,6 +231,7 @@ public class MenuBar extends MenuComponent implements MenuContainer, Accessible
|
||||
}
|
||||
peer.addMenu(m);
|
||||
}
|
||||
menus.addElement(m);
|
||||
return m;
|
||||
}
|
||||
}
|
||||
@ -248,9 +248,9 @@ public class MenuBar extends MenuComponent implements MenuContainer, Accessible
|
||||
menus.removeElementAt(index);
|
||||
MenuBarPeer peer = (MenuBarPeer)this.peer;
|
||||
if (peer != null) {
|
||||
peer.delMenu(index);
|
||||
m.removeNotify();
|
||||
m.parent = null;
|
||||
peer.delMenu(index);
|
||||
}
|
||||
if (helpMenu == m) {
|
||||
helpMenu = null;
|
||||
|
@ -77,7 +77,7 @@ public abstract class MenuComponent implements java.io.Serializable {
|
||||
* @see #setFont(Font)
|
||||
* @see #getFont()
|
||||
*/
|
||||
Font font;
|
||||
volatile Font font;
|
||||
|
||||
/**
|
||||
* The menu component's name, which defaults to <code>null</code>.
|
||||
@ -302,11 +302,13 @@ public abstract class MenuComponent implements java.io.Serializable {
|
||||
* @see java.awt.font.TextAttribute
|
||||
*/
|
||||
public void setFont(Font f) {
|
||||
font = f;
|
||||
//Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font)
|
||||
MenuComponentPeer peer = this.peer;
|
||||
if (peer != null) {
|
||||
peer.setFont(f);
|
||||
synchronized (getTreeLock()) {
|
||||
font = f;
|
||||
//Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font)
|
||||
MenuComponentPeer peer = this.peer;
|
||||
if (peer != null) {
|
||||
peer.setFont(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,6 +65,7 @@ class WaitDispatchSupport implements SecondaryLoop {
|
||||
|
||||
private AtomicBoolean keepBlockingEDT = new AtomicBoolean(false);
|
||||
private AtomicBoolean keepBlockingCT = new AtomicBoolean(false);
|
||||
private AtomicBoolean afterExit = new AtomicBoolean(false);
|
||||
|
||||
private static synchronized void initializeTimer() {
|
||||
if (timer == null) {
|
||||
@ -114,7 +115,7 @@ class WaitDispatchSupport implements SecondaryLoop {
|
||||
}
|
||||
boolean extEvaluate =
|
||||
(extCondition != null) ? extCondition.evaluate() : true;
|
||||
if (!keepBlockingEDT.get() || !extEvaluate) {
|
||||
if (!keepBlockingEDT.get() || !extEvaluate || afterExit.get()) {
|
||||
if (timerTask != null) {
|
||||
timerTask.cancel();
|
||||
timerTask = null;
|
||||
@ -174,110 +175,116 @@ class WaitDispatchSupport implements SecondaryLoop {
|
||||
log.fine("The secondary loop is already running, aborting");
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
if (afterExit.get()) {
|
||||
log.fine("Exit was called already, aborting");
|
||||
return false;
|
||||
}
|
||||
|
||||
final Runnable run = new Runnable() {
|
||||
public void run() {
|
||||
log.fine("Starting a new event pump");
|
||||
if (filter == null) {
|
||||
dispatchThread.pumpEvents(condition);
|
||||
} else {
|
||||
dispatchThread.pumpEventsForFilter(condition, filter);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// We have two mechanisms for blocking: if we're on the
|
||||
// dispatch thread, start a new event pump; if we're
|
||||
// on any other thread, call wait() on the treelock
|
||||
|
||||
Thread currentThread = Thread.currentThread();
|
||||
if (currentThread == dispatchThread) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINEST)) {
|
||||
log.finest("On dispatch thread: " + dispatchThread);
|
||||
}
|
||||
if (interval != 0) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINEST)) {
|
||||
log.finest("scheduling the timer for " + interval + " ms");
|
||||
}
|
||||
timer.schedule(timerTask = new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (keepBlockingEDT.compareAndSet(true, false)) {
|
||||
wakeupEDT();
|
||||
}
|
||||
}
|
||||
}, interval);
|
||||
}
|
||||
// Dispose SequencedEvent we are dispatching on the current
|
||||
// AppContext, to prevent us from hang - see 4531693 for details
|
||||
SequencedEvent currentSE = KeyboardFocusManager.
|
||||
getCurrentKeyboardFocusManager().getCurrentSequencedEvent();
|
||||
if (currentSE != null) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Dispose current SequencedEvent: " + currentSE);
|
||||
}
|
||||
currentSE.dispose();
|
||||
}
|
||||
// In case the exit() method is called before starting
|
||||
// new event pump it will post the waking event to EDT.
|
||||
// The event will be handled after the new event pump
|
||||
// starts. Thus, the enter() method will not hang.
|
||||
//
|
||||
// Event pump should be privileged. See 6300270.
|
||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
run.run();
|
||||
return null;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINEST)) {
|
||||
log.finest("On non-dispatch thread: " + currentThread);
|
||||
}
|
||||
synchronized (getTreeLock()) {
|
||||
if (filter != null) {
|
||||
dispatchThread.addEventFilter(filter);
|
||||
}
|
||||
try {
|
||||
EventQueue eq = dispatchThread.getEventQueue();
|
||||
eq.postEvent(new PeerEvent(this, run, PeerEvent.PRIORITY_EVENT));
|
||||
keepBlockingCT.set(true);
|
||||
if (interval > 0) {
|
||||
long currTime = System.currentTimeMillis();
|
||||
while (keepBlockingCT.get() &&
|
||||
((extCondition != null) ? extCondition.evaluate() : true) &&
|
||||
(currTime + interval > System.currentTimeMillis()))
|
||||
{
|
||||
getTreeLock().wait(interval);
|
||||
}
|
||||
final Runnable run = new Runnable() {
|
||||
public void run() {
|
||||
log.fine("Starting a new event pump");
|
||||
if (filter == null) {
|
||||
dispatchThread.pumpEvents(condition);
|
||||
} else {
|
||||
while (keepBlockingCT.get() &&
|
||||
((extCondition != null) ? extCondition.evaluate() : true))
|
||||
{
|
||||
getTreeLock().wait();
|
||||
}
|
||||
}
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("waitDone " + keepBlockingEDT.get() + " " + keepBlockingCT.get());
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Exception caught while waiting: " + e);
|
||||
}
|
||||
} finally {
|
||||
if (filter != null) {
|
||||
dispatchThread.removeEventFilter(filter);
|
||||
dispatchThread.pumpEventsForFilter(condition, filter);
|
||||
}
|
||||
}
|
||||
// If the waiting process has been stopped because of the
|
||||
// time interval passed or an exception occurred, the state
|
||||
// should be changed
|
||||
keepBlockingEDT.set(false);
|
||||
keepBlockingCT.set(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return true;
|
||||
// We have two mechanisms for blocking: if we're on the
|
||||
// dispatch thread, start a new event pump; if we're
|
||||
// on any other thread, call wait() on the treelock
|
||||
|
||||
Thread currentThread = Thread.currentThread();
|
||||
if (currentThread == dispatchThread) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINEST)) {
|
||||
log.finest("On dispatch thread: " + dispatchThread);
|
||||
}
|
||||
if (interval != 0) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINEST)) {
|
||||
log.finest("scheduling the timer for " + interval + " ms");
|
||||
}
|
||||
timer.schedule(timerTask = new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (keepBlockingEDT.compareAndSet(true, false)) {
|
||||
wakeupEDT();
|
||||
}
|
||||
}
|
||||
}, interval);
|
||||
}
|
||||
// Dispose SequencedEvent we are dispatching on the current
|
||||
// AppContext, to prevent us from hang - see 4531693 for details
|
||||
SequencedEvent currentSE = KeyboardFocusManager.
|
||||
getCurrentKeyboardFocusManager().getCurrentSequencedEvent();
|
||||
if (currentSE != null) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Dispose current SequencedEvent: " + currentSE);
|
||||
}
|
||||
currentSE.dispose();
|
||||
}
|
||||
// In case the exit() method is called before starting
|
||||
// new event pump it will post the waking event to EDT.
|
||||
// The event will be handled after the new event pump
|
||||
// starts. Thus, the enter() method will not hang.
|
||||
//
|
||||
// Event pump should be privileged. See 6300270.
|
||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
run.run();
|
||||
return null;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINEST)) {
|
||||
log.finest("On non-dispatch thread: " + currentThread);
|
||||
}
|
||||
keepBlockingCT.set(true);
|
||||
synchronized (getTreeLock()) {
|
||||
if (afterExit.get()) return false;
|
||||
if (filter != null) {
|
||||
dispatchThread.addEventFilter(filter);
|
||||
}
|
||||
try {
|
||||
EventQueue eq = dispatchThread.getEventQueue();
|
||||
eq.postEvent(new PeerEvent(this, run, PeerEvent.PRIORITY_EVENT));
|
||||
if (interval > 0) {
|
||||
long currTime = System.currentTimeMillis();
|
||||
while (keepBlockingCT.get() &&
|
||||
((extCondition != null) ? extCondition.evaluate() : true) &&
|
||||
(currTime + interval > System.currentTimeMillis()))
|
||||
{
|
||||
getTreeLock().wait(interval);
|
||||
}
|
||||
} else {
|
||||
while (keepBlockingCT.get() &&
|
||||
((extCondition != null) ? extCondition.evaluate() : true))
|
||||
{
|
||||
getTreeLock().wait();
|
||||
}
|
||||
}
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("waitDone " + keepBlockingEDT.get() + " " + keepBlockingCT.get());
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Exception caught while waiting: " + e);
|
||||
}
|
||||
} finally {
|
||||
if (filter != null) {
|
||||
dispatchThread.removeEventFilter(filter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
finally {
|
||||
keepBlockingEDT.set(false);
|
||||
keepBlockingCT.set(false);
|
||||
afterExit.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -288,7 +295,8 @@ class WaitDispatchSupport implements SecondaryLoop {
|
||||
log.fine("exit(): blockingEDT=" + keepBlockingEDT.get() +
|
||||
", blockingCT=" + keepBlockingCT.get());
|
||||
}
|
||||
if (keepBlockingEDT.compareAndSet(true, false)) {
|
||||
afterExit.set(true);
|
||||
if (keepBlockingEDT.getAndSet(false)) {
|
||||
wakeupEDT();
|
||||
return true;
|
||||
}
|
||||
|
@ -331,7 +331,7 @@ public interface OpenType {
|
||||
* Optical bounds. Table tag "opbd" in the Open
|
||||
* Type Specification.
|
||||
*/
|
||||
public final static int TAG_OPBD = 0x6d6f7274;
|
||||
public final static int TAG_OPBD = 0x6F706264;
|
||||
|
||||
/**
|
||||
* Glyph properties. Table tag "prop" in the Open
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -218,6 +218,9 @@ public class GroupLayout implements LayoutManager2 {
|
||||
|
||||
private static final int UNSET = Integer.MIN_VALUE;
|
||||
|
||||
// Maximum spring size constrain to avoid integer overflow
|
||||
private static final int INFINITE = Integer.MAX_VALUE >> 1;
|
||||
|
||||
/**
|
||||
* Indicates the size from the component or gap should be used for a
|
||||
* particular range value.
|
||||
@ -1389,7 +1392,7 @@ public class GroupLayout implements LayoutManager2 {
|
||||
}
|
||||
|
||||
int constrain(int value) {
|
||||
return Math.min(value, Short.MAX_VALUE);
|
||||
return Math.min(value, INFINITE);
|
||||
}
|
||||
|
||||
int getBaseline() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -24,14 +24,18 @@
|
||||
*/
|
||||
package javax.swing;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.applet.Applet;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.Locale;
|
||||
import java.util.Vector;
|
||||
import java.io.Serializable;
|
||||
import javax.accessibility.*;
|
||||
import java.awt.AWTEvent;
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Container;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.HeadlessException;
|
||||
import java.awt.LayoutManager;
|
||||
|
||||
import javax.accessibility.Accessible;
|
||||
import javax.accessibility.AccessibleContext;
|
||||
|
||||
/**
|
||||
* An extended version of <code>java.applet.Applet</code> that adds support for
|
||||
@ -243,9 +247,8 @@ public class JApplet extends Applet implements Accessible,
|
||||
* hidden: true
|
||||
* description: The menubar for accessing pulldown menus from this applet.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setJMenuBar(JMenuBar menuBar) {
|
||||
getRootPane().setMenuBar(menuBar);
|
||||
public void setJMenuBar(final JMenuBar menuBar) {
|
||||
getRootPane().setJMenuBar(menuBar);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -254,9 +257,8 @@ public class JApplet extends Applet implements Accessible,
|
||||
* @return the menubar set on this applet
|
||||
* @see #setJMenuBar
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public JMenuBar getJMenuBar() {
|
||||
return getRootPane().getMenuBar();
|
||||
return getRootPane().getJMenuBar();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -849,9 +849,8 @@ public class JDialog extends Dialog implements WindowConstants,
|
||||
* hidden: true
|
||||
* description: The menubar for accessing pulldown menus from this dialog.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setJMenuBar(JMenuBar menu) {
|
||||
getRootPane().setMenuBar(menu);
|
||||
public void setJMenuBar(final JMenuBar menu) {
|
||||
getRootPane().setJMenuBar(menu);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -860,12 +859,10 @@ public class JDialog extends Dialog implements WindowConstants,
|
||||
* @return the menubar set on this dialog
|
||||
* @see #setJMenuBar
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public JMenuBar getJMenuBar() {
|
||||
return getRootPane().getMenuBar();
|
||||
return getRootPane().getJMenuBar();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether calls to {@code add} and
|
||||
* {@code setLayout} are forwarded to the {@code contentPane}.
|
||||
|
@ -486,9 +486,8 @@ public class JFrame extends Frame implements WindowConstants,
|
||||
* hidden: true
|
||||
* description: The menubar for accessing pulldown menus from this frame.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setJMenuBar(JMenuBar menubar) {
|
||||
getRootPane().setMenuBar(menubar);
|
||||
public void setJMenuBar(final JMenuBar menubar) {
|
||||
getRootPane().setJMenuBar(menubar);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -497,9 +496,8 @@ public class JFrame extends Frame implements WindowConstants,
|
||||
*
|
||||
* @see #setJMenuBar
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public JMenuBar getJMenuBar() {
|
||||
return getRootPane().getMenuBar();
|
||||
return getRootPane().getJMenuBar();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -42,8 +42,6 @@ import java.text.spi.NumberFormatProvider;
|
||||
import javax.accessibility.*;
|
||||
import sun.util.locale.provider.LocaleProviderAdapter;
|
||||
import sun.util.locale.provider.LocaleResources;
|
||||
import sun.util.locale.provider.LocaleServiceProviderPool;
|
||||
|
||||
|
||||
/**
|
||||
* A single line input field that lets the user select a
|
||||
@ -77,12 +75,12 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
|
||||
* try {
|
||||
* spinner.commitEdit();
|
||||
* }
|
||||
* catch (ParseException pe) {{
|
||||
* catch (ParseException pe) {
|
||||
* // Edited value is invalid, spinner.getValue() will return
|
||||
* // the last valid value, you could revert the spinner to show that:
|
||||
* JComponent editor = spinner.getEditor()
|
||||
* JComponent editor = spinner.getEditor();
|
||||
* if (editor instanceof DefaultEditor) {
|
||||
* ((DefaultEditor)editor).getTextField().setValue(spinner.getValue();
|
||||
* ((DefaultEditor)editor).getTextField().setValue(spinner.getValue());
|
||||
* }
|
||||
* // reset the value to some known value:
|
||||
* spinner.setValue(fallbackValue);
|
||||
@ -972,7 +970,7 @@ public class JSpinner extends JComponent implements Accessible
|
||||
* and editing the value of a <code>SpinnerDateModel</code>
|
||||
* with a <code>JFormattedTextField</code>. <code>This</code>
|
||||
* <code>DateEditor</code> becomes both a <code>ChangeListener</code>
|
||||
* on the spinners model and a <code>PropertyChangeListener</code>
|
||||
* on the spinner and a <code>PropertyChangeListener</code>
|
||||
* on the new <code>JFormattedTextField</code>.
|
||||
*
|
||||
* @param spinner the spinner whose model <code>this</code> editor will monitor
|
||||
|
@ -182,9 +182,16 @@ public class RepaintManager
|
||||
*/
|
||||
private final ProcessingRunnable processingRunnable;
|
||||
|
||||
private final static JavaSecurityAccess javaSecurityAccess =
|
||||
SharedSecrets.getJavaSecurityAccess();
|
||||
private static final JavaSecurityAccess javaSecurityAccess =
|
||||
SharedSecrets.getJavaSecurityAccess();
|
||||
|
||||
/**
|
||||
* Listener installed to detect display changes. When display changes,
|
||||
* schedules a callback to notify all RepaintManagers of the display
|
||||
* changes.
|
||||
*/
|
||||
private static final DisplayChangedListener displayChangedHandler =
|
||||
new DisplayChangedHandler();
|
||||
|
||||
static {
|
||||
SwingAccessor.setRepaintManagerAccessor(new SwingAccessor.RepaintManagerAccessor() {
|
||||
@ -226,8 +233,8 @@ public class RepaintManager
|
||||
GraphicsEnvironment ge = GraphicsEnvironment.
|
||||
getLocalGraphicsEnvironment();
|
||||
if (ge instanceof SunGraphicsEnvironment) {
|
||||
((SunGraphicsEnvironment)ge).addDisplayChangedListener(
|
||||
new DisplayChangedHandler());
|
||||
((SunGraphicsEnvironment) ge).addDisplayChangedListener(
|
||||
displayChangedHandler);
|
||||
}
|
||||
Toolkit tk = Toolkit.getDefaultToolkit();
|
||||
if ((tk instanceof SunToolkit)
|
||||
@ -1679,6 +1686,12 @@ public class RepaintManager
|
||||
*/
|
||||
private static final class DisplayChangedHandler implements
|
||||
DisplayChangedListener {
|
||||
// Empty non private constructor was added because access to this
|
||||
// class shouldn't be generated by the compiler using synthetic
|
||||
// accessor method
|
||||
DisplayChangedHandler() {
|
||||
}
|
||||
|
||||
public void displayChanged() {
|
||||
scheduleDisplayChanges();
|
||||
}
|
||||
@ -1686,11 +1699,10 @@ public class RepaintManager
|
||||
public void paletteChanged() {
|
||||
}
|
||||
|
||||
private void scheduleDisplayChanges() {
|
||||
private static void scheduleDisplayChanges() {
|
||||
// To avoid threading problems, we notify each RepaintManager
|
||||
// on the thread it was created on.
|
||||
for (Object c : AppContext.getAppContexts()) {
|
||||
AppContext context = (AppContext) c;
|
||||
for (AppContext context : AppContext.getAppContexts()) {
|
||||
synchronized(context) {
|
||||
if (!context.isDisposed()) {
|
||||
EventQueue eventQueue = (EventQueue)context.get(
|
||||
|
@ -150,6 +150,8 @@ public class BasicComboBoxUI extends ComboBoxUI {
|
||||
*/
|
||||
protected KeyListener popupKeyListener;
|
||||
|
||||
private MouseWheelListener mouseWheelListener;
|
||||
|
||||
// This is used for knowing when to cache the minimum preferred size.
|
||||
// If the data in the list changes, the cached value get marked for recalc.
|
||||
// Added to the current JComboBox model
|
||||
@ -413,6 +415,10 @@ public class BasicComboBoxUI extends ComboBoxUI {
|
||||
comboBox.getModel().addListDataListener( listDataListener );
|
||||
}
|
||||
}
|
||||
|
||||
if ((mouseWheelListener = createMouseWheelListener()) != null) {
|
||||
comboBox.addMouseWheelListener(mouseWheelListener);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -459,6 +465,9 @@ public class BasicComboBoxUI extends ComboBoxUI {
|
||||
comboBox.getModel().removeListDataListener( listDataListener );
|
||||
}
|
||||
}
|
||||
if (mouseWheelListener != null) {
|
||||
comboBox.removeMouseWheelListener(mouseWheelListener);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -572,6 +581,10 @@ public class BasicComboBoxUI extends ComboBoxUI {
|
||||
return handler;
|
||||
}
|
||||
|
||||
private MouseWheelListener createMouseWheelListener() {
|
||||
return getHandler();
|
||||
}
|
||||
|
||||
//
|
||||
// end UI Initialization
|
||||
//======================
|
||||
@ -1723,7 +1736,8 @@ public class BasicComboBoxUI extends ComboBoxUI {
|
||||
//
|
||||
private class Handler implements ActionListener, FocusListener,
|
||||
KeyListener, LayoutManager,
|
||||
ListDataListener, PropertyChangeListener {
|
||||
ListDataListener, PropertyChangeListener,
|
||||
MouseWheelListener {
|
||||
//
|
||||
// PropertyChangeListener
|
||||
//
|
||||
@ -1997,21 +2011,25 @@ public class BasicComboBoxUI extends ComboBoxUI {
|
||||
public void actionPerformed(ActionEvent evt) {
|
||||
Object item = comboBox.getEditor().getItem();
|
||||
if (item != null) {
|
||||
if(!comboBox.isPopupVisible() && !item.equals(comboBox.getSelectedItem())) {
|
||||
comboBox.setSelectedItem(comboBox.getEditor().getItem());
|
||||
}
|
||||
ActionMap am = comboBox.getActionMap();
|
||||
if (am != null) {
|
||||
Action action = am.get("enterPressed");
|
||||
if (action != null) {
|
||||
action.actionPerformed(new ActionEvent(comboBox, evt.getID(),
|
||||
evt.getActionCommand(),
|
||||
evt.getModifiers()));
|
||||
if (!comboBox.isPopupVisible() && !item.equals(comboBox.getSelectedItem())) {
|
||||
comboBox.setSelectedItem(comboBox.getEditor().getItem());
|
||||
}
|
||||
ActionMap am = comboBox.getActionMap();
|
||||
if (am != null) {
|
||||
Action action = am.get("enterPressed");
|
||||
if (action != null) {
|
||||
action.actionPerformed(new ActionEvent(comboBox, evt.getID(),
|
||||
evt.getActionCommand(),
|
||||
evt.getModifiers()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void mouseWheelMoved(MouseWheelEvent e) {
|
||||
e.consume();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class DefaultKeySelectionManager implements JComboBox.KeySelectionManager, UIResource {
|
||||
private String prefix = "";
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -184,6 +184,8 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup {
|
||||
*/
|
||||
protected ItemListener itemListener;
|
||||
|
||||
private MouseWheelListener scrollerMouseWheelListener;
|
||||
|
||||
/**
|
||||
* This protected field is implementation specific. Do not access directly
|
||||
* or override.
|
||||
@ -311,6 +313,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup {
|
||||
uninstallComboBoxModelListeners(comboBox.getModel());
|
||||
uninstallKeyboardActions();
|
||||
uninstallListListeners();
|
||||
uninstallScrollerListeners();
|
||||
// We do this, otherwise the listener the ui installs on
|
||||
// the model (the combobox model in this case) will keep a
|
||||
// reference to the list, causing the list (and us) to never get gced.
|
||||
@ -608,6 +611,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup {
|
||||
scroller.setFocusable( false );
|
||||
scroller.getVerticalScrollBar().setFocusable( false );
|
||||
scroller.setBorder( null );
|
||||
installScrollerListeners();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -624,6 +628,20 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup {
|
||||
setFocusable( false );
|
||||
}
|
||||
|
||||
private void installScrollerListeners() {
|
||||
scrollerMouseWheelListener = getHandler();
|
||||
if (scrollerMouseWheelListener != null) {
|
||||
scroller.addMouseWheelListener(scrollerMouseWheelListener);
|
||||
}
|
||||
}
|
||||
|
||||
private void uninstallScrollerListeners() {
|
||||
if (scrollerMouseWheelListener != null) {
|
||||
scroller.removeMouseWheelListener(scrollerMouseWheelListener);
|
||||
scrollerMouseWheelListener = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method adds the necessary listeners to the JComboBox.
|
||||
*/
|
||||
@ -835,8 +853,8 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup {
|
||||
|
||||
|
||||
private class Handler implements ItemListener, MouseListener,
|
||||
MouseMotionListener, PropertyChangeListener,
|
||||
Serializable {
|
||||
MouseMotionListener, MouseWheelListener,
|
||||
PropertyChangeListener, Serializable {
|
||||
//
|
||||
// MouseListener
|
||||
// NOTE: this is added to both the JList and JComboBox
|
||||
@ -1024,6 +1042,13 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup {
|
||||
setListSelection(comboBox.getSelectedIndex());
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// MouseWheelListener
|
||||
//
|
||||
public void mouseWheelMoved(MouseWheelEvent e) {
|
||||
e.consume();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@ -1287,11 +1312,24 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup {
|
||||
else {
|
||||
screenBounds = new Rectangle(p, toolkit.getScreenSize());
|
||||
}
|
||||
|
||||
Rectangle rect = new Rectangle(px,py,pw,ph);
|
||||
if (py+ph > screenBounds.y+screenBounds.height
|
||||
&& ph < screenBounds.height) {
|
||||
rect.y = -rect.height;
|
||||
int borderHeight = 0;
|
||||
Border popupBorder = getBorder();
|
||||
if (popupBorder != null) {
|
||||
Insets borderInsets = popupBorder.getBorderInsets(this);
|
||||
borderHeight = borderInsets.top + borderInsets.bottom;
|
||||
screenBounds.width -= (borderInsets.left + borderInsets.right);
|
||||
screenBounds.height -= borderHeight;
|
||||
}
|
||||
Rectangle rect = new Rectangle(px, py, pw, ph);
|
||||
if (py + ph > screenBounds.y + screenBounds.height) {
|
||||
if (ph <= -screenBounds.y - borderHeight) {
|
||||
// popup goes above
|
||||
rect.y = -ph - borderHeight;
|
||||
} else {
|
||||
// a full screen height popup
|
||||
rect.y = screenBounds.y + Math.max(0, (screenBounds.height - ph) / 2 );
|
||||
rect.height = Math.min(screenBounds.height, ph);
|
||||
}
|
||||
}
|
||||
return rect;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -504,7 +504,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
|
||||
doPress(label);
|
||||
}
|
||||
else if (key == RELEASE) {
|
||||
doRelease(label);
|
||||
doRelease(label, e.getActionCommand() != null);
|
||||
}
|
||||
}
|
||||
|
||||
@ -517,33 +517,77 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
|
||||
SwingUtilities.replaceUIInputMap(label, JComponent.WHEN_FOCUSED, inputMap);
|
||||
}
|
||||
int dka = label.getDisplayedMnemonic();
|
||||
inputMap.put(KeyStroke.getKeyStroke(dka, BasicLookAndFeel.getFocusAcceleratorKeyMask(), true), RELEASE);
|
||||
putOnRelease(inputMap, dka, BasicLookAndFeel
|
||||
.getFocusAcceleratorKeyMask());
|
||||
// Need this when the sticky keys are enabled
|
||||
inputMap.put(KeyStroke.getKeyStroke(dka, 0, true), RELEASE);
|
||||
putOnRelease(inputMap, dka, 0);
|
||||
// Need this if ALT is released before the accelerator
|
||||
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ALT, 0, true), RELEASE);
|
||||
putOnRelease(inputMap, KeyEvent.VK_ALT, 0);
|
||||
label.requestFocus();
|
||||
}
|
||||
}
|
||||
|
||||
private void doRelease(JLabel label) {
|
||||
private void doRelease(JLabel label, boolean isCommand) {
|
||||
Component labelFor = label.getLabelFor();
|
||||
if (labelFor != null && labelFor.isEnabled()) {
|
||||
InputMap inputMap = SwingUtilities.getUIInputMap(label, JComponent.WHEN_FOCUSED);
|
||||
if (inputMap != null) {
|
||||
// inputMap should never be null.
|
||||
if (label.hasFocus()) {
|
||||
InputMap inputMap = SwingUtilities.getUIInputMap(label,
|
||||
JComponent.WHEN_FOCUSED);
|
||||
if (inputMap != null) {
|
||||
// inputMap should never be null.
|
||||
int dka = label.getDisplayedMnemonic();
|
||||
removeOnRelease(inputMap, dka, BasicLookAndFeel
|
||||
.getFocusAcceleratorKeyMask());
|
||||
removeOnRelease(inputMap, dka, 0);
|
||||
removeOnRelease(inputMap, KeyEvent.VK_ALT, 0);
|
||||
}
|
||||
inputMap = SwingUtilities.getUIInputMap(label,
|
||||
JComponent.WHEN_IN_FOCUSED_WINDOW);
|
||||
if (inputMap == null) {
|
||||
inputMap = new InputMapUIResource();
|
||||
SwingUtilities.replaceUIInputMap(label,
|
||||
JComponent.WHEN_IN_FOCUSED_WINDOW, inputMap);
|
||||
}
|
||||
int dka = label.getDisplayedMnemonic();
|
||||
inputMap.remove(KeyStroke.getKeyStroke(dka, BasicLookAndFeel.getFocusAcceleratorKeyMask(), true));
|
||||
inputMap.remove(KeyStroke.getKeyStroke(dka, 0, true));
|
||||
inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ALT, 0, true));
|
||||
}
|
||||
if (labelFor instanceof Container &&
|
||||
((Container) labelFor).isFocusCycleRoot()) {
|
||||
labelFor.requestFocus();
|
||||
if (isCommand) {
|
||||
putOnRelease(inputMap, KeyEvent.VK_ALT, 0);
|
||||
} else {
|
||||
putOnRelease(inputMap, dka, BasicLookAndFeel
|
||||
.getFocusAcceleratorKeyMask());
|
||||
// Need this when the sticky keys are enabled
|
||||
putOnRelease(inputMap, dka, 0);
|
||||
}
|
||||
if (labelFor instanceof Container &&
|
||||
((Container) labelFor).isFocusCycleRoot()) {
|
||||
labelFor.requestFocus();
|
||||
} else {
|
||||
SwingUtilities2.compositeRequestFocus(labelFor);
|
||||
}
|
||||
} else {
|
||||
SwingUtilities2.compositeRequestFocus(labelFor);
|
||||
InputMap inputMap = SwingUtilities.getUIInputMap(label,
|
||||
JComponent.WHEN_IN_FOCUSED_WINDOW);
|
||||
int dka = label.getDisplayedMnemonic();
|
||||
if (inputMap != null) {
|
||||
if (isCommand) {
|
||||
removeOnRelease(inputMap, dka, BasicLookAndFeel
|
||||
.getFocusAcceleratorKeyMask());
|
||||
removeOnRelease(inputMap, dka, 0);
|
||||
} else {
|
||||
removeOnRelease(inputMap, KeyEvent.VK_ALT, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void putOnRelease(InputMap inputMap, int keyCode, int modifiers) {
|
||||
inputMap.put(KeyStroke.getKeyStroke(keyCode, modifiers, true),
|
||||
RELEASE);
|
||||
}
|
||||
|
||||
private void removeOnRelease(InputMap inputMap, int keyCode, int modifiers) {
|
||||
inputMap.remove(KeyStroke.getKeyStroke(keyCode, modifiers, true));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -914,7 +914,9 @@ public class BasicPopupMenuUI extends PopupMenuUI {
|
||||
processMouseEvent(me);
|
||||
break;
|
||||
case MouseEvent.MOUSE_WHEEL:
|
||||
if (isInPopup(src)) {
|
||||
if (isInPopup(src)
|
||||
|| ((src instanceof JComboBox) && ((JComboBox) src).isPopupVisible())) {
|
||||
|
||||
return;
|
||||
}
|
||||
cancelPopupMenu();
|
||||
|
@ -438,7 +438,7 @@ public class BasicRadioButtonUI extends BasicToggleButtonUI
|
||||
// to the button group or not
|
||||
Component getFocusTransferBaseComponent(boolean next){
|
||||
Component focusBaseComp = activeBtn;
|
||||
Window container = SwingUtilities.getWindowAncestor(activeBtn);
|
||||
Container container = focusBaseComp.getFocusCycleRootAncestor();
|
||||
if (container != null) {
|
||||
FocusTraversalPolicy policy = container.getFocusTraversalPolicy();
|
||||
Component comp = next ? policy.getComponentAfter(container, activeBtn)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -989,7 +989,7 @@ public class BasicSpinnerUI extends SpinnerUI
|
||||
((JSpinner.DefaultEditor)newEditor).getTextField();
|
||||
if (tf != null) {
|
||||
if (tf.getFont() instanceof UIResource) {
|
||||
tf.setFont(spinner.getFont());
|
||||
tf.setFont(new FontUIResource(spinner.getFont()));
|
||||
}
|
||||
tf.addFocusListener(nextButtonHandler);
|
||||
tf.addFocusListener(previousButtonHandler);
|
||||
@ -1002,12 +1002,12 @@ public class BasicSpinnerUI extends SpinnerUI
|
||||
}
|
||||
else if ("font".equals(propertyName)) {
|
||||
JComponent editor = spinner.getEditor();
|
||||
if (editor!=null && editor instanceof JSpinner.DefaultEditor) {
|
||||
if (editor instanceof JSpinner.DefaultEditor) {
|
||||
JTextField tf =
|
||||
((JSpinner.DefaultEditor)editor).getTextField();
|
||||
if (tf != null) {
|
||||
if (tf.getFont() instanceof UIResource) {
|
||||
tf.setFont(spinner.getFont());
|
||||
tf.setFont(new FontUIResource(spinner.getFont()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -936,10 +936,11 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory {
|
||||
((AbstractDocument)doc).readLock();
|
||||
}
|
||||
try {
|
||||
if ((d.width > (i.left + i.right)) && (d.height > (i.top + i.bottom))) {
|
||||
rootView.setSize(d.width - i.left - i.right, d.height - i.top - i.bottom);
|
||||
if ((d.width > (i.left + i.right + caretMargin)) && (d.height > (i.top + i.bottom))) {
|
||||
rootView.setSize(d.width - i.left - i.right -
|
||||
caretMargin, d.height - i.top - i.bottom);
|
||||
}
|
||||
else if (d.width == 0 && d.height == 0) {
|
||||
else if (d.width == 0 || d.height == 0) {
|
||||
// Probably haven't been layed out yet, force some sort of
|
||||
// initial sizing.
|
||||
rootView.setSize(Integer.MAX_VALUE, Integer.MAX_VALUE);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,15 +27,11 @@ package javax.swing.plaf.metal;
|
||||
|
||||
import java.awt.event.*;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.*;
|
||||
import javax.swing.event.*;
|
||||
import javax.swing.plaf.*;
|
||||
import javax.swing.plaf.basic.*;
|
||||
import java.awt.*;
|
||||
import java.io.*;
|
||||
import java.security.*;
|
||||
|
||||
/**
|
||||
* Provides the metal look and feel implementation of <code>RootPaneUI</code>.
|
||||
@ -441,7 +437,6 @@ public class MetalRootPaneUI extends BasicRootPaneUI
|
||||
* @param the Container for which this layout manager is being used
|
||||
* @return a Dimension object containing the layout's preferred size
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public Dimension preferredLayoutSize(Container parent) {
|
||||
Dimension cpd, mbd, tpd;
|
||||
int cpWidth = 0;
|
||||
@ -463,8 +458,8 @@ public class MetalRootPaneUI extends BasicRootPaneUI
|
||||
cpHeight = cpd.height;
|
||||
}
|
||||
|
||||
if(root.getMenuBar() != null) {
|
||||
mbd = root.getMenuBar().getPreferredSize();
|
||||
if(root.getJMenuBar() != null) {
|
||||
mbd = root.getJMenuBar().getPreferredSize();
|
||||
if (mbd != null) {
|
||||
mbWidth = mbd.width;
|
||||
mbHeight = mbd.height;
|
||||
@ -494,7 +489,6 @@ public class MetalRootPaneUI extends BasicRootPaneUI
|
||||
* @param the Container for which this layout manager is being used
|
||||
* @return a Dimension object containing the layout's minimum size
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public Dimension minimumLayoutSize(Container parent) {
|
||||
Dimension cpd, mbd, tpd;
|
||||
int cpWidth = 0;
|
||||
@ -516,8 +510,8 @@ public class MetalRootPaneUI extends BasicRootPaneUI
|
||||
cpHeight = cpd.height;
|
||||
}
|
||||
|
||||
if(root.getMenuBar() != null) {
|
||||
mbd = root.getMenuBar().getMinimumSize();
|
||||
if(root.getJMenuBar() != null) {
|
||||
mbd = root.getJMenuBar().getMinimumSize();
|
||||
if (mbd != null) {
|
||||
mbWidth = mbd.width;
|
||||
mbHeight = mbd.height;
|
||||
@ -546,7 +540,6 @@ public class MetalRootPaneUI extends BasicRootPaneUI
|
||||
* @param the Container for which this layout manager is being used
|
||||
* @return a Dimension object containing the layout's maximum size
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public Dimension maximumLayoutSize(Container target) {
|
||||
Dimension cpd, mbd, tpd;
|
||||
int cpWidth = Integer.MAX_VALUE;
|
||||
@ -566,8 +559,8 @@ public class MetalRootPaneUI extends BasicRootPaneUI
|
||||
}
|
||||
}
|
||||
|
||||
if(root.getMenuBar() != null) {
|
||||
mbd = root.getMenuBar().getMaximumSize();
|
||||
if(root.getJMenuBar() != null) {
|
||||
mbd = root.getJMenuBar().getMaximumSize();
|
||||
if (mbd != null) {
|
||||
mbWidth = mbd.width;
|
||||
mbHeight = mbd.height;
|
||||
@ -610,7 +603,6 @@ public class MetalRootPaneUI extends BasicRootPaneUI
|
||||
*
|
||||
* @param the Container for which this layout manager is being used
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void layoutContainer(Container parent) {
|
||||
JRootPane root = (JRootPane) parent;
|
||||
Rectangle b = root.getBounds();
|
||||
@ -640,9 +632,9 @@ public class MetalRootPaneUI extends BasicRootPaneUI
|
||||
}
|
||||
}
|
||||
}
|
||||
if(root.getMenuBar() != null) {
|
||||
Dimension mbd = root.getMenuBar().getPreferredSize();
|
||||
root.getMenuBar().setBounds(0, nextY, w, mbd.height);
|
||||
if(root.getJMenuBar() != null) {
|
||||
Dimension mbd = root.getJMenuBar().getPreferredSize();
|
||||
root.getJMenuBar().setBounds(0, nextY, w, mbd.height);
|
||||
nextY += mbd.height;
|
||||
}
|
||||
if(root.getContentPane() != null) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -134,6 +134,7 @@ public class SynthSplitPaneUI extends BasicSplitPaneUI
|
||||
value = Integer.valueOf(6);
|
||||
}
|
||||
LookAndFeel.installProperty(splitPane, "dividerSize", value);
|
||||
dividerSize = ((Number)value).intValue();
|
||||
|
||||
value = style.get(context, "SplitPane.oneTouchExpandable");
|
||||
if (value != null) {
|
||||
|
@ -802,7 +802,7 @@ public void grab() {
|
||||
/**
|
||||
* Determine if applet is targeted for JDK 1.1.
|
||||
*
|
||||
* @param applet Applet class.
|
||||
* @param clazz Applet class.
|
||||
* @return TRUE if applet is targeted for JDK 1.1;
|
||||
* FALSE if applet is not;
|
||||
* null if applet is unknown.
|
||||
@ -815,7 +815,7 @@ public void grab() {
|
||||
/**
|
||||
* Determine if applet is targeted for JDK 1.2.
|
||||
*
|
||||
* @param applet Applet class.
|
||||
* @param clazz Applet class.
|
||||
* @return TRUE if applet is targeted for JDK 1.2;
|
||||
* FALSE if applet is not;
|
||||
* null if applet is unknown.
|
||||
|
@ -270,10 +270,10 @@ class AppletSecurity extends AWTSecurityManager {
|
||||
* The <code>checkPackageAccess</code> method for class
|
||||
* <code>SecurityManager</code> calls
|
||||
* <code>checkPermission</code> with the
|
||||
* <code>RuntimePermission("accessClassInPackage."+pkg)</code>
|
||||
* <code>RuntimePermission("accessClassInPackage."+ pkgname)</code>
|
||||
* permission.
|
||||
*
|
||||
* @param pkg the package name.
|
||||
* @param pkgname the package name.
|
||||
* @exception SecurityException if the caller does not have
|
||||
* permission to access the specified package.
|
||||
* @see java.lang.ClassLoader#loadClass(java.lang.String, boolean)
|
||||
|
@ -190,7 +190,7 @@ public final class AppContext {
|
||||
*
|
||||
* @see #addPropertyChangeListener
|
||||
* @see #removePropertyChangeListener
|
||||
* @see #firePropertyChange
|
||||
* @see PropertyChangeSupport#firePropertyChange
|
||||
*/
|
||||
private PropertyChangeSupport changeSupport = null;
|
||||
|
||||
@ -809,7 +809,7 @@ public final class AppContext {
|
||||
*
|
||||
* @see #addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
|
||||
* @see #getPropertyChangeListeners(java.lang.String)
|
||||
* @see #removePropertyChangeListener(java.beans.PropertyChangeListener)
|
||||
* @see PropertyChangeSupport#removePropertyChangeListener(java.beans.PropertyChangeListener)
|
||||
*/
|
||||
public synchronized void removePropertyChangeListener(
|
||||
String propertyName,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -29,7 +29,7 @@ import java.awt.Point;
|
||||
import java.awt.Window;
|
||||
import java.awt.peer.MouseInfoPeer;
|
||||
|
||||
public class DefaultMouseInfoPeer implements MouseInfoPeer {
|
||||
public final class DefaultMouseInfoPeer implements MouseInfoPeer {
|
||||
|
||||
/**
|
||||
* Package-private constructor to prevent instantiation.
|
||||
|
@ -552,16 +552,10 @@ public abstract class EmbeddedFrame extends Frame
|
||||
}
|
||||
public void setModalBlocked(Dialog blocker, boolean blocked) {}
|
||||
|
||||
/**
|
||||
* @see java.awt.peer.ContainerPeer#restack
|
||||
*/
|
||||
public void restack() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.awt.peer.ContainerPeer#isRestackSupported
|
||||
*/
|
||||
public boolean isRestackSupported() {
|
||||
return false;
|
||||
}
|
||||
|
@ -45,8 +45,7 @@ import java.util.Properties;
|
||||
* with the HeadlessToolkit. It is primarily used
|
||||
* in embedded JRE's that do not have sun/awt/X11 classes.
|
||||
*/
|
||||
public class HToolkit extends SunToolkit
|
||||
implements ComponentFactory {
|
||||
public final class HToolkit extends SunToolkit implements ComponentFactory {
|
||||
|
||||
private static final KeyboardFocusManagerPeer kfmPeer = new KeyboardFocusManagerPeer() {
|
||||
@Override
|
||||
|
@ -366,8 +366,8 @@ public abstract class SunToolkit extends Toolkit
|
||||
* status to synchronous for any of its windows, then further focus
|
||||
* behaviour is unspecified.
|
||||
* <p>
|
||||
* @param w window for which the lightweight focus request status
|
||||
* should be set
|
||||
* @param changed the window for which the lightweight focus request
|
||||
* status should be set
|
||||
* @param status the value of lightweight focus request status
|
||||
*/
|
||||
|
||||
@ -1459,9 +1459,9 @@ public abstract class SunToolkit extends Toolkit
|
||||
* <p> Notice that realSync isn't guaranteed to work if recurring
|
||||
* actions occur, such as if during processing of some event
|
||||
* another request which may generate some events occurs. By
|
||||
* default, sync tries to perform as much as {@value MAX_ITERS}
|
||||
* default, sync tries to perform as much as {@value #MAX_ITERS}
|
||||
* cycles of event processing, allowing for roughly {@value
|
||||
* MAX_ITERS} additional requests.
|
||||
* #MAX_ITERS} additional requests.
|
||||
*
|
||||
* <p> For example, requestFocus() generates native request, which
|
||||
* generates one or two Java focus events, which then generate a
|
||||
|
@ -151,7 +151,7 @@ public abstract class SunClipboard extends Clipboard
|
||||
|
||||
|
||||
/**
|
||||
* @see java.awt.Clipboard#getAvailableDataFlavors
|
||||
* @see java.awt.datatransfer.Clipboard#getAvailableDataFlavors
|
||||
* @since 1.5
|
||||
*/
|
||||
public DataFlavor[] getAvailableDataFlavors() {
|
||||
@ -167,7 +167,7 @@ public abstract class SunClipboard extends Clipboard
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.awt.Clipboard#isDataFlavorAvailable
|
||||
* @see java.awt.datatransfer.Clipboard#isDataFlavorAvailable
|
||||
* @since 1.5
|
||||
*/
|
||||
public boolean isDataFlavorAvailable(DataFlavor flavor) {
|
||||
@ -186,7 +186,7 @@ public abstract class SunClipboard extends Clipboard
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.awt.Clipboard#getData
|
||||
* @see java.awt.datatransfer.Clipboard#getData
|
||||
* @since 1.5
|
||||
*/
|
||||
public Object getData(DataFlavor flavor)
|
||||
|
@ -27,30 +27,30 @@ package sun.awt.geom;
|
||||
|
||||
public interface PathConsumer2D {
|
||||
/**
|
||||
* @see java.awt.geom.Path2D.Float.moveTo
|
||||
* @see java.awt.geom.Path2D.Float#moveTo
|
||||
*/
|
||||
public void moveTo(float x, float y);
|
||||
|
||||
/**
|
||||
* @see java.awt.geom.Path2D.Float.lineTo
|
||||
* @see java.awt.geom.Path2D.Float#lineTo
|
||||
*/
|
||||
public void lineTo(float x, float y);
|
||||
|
||||
/**
|
||||
* @see java.awt.geom.Path2D.Float.quadTo
|
||||
* @see java.awt.geom.Path2D.Float#quadTo
|
||||
*/
|
||||
public void quadTo(float x1, float y1,
|
||||
float x2, float y2);
|
||||
|
||||
/**
|
||||
* @see java.awt.geom.Path2D.Float.curveTo
|
||||
* @see java.awt.geom.Path2D.Float#curveTo
|
||||
*/
|
||||
public void curveTo(float x1, float y1,
|
||||
float x2, float y2,
|
||||
float x3, float y3);
|
||||
|
||||
/**
|
||||
* @see java.awt.geom.Path2D.Float.closePath
|
||||
* @see java.awt.geom.Path2D.Float#closePath
|
||||
*/
|
||||
public void closePath();
|
||||
|
||||
|
@ -519,7 +519,7 @@ class ExecutableInputMethodManager extends InputMethodManager
|
||||
* Writes the preferred input method descriptor class name into
|
||||
* the user's Preferences tree in accordance with the given locale.
|
||||
*
|
||||
* @param inputMethodLocator input method locator to remember.
|
||||
* @param locator input method locator to remember.
|
||||
*/
|
||||
private synchronized void putPreferredInputMethod(InputMethodLocator locator) {
|
||||
InputMethodDescriptor descriptor = locator.getDescriptor();
|
||||
|
@ -176,7 +176,7 @@ public class ByteBandedRaster extends SunWritableRaster {
|
||||
* Returns data offset for the specified band. The data offset
|
||||
* is the index into the band's data array
|
||||
* in which the first sample of the first scanline is stored.
|
||||
* @param The band whose offset is returned.
|
||||
* @param band The band whose offset is returned.
|
||||
*/
|
||||
public int getDataOffset(int band) {
|
||||
return dataOffsets[band];
|
||||
@ -222,11 +222,11 @@ public class ByteBandedRaster extends SunWritableRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
* @return An object reference to an array of type defined by
|
||||
* @return An object reference to an array of type defined by
|
||||
* getTransferType() with the request pixel data.
|
||||
*/
|
||||
public Object getDataElements(int x, int y, Object obj) {
|
||||
@ -267,9 +267,9 @@ public class ByteBandedRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -320,8 +320,8 @@ public class ByteBandedRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param band The band to return.
|
||||
* @param outData If non-null, data elements for all bands
|
||||
* at the specified location are returned in this array.
|
||||
@ -368,8 +368,8 @@ public class ByteBandedRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param outData If non-null, data elements for all bands
|
||||
* at the specified location are returned in this array.
|
||||
* @return Data array with data elements for all bands.
|
||||
@ -412,7 +412,7 @@ public class ByteBandedRaster extends SunWritableRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements()
|
||||
* containing the pixel data to place at x,y.
|
||||
*/
|
||||
@ -505,7 +505,7 @@ public class ByteBandedRaster extends SunWritableRaster {
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements()
|
||||
* containing the pixel data to place between x,y and
|
||||
* x+h, y+h.
|
||||
|
@ -253,7 +253,7 @@ public class ByteComponentRaster extends SunWritableRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -299,9 +299,9 @@ public class ByteComponentRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -352,8 +352,8 @@ public class ByteComponentRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param band The band to return.
|
||||
* @param outData If non-null, data elements for all bands
|
||||
* at the specified location are returned in this array.
|
||||
@ -415,8 +415,8 @@ public class ByteComponentRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param outData If non-null, data elements for all bands
|
||||
* at the specified location are returned in this array.
|
||||
* @return Data array with data elements for all bands.
|
||||
@ -458,7 +458,7 @@ public class ByteComponentRaster extends SunWritableRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements()
|
||||
* containing the pixel data to place at x,y.
|
||||
*/
|
||||
@ -577,7 +577,7 @@ public class ByteComponentRaster extends SunWritableRaster {
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements()
|
||||
* containing the pixel data to place between x,y and
|
||||
* x+h, y+h.
|
||||
|
@ -305,7 +305,7 @@ public class ByteInterleavedRaster extends ByteComponentRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -351,9 +351,9 @@ public class ByteInterleavedRaster extends ByteComponentRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -376,8 +376,8 @@ public class ByteInterleavedRaster extends ByteComponentRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param band The band to return.
|
||||
* @param outData If non-null, data elements for all bands
|
||||
* at the specified location are returned in this array.
|
||||
@ -437,8 +437,8 @@ public class ByteInterleavedRaster extends ByteComponentRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param outData If non-null, data elements for all bands
|
||||
* at the specified location are returned in this array.
|
||||
* @return Data array with data elements for all bands.
|
||||
@ -536,7 +536,7 @@ public class ByteInterleavedRaster extends ByteComponentRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements()
|
||||
* containing the pixel data to place at x,y.
|
||||
*/
|
||||
@ -666,7 +666,7 @@ public class ByteInterleavedRaster extends ByteComponentRaster {
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements()
|
||||
* containing the pixel data to place between x,y and
|
||||
* x+h, y+h.
|
||||
|
@ -234,7 +234,7 @@ public class BytePackedRaster extends SunWritableRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -306,9 +306,9 @@ public class BytePackedRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -358,8 +358,8 @@ public class BytePackedRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param band The band to return, is ignored.
|
||||
* @param outData If non-null, data elements
|
||||
* at the specified locations are returned in this array.
|
||||
@ -383,8 +383,8 @@ public class BytePackedRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param outData If non-null, data elements
|
||||
* at the specified locations are returned in this array.
|
||||
* @return Byte array with data elements.
|
||||
@ -499,7 +499,7 @@ public class BytePackedRaster extends SunWritableRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements()
|
||||
* containing the pixel data to place at x,y.
|
||||
*/
|
||||
@ -857,7 +857,7 @@ public class BytePackedRaster extends SunWritableRaster {
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements()
|
||||
* containing the pixel data to place between x,y and
|
||||
* x+h, y+h.
|
||||
|
@ -33,7 +33,7 @@ package sun.awt.image;
|
||||
* threads which manage the applications User Interface.
|
||||
*
|
||||
* @see ImageFetcher
|
||||
* @see ImageProducer
|
||||
* @see java.awt.image.ImageProducer
|
||||
*
|
||||
* @author Jim Graham
|
||||
*/
|
||||
@ -42,7 +42,7 @@ public interface ImageFetchable {
|
||||
* This method is called by one of the ImageFetcher threads to start
|
||||
* the flow of information from the ImageProducer to the ImageConsumer.
|
||||
* @see ImageFetcher
|
||||
* @see ImageProducer
|
||||
* @see java.awt.image.ImageProducer
|
||||
*/
|
||||
public void doFetch();
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ public class IntegerComponentRaster extends SunWritableRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -309,9 +309,9 @@ public class IntegerComponentRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -358,7 +358,7 @@ public class IntegerComponentRaster extends SunWritableRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements()
|
||||
* containing the pixel data to place at x,y.
|
||||
*/
|
||||
@ -489,7 +489,7 @@ public class IntegerComponentRaster extends SunWritableRaster {
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements()
|
||||
* containing the pixel data to place between x,y and
|
||||
* x+h, y+h.
|
||||
|
@ -206,7 +206,7 @@ public class IntegerInterleavedRaster extends IntegerComponentRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -249,9 +249,9 @@ public class IntegerInterleavedRaster extends IntegerComponentRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -291,7 +291,7 @@ public class IntegerInterleavedRaster extends IntegerComponentRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements()
|
||||
* containing the pixel data to place at x,y.
|
||||
*/
|
||||
@ -410,7 +410,7 @@ public class IntegerInterleavedRaster extends IntegerComponentRaster {
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements()
|
||||
* containing the pixel data to place between x,y and
|
||||
* x+h, y+h.
|
||||
|
@ -172,7 +172,7 @@ public class ShortBandedRaster extends SunWritableRaster {
|
||||
* Returns the data offset for the specified band. The data offset
|
||||
* is the index into the band's data array
|
||||
* in which the first sample of the first scanline is stored.
|
||||
* @param The band whose offset is returned.
|
||||
* @param band The band whose offset is returned.
|
||||
*/
|
||||
public int getDataOffset(int band) {
|
||||
return dataOffsets[band];
|
||||
@ -218,7 +218,7 @@ public class ShortBandedRaster extends SunWritableRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -262,9 +262,9 @@ public class ShortBandedRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -315,8 +315,8 @@ public class ShortBandedRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param band The band to return.
|
||||
* @param outData If non-null, data elements for all bands
|
||||
* at the specified location are returned in this array.
|
||||
@ -363,8 +363,8 @@ public class ShortBandedRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param outData If non-null, data elements for all bands
|
||||
* at the specified location are returned in this array.
|
||||
* @return Data array with data elements for all bands.
|
||||
@ -407,7 +407,7 @@ public class ShortBandedRaster extends SunWritableRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements()
|
||||
* containing the pixel data to place at x,y.
|
||||
*/
|
||||
@ -503,7 +503,7 @@ public class ShortBandedRaster extends SunWritableRaster {
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements()
|
||||
* containing the pixel data to place between x,y and
|
||||
* x+h, y+h.
|
||||
|
@ -252,7 +252,7 @@ public class ShortComponentRaster extends SunWritableRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -298,9 +298,9 @@ public class ShortComponentRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -351,8 +351,8 @@ public class ShortComponentRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the sample rectangle.
|
||||
* @param height Height of the sample rectangle.
|
||||
* @param w Width of the sample rectangle.
|
||||
* @param h Height of the sample rectangle.
|
||||
* @param band The band to return.
|
||||
* @param outData If non-null, data elements for all bands
|
||||
* at the specified location are returned in this array.
|
||||
@ -414,8 +414,8 @@ public class ShortComponentRaster extends SunWritableRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param outData If non-null, data elements for all bands
|
||||
* at the specified location are returned in this array.
|
||||
* @return Data array with data elements for all bands.
|
||||
@ -456,7 +456,7 @@ public class ShortComponentRaster extends SunWritableRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements()
|
||||
* containing the pixel data to place at x,y.
|
||||
*/
|
||||
@ -553,7 +553,7 @@ public class ShortComponentRaster extends SunWritableRaster {
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements()
|
||||
* containing the pixel data to place between x,y and
|
||||
* x+h, y+h.
|
||||
|
@ -225,7 +225,7 @@ public class ShortInterleavedRaster extends ShortComponentRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -271,9 +271,9 @@ public class ShortInterleavedRaster extends ShortComponentRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param outData An object reference to an array of type defined by
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements().
|
||||
* If null an array of appropriate type and size will be
|
||||
* allocated.
|
||||
@ -324,8 +324,8 @@ public class ShortInterleavedRaster extends ShortComponentRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the sample rectangle.
|
||||
* @param height Height of the sample rectangle.
|
||||
* @param w Width of the sample rectangle.
|
||||
* @param h Height of the sample rectangle.
|
||||
* @param band The band to return.
|
||||
* @param outData If non-null, data elements for all bands
|
||||
* at the specified location are returned in this array.
|
||||
@ -387,8 +387,8 @@ public class ShortInterleavedRaster extends ShortComponentRaster {
|
||||
* </pre>
|
||||
* @param x The X coordinate of the upper left pixel location.
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param width Width of the pixel rectangle.
|
||||
* @param height Height of the pixel rectangle.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param outData If non-null, data elements for all bands
|
||||
* at the specified location are returned in this array.
|
||||
* @return Data array with data elements for all bands.
|
||||
@ -429,7 +429,7 @@ public class ShortInterleavedRaster extends ShortComponentRaster {
|
||||
* and references anything other than an array of transferType.
|
||||
* @param x The X coordinate of the pixel location.
|
||||
* @param y The Y coordinate of the pixel location.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length getNumDataElements()
|
||||
* containing the pixel data to place at x,y.
|
||||
*/
|
||||
@ -525,7 +525,7 @@ public class ShortInterleavedRaster extends ShortComponentRaster {
|
||||
* @param y The Y coordinate of the upper left pixel location.
|
||||
* @param w Width of the pixel rectangle.
|
||||
* @param h Height of the pixel rectangle.
|
||||
* @param inData An object reference to an array of type defined by
|
||||
* @param obj An object reference to an array of type defined by
|
||||
* getTransferType() and length w*h*getNumDataElements()
|
||||
* containing the pixel data to place between x,y and
|
||||
* x+h, y+h.
|
||||
|
@ -40,7 +40,7 @@ public class ShellFolderColumnInfo {
|
||||
private SortOrder sortOrder;
|
||||
private Comparator<?> comparator;
|
||||
/**
|
||||
* <code>false</code> (default) if the {@link comparator} expects folders as arguments,
|
||||
* <code>false</code> (default) if the {@link #comparator} expects folders as arguments,
|
||||
* and <code>true</code> if folder's column values. The first option is used default for comparison
|
||||
* on Windows and also for separating files from directories when sorting using
|
||||
* ShellFolderManager's inner comparator.
|
||||
|
@ -68,7 +68,7 @@ import java.util.RandomAccess;
|
||||
* synchronizing on some object that naturally encapsulates the list.
|
||||
*
|
||||
* If no such object exists, the list should be "wrapped" using the
|
||||
* {@link Collections#synchronizedList Collections.synchronizedList}
|
||||
* {@link java.util.Collections#synchronizedList Collections.synchronizedList}
|
||||
* method. This is best done at creation time, to prevent accidental
|
||||
* unsynchronized access to the list:<pre>
|
||||
* List list = Collections.synchronizedList(new IdentityArrayList(...));</pre>
|
||||
|
@ -41,7 +41,7 @@ import java.util.NoSuchElementException;
|
||||
* the <tt>IdentityLinkedList</tt> class provides uniformly named methods to
|
||||
* <tt>get</tt>, <tt>remove</tt> and <tt>insert</tt> an element at the
|
||||
* beginning and end of the list. These operations allow linked lists to be
|
||||
* used as a stack, {@linkplain Queue queue}, or {@linkplain Deque
|
||||
* used as a stack, {@linkplain java.util.Queue queue}, or {@linkplain Deque
|
||||
* double-ended queue}. <p>
|
||||
*
|
||||
* The class implements the <tt>Deque</tt> interface, providing
|
||||
@ -62,7 +62,7 @@ import java.util.NoSuchElementException;
|
||||
* encapsulates the list.
|
||||
*
|
||||
* If no such object exists, the list should be "wrapped" using the
|
||||
* {@link Collections#synchronizedList Collections.synchronizedList}
|
||||
* {@link java.util.Collections#synchronizedList Collections.synchronizedList}
|
||||
* method. This is best done at creation time, to prevent accidental
|
||||
* unsynchronized access to the list:<pre>
|
||||
* List list = Collections.synchronizedList(new IdentityLinkedList(...));</pre>
|
||||
@ -478,7 +478,7 @@ public class IdentityLinkedList<E>
|
||||
* Adds the specified element as the tail (last element) of this list.
|
||||
*
|
||||
* @param e the element to add
|
||||
* @return <tt>true</tt> (as specified by {@link Queue#offer})
|
||||
* @return <tt>true</tt> (as specified by {@link java.util.Queue#offer})
|
||||
* @since 1.5
|
||||
*/
|
||||
public boolean offer(E e) {
|
||||
|
@ -138,7 +138,7 @@ public final class ScriptRun
|
||||
* Get the script code for the script of the current script run.
|
||||
*
|
||||
* @return the script code for the script of the current script run.
|
||||
* @see #Script
|
||||
* @see Script
|
||||
*/
|
||||
public int getScriptCode() {
|
||||
return scriptCode;
|
||||
@ -274,7 +274,7 @@ public final class ScriptRun
|
||||
* @param scriptOne one of the script codes.
|
||||
* @param scriptTwo the other script code.
|
||||
* @return <code>true</code> if the two scripts are the same.
|
||||
* @see com.ibm.icu.lang.Script
|
||||
* @see Script
|
||||
*/
|
||||
private static boolean sameScript(int scriptOne, int scriptTwo) {
|
||||
return scriptOne == scriptTwo || scriptOne <= Script.INHERITED || scriptTwo <= Script.INHERITED;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -33,42 +33,43 @@ import java.awt.Font;
|
||||
import java.awt.font.FontRenderContext;
|
||||
import java.awt.font.LineMetrics;
|
||||
|
||||
public class StandardTextSource extends TextSource {
|
||||
char[] chars;
|
||||
int start;
|
||||
int len;
|
||||
int cstart;
|
||||
int clen;
|
||||
int level; // assumed all uniform
|
||||
int flags; // see GlyphVector.java
|
||||
Font font;
|
||||
FontRenderContext frc;
|
||||
CoreMetrics cm;
|
||||
final class StandardTextSource extends TextSource {
|
||||
|
||||
/**
|
||||
* Create a simple implementation of a TextSource.
|
||||
*
|
||||
* Chars is an array containing clen chars in the context, in
|
||||
* logical order, contiguously starting at cstart. Start and len
|
||||
* represent that portion of the context representing the true
|
||||
* source; start, like cstart, is relative to the start of the
|
||||
* character array.
|
||||
*
|
||||
* Level is the bidi level (0-63 for the entire context. Flags is
|
||||
* the layout flags. Font is the font, frc is the render context,
|
||||
* and lm is the line metrics for the entire source text, but not
|
||||
* necessarily the context.
|
||||
*/
|
||||
public StandardTextSource(char[] chars,
|
||||
int start,
|
||||
int len,
|
||||
int cstart,
|
||||
int clen,
|
||||
int level,
|
||||
int flags,
|
||||
Font font,
|
||||
FontRenderContext frc,
|
||||
CoreMetrics cm) {
|
||||
private final char[] chars;
|
||||
private final int start;
|
||||
private final int len;
|
||||
private final int cstart;
|
||||
private final int clen;
|
||||
private final int level; // assumed all uniform
|
||||
private final int flags; // see GlyphVector.java
|
||||
private final Font font;
|
||||
private final FontRenderContext frc;
|
||||
private final CoreMetrics cm;
|
||||
|
||||
/**
|
||||
* Create a simple implementation of a TextSource.
|
||||
*
|
||||
* Chars is an array containing clen chars in the context, in
|
||||
* logical order, contiguously starting at cstart. Start and len
|
||||
* represent that portion of the context representing the true
|
||||
* source; start, like cstart, is relative to the start of the
|
||||
* character array.
|
||||
*
|
||||
* Level is the bidi level (0-63 for the entire context. Flags is
|
||||
* the layout flags. Font is the font, frc is the render context,
|
||||
* and lm is the line metrics for the entire source text, but not
|
||||
* necessarily the context.
|
||||
*/
|
||||
StandardTextSource(char[] chars,
|
||||
int start,
|
||||
int len,
|
||||
int cstart,
|
||||
int clen,
|
||||
int level,
|
||||
int flags,
|
||||
Font font,
|
||||
FontRenderContext frc,
|
||||
CoreMetrics cm) {
|
||||
if (chars == null) {
|
||||
throw new IllegalArgumentException("bad chars: null");
|
||||
}
|
||||
@ -97,7 +98,7 @@ public class StandardTextSource extends TextSource {
|
||||
throw new IllegalArgumentException("bad frc: null");
|
||||
}
|
||||
|
||||
this.chars = chars.clone();
|
||||
this.chars = chars;
|
||||
this.start = start;
|
||||
this.len = len;
|
||||
this.cstart = cstart;
|
||||
@ -115,40 +116,10 @@ public class StandardTextSource extends TextSource {
|
||||
}
|
||||
}
|
||||
|
||||
/** Create a StandardTextSource whose context is coextensive with the source. */
|
||||
public StandardTextSource(char[] chars,
|
||||
int start,
|
||||
int len,
|
||||
int level,
|
||||
int flags,
|
||||
Font font,
|
||||
FontRenderContext frc,
|
||||
CoreMetrics cm) {
|
||||
this(chars, start, len, start, len, level, flags, font, frc, cm);
|
||||
}
|
||||
|
||||
/** Create a StandardTextSource whose context and source are coextensive with the entire char array. */
|
||||
public StandardTextSource(char[] chars,
|
||||
int level,
|
||||
int flags,
|
||||
Font font,
|
||||
FontRenderContext frc) {
|
||||
this(chars, 0, chars.length, 0, chars.length, level, flags, font, frc, null);
|
||||
}
|
||||
|
||||
/** Create a StandardTextSource whose context and source are all the text in the String. */
|
||||
public StandardTextSource(String str,
|
||||
int level,
|
||||
int flags,
|
||||
Font font,
|
||||
FontRenderContext frc) {
|
||||
this(str.toCharArray(), 0, str.length(), 0, str.length(), level, flags, font, frc, null);
|
||||
}
|
||||
|
||||
// TextSource API
|
||||
|
||||
public char[] getChars() {
|
||||
return chars.clone();
|
||||
return chars;
|
||||
}
|
||||
|
||||
public int getStart() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -41,19 +41,19 @@ import java.text.Bidi;
|
||||
*
|
||||
* @see Font
|
||||
* @see FontRenderContext
|
||||
* @see GlyphVector
|
||||
* @see java.awt.font.GlyphVector
|
||||
* @see TextLabel
|
||||
* @see ExtendedTextLabel
|
||||
* @see Bidi
|
||||
* @see TextLayout
|
||||
* @see java.awt.font.TextLayout
|
||||
*/
|
||||
|
||||
public class TextLabelFactory {
|
||||
private FontRenderContext frc;
|
||||
private char[] text;
|
||||
private Bidi bidi;
|
||||
public final class TextLabelFactory {
|
||||
private final FontRenderContext frc;
|
||||
private final char[] text;
|
||||
private final Bidi bidi;
|
||||
private Bidi lineBidi;
|
||||
private int flags;
|
||||
private final int flags;
|
||||
private int lineStart;
|
||||
private int lineLimit;
|
||||
|
||||
|
@ -86,7 +86,7 @@ public class NullSurfaceData extends SurfaceData {
|
||||
* In most cases, the returned Raster might contain more pixels
|
||||
* than requested.
|
||||
*
|
||||
* @see useTightBBoxes
|
||||
* @see #useTightBBoxes
|
||||
*/
|
||||
public Raster getRaster(int x, int y, int w, int h) {
|
||||
throw new InvalidPipeException("should be NOP");
|
||||
@ -101,7 +101,7 @@ public class NullSurfaceData extends SurfaceData {
|
||||
* the pixels has to be made when doing a getRaster. The
|
||||
* fewer pixels copied, the faster the operation will go.
|
||||
*
|
||||
* @see getRaster
|
||||
* @see #getRaster
|
||||
*/
|
||||
public boolean useTightBBoxes() {
|
||||
return false;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user