/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* The AWTAccessor utility class.
* The main purpose of this class is to enable accessing
* private and package-private fields of classes from
* for another example.
*/
public final class AWTAccessor {
/*
* We don't need any objects of this class.
* It's rather a collection of static methods
* and interfaces.
*/
private AWTAccessor() {
}
/*
* An interface of accessor for the java.awt.Component class.
*/
public interface ComponentAccessor {
/*
* Sets whether the native background erase for a component
* has been disabled via SunToolkit.disableBackgroundErase().
*/
/*
* Indicates whether the native background erase for a
* component has been disabled via
* SunToolkit.disableBackgroundErase().
*/
/*
*
* Gets the bounds of this component in the form of a
* <code>Rectangle</code> object. The bounds specify this
* component's width, height, and location relative to
* its parent.
*/
/*
* Sets the shape of a lw component to cut out from hw components.
*
* See 6797587, 6776743, 6768307, and 6768332 for details
*/
/**
* Sets GraphicsConfiguration value for the component.
*/
/*
* Requests focus to the component.
*/
/*
* Determines if the component can gain focus.
*/
/**
* Returns whether the component is visible without invoking
* any client code.
*/
/**
* Sets the RequestFocusController.
*/
/**
* Returns the appContext of the component.
*/
/**
* Sets the appContext of the component.
*/
/**
* Returns the parent of the component.
*/
/**
* Sets the parent of the component to the specified parent.
*/
/**
* Resizes the component to the specified width and height.
*/
/**
* Returns the location of the component.
*/
/**
* Moves the component to the new location.
*/
/**
* Determines whether this component is enabled.
*/
/**
* Determines whether this component is displayable.
*/
/**
* Gets the cursor set in the component.
*/
/**
* Returns the peer of the component.
*/
/**
* Sets the peer of the component to the specified peer.
*/
/**
* Determines whether this component is lightweight.
*/
/**
* Returns whether or not paint messages received from
* the operating system should be ignored.
*/
/**
* Returns the width of the component.
*/
/**
* Returns the height of the component.
*/
/**
* Returns the x coordinate of the component.
*/
/**
* Returns the y coordinate of the component.
*/
/**
* Gets the foreground color of this component.
*/
/**
* Gets the background color of this component.
*/
/**
* Sets the background of this component to the specified color.
*/
/**
* Gets the font of the component.
*/
/**
* Processes events occurring on this component.
*/
/*
* Returns the acc this component was constructed with.
*/
}
/*
* An interface of accessor for the java.awt.Container class.
*/
public interface ContainerAccessor {
/**
* Validates the container unconditionally.
*/
}
/*
* An interface of accessor for java.awt.Window class.
*/
public interface WindowAccessor {
/*
* Get opacity level of the given window.
*/
/*
* Set opacity level to the given window.
*/
/*
* Get a shape assigned to the given window.
*/
/*
* Set a shape to the given window.
*/
/*
* Set the opaque preoperty to the given window.
*/
/*
* Update the image of a non-opaque (translucent) window.
*/
/** Get the size of the security warning.
*/
/**
* Set the size of the security warning.
*/
/** Set the position of the security warning.
*/
float alignmentX, float alignmentY);
/** Request to recalculate the new position of the security warning for
*/
double x, double y, double w, double h);
/** Sets the synchronous status of focus requests on lightweight
* components in the specified window to the specified value.
*/
/**
* Indicates whether this window should receive focus on subsequently
* being shown, or being moved to the front.
*/
/**
* Indicates whether the specified window is an utility window for TrayIcon.
*/
/**
* Marks the specified window as an utility window for TrayIcon.
*/
}
/**
* An accessor for the AWTEvent class.
*/
public interface AWTEventAccessor {
/**
* Marks the event as posted.
*/
/**
* Sets the flag on this AWTEvent indicating that it was
* generated by the system.
*/
/**
* Indicates whether this AWTEvent was generated by the system.
*/
/**
* Returns the acc this event was constructed with.
*/
/**
* Returns binary data associated with this event;
*/
/**
* Associates binary data with this event;
*/
}
public interface InputEventAccessor {
/*
* Accessor for InputEvent.getButtonDownMasks()
*/
int[] getButtonDownMasks();
}
/*
* An accessor for the java.awt.Frame class.
*/
public interface FrameAccessor {
/*
* Sets the state of this frame.
*/
/*
* Gets the state of this frame.
*/
/*
* Gets the maximized bounds of this frame.
*/
}
/**
* An interface of accessor for the java.awt.KeyboardFocusManager class.
*/
public interface KeyboardFocusManagerAccessor {
/**
* Indicates whether the native implementation should
* proceed with a pending focus request for the heavyweight.
*/
boolean temporary,
boolean focusedWindowChangeAllowed,
long time,
/**
* Delivers focus for the lightweight descendant of the heavyweight
* synchronously.
*/
boolean temporary,
boolean focusedWindowChangeAllowed,
long time);
/**
* Removes the last focus request for the heavyweight from the queue.
*/
/**
* Sets the most recent focus owner in the window.
*/
/**
* Returns current KFM of the specified AppContext.
*/
/**
* Return the current focus cycle root
*/
}
/**
* An accessor for the MenuComponent class.
*/
public interface MenuComponentAccessor {
/**
* Returns the appContext of the menu component.
*/
/**
* Sets the appContext of the menu component.
*/
/**
* Returns the menu container of the menu component
*/
/**
* Gets the font used for this menu component.
*/
}
/**
* An accessor for the EventQueue class
*/
public interface EventQueueAccessor {
/**
* Gets the event dispatch thread.
*/
/**
* Checks if the current thread is EDT for the given EQ.
*/
/**
* Removes any pending events for the specified source object.
*/
/**
* Returns whether an event is pending on any of the separate Queues.
*/
/**
* Called from PostEventQueue.postEvent to notify that a new event
* appeared.
*/
/**
* Static in EventQueue
*/
}
/*
* An accessor for the PopupMenu class
*/
public interface PopupMenuAccessor {
/*
* Returns whether the popup menu is attached to a tray
*/
}
/*
* An accessor for the FileDialog class
*/
public interface FileDialogAccessor {
/*
* Sets the files the user selects
*/
/*
* Sets the file the user selects
*/
/*
* Sets the directory the user selects
*/
/*
* Returns whether the file dialog allows the multiple file selection.
*/
}
/**
* An accessor for the ScrollPaneAdjustable class.
*/
public interface ScrollPaneAdjustableAccessor {
/**
* Sets the value of this scrollbar to the specified value.
*/
final int type);
}
/**
* An accessor for the CheckboxMenuItem class
*/
public interface CheckboxMenuItemAccessor {
/**
* Returns whether menu item is checked
*/
}
/**
* An accessor for the Cursor class
*/
public interface CursorAccessor {
/**
* Returns pData of the Cursor class
*/
/**
* Sets pData to the Cursor class
*/
/**
* Return type of the Cursor class
*/
}
/**
* An accessor for the MenuBar class
*/
public interface MenuBarAccessor {
/**
* Returns help menu
*/
/**
* Returns menus
*/
}
/**
* An accessor for the MenuItem class
*/
public interface MenuItemAccessor {
/**
* Returns whether menu item is enabled
*/
/**
* Gets the command name of the action event that is fired
* by this menu item.
*/
/**
* Returns true if the item and all its ancestors are
* enabled, false otherwise
*/
/**
* Returns label
*/
/**
* Returns shortcut
*/
}
/**
* An accessor for the Menu class
*/
public interface MenuAccessor {
/**
* Returns vector of the items that are part of the Menu
*/
}
/**
* An accessor for the KeyEvent class
*/
public interface KeyEventAccessor {
/**
* Sets rawCode field for KeyEvent
*/
/**
* Sets primaryLevelUnicode field for KeyEvent
*/
/**
* Sets extendedKeyCode field for KeyEvent
*/
}
/**
* An accessor for the ClientPropertyKey class
*/
public interface ClientPropertyKeyAccessor {
/**
* Retrieves JComponent_TRANSFER_HANDLER enum object
*/
}
/**
* An accessor for the SystemTray class
*/
public interface SystemTrayAccessor {
/**
* Support for reporting bound property changes for Object properties.
*/
}
/**
* An accessor for the TrayIcon class
*/
public interface TrayIconAccessor {
}
/**
* An accessor for the DefaultKeyboardFocusManager class
*/
public interface DefaultKeyboardFocusManagerAccessor {
}
/*
* An accessor for the SequencedEventAccessor class
*/
public interface SequencedEventAccessor {
/*
* Returns the nested event.
*/
/*
* Returns true if the event is an instances of SequencedEvent.
*/
}
/*
* Accessor instances are initialized in the static initializers of
* corresponding AWT classes by using setters defined below.
*/
/*
* Set an accessor object for the java.awt.Component class.
*/
}
/*
* Retrieve the accessor object for the java.awt.Component class.
*/
if (componentAccessor == null) {
}
return componentAccessor;
}
/*
* Set an accessor object for the java.awt.Container class.
*/
}
/*
* Retrieve the accessor object for the java.awt.Container class.
*/
if (containerAccessor == null) {
}
return containerAccessor;
}
/*
* Set an accessor object for the java.awt.Window class.
*/
windowAccessor = wa;
}
/*
* Retrieve the accessor object for the java.awt.Window class.
*/
if (windowAccessor == null) {
}
return windowAccessor;
}
/*
* Set an accessor object for the java.awt.AWTEvent class.
*/
}
/*
* Retrieve the accessor object for the java.awt.AWTEvent class.
*/
if (awtEventAccessor == null) {
}
return awtEventAccessor;
}
/*
* Set an accessor object for the java.awt.event.InputEvent class.
*/
}
/*
* Retrieve the accessor object for the java.awt.event.InputEvent class.
*/
if (inputEventAccessor == null) {
}
return inputEventAccessor;
}
/*
* Set an accessor object for the java.awt.Frame class.
*/
frameAccessor = fa;
}
/*
* Retrieve the accessor object for the java.awt.Frame class.
*/
if (frameAccessor == null) {
}
return frameAccessor;
}
/*
* Set an accessor object for the java.awt.KeyboardFocusManager class.
*/
kfmAccessor = kfma;
}
/*
* Retrieve the accessor object for the java.awt.KeyboardFocusManager class.
*/
if (kfmAccessor == null) {
}
return kfmAccessor;
}
/*
* Set an accessor object for the java.awt.MenuComponent class.
*/
}
/*
* Retrieve the accessor object for the java.awt.MenuComponent class.
*/
if (menuComponentAccessor == null) {
}
return menuComponentAccessor;
}
/*
* Set an accessor object for the java.awt.EventQueue class.
*/
}
/*
* Retrieve the accessor object for the java.awt.EventQueue class.
*/
if (eventQueueAccessor == null) {
}
return eventQueueAccessor;
}
/*
* Set an accessor object for the java.awt.PopupMenu class.
*/
}
/*
* Retrieve the accessor object for the java.awt.PopupMenu class.
*/
if (popupMenuAccessor == null) {
}
return popupMenuAccessor;
}
/*
* Set an accessor object for the java.awt.FileDialog class.
*/
}
/*
* Retrieve the accessor object for the java.awt.FileDialog class.
*/
if (fileDialogAccessor == null) {
}
return fileDialogAccessor;
}
/**
* Set an accessor object for the java.awt.ScrollPaneAdjustable class.
*/
}
/**
* Retrieve the accessor object for the java.awt.ScrollPaneAdjustable
* class.
*/
if (scrollPaneAdjustableAccessor == null) {
}
return scrollPaneAdjustableAccessor;
}
/**
* Set an accessor object for the java.awt.CheckboxMenuItem class.
*/
}
/**
* Retrieve the accessor object for the java.awt.CheckboxMenuItem class.
*/
if (checkboxMenuItemAccessor == null) {
}
return checkboxMenuItemAccessor;
}
/**
* Set an accessor object for the java.awt.Cursor class.
*/
cursorAccessor = ca;
}
/**
* Retrieve the accessor object for the java.awt.Cursor class.
*/
if (cursorAccessor == null) {
}
return cursorAccessor;
}
/**
* Set an accessor object for the java.awt.MenuBar class.
*/
}
/**
* Retrieve the accessor object for the java.awt.MenuBar class.
*/
if (menuBarAccessor == null) {
}
return menuBarAccessor;
}
/**
* Set an accessor object for the java.awt.MenuItem class.
*/
}
/**
* Retrieve the accessor object for the java.awt.MenuItem class.
*/
if (menuItemAccessor == null) {
}
return menuItemAccessor;
}
/**
* Set an accessor object for the java.awt.Menu class.
*/
menuAccessor = ma;
}
/**
* Retrieve the accessor object for the java.awt.Menu class.
*/
if (menuAccessor == null) {
}
return menuAccessor;
}
/**
* Set an accessor object for the java.awt.event.KeyEvent class.
*/
}
/**
* Retrieve the accessor object for the java.awt.event.KeyEvent class.
*/
if (keyEventAccessor == null) {
}
return keyEventAccessor;
}
/**
* Set an accessor object for the javax.swing.ClientPropertyKey class.
*/
}
/**
* Retrieve the accessor object for the javax.swing.ClientPropertyKey class.
*/
if (clientPropertyKeyAccessor == null) {
}
return clientPropertyKeyAccessor;
}
/**
* Set an accessor object for the java.awt.SystemTray class.
*/
}
/**
* Retrieve the accessor object for the java.awt.SystemTray class.
*/
if (systemTrayAccessor == null) {
}
return systemTrayAccessor;
}
/**
* Set an accessor object for the java.awt.TrayIcon class.
*/
}
/**
* Retrieve the accessor object for the java.awt.TrayIcon class.
*/
if (trayIconAccessor == null) {
}
return trayIconAccessor;
}
/**
* Set an accessor object for the java.awt.DefaultKeyboardFocusManager class.
*/
public static void setDefaultKeyboardFocusManagerAccessor(DefaultKeyboardFocusManagerAccessor dkfma) {
}
/**
* Retrieve the accessor object for the java.awt.DefaultKeyboardFocusManager class.
*/
if (defaultKeyboardFocusManagerAccessor == null) {
}
}
/*
* Set an accessor object for the java.awt.SequencedEvent class.
*/
}
/*
* Get the accessor object for the java.awt.SequencedEvent class.
*/
// The class is not public. So we can't ensure it's initialized.
// Null returned value means it's not initialized
// (so not a single instance of the event has been created).
return sequencedEventAccessor;
}
}