javax.swing
public abstract class JComponent extends Container implements Serializable
Nested Class Summary | |
---|---|
abstract class | JComponent.AccessibleJComponent
Basic accessibility support for JComponent derived
widgets. |
Field Summary | |
---|---|
protected AccessibleContext | accessibleContext
The accessible context of this JComponent . |
protected EventListenerList | listenerList
Listeners for events other than PropertyChangeEvent are
handled by this listener list. |
static String | TOOL_TIP_TEXT_KEY |
protected ComponentUI | ui
The user interface delegate for this component. |
static int | UNDEFINED_CONDITION
Constant used to indicate that no condition has been assigned to a
particular action.
|
static int | WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
Constant used to indicate that an action should be performed only when
the component is an ancestor of the component which has focus.
|
static int | WHEN_FOCUSED
Constant used to indicate that an action should be performed only when
the component has focus.
|
static int | WHEN_IN_FOCUSED_WINDOW
Constant used to indicate that an action should be performed only when
the component is in the window which has focus.
|
Constructor Summary | |
---|---|
JComponent()
Creates a new JComponent instance. |
Method Summary | |
---|---|
void | addAncestorListener(AncestorListener listener)
Register an AncestorListener .
|
void | addNotify()
Receives notification if this component is added to a parent component.
|
void | addVetoableChangeListener(VetoableChangeListener listener)
Register a VetoableChangeListener .
|
void | computeVisibleRect(Rectangle rect)
Compute the component's visible rectangle, which is defined
recursively as either the component's bounds, if it has no parent, or
the intersection of the component's bounds with the visible rectangle
of its parent.
|
boolean | contains(int x, int y)
Returns true if the coordinates (x, y) lie within
the bounds of this component and false otherwise.
|
JToolTip | createToolTip()
Return the toolTip property of this component, creating it and
setting it if it is currently null . |
void | disable()
Disables this component.
|
void | enable()
Enables this component.
|
void | firePropertyChange(String property, int oldValue, int newValue)
Fires a property change for a primitive integer property.
|
void | firePropertyChange(String property, boolean oldValue, boolean newValue)
Fires a property change for a primitive boolean property.
|
protected void | fireVetoableChange(String propertyName, Object oldValue, Object newValue)
Call VetoableChangeListener on all listeners
registered to listen to a given property. |
AccessibleContext | getAccessibleContext()
Get the value of the accessibleContext property for this component.
|
ActionListener | getActionForKeyStroke(KeyStroke ks)
Get the ActionListener (typically an Action object) which is
associated with a particular keystroke.
|
ActionMap | getActionMap() |
float | getAlignmentX()
Get the value of the alignmentX property.
|
float | getAlignmentY()
Get the value of the alignmentY property.
|
AncestorListener[] | getAncestorListeners()
Return all registered AncestorListener objects.
|
boolean | getAutoscrolls()
Get the current value of the autoscrolls property.
|
Border | getBorder()
Get the value of the border property.
|
Rectangle | getBounds(Rectangle rv)
Get the component's current bounding box. |
Object | getClientProperty(Object key)
Get a client property associated with this component and a particular
key.
|
protected Graphics | getComponentGraphics(Graphics g)
Prepares a graphics context for painting this object. |
JPopupMenu | getComponentPopupMenu()
Returns the popup menu for this component. |
int | getConditionForKeyStroke(KeyStroke ks)
Return the condition that determines whether a registered action
occurs in response to the specified keystroke.
|
int | getDebugGraphicsOptions()
Get the value of the debugGraphicsOptions property.
|
static Locale | getDefaultLocale()
Returns the locale used as the default for all new components. |
Graphics | getGraphics()
Returns the Graphics context for this component. |
int | getHeight()
Returns the height of this component. |
boolean | getInheritsPopupMenu()
Returns the flag that controls whether or not the component inherits its
parent's popup menu when no popup menu is specified for this component.
|
InputMap | getInputMap(int condition)
Returns the input map associated with this component for the given
state/condition.
|
InputMap | getInputMap()
Returns the input map associated with this component for the
WHEN_FOCUSED state.
|
InputVerifier | getInputVerifier()
Returns the currently set input verifier for this component.
|
Insets | getInsets()
Get the component's insets, which are calculated from
the border property. |
Insets | getInsets(Insets insets)
Get the component's insets, which are calculated from the border property. |
<T extends EventListener> T[] | getListeners(Class<T> listenerType)
Returns all registered EventListeners of the given
listenerType .
|
Point | getLocation(Point rv)
Get the component's location. |
Dimension | getMaximumSize()
Get the component's maximum size. |
Dimension | getMinimumSize()
Get the component's minimum size. |
Component | getNextFocusableComponent()
Return the value of the nextFocusableComponent property.
|
Dimension | getPreferredSize()
Get the component's preferred size. |
KeyStroke[] | getRegisteredKeyStrokes()
Return the set of KeyStroke objects which are registered
to initiate actions on this component.
|
JRootPane | getRootPane()
Returns the first ancestor of this component which is a JRootPane.
|
Dimension | getSize(Dimension rv)
Get the component's size. |
Point | getToolTipLocation(MouseEvent event)
Return the location at which the toolTipText property should
be displayed, when triggered by a particular mouse event.
|
String | getToolTipText()
Returns the current tooltip text for this component, or null
if none has been set.
|
String | getToolTipText(MouseEvent event)
Returns the tooltip text for this component for a particular mouse
event. |
Container | getTopLevelAncestor() |
TransferHandler | getTransferHandler()
Get the value of the transferHandler property.
|
String | getUIClassID()
Get the value of the UIClassID property. |
boolean | getVerifyInputWhenFocusTarget() |
VetoableChangeListener[] | getVetoableChangeListeners()
Return all registered VetoableChangeListener objects.
|
Rectangle | getVisibleRect()
Return the component's visible rectangle in a new Rectangle,
rather than via a return slot.
|
int | getWidth()
Returns the width of this component. |
int | getX()
Returns the X coordinate of the upper left corner of this component.
|
int | getY()
Returns the Y coordinate of the upper left corner of this component.
|
void | grabFocus() Requests that this component receive input focus, giving window focus to the top level ancestor of this component. |
boolean | isDoubleBuffered()
Get the value of the doubleBuffered property.
|
static boolean | isLightweightComponent(Component c)
Return true if the provided component has no native peer;
in other words, if it is a "lightweight component".
|
boolean | isManagingFocus()
Return true if you wish this component to manage its own
focus. |
boolean | isOpaque()
Return the current value of the opaque property.
|
boolean | isOptimizedDrawingEnabled()
Return true if the component can guarantee that none of its
children will overlap in Z-order. |
boolean | isPaintingTile()
Return true if this component is currently painting a tile,
this means that paint() is called again on another child component. |
boolean | isRequestFocusEnabled()
Get the value of the requestFocusEnabled property.
|
boolean | isValidateRoot()
Return true if this component is a validation root; this
will cause calls to JComponent in this component's children
to be "captured" at this component, and not propagate to its parents.
|
void | paint(Graphics g) Paint the component. |
protected void | paintBorder(Graphics g)
Paint the component's border. |
protected void | paintChildren(Graphics g)
Paint the component's children. |
protected void | paintComponent(Graphics g)
Paint the component's body. |
void | paintImmediately(int x, int y, int w, int h)
A variant of paintImmediately which takes
integer parameters.
|
void | paintImmediately(Rectangle r)
Transform the provided dirty rectangle for this component into the
appropriate ancestral JRootPane and call JComponent on
that root pane. |
protected String | paramString()
Return a string representation for this component, for use in
debugging.
|
void | print(Graphics g)
Prints this component to the given Graphics context. |
void | printAll(Graphics g)
Prints this component to the given Graphics context. |
protected void | printBorder(Graphics g)
Print this component's border to the specified Graphics context.
|
protected void | printChildren(Graphics g)
Print this component's children to the specified Graphics context.
|
protected void | printComponent(Graphics g)
Prints this component to the specified Graphics context. |
protected void | processComponentKeyEvent(KeyEvent e)
A hook for subclasses which want to customize event processing. |
protected boolean | processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) |
protected void | processKeyEvent(KeyEvent e) |
protected void | processMouseMotionEvent(MouseEvent ev)
Processes mouse motion event, like dragging and moving.
|
void | putClientProperty(Object key, Object value)
Add a client property value to this component, associated
with key . |
void | registerKeyboardAction(ActionListener act, KeyStroke stroke, int cond)
A variant of JComponent which
provides null for the command name.
|
void | registerKeyboardAction(ActionListener act, String cmd, KeyStroke stroke, int cond)
An obsolete method to register a keyboard action on this component.
|
void | removeAncestorListener(AncestorListener listener)
Unregister an AncestorListener .
|
void | removeNotify()
Receives notification that this component no longer has a parent.
|
void | removeVetoableChangeListener(VetoableChangeListener listener)
Unregister a VetoableChangeChangeListener .
|
void | repaint(long tm, int x, int y, int width, int height)
Mark the described region of this component as dirty in the current
RepaintManager. |
void | repaint(Rectangle r)
Mark the described region of this component as dirty in the current
RepaintManager. |
boolean | requestDefaultFocus()
Request focus on the default component of this component's FocusTraversalPolicy.
|
void | requestFocus()
Requests that this component gets the input focus if the
requestFocusEnabled property is set to true .
|
boolean | requestFocus(boolean temporary)
This method is overridden to make it public so that it can be used
by look and feel implementations.
|
boolean | requestFocusInWindow()
Requests that this component gets the input focus if the top level
window that contains this component has the focus and the
requestFocusEnabled property is set to true .
|
protected boolean | requestFocusInWindow(boolean temporary)
This method is overridden to make it public so that it can be used
by look and feel implementations.
|
void | resetKeyboardActions()
Reset all keyboard action registries.
|
void | reshape(int x, int y, int w, int h)
Moves and resizes the component.
|
void | revalidate()
Queue a an invalidation and revalidation of this component, using
RepaintManager. |
void | scrollRectToVisible(Rectangle r)
Calls scrollRectToVisible on the component's parent.
|
void | setActionMap(ActionMap map) |
void | setAlignmentX(float a)
Set the value of the alignmentX property.
|
void | setAlignmentY(float a)
Set the value of the alignmentY property.
|
void | setAutoscrolls(boolean a)
Set the value of the autoscrolls property.
|
void | setBackground(Color bg)
Set the value of the background property.
|
void | setBorder(Border newBorder)
Set the value of the border property.
|
void | setComponentPopupMenu(JPopupMenu popup)
Sets the popup menu for this component (this is a bound property with
the property name 'componentPopupMenu').
|
void | setDebugGraphicsOptions(int debugOptions)
Set the value of the debugGraphicsOptions property.
|
static void | setDefaultLocale(Locale l)
Sets the locale to be used as the default for all new components. |
void | setDoubleBuffered(boolean db)
Set the value of the doubleBuffered property.
|
void | setEnabled(boolean enable)
Set the value of the enabled property.
|
void | setFont(Font f)
Set the value of the font property.
|
void | setForeground(Color fg)
Set the value of the foreground property.
|
void | setInheritsPopupMenu(boolean inherit)
Sets the flag that controls whether or not the component inherits its
parent's popup menu when no popup menu is specified for this component.
|
void | setInputMap(int condition, InputMap map)
Sets the input map for the given condition.
|
void | setInputVerifier(InputVerifier verifier)
Sets the input verifier to use by this component.
|
void | setNextFocusableComponent(Component aComponent)
Set the specified component to be the next component in the
focus cycle, overriding the FocusTraversalPolicy for
this component.
|
void | setOpaque(boolean isOpaque)
Set if the component should paint all pixels withing its bounds.
|
void | setRequestFocusEnabled(boolean e)
Set the value of the requestFocusEnabled property.
|
void | setToolTipText(String text)
Set the tooltip text for this component. |
void | setTransferHandler(TransferHandler newHandler)
Set the value of the transferHandler property.
|
protected void | setUI(ComponentUI newUI)
Install a new UI delegate as the component's ui property. |
void | setVerifyInputWhenFocusTarget(boolean verifyInputWhenFocusTarget) |
void | setVisible(boolean v)
Set the value of the visible property.
|
void | unregisterKeyboardAction(KeyStroke aKeyStroke)
Remove a keyboard action registry.
|
void | update(Graphics g)
Call JComponent.
|
void | updateUI()
This method should be overridden in subclasses. |
JComponent
.See Also: JComponent JComponent JComponent
See Also: JComponent
See Also: JComponent
See Also: JComponent
See Also: JComponent
JComponent
instance.VetoableChangeListener
.
Parameters: listener The listener to register
See Also: JComponent listenerList
Parameters: rect The return value slot to place the visible rectangle in
true
if the coordinates (x, y) lie within
the bounds of this component and false
otherwise.
x and y are relative to the coordinate space of the component.
Parameters: x the X coordinate of the point to check y the Y coordinate of the point to check
Returns: true
if the specified point lies within the bounds
of this component, false
otherwise
toolTip
property of this component, creating it and
setting it if it is currently null
. This method can be
overridden in subclasses which wish to control the exact form of
tooltip created.
Returns: The current toolTip
Deprecated: replaced by JComponent
Disables this component.Deprecated: replaced by JComponent
Enables this component.Parameters: property the name of the property oldValue the old value of the property newValue the new value of the property
UNKNOWN: This method is implemented in Component. It is only here because it is specified to be public, whereas the Component method is protected.
Parameters: property the name of the property oldValue the old value of the property newValue the new value of the property
UNKNOWN: This method is implemented in Component. It is only here because it is specified to be public, whereas the Component method is protected.
Parameters: propertyName The property which changed oldValue The old value of the property newValue The new value of the property
Throws: PropertyVetoException if the change was vetoed by a listener
See Also: JComponent JComponent
Returns: the current value of the property
Parameters: ks The keystroke to retrieve the action of
Returns: The action associated with the specified keystroke
Returns: The current value of the property.
See Also: JComponent alignmentY
Returns: The current value of the property.
See Also: JComponent alignmentX
AncestorListener
objects.
Returns: The set of AncestorListener
objects in listenerList
Returns: The current value of the property
null
is provided) return a new Rectangle.
Parameters: rv Optional return value to use
Returns: A rectangle bounding the component
Parameters: key The key with which to look up the client property
Returns: A client property associated with this object and key
See Also: clientProperties JComponent JComponent
Parameters: g The graphics context to wrap or configure
Returns: A graphics context to paint this object with
See Also: debugGraphicsOptions JComponent
null
AND the getInheritsPopupMenu method returns
true
, this method will return the parent's popup menu (if it
has one).
Returns: The popup menu (possibly null
.
Since: 1.5
See Also: setComponentPopupMenu getInheritsPopupMenu
Parameters: ks The keystroke to return the condition of
Returns: One of the values UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, or WHEN_IN_FOCUSED_WINDOW
See Also: JComponent JComponent JComponent
Returns: The current value of the property.
See Also: JComponent debugGraphicsOptions
Returns: The locale (never null
).
See Also: setDefaultLocale
Returns: the Graphics context for this component
Returns: the height of the component
Returns: A boolean.
Since: 1.5
See Also: JComponent
Parameters: condition the state (one of WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT and WHEN_IN_FOCUSED_WINDOW).
Returns: The input map.
Throws: IllegalArgumentException if condition
is not one of
the specified values.
Since: 1.3
Returns: The input map.
Since: 1.3
See Also: JComponent
Returns: the input verifier, or null
if none
null
,
calls Container.
Returns: The component's current insets
null
, calls Container. The passed-in Insets value will be
used as the return value, if possible.
Parameters: insets Return value object to reuse, if possible
Returns: The component's current insets
listenerType
.
Parameters: listenerType the class of listeners to filter (null
not permitted).
Returns: An array of registered listeners.
Throws: ClassCastException if listenerType
does not implement
the EventListener interface. NullPointerException if listenerType
is
null
.
Since: 1.3
See Also: getAncestorListeners listenerList
Parameters: rv Return value object to reuse, if possible
Returns: The component's current location
maximumSize
property
has been explicitly set, it is returned. If the maximumSize
property has not been set but the ui property has been, the
result of ComponentUI is returned. If neither
property has been set, the result of Container
is returned.
Returns: the maximum size of the component
See Also: Component getMaximumSize isMaximumSizeSet getMaximumSize
minimumSize
property
has been explicitly set, it is returned. If the minimumSize
property has not been set but the ui property has been, the
result of ComponentUI is returned. If neither
property has been set, the result of Container
is returned.
Returns: The minimum size of the component
See Also: Component getMinimumSize isMinimumSizeSet getMinimumSize
Deprecated: See FocusTraversalPolicy
Return the value of thenextFocusableComponent
property.
Returns: The current value of the property, or null
if none has been set.
preferredSize
property has been explicitly set, it is returned. If the
preferredSize
property has not been set but the ui
property has been, the result of ComponentUI is
returned. If neither property has been set, the result of Container is returned.
Returns: The preferred size of the component
See Also: Component getPreferredSize isPreferredSizeSet getPreferredSize
Returns: An array of the registered keystrokes (possibly empty but never
null
).
SwingUtilities.getRootPane(this);
.
Returns: An ancestral JRootPane, or null
if none exists.
Parameters: rv Return value object to reuse, if possible
Returns: The component's current size
toolTipText
property should
be displayed, when triggered by a particular mouse event.
Parameters: event The event the tooltip is being presented in response to
Returns: The point at which to display a tooltip, or null
if swing is to choose a default location.
null
if none has been set.
Returns: the current tooltip text for this component, or null
if none has been set
See Also: JComponent getToolTipText
Parameters: event the mouse event which triggered the tooltip
Returns: the tooltip text for this component for a particular mouse event
See Also: JComponent getToolTipText
null
if no ancestors exist.
Returns: The top level container, if it exists
Returns: The current value of the property
See Also: JComponent
Returns: A "symbolic" name which will map to a class to use for the
component's UI, such as "ComponentUI"
See Also: JComponent JComponent
Since: 1.3
VetoableChangeListener
objects.
Returns: An array of the VetoableChangeListener
objects
registered with this component (possibly empty but never
null
).
Since: 1.4
Returns: the component's visible rectangle
See Also: computeVisibleRect
Returns: the width of the component
Returns: the X coordinate of the upper left corner of the component
Returns: the Y coordinate of the upper left corner of the component
Requests that this component receive input focus, giving window focus to the top level ancestor of this component. Only works on displayable, focusable, visible components.
This method should not be called by clients; it is intended for focus implementations. Use requestFocus instead.
See Also: requestFocus
Returns: The property's current value
true
if the provided component has no native peer;
in other words, if it is a "lightweight component".
Parameters: c The component to test for lightweight-ness
Returns: Whether or not the component is lightweight
Deprecated: 1.4 Use Component and Container instead
Returntrue
if you wish this component to manage its own
focus. In particular: if you want this component to be sent
TAB
and SHIFT+TAB
key events, and to not
have its children considered as focus transfer targets. If
true
, focus traversal around this component changes to
CTRL+TAB
and CTRL+SHIFT+TAB
.
Returns: true
if you want this component to manage its own
focus, otherwise (by default) false
Returns: The current property value
true
if the component can guarantee that none of its
children will overlap in Z-order. This is a hint to the painting system.
The default is to return true
, but some components such as
JLayeredPane should override this to return false
.
Returns: Whether the component tiles its children
true
if this component is currently painting a tile,
this means that paint() is called again on another child component. This
method returns false
if this component does not paint a tile
or if the last tile is currently painted.
Returns: whether the component is painting a tile
Returns: The current value of the property
true
if this component is a validation root; this
will cause calls to JComponent in this component's children
to be "captured" at this component, and not propagate to its parents.
For most components this should return false
, but some
components such as JViewport will want to return
true
.
Returns: Whether this component is a validation root
Paint the component. This is a delicate process, and should only be called from the repaint thread, under control of the RepaintManager. Client code should usually call JComponent to trigger painting.
The body of the paint
call involves calling JComponent, JComponent, and JComponent in
order. If you want to customize painting behavior, you should override
one of these methods rather than paint
.
For more details on the painting sequence, see this article.
Parameters: g The graphics context to paint with
See Also: paintImmediately
null
. You may override this if you wish to customize
border painting behavior. The border is painted after the component's
body, but before the component's children.
Parameters: g The graphics context with which to paint the border
See Also: JComponent JComponent JComponent
Parameters: g The graphics context with which to paint the children
See Also: JComponent JComponent JComponent
null
. You may override this if you wish to
customize the component's body-painting behavior. The component's body
is painted first, before the border and children.
Parameters: g The graphics context with which to paint the body
See Also: JComponent JComponent JComponent
Parameters: x The left x coordinate of the dirty region y The top y coordinate of the dirty region w The width of the dirty region h The height of the dirty region
This method will acquire a double buffer from the RepaintManager if the component's doubleBuffered property is
true
and the paint
call is the
first recursive paint
call inside swing.
The method will also modify the provided Graphics context
via the JComponent method. If you want to customize
the graphics object used for painting, you should override that method
rather than paint
.
Parameters: r The dirty rectangle to paint
Returns: A string describing this component.
Parameters: g the Graphics context to print onto
Parameters: g the Graphics context to print onto
Parameters: g the Graphics context to print onto
Since: 1.3
Parameters: g the Graphics context to print onto
Since: 1.3
Parameters: g the Graphics context to print onto
Since: 1.3
Parameters: ev the MouseEvent describing the mouse motion
value
to this component, associated
with key
. If there is an existing client property
associated with key
, it will be replaced. A
PropertyChangeEvent is sent to registered listeners (with the
name of the property being key.toString()
).
Parameters: key The key of the client property association to add value The value of the client property association to add
See Also: clientProperties JComponent JComponent
null
for the command name.
Parameters: act the action listener to notify when the keystroke occurs. stroke the key stroke. cond the condition (one of WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW and WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).
getInputMap
and getActionMap
to fetch mapping tables from keystrokes to commands, and commands to
actions, respectively, and modify those mappings directly.
Parameters: act The action to be registered cmd The command to deliver in the delivered ActionEvent stroke The keystroke to register on cond One of the values UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, or WHEN_IN_FOCUSED_WINDOW, indicating the condition which must be met for the action to be fired
See Also: JComponent JComponent JComponent
AncestorListener
.
Parameters: listener The listener to unregister
See Also: JComponent
VetoableChangeChangeListener
.
Parameters: listener The listener to unregister
See Also: JComponent
Parameters: tm ignored x coordinate of the region to mark as dirty y coordinate of the region to mark as dirty width dimension of the region to mark as dirty height dimension of the region to mark as dirty
Parameters: r The rectangle to mark as dirty
Deprecated: Use requestFocus on the default component provided from the FocusTraversalPolicy instead.
Request focus on the default component of this component's FocusTraversalPolicy.Returns: The result of requestFocus
true
.
This also means that this component's top-level window becomes
the focused window, if that is not already the case.
The preconditions that have to be met to become a focus owner is that
the component must be displayable, visible and focusable.
Note that this signals only a request for becoming focused. There are
situations in which it is not possible to get the focus. So developers
should not assume that the component has the focus until it receives
a FocusEvent with a value of
FOCUS_GAINED.
See Also: requestFocus
Parameters: temporary if the focus change is temporary
Returns: false
if the focus change request will definitly
fail, true
if it will likely succeed
Since: 1.4
true
.
The preconditions that have to be met to become a focus owner is that
the component must be displayable, visible and focusable.
Note that this signals only a request for becoming focused. There are
situations in which it is not possible to get the focus. So developers
should not assume that the component has the focus until it receives
a FocusEvent with a value of
FOCUS_GAINED.
Returns: false
if the focus change request will definitly
fail, true
if it will likely succeed
See Also: requestFocusInWindow
Parameters: temporary if the focus change is temporary
Returns: false
if the focus change request will definitly
fail, true
if it will likely succeed
Since: 1.4
See Also: JComponent JComponent JComponent
Parameters: x the new horizontal location y the new vertial location w the new width h the new height
scrollRectToVisible
on the component's parent.
Components which can service this call should override.
Parameters: r The rectangle to make visible
Parameters: a The new value of the property
Parameters: a The new value of the property
Parameters: a The new value of the property
background
property.
Parameters: bg The new value of the property
Parameters: newBorder The new value of the property
See Also: JComponent
Parameters: popup the popup menu (null
permitted).
Since: 1.5
See Also: getComponentPopupMenu
Parameters: debugOptions The new value of the property
null
, the getDefaultLocale method will
return the platform default locale.
Parameters: l the locale (null
permitted).
Parameters: db The new value of the property
enabled
property.
Parameters: enable The new value of the property
font
property.
Parameters: f The new value of the property
foreground
property.
Parameters: fg The new value of the property
Parameters: inherit the new flag value.
Since: 1.5
See Also: getInheritsPopupMenu
Parameters: condition the condition (one of WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW and WHEN_ANCESTOR_OF_FOCUSED_COMPONENT). map the map.
Throws: IllegalArgumentException if condition
is not one of
the specified values.
Parameters: verifier the input verifier, or null
Deprecated: Use FocusTraversalPolicy instead
Set the specified component to be the next component in the focus cycle, overriding the FocusTraversalPolicy for this component.Parameters: aComponent The component to set as the next focusable
Parameters: isOpaque if true, paint all pixels. If false, expect the clean background.
See Also: ComponentUI
Parameters: e The new value of the property
null
value is set, this component is registered in the
ToolTipManager
in order to turn on tooltips for this
component. If a null
value is set, tooltips are turne off
for this component.
Parameters: text the tooltip text for this component
See Also: getToolTipText getToolTipText
Parameters: newHandler The new value of the property
See Also: JComponent
Parameters: newUI The new UI delegate to install
See Also: JComponent JComponent
Since: 1.3
Parameters: v The new value of the property
Parameters: aKeyStroke The keystroke to unregister
See Also: JComponent JComponent JComponent
Parameters: g The graphics context to paint into