Lines Matching refs:to

8  * particular file as subject to the "Classpath" exception as provided
18 * 2 along with this work; if not, write to the Free Software Foundation,
78 * that provide a place for other Swing components to paint themselves.
96 * to Set the Look and Feel</a>
110 * to Use Tool Tips</a>
129 * to Use Borders</a>,
142 * to provide a particular look and feel each
145 * look and feel may require <code>JTable</code>s to have a row
154 * How to Use the Focus Subsystem</a>,
168 * has been added to the <code>java.beans</code> package.
199 * Keys to use for forward focus traversal when the JComponent is
205 * Keys to use for backward focus traversal when the JComponent is
216 * Set to true when DebugGraphics has been loaded.
221 * Key used to look up a value from the AppContext to determine the
264 * If <code>paintingChild</code> is opaque, no need to paint
294 * Constant used by some of the APIs to mean that no condition is defined.
299 * The key used by <code>JComponent</code> to access keyboard bindings.
311 * The comment to display when the cursor is over the component,
319 * <code>JPopupMenu</code> assigned to this component
339 /** Bits 14-21 are used to handle nested writeObject calls. **/
372 /** Key used to store the default locale in an AppContext **/
418 * Returns the Set of <code>KeyStroke</code>s to use if the component
434 * Returns the Set of <code>KeyStroke</code>s to use if the component
472 * to the parent if this component does not have a <code>JPopupMenu</code>
473 * assigned to it.
477 * may set this to true.
514 * to the parent. This provides for a way to make all child components
519 * @param popup - the popup that will be assigned to this component
525 * description: Popup to show
540 * to it and <code>getInheritsPopupMenu</code> is true, this
580 * property to the value returned by
588 // bindings will work everywhere. This is a partial fix to BugID
605 * Resets the UI property to a value from the current look and feel.
624 * to narrow the argument type. For example, in <code>JSlider</code>:
651 * before allowing the switch in order to enable the
653 * to be installed.
674 * as being specific to the installed UI - instances of
698 * Returns the <code>UIDefaults</code> key used to
701 * for this component. Most applications will never need to
703 * pluggable look and feel should override this method to
704 * return a <code>UIDefaults</code> key that maps to the
720 * Returns the graphics object used to paint this component.
748 * <code>Graphics</code> object to protect the rest of the
753 * changes to the passed in <code>Graphics</code>. For example, you
755 * transform. If you need to do these operations you may find it
756 * easier to create a new <code>Graphics</code> from the passed in
770 * @param g the <code>Graphics</code> object to protect
792 * should not use a buffer to paint.
793 * @param g the <code>Graphics</code> context in which to paint
805 // If we are only to paint to a specific child, determine
933 * changes to the passed in <code>Graphics</code>. For example, you
935 * transform. If you need to do these operations you may find it
936 * easier to create a new <code>Graphics</code> from the passed in
939 * @param g the <code>Graphics</code> context in which to paint
957 * @param g the <code>Graphics</code> context in which to paint
968 * Invoked by Swing to draw components.
970 * but should instead use the <code>repaint</code> method to
973 * This method actually delegates the work of painting to three
977 * listed to ensure that children appear on top of component itself.
979 * paint in the insets area allocated to the border. Subclasses can
981 * wants to specialize the UI (look and feel) delegate's
985 * @param g the <code>Graphics</code> context in which to paint
1134 * Invoke this method to print the component. This method invokes
1137 * @param g the <code>Graphics</code> context in which to paint
1154 * Invoke this method to print the component to the specified
1159 * your intention is to customize the way printing looks. However,
1160 * it can be useful to override this method should you want to prepare
1162 * if you wanted to change the component's background color before
1178 * Alternatively, or for components that delegate painting to other objects,
1181 * this ability and its return value will be changed by this method: to
1182 * <code>true</code> immediately before rendering and to <code>false</code>
1190 * @param g the <code>Graphics</code> context in which to paint
1209 * This is invoked during a printing operation. This is implemented to
1211 * if you wish to add special painting behavior when printing.
1213 * @param g the <code>Graphics</code> context in which to paint
1222 * Prints this component's children. This is implemented to invoke
1224 * wish to print the children differently than painting.
1226 * @param g the <code>Graphics</code> context in which to paint
1235 * Prints the component's border. This is implemented to invoke
1237 * wish to print the border differently that it is painted.
1239 * @param g the <code>Graphics</code> context in which to paint
1252 * Use this method to keep some state you might need between tiles.
1264 * useful when you want to customize what you print versus what you show
1271 * Note: This method provides complimentary functionality to that provided
1277 * times during that operation. It is even possible for the component to be
1278 * painted to the screen while the printing process is ongoing. In such a
1295 * How to Use the Focus Subsystem</a>,
1298 * Changes this <code>JComponent</code>'s focus traversal keys to
1357 * How to Use the Focus Subsystem</a>,
1390 * How to Use the Focus Subsystem</a>,
1393 * Returns the <code>Component</code> set by a prior call to
1410 * Provides a hint as to whether or not this <code>JComponent</code>
1411 * should get focus. This is only a hint, and it is up to consumers that
1412 * are requesting focus to honor this property. This is typically honored
1416 * not want a mouse press on a <code>JComponent</code> to steal focus,
1417 * but did want the <code>JComponent</code> to be traversable via the
1423 * How to Use the Focus Subsystem</a>,
1428 * <code>JComponent</code> to be focusable or not
1442 * How to Use the Focus Subsystem</a>,
1459 * Refer to {@link java.awt.Component#requestFocus()
1468 * How to Use the Focus Subsystem</a>,
1481 * Refer to {@link java.awt.Component#requestFocus(boolean)
1491 * How to Use the Focus Subsystem</a>,
1495 * @return <code>false</code> if the focus change request is guaranteed to
1496 * fail; <code>true</code> if it is likely to succeed
1507 * Refer to {@link java.awt.Component#requestFocusInWindow()
1513 * How to Use the Focus Subsystem</a>,
1516 * @return <code>false</code> if the focus change request is guaranteed to
1517 * fail; <code>true</code> if it is likely to succeed
1528 * Refer to {@link java.awt.Component#requestFocusInWindow(boolean)
1534 * How to Use the Focus Subsystem</a>,
1538 * @return <code>false</code> if the focus change request is guaranteed to
1539 * fail; <code>true</code> if it is likely to succeed
1551 * must be displayable, visible, and focusable for the request to be
1565 * Sets the value to indicate whether input verifier for the
1567 * focus. The default is true. Set to false on components such as a
1617 * @param font the font for which font metrics is to be
1643 * If the <code>preferredSize</code> has been set to a
1647 * otherwise defer to the component's layout manager.
1667 * Sets the maximum size of this component to a constant
1668 * value. Subsequent calls to <code>getMaximumSize</code> will always
1670 * to compute it. Setting the maximum size to <code>null</code>
1686 * If the maximum size has been set to a non-<code>null</code> value
1689 * otherwise defer to the component's layout manager.
1709 * Sets the minimum size of this component to a constant
1710 * value. Subsequent calls to <code>getMinimumSize</code> will always
1712 * to compute it. Setting the minimum size to <code>null</code>
1726 * If the minimum size has been set to a non-<code>null</code> value
1729 * defer to the component's layout manager.
1748 * Gives the UI delegate an opportunity to define the precise
1767 * Compound borders can be used to nest multiple borders within a
1774 * when you want to set a border on a standard Swing
1781 * @param border the border to be rendered for this component
1864 * Overrides <code>Container.getAlignmentY</code> to return
1893 * Overrides <code>Container.getAlignmentX</code> to return
1950 * on a component. Use this method to get a <code>Graphics</code> object and
1951 * then invoke operations on that object to draw on the component.
1970 * <li>DebugGraphics.LOG_OPTION - causes a text message to be printed.
1971 * <li>DebugGraphics.FLASH_OPTION - causes the drawing to flash several
1977 * <li>A value of 0 causes no changes to the debugging options.
1997 * <li>DebugGraphics.LOG_OPTION - causes a text message to be printed.
1998 * <li>DebugGraphics.FLASH_OPTION - causes the drawing to flash several
2004 * <li>A value of 0 causes no changes to the debugging options.
2024 * similiar behavior. For example, to bind the <code>KeyStroke</code>
2025 * <code>aKeyStroke</code> to the <code>Action</code> <code>anAction</code>
2031 * The above assumes you want the binding to be applicable for
2068 * combination (using the KeyStroke class) and direct to a parent or
2069 * child of a component that has the focus, or to the component itself.
2071 * arbitrary key-combination can be immediately directed to the
2073 * to be invoked (usually by way of adapter objects).
2079 * @param anAction the <code>Action</code> to be registered
2080 * @param aCommand the command to be set in the delivered event
2081 * @param aKeyStroke the <code>KeyStroke</code> to bind to the action
2082 * @param aCondition the condition that needs to be met, see above
2103 * to the <code>KeyboardManager</code>;
2104 * otherwise all actions are pushed to the <code>KeyboardManager</code>.
2107 * are pushed to the <code>KeyboardManager</code>
2116 // Push any new KeyStrokes to the KeyboardManager.
2221 * to be active, whereas putting a dummy binding in the
2275 * occurs in response to the specified keystroke.
2330 * (the UI is usually defined in the second tier) to persist.
2351 * Sets the <code>InputMap</code> to use under the condition
2352 * <code>condition</code> to
2354 * do not want any bindings to be used, even from the UI. This will
2369 * @param map the <code>InputMap</code> to use for the given condition
2427 * Sets the <code>ActionMap</code> to <code>am</code>. This does not set
2428 * the parent of the <code>am</code> to be the <code>ActionMap</code>
2429 * from the UI (if there was one), it is up to the caller to have done this.
2440 * Returns the <code>ActionMap</code> used to determine what
2441 * <code>Action</code> to fire for particular <code>KeyStroke</code>
2453 * Returns the <code>InputMap</code> to use for condition
2538 * <code>LayoutManager</code>s to align components along their
2549 * can be used to determine how the baseline changes with size.
2579 * this method. It is acceptable for this method to return a
2597 * How to Use the Focus Subsystem</a>,
2632 * @param aFlag true to make the component visible; false to
2654 * A component that is enabled may respond to user input,
2655 * while a component that is not enabled cannot respond to
2657 * representation when they are disabled in order to
2658 * provide feedback to the user that they cannot take input.
2684 * Sets the foreground color of this component. It is up to the
2685 * look and feel to honor this property, some may choose to ignore
2712 * <code>paintComponent</code> to honor this property.
2714 * It is up to the look and feel to honor this property, some may
2715 * choose to ignore it.
2759 * Returns the default locale used to initialize each JComponent's
2786 * Sets the default locale used to initialize each JComponent's locale
2809 * given a chance to steal away the event. This
2812 * to the keyboard UI logic.
2814 * This method is implemented to do nothing. Subclasses would
2822 /** Overrides <code>processKeyEvent</code> to process events. **/
2848 * Invoked to process the key bindings for <code>ks</code> as the result
2853 * is enabled) invokes <code>notifyAction</code> to notify the action.
2864 * @return true if there was a binding to an action, and the action
2928 /* We have no key binding. Let's try the path from our parent to the
2946 // more precedence to the WHEN_IN_FOCUSED_WINDOW bindings of the
2984 * Registers the text to display in a tool tip.
2987 * See <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tooltip.html">How to Use Tool Tips</a>
2991 * @param text the string to display; if the text is <code>null</code>,
2996 * description: The text to display in a tool tip.
3024 * Returns the string to be used as the tooltip for <i>event</i>.
3027 * more extensive API to support differing tooltips at different locations,
3040 * <code>ToolTipManager</code> to show the tooltip
3048 * Returns the preferred location to display the popup menu in this
3049 * component's coordinate system. It is up to the look and feel to
3050 * honor this property, some may choose to ignore it.
3053 * @param event the {@code MouseEvent} that triggered the popup to be
3056 * @return location to display the {@code JPopupMenu}, or {@code null}
3066 * to display the tooltip.
3068 * but it can be used to
3069 * cause different tooltips to be displayed differently.
3071 * @return the <code>JToolTip</code> used to display this toolTip
3080 * Forwards the <code>scrollRectToVisible()</code> message to the
3118 * has paused (while the button continues to be held
3147 * bounds and the mouse button continues to be held down; otherwise
3189 * also installs a <b>new</b> {@code DropTarget} on the component to
3192 * locations). If you do not wish for this component to respond in any way
3193 * to drops, you can disable drop support entirely either by removing the
3202 * set by the developer to a {@code non-null} value. Second, if the
3208 * How to Use Drag and Drop and Data Transfer</a>,
3219 * description: Mechanism for transfer of data to and from the component
3251 * @param p the point to calculate a drop location for
3259 * Called to set or clear the drop location during a DnD operation.
3260 * In some cases, the component may need to use its internal selection
3261 * temporarily to indicate the drop location. To help facilitate this,
3263 * This state object can be used to store, and later restore, the selection
3264 * state. Whatever this method returns will be passed back to it in
3265 * future calls, as the state parameter. If it wants the DnD system to
3269 * Let's say that on the first call to this method the component decides
3270 * to save some state (because it is about to use the selection to show
3271 * a drop index). It can return a state object to the caller encapsulating
3273 * is being changed to something else. The component doesn't need to
3275 * to have the DnD system continue storing it. Finally, let's say this
3278 * state. At this point, it can use the state parameter to restore
3280 * no longer anything to store.
3299 * Called to indicate to this component that DnD is done.
3307 * dispatching them to any registered
3308 * <code>MouseListener</code> objects, refer to
3332 // We don't want to do the drags when the mouse moves if we're
3410 // bindings to be accessed.
3425 // We don't allow any values to be added.
3439 // This class is used by the KeyboardState class to provide a single
3535 // We are forced to process VK_PRINTSCREEN separately because
3555 public boolean acceptRequestFocus(Component from, Component to,
3559 if ((to == null) || !(to instanceof JComponent)) {
3567 JComponent target = (JComponent) to;
3653 * should implement this method to return the
3664 * Inner class of JComponent used to provide default support for
3665 * accessibility. This class is not meant to be used directly by
3666 * application developers, but is instead meant only to be
3675 * has been added to the <code>java.beans</code> package.
3739 * Adds a PropertyChangeListener to the listener list.
3741 * @param listener the PropertyChangeListener to be added
3760 * @param listener the PropertyChangeListener to be removed
3806 * appropriate String to return.
3815 // fallback to the client name property
3821 // fallback to the titled border if it exists
3827 // fallback to the label labeling us if it exists
3844 * is its meaning to the user. If the object has a tooltip, the
3845 * tooltip text may be an appropriate string to return, assuming
3859 // fallback to the client description property
3865 // fallback to the tool tip text if it exists
3875 // method to take a MouseEvent and just pass it on
3876 // to getToolTipText. The swing-feedback traffic
3877 // leads me to believe getToolTipText might change,
3878 // though, so I was hesitant to make this change at
3883 // fallback to the label labeling us if it exists
4040 * Adds an arbitrary key/value "client property" to this component.
4042 * The <code>get/putClientProperty</code> methods provide access to
4044 * to annotate components that were created by another module.
4048 * componentA.putClientProperty("to the left of", componentB);
4051 * Changes to client properties are reported with
4056 * The <code>clientProperty</code> dictionary is not intended to
4058 * scale extensions to JComponent nor should be it considered an
4059 * alternative to subclassing when designing a new component.
4074 // have to do anything.
4102 * Sets the property with the specified name to the specified value if
4104 * This method is used primarily to set UI defaults for properties
4144 * Refer to
4161 * or if any keystroke already maps to another focus traversal
4179 * The methods and fields in this section will migrate to
4217 * if the caller wants to avoid allocating a new <code>Rectangle</code>
4220 * @param rv the return value, modified to the component's bounds
4241 * is useful if the caller wants to avoid allocating a new
4244 * @param rv the return value, modified to the component's size
4263 * if the caller wants to avoid allocating a new <code>Point</code>
4266 * @param rv the return value, modified to the component's location
4282 * This method is preferable to writing
4294 * This method is preferable to writing
4306 * This method is preferable to writing
4318 * This method is preferable to writing
4332 * its pixels or none at all, allowing the pixels underneath it to
4336 * Subclasses that guarantee to always completely paint their contents
4349 * pixels, allowing the underlying pixels to show through.
4483 * send the appropriate PropertyChangeEvent to any registered
4499 * send the appropriate PropertyChangeEvent to any registered
4511 // XXX This method is implemented as a workaround to a JLS issue with ambiguous
4521 * to any registered <code>VetoableChangeListeners</code>.
4526 * @exception PropertyVetoException when the attempt to set the
4540 * Adds a <code>VetoableChangeListener</code> to the listener list.
4543 * @param listener the <code>VetoableChangeListener</code> to be added
4558 * @param listener the <code>VetoableChangeListener</code> to be removed
4593 * been added to any container.
4619 * @param listener the <code>AncestorListener</code> to register
4636 * @param listener the <code>AncestorListener</code> to be removed
4761 // fired until *after* the parent is set to null. But
4779 * Adds the specified region to the dirty region list if the component
4798 * Adds the specified region to the dirty region list if the component
4816 * <code>validateRoot</code> to a list of components that need to be
4829 * longer need to invoke <code>validate</code> to get the contents of the
4830 * GUI to update.
4841 // to a valid parent invalidate will be invoked (addImpl
4843 // new Component). Also, if we do add a check to isValid
4854 // the EDT, a flag is maintained as to whether or not
4877 * beginning with this root to be validated.
4899 * should override this method to return false.
4909 * painting to originate from this Component, or one of its ancestors.
4916 * {@code JComponent} subclasses that need to be painted when any of their
4917 * children are repainted should override this method to return {@code true}.
4931 * It's rarely necessary to call this method. In most cases it's
4932 * more efficient to call repaint, which defers the actual painting
4934 * This method is useful if one needs to update the display while
4937 * This method is to be overridden when the dirty region needs to be changed
4940 * @param x the x value of the region to be painted
4941 * @param y the y value of the region to be painted
4942 * @param w the width of the region to be painted
4943 * @param h the height of the region to be painted
4987 * @param r a <code>Rectangle</code> containing the region to be painted
4994 * Returns whether this component should be guaranteed to be on top.
4995 * For example, it would make no sense for <code>Menu</code>s to pop up
4997 * Most components will want to return false, hence that is the default.
5024 // parent Container's up to Window or Applet. First container is
5025 // the direct parent. Note that in testing it was faster to
5027 // seemed to have a minimal effect on this.
5065 // case there is no need to paint.
5066 // . Partially obscured by a sibling: need to start
5068 // . Otherwise we aren't obscured and thus don't need to
5112 // look to see if the parent (and therefor this component)
5147 // Notify the Components that are going to be painted of the
5148 // child component to paint to.
5203 * Paints to the specified graphics. This does not set the clip and it
5206 * its subclasses to call, it is NOT intended for general use outside
5217 // Called from paintImmediately (RepaintManager) to fill
5221 // Called from paint() (AWT) to repair damage
5324 * Sets whether this component should use a buffer to paint.
5325 * If set to true, all the drawing from this component will be done
5331 * @param aFlag if true, set this component to be double buffered
5338 * Returns whether this component should use a buffer to paint.
5373 * being able to override this package-private method the way the
5374 * other components can. We don't want to make this method protected
5390 * that was read to the current default with <code>updateUI</code>.
5430 * seen, then add it to the roots <code>Vector</code>.
5432 * @param c the <code>JComponent</code> to add
5449 * to the roots vector.
5468 * callback to update the UI for the entire tree of components
5471 * @param s the <code>ObjectInputStream</code> from which to read
5479 * this is the first call to JComponent.readObject() for this
5512 * Before writing a <code>JComponent</code> to an
5514 * This is tricky to do because we want to uninstall
5517 * and we don't want to restore the UI until the most derived
5520 * @param s the <code>ObjectOutputStream</code> in which to write
5538 * is intended to be used only for debugging purposes, and the