Advanced   Java   Services
New 1.4 methods in Component and its subclasses
Back Next Up Home

Component


void addMouseWheelListener(MouseWheelListener l)
// Adds the specified mouse wheel listener to receive mouse wheel events from this component.

void applyComponentOrientation(ComponentOrientation orientation)
// Sets the ComponentOrientation property of this component and all components contained within it.

boolean areFocusTraversalKeysSet(int id)
// Returns whether the Set of focus traversal keys for the given focus traversal operation has been explicitly defined for this Component.

VolatileImage createVolatileImage(int width, int height)
// Creates a volatile off-screen drawable image to be used for double buffering.

VolatileImage createVolatileImage(int width, int height, ImageCapabilities caps)
// Creates a volatile off-screen drawable image, with the given capabilities.

ComponentListener[] getComponentListeners()
// Returns an array of all the component listeners registered on this component.

Container getFocusCycleRootAncestor()
// Returns the Container which is the focus cycle root of this Component's focus traversal cycle.

FocusListener[] getFocusListeners()
// Returns an array of all the focus listeners registered on this component.

Set getFocusTraversalKeys(int id)
// Returns the Set of focus traversal keys for a given traversal operation for this Component.

boolean getFocusTraversalKeysEnabled()
// Returns whether focus traversal keys are enabled for this Component.

HierarchyBoundsListener[] getHierarchyBoundsListeners()
// Returns an array of all the hierarchy bounds listeners registered on this component.

boolean getIgnoreRepaint()

InputMethodListener[] getInputMethodListeners()
// Returns an array of all the input method listeners registered on this component

KeyListener[] getKeyListeners()
// Returns an array of all the key listeners registered on this component.

EventListener[] getListeners(Class listenerType)
// 1.3) Returns an array of all the objects currently registered as FooListeners upon this Component.

MouseWheelListener[] getMouseWheelListeners()
// Returns an array of all the mouse wheel listeners registered on this component

PropertyChangeListener[] getPropertyChangeListeners()
// Returns an array of all the property change listeners registered on this component.

boolean isBackgroundSet()
// Returns whether the background color has been explicitly set for this Component.

boolean isCursorSet()
// Returns whether the cursor has been explicitly set for this Component.

boolean isFocusable()
// Returns whether this Component can be focused.

boolean isFocusCycleRoot(Container container)
// Returns whether the specified Container is the focus cycle root of this Component's focus traversal cycle.

boolean isFocusOwner()
// Returns true if this Component is the focus owner.

boolean isFocusTraversable()
// Deprecated. As of 1.4, replaced by isFocusable().

void removeMouseWheelListener(MouseWheelListener l)
// Removes the specified mouse wheel listener so that it no longer receives mouse wheel events from this component.

void requestFocus()
// (1.0)Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window.

protected boolean requestFocus(boolean temporary)
// Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window.

boolean requestFocusInWindow()
// Requests that this Component get the input focus, if this Component's top-level ancestor is already the focused Window.

protected boolean requestFocusInWindow(boolean temporary)
// Requests that this Component get the input focus, if this Component's top-level ancestor is already the focused Window.

void setFocusable(boolean focusable)
// Sets the focusable state of this Component to the specified value.

void setFocusTraversalKeys(int id, Set keystrokes)
// Sets the focus traversal keys for a given traversal operation for this Component.

void setFocusTraversalKeysEnabled(boolean focusTraversalKeysEnabled)
// Sets whether focus traversal keys are enabled for this Component.

void setIgnoreRepaint(boolean ignoreRepaint)
// Sets whether or not paint messages received from the operating system should be ignored.

void transferFocusBackward()
// Transfers the focus to the previous component, as though this Component were the focus owner.

void transferFocusUpCycle()
// Transfers the focus up one focus traversal cycle.



Container


void applyComponentOrientation(ComponentOrientation o)
// Sets the ComponentOrientation property of this container and all components contained within it.

boolean areFocusTraversalKeysSet(int id)
// Returns whether the Set of focus traversal keys for the given focus traversal operation has been explicitly defined for this Container.

ContainerListener[] getContainerListeners()
// Returns an array of all the container listeners registered on this container.

Set getFocusTraversalKeys(int id)
// Returns the Set of focus traversal keys for a given traversal operation for this Container.

FocusTraversalPolicy getFocusTraversalPolicy()
// Returns the focus traversal policy that will manage keyboard traversal of this Container's children, or null if this Container is not a focus cycle root.

EventListener[] getListeners(Class listenerType)
// (1.3) Returns an array of all the objects currently registered as FooListeners upon this Container.

boolean isFocusCycleRoot()
// Returns whether this Container is the root of a focus traversal cycle.

boolean isFocusCycleRoot(Container container)
// Returns whether the specified Container is the focus cycle root of this Container's focus traversal cycle.

boolean isFocusTraversalPolicySet()
// Returns whether the focus traversal policy has been explicitly set for this Container.

