This class is the abstract superclass of all actual implementations of the Abstract Window Toolkit. Subclasses of the
Toolkit
class are used to bind the various components to particular native toolkit implementations.
Many GUI events may be delivered to user asynchronously, if the opposite is not specified explicitly. As well as many GUI operations may be performed asynchronously. This fact means that if the state of a component is set, and then the state immediately queried, the returned value may not yet reflect the requested change. This behavior includes, but is not limited to:
ScrollPane.setScrollPosition
and then getScrollPosition
may return an incorrect value if the original request has not yet been processed.setVisible(true)
on a Window
, Frame
or Dialog
may occur asynchronously.setSize
, setBounds
or setLocation
on a Window
, Frame
or Dialog
are forwarded to the underlying window management system and may be ignored or modified. See Window
for more information.Most applications should not call any of the methods in this class directly. The methods defined by Toolkit
are the "glue" that joins the platform-independent classes in the java.awt
package with their counterparts in java.awt.peer
. Some methods defined by Toolkit
query the native operating system directly.
Fields
The desktop properties change support.
Constructors
void
Adds an AWTEventListener to receive all AWTEvents dispatched system-wide that conform to the given eventMask
.
void
Adds the specified property change listener for the named desktop property.
boolean
Reports whether events from extra mouse buttons are allowed to be processed and posted into EventQueue
.
abstract void
Emits an audio beep depending on native system settings and hardware capabilities.
abstract int
Indicates the construction status of a specified image that is being prepared for display.
Creates a new custom cursor object.
Creates a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associates it with the DragSource, Component and DragGestureListener specified.
Creates an image which decodes the image stored in the specified byte array.
createImage(byte[] imagedata, int imageoffset, int imagelength)
Creates an image which decodes the image stored in the specified byte array, and at the specified offset and length.
Creates an image with the specified image producer.
Returns an image which gets pixel data from the specified file.
Returns an image which gets pixel data from the specified URL.
Returns an array of all the AWTEventListener
s registered on this toolkit.
Returns an array of all the AWTEventListener
s registered on this toolkit which listen to all of the event types specified in the eventMask
argument.
Returns the supported cursor dimension which is closest to the desired sizes.
Determines the color model of this toolkit's screen.
Gets the default toolkit.
Obtains a value for the specified desktop property.
Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG.
Returns an image which gets pixel data from the specified URL.
boolean
Returns whether the given locking key on the keyboard is currently in its "on" state.
int
Returns the maximum number of colors the Toolkit supports in a custom cursor palette.
int
int
Determines which extended modifier key is the appropriate accelerator key for menu shortcuts.
Give native peers the ability to query the native container given a native component (eg the direct parent may be lightweight).
Gets a PrintJob
object which is the result of initiating a print operation on the toolkit's platform.
Gets a PrintJob
object which is the result of initiating a print operation on the toolkit's platform.
Gets a property with the specified key and default.
Returns an array of all the property change listeners registered on this toolkit.
Returns an array of all property change listeners associated with the specified name of a desktop property.
Gets the insets of the screen.
abstract int
Returns the screen resolution in dots-per-inch.
Gets the size of the screen.
Gets the singleton instance of the system Clipboard which interfaces with clipboard facilities provided by the native platform.
Get the application's or applet's EventQueue instance.
Gets the application's or applet's EventQueue
instance, without checking access.
Gets the singleton instance of the system selection as a Clipboard
object.
protected void
initializeDesktopProperties
boolean
Returns whether the always-on-top mode is supported by this toolkit.
boolean
Returns whether dynamic layout of Containers on resize is currently enabled on the underlying operating system and/or window manager.
protected boolean
Returns whether the layout of Containers is validated dynamically during resizing, or statically, after resizing is complete.
boolean
Returns whether Toolkit supports this state for Frame
s.
abstract boolean
Returns whether the given modal exclusion type is supported by this toolkit.
abstract boolean
Returns whether the given modality type is supported by this toolkit.
An opportunity to lazily evaluate desktop property values.
protected void
Fills in the integer array that is supplied as an argument with the current system color values.
Returns a map of visual attributes for the abstract level description of the given input method highlight, or null if no mapping is found.
abstract boolean
Prepares an image for rendering.
void
Removes an AWTEventListener from receiving dispatched AWTEvents.
void
Removes the specified property change listener for the named desktop property.
protected final void
Sets the named desktop property to the specified value and fires a property change event to notify any listeners that the value has changed.
void
Controls whether the layout of Containers is validated dynamically during resizing, or statically, after resizing is complete.
void
Sets the state of the given locking key on the keyboard.
abstract void
Synchronizes this toolkit's graphics state.
Methods declared in class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
The desktop properties.
The desktop properties change support.
protected Toolkit()
Constructs a Toolkit
.
Fills in the integer array that is supplied as an argument with the current system color values.
systemColors
- an integer array.
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
Controls whether the layout of Containers is validated dynamically during resizing, or statically, after resizing is complete. Use isDynamicLayoutActive()
to detect if this feature enabled in this program and is supported by this operating system and/or window manager. Note that this feature is supported not on all platforms, and conversely, that this feature cannot be turned off on some platforms. On these platforms where dynamic layout during resizing is not supported (or is always supported), setting this property has no effect. Note that this feature can be set or unset as a property of the operating system or window manager on some platforms. On such platforms, the dynamic resize property must be set at the operating system or window manager level before this method can take effect. This method does not change support or settings of the underlying operating system or window manager. The OS/WM support can be queried using getDesktopProperty("awt.dynamicLayoutSupported") method.
dynamic
- If true, Containers should re-layout their components as the Container is being resized. If false, the layout will be validated after resizing is completed.
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
Returns whether the layout of Containers is validated dynamically during resizing, or statically, after resizing is complete. Note: this method returns the value that was set programmatically; it does not reflect support at the level of the operating system or window manager for dynamic layout on resizing, or the current operating system or window manager settings. The OS/WM support can be queried using getDesktopProperty("awt.dynamicLayoutSupported").
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
Returns whether dynamic layout of Containers on resize is currently enabled on the underlying operating system and/or window manager. If the platform supports it,
setDynamicLayout(boolean)
may be used to programmatically enable or disable platform dynamic layout. Regardless of whether that toggling is supported, or whether
true
or
false
is specified as an argument, or has never been called at all, this method will return the active current platform behavior and which will be followed by the JDK in determining layout policy during resizing.
If dynamic layout is currently inactive then Containers re-layout their components when resizing is completed. As a result the Component.validate()
method will be invoked only once per resize. If dynamic layout is currently active then Containers re-layout their components on every native resize event and the validate()
method will be invoked each time. The OS/WM support can be queried using the getDesktopProperty("awt.dynamicLayoutSupported") method. This property will reflect the platform capability but is not sufficient to tell if it is presently enabled.
HeadlessException
- if the GraphicsEnvironment.isHeadless() method returns true
Gets the size of the screen. On systems with multiple displays, the primary display is used. Multi-screen aware display dimensions are available from GraphicsConfiguration
and GraphicsDevice
.
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
Returns the screen resolution in dots-per-inch.
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
Gets the insets of the screen.
gc
- a GraphicsConfiguration
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
Determines the color model of this toolkit's screen.
ColorModel
is an abstract class that encapsulates the ability to translate between the pixel values of an image and its red, green, blue, and alpha components.
This toolkit method is called by the getColorModel
method of the Component
class.
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
Returns the names of the available fonts in this toolkit.
For 1.1, the following font names are deprecated (the replacement name follows):
The ZapfDingbats fontname is also deprecated in 1.1 but the characters are defined in Unicode starting at 0x2700, and as of 1.1 Java supports those characters.
Gets the screen device metrics for rendering of the font.
font
- a font
public abstract void sync()
This method ensures that the display is up-to-date. It is useful for animation.
()
Gets the default toolkit.
If a system property named "java.awt.headless"
is set to true
then the headless implementation of Toolkit
is used, otherwise the default platform-specific implementation of Toolkit
is used.
If this Toolkit is not a headless implementation and if they exist, service providers of AccessibilityProvider
will be loaded if specified by the system property javax.accessibility.assistive_technologies
.
An example of setting this property is to invoke Java with -Djavax.accessibility.assistive_technologies=MyServiceProvider
. In addition to MyServiceProvider other service providers can be specified using a comma separated list. Service providers are loaded after the AWT toolkit is created.
If the list of assistive technology providers as provided through system property "javax.accessibility.assistive_technologies
" is the empty string or contains only white space characters it is ignored. All other errors are handled via an AWTError exception.
The names specified in the assistive_technologies property are used to query each service provider implementation. If the requested name matches the name of the service provider, the AccessibilityProvider.activate()
method will be invoked to activate the matching service provider.
${user.home}/.accessibility.properties
${java.home}/conf/accessibility.properties
assistive_technologies=
property. A single provider or a comma separated list of providers can be specified.
AWTError
- in case of an error loading assistive technologies.
Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG. The underlying toolkit attempts to resolve multiple requests with the same filename to the same returned Image.
Since the mechanism required to facilitate this sharing of Image
objects may continue to hold onto images that are no longer in use for an indefinite period of time, developers are encouraged to implement their own caching of images by using the createImage
variant wherever available. If the image data contained in the specified file changes, the Image
object returned from this method may still contain stale information which was loaded from the file after a prior call. Previously loaded image data can be manually discarded by calling the flush
method on the returned Image
.
This method first checks if there is a security manager installed. If so, the method calls the security manager's checkRead
method with the file specified to ensure that the access to the image is allowed.
filename
- the name of a file containing pixel data in a recognized file format.
SecurityException
- if a security manager exists and its checkRead method doesn't allow the operation.
Returns an image which gets pixel data from the specified URL. The pixel data referenced by the specified URL must be in one of the following formats: GIF, JPEG or PNG. The underlying toolkit attempts to resolve multiple requests with the same URL to the same returned Image.
Since the mechanism required to facilitate this sharing of Image
objects may continue to hold onto images that are no longer in use for an indefinite period of time, developers are encouraged to implement their own caching of images by using the createImage
variant wherever available. If the image data stored at the specified URL changes, the Image
object returned from this method may still contain stale information which was fetched from the URL after a prior call. Previously loaded image data can be manually discarded by calling the flush
method on the returned Image
.
This method first checks if there is a security manager installed. If so, the method calls the security manager's checkPermission
method with the corresponding permission to ensure that the access to the image is allowed. If the connection to the specified URL requires either URLPermission
or SocketPermission
, then URLPermission
is used for security checks.
url
- the URL to use in fetching the pixel data.
SecurityException
- if a security manager exists and its checkPermission method doesn't allow the operation.
This method first checks if there is a security manager installed. If so, the method calls the security manager's checkRead
method with the specified file to ensure that the image creation is allowed.
filename
- the name of a file containing pixel data in a recognized file format.
SecurityException
- if a security manager exists and its checkRead method doesn't allow the operation.
This method first checks if there is a security manager installed. If so, the method calls the security manager's checkPermission
method with the corresponding permission to ensure that the image creation is allowed. If the connection to the specified URL requires either URLPermission
or SocketPermission
, then URLPermission
is used for security checks.
url
- the URL to use in fetching the pixel data.
SecurityException
- if a security manager exists and its checkPermission method doesn't allow the operation.
Prepares an image for rendering.
If the values of the width and height arguments are both -1
, this method prepares the image for rendering on the default screen; otherwise, this method prepares an image for rendering on the default screen at the specified width and height.
The image data is downloaded asynchronously in another thread, and an appropriately scaled screen representation of the image is generated.
This method is called by components prepareImage
methods.
Information on the flags returned by this method can be found with the definition of the ImageObserver
interface.
image
- the image for which to prepare a screen representation.
width
- the width of the desired screen representation, or -1
.
height
- the height of the desired screen representation, or -1
.
observer
- the ImageObserver
object to be notified as the image is being prepared.
true
if the image has already been fully prepared; false
otherwise.
Indicates the construction status of a specified image that is being prepared for display.
If the values of the width and height arguments are both -1
, this method returns the construction status of a screen representation of the specified image in this toolkit. Otherwise, this method returns the construction status of a scaled representation of the image at the specified width and height.
This method does not cause the image to begin loading. An application must call prepareImage
to force the loading of an image.
This method is called by the component's checkImage
methods.
Information on the flags returned by this method can be found with the definition of the ImageObserver
interface.
image
- the image whose status is being checked.
width
- the width of the scaled version whose status is being checked, or -1
.
height
- the height of the scaled version whose status is being checked, or -1
.
observer
- the ImageObserver
object to be notified as the image is being prepared.
ImageObserver
flags for the image data that is currently available.
Creates an image with the specified image producer.
producer
- the image producer to be used.
The data must be in some image format, such as GIF or JPEG, that is supported by this toolkit.
imagedata
- an array of bytes, representing image data in a supported image format.
Creates an image which decodes the image stored in the specified byte array, and at the specified offset and length. The data must be in some image format, such as GIF or JPEG, that is supported by this toolkit.
imagedata
- an array of bytes, representing image data in a supported image format.
imageoffset
- the offset of the beginning of the data in the array.
imagelength
- the length of the data in the array.
Gets a
PrintJob
object which is the result of initiating a print operation on the toolkit's platform.
Each actual implementation of this method should first check if there is a security manager installed. If there is, the method should call the security manager's checkPrintJobAccess
method to ensure initiation of a print operation is allowed. If the default implementation of checkPrintJobAccess
is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission
method with a RuntimePermission("queuePrintJob")
permission.
frame
- the parent of the print dialog. May not be null.
jobtitle
- the title of the PrintJob. A null title is equivalent to "".
props
- a Properties object containing zero or more properties. Properties are not standardized and are not consistent across implementations. Because of this, PrintJobs which require job and page control should use the version of this function which takes JobAttributes and PageAttributes objects. This object may be updated to reflect the user's job choices on exit. May be null.
PrintJob
object, or null
if the user cancelled the print job.
NullPointerException
- if frame is null
SecurityException
- if this thread is not allowed to initiate a print job request
Gets a
PrintJob
object which is the result of initiating a print operation on the toolkit's platform.
Each actual implementation of this method should first check if there is a security manager installed. If there is, the method should call the security manager's checkPrintJobAccess
method to ensure initiation of a print operation is allowed. If the default implementation of checkPrintJobAccess
is used (that is, that method is not overriden), then this results in a call to the security manager's checkPermission
method with a RuntimePermission("queuePrintJob")
permission.
frame
- the parent of the print dialog. May not be null.
jobtitle
- the title of the PrintJob. A null title is equivalent to "".
jobAttributes
- a set of job attributes which will control the PrintJob. The attributes will be updated to reflect the user's choices as outlined in the JobAttributes documentation. May be null.
pageAttributes
- a set of page attributes which will control the PrintJob. The attributes will be applied to every page in the job. The attributes will be updated to reflect the user's choices as outlined in the PageAttributes documentation. May be null.
PrintJob
object, or null
if the user cancelled the print job.
NullPointerException
- if frame is null
IllegalArgumentException
- if pageAttributes specifies differing cross feed and feed resolutions. Also if this thread has access to the file system and jobAttributes specifies print to file, and the specified destination file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason. However in the case of print to file, if a dialog is also requested to be displayed then the user will be given an opportunity to select a file and proceed with printing. The dialog will ensure that the selected output file is valid before returning from this method.
SecurityException
- if this thread is not allowed to initiate a print job request, or if jobAttributes specifies print to file, and this thread is not allowed to access the file system
public abstract void beep()
Emits an audio beep depending on native system settings and hardware capabilities.
Gets the singleton instance of the system Clipboard which interfaces with clipboard facilities provided by the native platform. This clipboard enables data transfer between Java programs and native applications which use native clipboard facilities.
In addition to any and all default formats text returned by the system Clipboard's getTransferData()
method is available in the following flavors:
As with
java.awt.datatransfer.StringSelection
, if the requested flavor is
DataFlavor.plainTextFlavor
, or an equivalent flavor, a Reader is returned.
Note:The behavior of the system Clipboard's
getTransferData()
method for
DataFlavor.plainTextFlavor
, and equivalent DataFlavors, is inconsistent with the definition of
DataFlavor.plainTextFlavor
. Because of this, support for
DataFlavor.plainTextFlavor
, and equivalent flavors, is
deprecated.
Each actual implementation of this method should first check if there is a security manager installed. If there is, the method should call the security manager's checkPermission
method to check AWTPermission("accessClipboard")
.
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
Gets the singleton instance of the system selection as a
Clipboard
object. This allows an application to read and modify the current, system-wide selection.
An application is responsible for updating the system selection whenever the user selects text, using either the mouse or the keyboard. Typically, this is implemented by installing a FocusListener
on all Component
s which support text selection, and, between FOCUS_GAINED
and FOCUS_LOST
events delivered to that Component
, updating the system selection Clipboard
when the selection changes inside the Component
. Properly updating the system selection ensures that a Java application will interact correctly with native applications and other Java applications running simultaneously on the system. Note that java.awt.TextComponent
and javax.swing.text.JTextComponent
already adhere to this policy. When using these classes, and their subclasses, developers need not write any additional code.
Some platforms do not support a system selection Clipboard
. On those platforms, this method will return null
. In such a case, an application is absolved from its responsibility to update the system selection Clipboard
as described above.
Each actual implementation of this method should first check if there is a security manager installed. If there is, the method should call the security manager's checkPermission
method to check AWTPermission("accessClipboard")
.
Clipboard
, or null
if the native platform does not support a system selection Clipboard
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
keyCode
- the key code
true
if the given key is currently in its "on" state; otherwise false
IllegalArgumentException
- if keyCode
is not one of the valid key codes
UnsupportedOperationException
- if the host system doesn't allow getting the state of this key programmatically, or if the keyboard doesn't have this key
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
Sets the state of the given locking key on the keyboard. Valid key codes are
VK_CAPS_LOCK
,
VK_NUM_LOCK
,
VK_SCROLL_LOCK
, and
VK_KANA_LOCK
.
Depending on the platform, setting the state of a locking key may involve event processing and therefore may not be immediately observable through getLockingKeyState.
keyCode
- the key code
on
- the state of the key
IllegalArgumentException
- if keyCode
is not one of the valid key codes
UnsupportedOperationException
- if the host system doesn't allow setting the state of this key programmatically, or if the keyboard doesn't have this key
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
Give native peers the ability to query the native container given a native component (eg the direct parent may be lightweight).
c
- the component to fetch the container for
Note that multi-frame images are invalid and may cause this method to hang.
cursor
- the image to display when the cursor is activated
hotSpot
- the X and Y of the large cursor's hot spot; the hotSpot values must be less than the Dimension returned by getBestCursorSize
name
- a localized description of the cursor, for Java Accessibility use
IndexOutOfBoundsException
- if the hotSpot values are outside the bounds of the cursor
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
Note: if an image is used whose dimensions don't match a supported size (as returned by this method), the Toolkit implementation will attempt to resize the image to a supported size. Since converting low-resolution images is difficult, no guarantees are made as to the quality of a cursor image which isn't a supported size. It is therefore recommended that this method be called and an appropriate image used so no image conversion is made.
preferredWidth
- the preferred cursor width the component would like to use.
preferredHeight
- the preferred cursor height the component would like to use.
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
Returns the maximum number of colors the Toolkit supports in a custom cursor palette.
Note: if an image is used which has more colors in its palette than the supported maximum, the Toolkit implementation will attempt to flatten the palette to the maximum. Since converting low-resolution images is difficult, no guarantees are made as to the quality of a cursor image which has more colors than the system supports. It is therefore recommended that this method be called and an appropriate image used so no image conversion is made.
HeadlessException
- if GraphicsEnvironment.isHeadless() returns true
Returns whether Toolkit supports this state for
Frame
s. This method tells whether the
UI conceptof, say, maximization or iconification is supported. It will always return false for "compound" states like
Frame.ICONIFIED|Frame.MAXIMIZED_VERT
. In other words, the rule of thumb is that only queries with a single frame state constant as an argument are meaningful.
Note that supporting a given concept is a platform- dependent feature. Due to native limitations the Toolkit object may report a particular state as supported, however at the same time the Toolkit object will be unable to apply the state to a given frame. This circumstance has two following consequences:
false
for the present method actually indicates that the given state is not supported. If the method returns true
the given state may still be unsupported and/or unavailable for a particular frame.WindowEvent.getNewState()
method of the WindowEvent
received through the WindowStateListener
, rather than assuming that the state given to the setExtendedState()
method will be definitely applied. For more information see the documentation for the Frame.setExtendedState(int)
method.state
- one of named frame state constants.
true
is this frame state is supported by this Toolkit implementation, false
otherwise.
HeadlessException
- if GraphicsEnvironment.isHeadless()
returns true
.
Gets a property with the specified key and default. This method returns defaultValue if the property is not found.
key
- the key
defaultValue
- the default value
If there is a security manager then its checkPermission
method is called to check AWTPermission("accessEventQueue")
.
EventQueue
object
SecurityException
- if a security manager is set and it denies access to the EventQueue
()
Gets the application's or applet's EventQueue
instance, without checking access. For security reasons, this can only be called from a Toolkit
subclass.
EventQueue
object
Creates a concrete, platform dependent, subclass of the abstract DragGestureRecognizer class requested, and associates it with the DragSource, Component and DragGestureListener specified. subclasses should override this to provide their own implementation
T
- the type of DragGestureRecognizer to create
abstractRecognizerClass
- The abstract class of the required recognizer
ds
- The DragSource
c
- The Component target for the DragGestureRecognizer
srcActions
- The actions permitted for the gesture
dgl
- The DragGestureListener
Obtains a value for the specified desktop property. A desktop property is a uniquely named value for a resource that is Toolkit global in nature. Usually it also is an abstract representation for an underlying platform dependent desktop setting. For more information on desktop properties supported by the AWT see
AWT Desktop Properties.
propertyName
- the property name
Sets the named desktop property to the specified value and fires a property change event to notify any listeners that the value has changed.
name
- the property name
newValue
- the new property value
An opportunity to lazily evaluate desktop property values.
name
- the name
protected void initializeDesktopProperties()
initializeDesktopProperties
Adds the specified property change listener for the named desktop property. When a
PropertyChangeListenerProxy
object is added, its property name is ignored, and the wrapped listener is added. If
name
is
null
or
pcl
is
null
, no exception is thrown and no action is performed.
name
- The name of the property to listen for
pcl
- The property change listener
Removes the specified property change listener for the named desktop property. When a
PropertyChangeListenerProxy
object is removed, its property name is ignored, and the wrapped listener is removed. If
name
is
null
or
pcl
is
null
, no exception is thrown and no action is performed.
name
- The name of the property to remove
pcl
- The property change listener
Returns an array of all the property change listeners registered on this toolkit. The returned array contains
PropertyChangeListenerProxy
objects that associate listeners with the names of desktop properties.
PropertyChangeListener
objects wrapped in java.beans.PropertyChangeListenerProxy
objects or an empty array if no listeners are added
Returns an array of all property change listeners associated with the specified name of a desktop property.
propertyName
- the named property
PropertyChangeListener
objects associated with the specified name of a desktop property or an empty array if no such listeners are added
public boolean isAlwaysOnTopSupported()
Returns whether the always-on-top mode is supported by this toolkit. To detect whether the always-on-top mode is supported for a particular Window, use
Window.isAlwaysOnTopSupported()
.
true
, if current toolkit supports the always-on-top mode, otherwise returns false
Returns whether the given modality type is supported by this toolkit. If a dialog with unsupported modality type is created, then Dialog.ModalityType.MODELESS
is used instead.
modalityType
- modality type to be checked for support by this toolkit
true
, if current toolkit supports given modality type, false
otherwise
Returns whether the given modal exclusion type is supported by this toolkit. If an unsupported modal exclusion type property is set on a window, then Dialog.ModalExclusionType.NO_EXCLUDE
is used instead.
modalExclusionType
- modal exclusion type to be checked for support by this toolkit
true
, if current toolkit supports given modal exclusion type, false
otherwise
Adds an AWTEventListener to receive all AWTEvents dispatched system-wide that conform to the given
eventMask
.
First, if there is a security manager, its checkPermission
method is called with an AWTPermission("listenToAllAWTEvents")
permission. This may result in a SecurityException.
eventMask
is a bitmask of event types to receive. It is constructed by bitwise OR-ing together the event masks defined in AWTEvent
.
Note: event listener use is not recommended for normal application use, but are intended solely to support special purpose facilities including support for accessibility, event record/playback, and diagnostic tracing. If listener is null, no exception is thrown and no action is performed.
listener
- the event listener.
eventMask
- the bitmask of event types to receive
SecurityException
- if a security manager exists and its checkPermission
method doesn't allow the operation.
Removes an AWTEventListener from receiving dispatched AWTEvents.
First, if there is a security manager, its checkPermission
method is called with an AWTPermission("listenToAllAWTEvents")
permission. This may result in a SecurityException.
Note: event listener use is not recommended for normal application use, but are intended solely to support special purpose facilities including support for accessibility, event record/playback, and diagnostic tracing. If listener is null, no exception is thrown and no action is performed.
listener
- the event listener.
SecurityException
- if a security manager exists and its checkPermission
method doesn't allow the operation.
Returns an array of all the AWTEventListener
s registered on this toolkit. If there is a security manager, its checkPermission
method is called with an AWTPermission("listenToAllAWTEvents")
permission. This may result in a SecurityException. Listeners can be returned within AWTEventListenerProxy
objects, which also contain the event mask for the given listener. Note that listener objects added multiple times appear only once in the returned array.
AWTEventListener
s or an empty array if no listeners are currently registered
SecurityException
- if a security manager exists and its checkPermission
method doesn't allow the operation.
Returns an array of all the AWTEventListener
s registered on this toolkit which listen to all of the event types specified in the eventMask
argument. If there is a security manager, its checkPermission
method is called with an AWTPermission("listenToAllAWTEvents")
permission. This may result in a SecurityException. Listeners can be returned within AWTEventListenerProxy
objects, which also contain the event mask for the given listener. Note that listener objects added multiple times appear only once in the returned array.
eventMask
- the bitmask of event types to listen for
AWTEventListener
s registered on this toolkit for the specified event types, or an empty array if no such listeners are currently registered
SecurityException
- if a security manager exists and its checkPermission
method doesn't allow the operation.
Returns a map of visual attributes for the abstract level description of the given input method highlight, or null if no mapping is found. The style field of the input method highlight is ignored. The map returned is unmodifiable.
highlight
- input method highlight
null
HeadlessException
- if GraphicsEnvironment.isHeadless
returns true
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4