Lines Matching defs:Component

94  * The <code>Component</code> class is the abstract superclass of
96 * <code>Component</code> can also be extended directly to create a
188 public abstract class Component implements ImageObserver, MenuContainer,
192 private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Component");
193 private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.Component");
194 private static final PlatformLogger focusLog = PlatformLogger.getLogger("java.awt.focus.Component");
195 private static final PlatformLogger mixingLog = PlatformLogger.getLogger("java.awt.mixing.Component");
199 * behavior. The peer is set when the <code>Component</code> is
410 * Indicates whether this Component can be focused.
424 * Tracks whether this Component is relying on default focus travesability.
434 * value of null is specified for a traversal key, this Component inherits
435 * that traversal key from its parent. If all ancestors of this Component
454 * Indicates whether focus traversal keys are enabled for this Component.
687 throw new SecurityException("Component is missing AccessControlContext");
833 // Whether this Component has had the background erase flag
842 public void setBackgroundEraseDisabled(Component comp, boolean disabled) {
845 public boolean getBackgroundEraseDisabled(Component comp) {
848 public Rectangle getBounds(Component comp) {
851 public void setMixingCutoutShape(Component comp, Shape shape) {
880 public void setGraphicsConfiguration(Component comp,
885 public boolean requestFocus(Component comp, CausedFocusEvent.Cause cause) {
888 public boolean canBeFocusOwner(Component comp) {
892 public boolean isVisible(Component comp) {
898 Component.setRequestFocusController(requestController);
900 public AppContext getAppContext(Component comp) {
903 public void setAppContext(Component comp, AppContext appContext) {
906 public Container getParent(Component comp) {
909 public void setParent(Component comp, Container parent) {
912 public void setSize(Component comp, int width, int height) {
916 public Point getLocation(Component comp) {
919 public void setLocation(Component comp, int x, int y) {
923 public boolean isEnabled(Component comp) {
926 public boolean isDisplayable(Component comp) {
929 public Cursor getCursor(Component comp) {
932 public ComponentPeer getPeer(Component comp) {
935 public void setPeer(Component comp, ComponentPeer peer) {
938 public boolean isLightweight(Component comp) {
941 public boolean getIgnoreRepaint(Component comp) {
944 public int getWidth(Component comp) {
947 public int getHeight(Component comp) {
950 public int getX(Component comp) {
953 public int getY(Component comp) {
956 public Color getForeground(Component comp) {
959 public Color getBackground(Component comp) {
962 public void setBackground(Component comp, Color background) {
965 public Font getFont(Component comp) {
968 public void processEvent(Component comp, AWTEvent e) {
972 public AccessControlContext getAccessControlContext(Component comp) {
979 * Constructs a new component. Class <code>Component</code> can be
985 protected Component() {
998 return null; // For strict compliance with prior platform versions, a Component
1072 * The <code>Component</code> will receive drops only if it
1120 * <code>Component</code>.
1127 * <code>Component</code>.
1128 * If the <code>Component</code> has not been assigned a specific
1131 * <code>Component</code> object's top-level container is
1133 * If the <code>Component</code> has been created, but not yet added
1137 * <code>Component</code> or <code>null</code>
1262 * @see Container#add(Component)
1265 * @see Container#remove(Component)
1313 * to this method, it finds a Component that is in the same
1314 * Window as this Component and is located under the mouse pointer.
1315 * If no such Component exists, null is returned.
1317 * tree lock, as it is done in Component.getMousePosition() and
1320 Component findUnderMouseInWindow(PointerInfo pi) {
1330 Component inTheSameWindow = win.findComponentAt(relativeToWindow.x,
1337 * Returns the position of the mouse pointer in this <code>Component</code>'s
1338 * coordinate space if the <code>Component</code> is directly under the mouse
1340 * If the <code>Component</code> is not showing on the screen, this method
1342 * where the <code>Component</code> would be displayed.
1343 * If the <code>Component</code> is partially or fully obscured by other
1344 * <code>Component</code>s or native windows, this method returns a non-null
1346 * <code>Component</code>.
1353 * that matters is whether a specific <code>Component</code> is under the mouse
1355 * pointer is not directly above the <code>Component</code>.
1360 * @return mouse coordinates relative to this <code>Component</code>, or null
1377 Component inTheSameWindow = findUnderMouseInWindow(pi);
1388 boolean isSameOrAncestorOf(Component comp, boolean allowChildren) {
1398 * {@code Component} is actually visible to the user. This can happen when:
1401 * the {@code Component} is not currently in the scroll pane's view port.
1402 * <li>the {@code Component} is obscured by another {@code Component} or
1515 // Component so that keyboard traversal, et. al. still
1537 * ("buffer") that's copied to the screen later. Component
1759 * Component. If this method returns <code>false</code>, this Component is
1763 * set for this Component; <code>false</code> otherwise.
1820 * Component. If this method returns <code>false</code>, this Component is
1824 * set for this Component; <code>false</code> otherwise.
1891 // This could change the preferred size of the Component.
1901 * Returns whether the font has been explicitly set for this Component. If
1902 * this method returns <code>false</code>, this Component is inheriting its
1906 * Component; <code>false</code> otherwise.
1918 * @exception IllegalComponentStateException if the <code>Component</code>
1957 // This could change the preferred size of the Component.
2034 for(Component c = this; c != host; c = c.getParent()) {
2323 for (Component c = parent;
2541 * Subclasses of <code>Component</code> and <code>Container</code>,
3049 * rendering on the Component if {@link Graphics2D} functionality is being
3081 * this Component is visible, displayable, and enabled. Setting the
3153 * Returns whether the cursor has been explicitly set for this Component.
3154 * If this method returns <code>false</code>, this Component is inheriting
3158 * Component; <code>false</code> otherwise.
3173 * Subclasses of <code>Component</code> that override this
3176 * For performance reasons, <code>Component</code>s with zero width
3200 * The <code>update</code> method of <code>Component</code>
3205 * Subclasses of Component that override this method should either
3466 * The <code>imageUpdate</code> method of <code>Component</code>
3690 * The <code>checkImage</code> method of <code>Component</code>
3948 if (!(Component.this instanceof Window) &&
3949 !(Component.this instanceof Canvas))
3952 "Component must be a Canvas or Window");
3983 "Component must have a valid peer");
4044 "Component must have a valid peer");
4069 "Component must have a valid peer");
4080 "Component must have a valid peer");
4093 "Component must have a valid peer");
4205 if (Component.this.bufferStrategy == this) {
4206 Component.this.bufferStrategy = null;
4243 * Insets for the hosting Component. The size of the back buffer
4273 if (Component.this.bufferStrategy == this) {
4274 Component.this.bufferStrategy = null;
4634 * The <code>locate</code> method of <code>Component</code> simply
4647 public Component getComponentAt(int x, int y) {
4656 public Component locate(int x, int y) {
4664 * @see java.awt.Component#contains
4667 public Component getComponentAt(Point p) {
4683 * events which have been enabled for the <code>Component</code>.
4722 // lightweight Component support
4742 // Component. If the MouseWheelEvent needs to go to an ancestor,
4928 Component source = (Component)e.getSource();
4945 * for Component.
4959 // Component (e.getX()), and this Component's
5165 Component parent = this.parent;
5510 int createHierarchyEvents(int id, Component changed,
5928 * upon this <code>Component</code>.
5937 * <code>Component</code> <code>c</code>
6037 * <code>Component</code> which desire to have the specified event
6132 final Class<? extends Component> clazz = getClass();
6307 * enabled for this component. Component events are enabled
6312 * <li>Component events are enabled via <code>enableEvents</code>.
6360 * If focus events are enabled for a <code>Component</code>,
6365 * calls the <code>Component</code>'s <code>dispatchEvent</code>
6366 * method, which results in a call to the <code>Component</code>'s
6369 * If focus events are enabled for a <code>Component</code>, calling
6370 * the <code>Component</code>'s <code>dispatchEvent</code> method
6372 * call to the <code>Component</code>'s <code>processFocusEvent</code>
6418 * If key events are enabled for a <code>Component</code>,
6423 * key events to a <code>Component</code> that is not the focus
6431 * Calling a <code>Component</code>'s <code>dispatchEvent</code>
6433 * result in a call to the <code>Component</code>'s
6843 * Makes this <code>Component</code> displayable by connecting it to a
6861 // Update both the Component's peer variable and the local
6947 * Makes this <code>Component</code> undisplayable by destroying it native
7058 * Returns whether this <code>Component</code> can become the focus
7061 * @return <code>true</code> if this <code>Component</code> is
7076 * Returns whether this Component can be focused.
7078 * @return <code>true</code> if this Component is focusable;
7088 * Sets the focusable state of this Component to the specified value. This
7089 * value overrides the Component's default focusability.
7091 * @param focusable indicates whether this Component is focusable
7120 * Component.
7122 * The default values for a Component's focus traversal keys are
7128 * <table border=1 summary="Recommended default values for a Component's focus traversal keys">
7159 * to any Component. It is a runtime error to specify a KEY_TYPED event as
7163 * If a value of null is specified for the Set, this Component inherits the
7164 * Set from its parent. If all ancestors of this Component have null
7183 * operation for this Component
7200 * for this Component. (See
7204 * Component, then this Component's parent's Set is returned. If no Set
7205 * has been explicitly defined for any of this Component's ancestors, then
7234 // DOWN_CYCLE_TRAVERSAL_KEY while Component does not. The Component method
7271 throw new IllegalArgumentException("focus traversal keys must be unique for a Component");
7307 * traversal operation has been explicitly defined for this Component. If
7308 * this method returns <code>false</code>, this Component is inheriting the
7316 * this Component; <code>false</code> otherwise.
7332 * Sets whether focus traversal keys are enabled for this Component.
7339 * enabled for this Component
7360 * Returns whether focus traversal keys are enabled for this Component.
7366 * @return whether focus traversal keys are enabled for this Component
7377 * Requests that this Component get the input focus, and that this
7378 * Component's top-level ancestor become the focused Window. This
7384 * Component is the focus owner until this Component receives a
7386 * Component's top-level Window cannot become the focused Window,
7390 * This method cannot be used to set the focus owner to no Component at
7400 * {@code requestFocus} methods of {@code Component} being invoked.
7419 * Requests that this <code>Component</code> get the input focus,
7420 * and that this <code>Component</code>'s top-level ancestor
7455 * guaranteed only for lightweight <code>Component</code>s.
7462 * {@code requestFocus} methods of {@code Component} being invoked.
7485 * Requests that this Component get the input focus, if this
7486 * Component's top-level ancestor is already the focused
7492 * assume that this Component is the focus owner until this
7493 * Component receives a FOCUS_GAINED event.
7498 * extraordinary event, such as disposal of the Component's peer, occurs
7501 * likely to succeed, developers must never assume that this Component is
7502 * the focus owner until this Component receives a FOCUS_GAINED event.
7504 * This method cannot be used to set the focus owner to no Component at
7516 * {@code requestFocus} methods of {@code Component} being invoked.
7537 * Requests that this <code>Component</code> get the input focus,
7538 * if this <code>Component</code>'s top-level ancestor is already
7577 * {@code requestFocus} methods of {@code Component} being invoked.
7620 Component window = this;
7632 Component heavyweight = (peer instanceof LightweightPeer)
7636 focusLog.finest("Component is not a part of visible hierarchy");
7648 // Focus this Component
7688 focusLog.finest("Component doesn't have toplevel");
7695 Component focusOwner = KeyboardFocusManager.getMostRecentFocusOwner(window);
7728 boolean ret = Component.requestFocusController.acceptRequestFocus(focusOwner,
7745 public boolean acceptRequestFocus(Component from, Component to,
7763 * Returns the Container which is the focus cycle root of this Component's
7765 * focus cycle root and each Component which is not a Container belongs to
7772 * @return this Component's nearest focus-cycle-root ancestor
7786 * Component's focus traversal cycle. Each focus traversal cycle has only
7787 * a single focus cycle root and each Component which is not a Container
7792 * root of this Component; <code>false</code> otherwise
7806 * Transfers the focus to the next component, as though this Component were
7828 Component toFocus = getNextFocusCandidate();
7845 final Component getNextFocusCandidate() {
7847 Component comp = this;
7857 Component candidate = null;
7860 Component toFocus = policy.getComponentAfter(rootAncestor, comp);
7885 * Transfers the focus to the previous component, as though this Component
7896 Component comp = this;
7906 Component toFocus = policy.getComponentBefore(rootAncestor, comp);
7928 * owner is set to this Component's focus cycle root, and the current focus
7930 * however, this Component's focus cycle root is a Window, then the focus
7931 * owner is set to the focus cycle root's default Component to focus, and
7961 Component toFocus = window.getFocusTraversalPolicy().
7973 * Returns <code>true</code> if this <code>Component</code> is the
7977 * @return <code>true</code> if this <code>Component</code> is the
7987 * Returns <code>true</code> if this <code>Component</code> is the
7990 * @return <code>true</code> if this <code>Component</code> is the
8178 * <li>this Component's font ("font")</li>
8179 * <li>this Component's background color ("background")</li>
8180 * <li>this Component's foreground color ("foreground")</li>
8181 * <li>this Component's focusability ("focusable")</li>
8182 * <li>this Component's focus traversal keys enabled state
8184 * <li>this Component's Set of FORWARD_TRAVERSAL_KEYS
8186 * <li>this Component's Set of BACKWARD_TRAVERSAL_KEYS
8188 * <li>this Component's Set of UP_CYCLE_TRAVERSAL_KEYS
8190 * <li>this Component's preferred size ("preferredSize")</li>
8191 * <li>this Component's minimum size ("minimumSize")</li>
8192 * <li>this Component's maximum size ("maximumSize")</li>
8193 * <li>this Component's name ("name")</li>
8195 * Note that if this <code>Component</code> is inheriting a bound property, then no
8271 * <li>this Component's font ("font")</li>
8272 * <li>this Component's background color ("background")</li>
8273 * <li>this Component's foreground color ("foreground")</li>
8274 * <li>this Component's focusability ("focusable")</li>
8275 * <li>this Component's focus traversal keys enabled state
8277 * <li>this Component's Set of FORWARD_TRAVERSAL_KEYS
8279 * <li>this Component's Set of BACKWARD_TRAVERSAL_KEYS
8281 * <li>this Component's Set of UP_CYCLE_TRAVERSAL_KEYS
8284 * Note that if this <code>Component</code> is inheriting a bound property, then no
8538 * Component Serialized Data Version.
8551 // be notified before Component does it's serialization. This
8556 for (Class klass = Component.this.getClass(); klass != null;
8813 * <code>LayoutManager</code> and <code>Component</code>
8847 // This could change the preferred size of the Component.
8854 * and <code>Component</code>
8931 for (Component cont = getContainer();
8960 * Component will contain all of the methods in interface Accessible,
8962 * to the individual objects which extend Component.
8969 * with this <code>Component</code>.
8971 * class returns null. Classes that extend <code>Component</code>
8977 * <code>Component</code>
8985 * Inner class of Component used to provide default support for
9069 Component.this.addComponentListener(accessibleAWTComponentHandler);
9073 Component.this.addFocusListener(accessibleAWTFocusHandler);
9087 Component.this.removeComponentListener(accessibleAWTComponentHandler);
9091 Component.this.removeFocusListener(accessibleAWTFocusHandler);
9101 * return <code>java.awt.Component.getName()</code>,
9156 return Component.this.getAccessibleStateSet();
9188 return Component.this.getAccessibleIndexInParent();
9218 return Component.this.getLocale();
9242 return Component.this.getBackground();
9250 * @see Component#isOpaque
9253 Component.this.setBackground(c);
9263 return Component.this.getForeground();
9272 Component.this.setForeground(c);
9282 return Component.this.getCursor();
9294 Component.this.setCursor(cursor);
9304 return Component.this.getFont();
9313 Component.this.setFont(f);
9328 return Component.this.getFontMetrics(f);
9338 return Component.this.isEnabled();
9347 boolean old = Component.this.isEnabled();
9348 Component.this.setEnabled(b);
9374 return Component.this.isVisible();
9383 boolean old = Component.this.isVisible();
9384 Component.this.setVisible(b);
9410 return Component.this.isShowing();
9423 return Component.this.contains(p);
9433 synchronized (Component.this.getTreeLock()) {
9434 if (Component.this.isShowing()) {
9435 return Component.this.getLocationOnScreen();
9452 return Component.this.getLocation();
9460 Component.this.setLocation(p);
9472 return Component.this.getBounds();
9484 Component.this.setBounds(r);
9499 return Component.this.getSize();
9508 Component.this.setSize(d);
9533 return Component.this.isFocusTraversable();
9540 Component.this.requestFocus();
9550 Component.this.addFocusListener(l);
9560 Component.this.removeFocusListener(l);
9578 Component ca[] = parent.getComponents();
9638 if (Component.isInstanceOf(this, "javax.swing.JComponent")) {
9821 Component comp = cont.getComponent(i);
9867 Component comp = this;
9879 Component c = cont.getComponent(index);
10043 Component c = parent.getComponent(index);