void setFocusCycleRoot(boolean focusCycleRoot)
// Sets whether this Container is the root of a focus traversal cycle.

void setFocusTraversalKeys(int id, Set keystrokes)
// Sets the focus traversal keys for a given traversal operation for this Container.

void setFocusTraversalPolicy(FocusTraversalPolicy policy)
// Sets the focus traversal policy that will manage keyboard traversal of this Container's children, if this Container is a focus cycle root.

void transferFocusBackward()
// Transfers the focus to the previous component, as though this Component were the focus owner.

void transferFocusDownCycle()
// Transfers the focus down one focus traversal cycle.


ScrollPane


protected boolean eventTypeEnabled(int type)
// If wheel scrolling is enabled, we return true for MouseWheelEvents

boolean isWheelScrollingEnabled()
// Indicates whether or not scrolling will take place in response to the mouse wheel.

protected void processMouseWheelEvent(MouseWheelEvent e)
// Process mouse wheel events that are delivered to this ScrollPane by scrolling an appropriate amount.

void setWheelScrollingEnabled(boolean handleWheel)
// Enables/disables scrolling in response to movement of the mouse wheel.


Window


void addWindowFocusListener(WindowFocusListener l)
// Adds the specified window focus listener to receive window events from this window.

void addWindowStateListener(WindowStateListener l)
Adds the specified window state listener to receive window events from this window.

boolean getFocusableWindowState()
// Returns whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow.

Container getFocusCycleRootAncestor()
// Always returns null because Windows have no ancestors; they represent the top of the Component hierarchy.

Set getFocusTraversalKeys(int id)// Gets a focus traversal key for this Window.

EventListener[] getListeners(Class listenerType)
// (1.3) Returns an array of all the objects currently registered as FooListeners upon this Window.

Component getMostRecentFocusOwner()
// Returns the child Component of this Window that will receive the focus when this Window is focused.

WindowFocusListener[] getWindowFocusListeners()
// Returns an array of all the window focus listeners registered on this window.

WindowListener[] getWindowListeners()
// Returns an array of all the window listeners registered on this window.

WindowStateListener[] getWindowStateListeners()
// Returns an array of all the window state listeners registered on this window.

boolean isFocusableWindow()
// Returns whether this Window can become the focused Window, that is, whether this Window or any of its subcomponents can become the focus owner.

boolean isFocusCycleRoot()
// Always returns true because all Windows must be roots of a focus traversal cycle.

boolean isFocused()
// Returns whether this Window is focused.

protected void processWindowFocusEvent(WindowEvent e)
// Processes window focus event occuring on this window by dispatching them to any registered WindowFocusListener objects.

protected void processWindowStateEvent(WindowEvent e)
// Processes window state event occuring on this window by dispatching them to any registered WindowStateListener objects.

void removeWindowFocusListener(WindowFocusListener l)
// Removes the specified window focus listener so that it no longer receives window events from this window.

void removeWindowStateListener(WindowStateListener l)
// Removes the specified window state listener so that it no longer receives window events from this window.

void setFocusableWindowState(boolean focusableWindowState)
// Sets whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow.

void setFocusCycleRoot(boolean focusCycleRoot)
// Does nothing because Windows must always be roots of a focus traversal cycle.

void setLocationRelativeTo(Component c)
// Sets the location of the window relative to the specified component.


Frame


int getExtendedState()
// Gets the state of this frame.

void setExtendedState(int state)
// Sets the state of this frame

Sets the state of this frame. The state is represented as a bitwise mask.
NORMAL //Indicates that no state bits are set.
ICONIFIED
MAXIMIZED_HORIZ
MAXIMIZED_VERT
MAXIMIZED_BOTH
Concatenates MAXIMIZED_HORIZ and MAXIMIZED_VERT.
Note that if the state is not supported on a given platform, nothing will happen. The application may determine if a specific state is available via the java.awt.ToolkitisFrameStateSupported(int state) method.

Rectangle getMaximizedBounds()
// Gets maximized bounds for this frame.

void setMaximizedBounds(Rectangle bounds)
// Sets the maximized bounds for this frame.

boolean isUndecorated()
// Indicates whether this frame is undecorated.

void setUndecorated(boolean undecorated)
// Disables or enables decorations for this frame.


Dialog


Dialog(Dialog owner, String title, boolean modal, GraphicsConfiguration gc)
// Constructs an initially invisible Dialog with the specified owner dialog, title, modality, and GraphicsConfiguration.

Dialog(Frame owner, String title, boolean modal, GraphicsConfiguration gc)
// Constructs an initially invisible Dialog with the specified owner frame, title, modality, and GraphicsConfiguration.

boolean isUndecorated()
// Indicates whether this dialog is undecorated.

void setUndecorated(boolean undecorated)
// Disables or enables decorations for this dialog.

top Back Next Up Home