784 |
* events). |
* events). |
785 |
* |
* |
786 |
* @param enabled true to enable this component |
* @param enabled true to enable this component |
787 |
|
* |
788 |
* @see #isEnabled() |
* @see #isEnabled() |
789 |
* @see #isLightweight() |
* @see #isLightweight() |
790 |
|
* |
791 |
* @since 1.1 |
* @since 1.1 |
792 |
*/ |
*/ |
793 |
public void setEnabled(boolean b) |
public void setEnabled(boolean enabled) |
794 |
{ |
{ |
795 |
enable (b); |
enable(enabled); |
796 |
} |
} |
797 |
|
|
798 |
/** |
/** |
811 |
* Enables or disables this component. |
* Enables or disables this component. |
812 |
* |
* |
813 |
* @param enabled true to enable this component |
* @param enabled true to enable this component |
814 |
|
* |
815 |
* @deprecated use {@link #setEnabled(boolean)} instead |
* @deprecated use {@link #setEnabled(boolean)} instead |
816 |
*/ |
*/ |
817 |
public void enable(boolean b) |
public void enable(boolean enabled) |
818 |
{ |
{ |
819 |
if (b) |
if (enabled) |
820 |
enable (); |
enable(); |
821 |
else |
else |
822 |
disable (); |
disable(); |
823 |
} |
} |
824 |
|
|
825 |
/** |
/** |
867 |
* not show the component, if a parent is invisible. |
* not show the component, if a parent is invisible. |
868 |
* |
* |
869 |
* @param visible true to make this component visible |
* @param visible true to make this component visible |
870 |
|
* |
871 |
* @see #isVisible() |
* @see #isVisible() |
872 |
|
* |
873 |
* @since 1.1 |
* @since 1.1 |
874 |
*/ |
*/ |
875 |
public void setVisible(boolean b) |
public void setVisible(boolean visible) |
876 |
{ |
{ |
877 |
// Inspection by subclassing shows that Sun's implementation calls |
// Inspection by subclassing shows that Sun's implementation calls |
878 |
// show(boolean) which then calls show() or hide(). It is the show() |
// show(boolean) which then calls show() or hide(). It is the show() |
879 |
// method that is overriden in subclasses like Window. |
// method that is overriden in subclasses like Window. |
880 |
show (b); |
show(visible); |
881 |
} |
} |
882 |
|
|
883 |
/** |
/** |
908 |
* Makes this component visible or invisible. |
* Makes this component visible or invisible. |
909 |
* |
* |
910 |
* @param visible true to make this component visible |
* @param visible true to make this component visible |
911 |
|
* |
912 |
* @deprecated use {@link #setVisible(boolean)} instead |
* @deprecated use {@link #setVisible(boolean)} instead |
913 |
*/ |
*/ |
914 |
public void show(boolean b) |
public void show(boolean visible) |
915 |
{ |
{ |
916 |
if (b) |
if (visible) |
917 |
show (); |
show(); |
918 |
else |
else |
919 |
hide (); |
hide(); |
920 |
} |
} |
921 |
|
|
922 |
/** |
/** |
1792 |
* relative to this component. Subclasses should call either |
* relative to this component. Subclasses should call either |
1793 |
* <code>super.update(g)</code> or <code>paint(g)</code>. |
* <code>super.update(g)</code> or <code>paint(g)</code>. |
1794 |
* |
* |
1795 |
* @param graphics the graphics context for this update |
* @param g the graphics context for this update |
1796 |
|
* |
1797 |
* @see #paint(Graphics) |
* @see #paint(Graphics) |
1798 |
* @see #repaint() |
* @see #repaint() |
1799 |
*/ |
*/ |
1814 |
/** |
/** |
1815 |
* Paints this entire component, including any sub-components. |
* Paints this entire component, including any sub-components. |
1816 |
* |
* |
1817 |
* @param graphics the graphics context for this paint job |
* @param g the graphics context for this paint job |
1818 |
|
* |
1819 |
* @see #paint(Graphics) |
* @see #paint(Graphics) |
1820 |
*/ |
*/ |
1821 |
public void paintAll(Graphics g) |
public void paintAll(Graphics g) |
1877 |
* @param tm milliseconds before this component should be repainted |
* @param tm milliseconds before this component should be repainted |
1878 |
* @param x the X coordinate of the upper left of the region to repaint |
* @param x the X coordinate of the upper left of the region to repaint |
1879 |
* @param y the Y coordinate of the upper left of the region to repaint |
* @param y the Y coordinate of the upper left of the region to repaint |
1880 |
* @param w the width of the region to repaint |
* @param width the width of the region to repaint |
1881 |
* @param h the height of the region to repaint |
* @param height the height of the region to repaint |
1882 |
* @see #update(Graphics) |
* @see #update(Graphics) |
1883 |
*/ |
*/ |
1884 |
public void repaint(long tm, int x, int y, int width, int height) |
public void repaint(long tm, int x, int y, int width, int height) |
1898 |
* done in a different manner from painting. However, the implementation |
* done in a different manner from painting. However, the implementation |
1899 |
* in this class simply calls the <code>paint()</code> method. |
* in this class simply calls the <code>paint()</code> method. |
1900 |
* |
* |
1901 |
* @param graphics the graphics context of the print device |
* @param g the graphics context of the print device |
1902 |
|
* |
1903 |
* @see #paint(Graphics) |
* @see #paint(Graphics) |
1904 |
*/ |
*/ |
1905 |
public void print(Graphics g) |
public void print(Graphics g) |
1913 |
* painting. However, the implementation in this class simply calls the |
* painting. However, the implementation in this class simply calls the |
1914 |
* <code>paintAll()</code> method. |
* <code>paintAll()</code> method. |
1915 |
* |
* |
1916 |
* @param graphics the graphics context of the print device |
* @param g the graphics context of the print device |
1917 |
|
* |
1918 |
* @see #paintAll(Graphics) |
* @see #paintAll(Graphics) |
1919 |
*/ |
*/ |
1920 |
public void printAll(Graphics g) |
public void printAll(Graphics g) |
1932 |
* |
* |
1933 |
* <p>The coordinate system used depends on the particular flags. |
* <p>The coordinate system used depends on the particular flags. |
1934 |
* |
* |
1935 |
* @param image the image that has been updated |
* @param img the image that has been updated |
1936 |
* @param flags tlags as specified in <code>ImageObserver</code> |
* @param flags tlags as specified in <code>ImageObserver</code> |
1937 |
* @param x the X coordinate |
* @param x the X coordinate |
1938 |
* @param y the Y coordinate |
* @param y the Y coordinate |
2867 |
* Processes the specified event. In this class, this method simply |
* Processes the specified event. In this class, this method simply |
2868 |
* calls one of the more specific event handlers. |
* calls one of the more specific event handlers. |
2869 |
* |
* |
2870 |
* @param event the event to process |
* @param e the event to process |
2871 |
* @throws NullPointerException if e is null |
* @throws NullPointerException if e is null |
2872 |
* @see #processComponentEvent(ComponentEvent) |
* @see #processComponentEvent(ComponentEvent) |
2873 |
* @see #processFocusEvent(FocusEvent) |
* @see #processFocusEvent(FocusEvent) |
2918 |
* enabled. This method passes the event along to any listeners |
* enabled. This method passes the event along to any listeners |
2919 |
* that are attached. |
* that are attached. |
2920 |
* |
* |
2921 |
* @param event the <code>ComponentEvent</code> to process |
* @param e the <code>ComponentEvent</code> to process |
2922 |
* @throws NullPointerException if e is null |
* @throws NullPointerException if e is null |
2923 |
* @see ComponentListener |
* @see ComponentListener |
2924 |
* @see #addComponentListener(ComponentListener) |
* @see #addComponentListener(ComponentListener) |
2951 |
* enabled. This method passes the event along to any listeners |
* enabled. This method passes the event along to any listeners |
2952 |
* that are attached. |
* that are attached. |
2953 |
* |
* |
2954 |
* @param event the <code>FocusEvent</code> to process |
* @param e the <code>FocusEvent</code> to process |
2955 |
* @throws NullPointerException if e is null |
* @throws NullPointerException if e is null |
2956 |
* @see FocusListener |
* @see FocusListener |
2957 |
* @see #addFocusListener(FocusListener) |
* @see #addFocusListener(FocusListener) |
2979 |
* enabled. This method passes the event along to any listeners |
* enabled. This method passes the event along to any listeners |
2980 |
* that are attached. |
* that are attached. |
2981 |
* |
* |
2982 |
* @param event the <code>KeyEvent</code> to process |
* @param e the <code>KeyEvent</code> to process |
2983 |
* @throws NullPointerException if e is null |
* @throws NullPointerException if e is null |
2984 |
* @see KeyListener |
* @see KeyListener |
2985 |
* @see #addKeyListener(KeyListener) |
* @see #addKeyListener(KeyListener) |
3009 |
* enabled. This method passes the event along to any listeners |
* enabled. This method passes the event along to any listeners |
3010 |
* that are attached. |
* that are attached. |
3011 |
* |
* |
3012 |
* @param event the <code>MouseEvent</code> to process |
* @param e the <code>MouseEvent</code> to process |
3013 |
* @throws NullPointerException if e is null |
* @throws NullPointerException if e is null |
3014 |
* @see MouseListener |
* @see MouseListener |
3015 |
* @see #addMouseListener(MouseListener) |
* @see #addMouseListener(MouseListener) |
3046 |
* enabled. This method passes the event along to any listeners |
* enabled. This method passes the event along to any listeners |
3047 |
* that are attached. |
* that are attached. |
3048 |
* |
* |
3049 |
* @param event the <code>MouseMotionEvent</code> to process |
* @param e the <code>MouseMotionEvent</code> to process |
3050 |
* @throws NullPointerException if e is null |
* @throws NullPointerException if e is null |
3051 |
* @see MouseMotionListener |
* @see MouseMotionListener |
3052 |
* @see #addMouseMotionListener(MouseMotionListener) |
* @see #addMouseMotionListener(MouseMotionListener) |
3074 |
* enabled. This method passes the event along to any listeners that are |
* enabled. This method passes the event along to any listeners that are |
3075 |
* attached. |
* attached. |
3076 |
* |
* |
3077 |
* @param event the <code>MouseWheelEvent</code> to process |
* @param e the <code>MouseWheelEvent</code> to process |
3078 |
* @throws NullPointerException if e is null |
* @throws NullPointerException if e is null |
3079 |
* @see MouseWheelListener |
* @see MouseWheelListener |
3080 |
* @see #addMouseWheelListener(MouseWheelListener) |
* @see #addMouseWheelListener(MouseWheelListener) |
3096 |
* enabled. This method passes the event along to any listeners that are |
* enabled. This method passes the event along to any listeners that are |
3097 |
* attached. |
* attached. |
3098 |
* |
* |
3099 |
* @param event the <code>InputMethodEvent</code> to process |
* @param e the <code>InputMethodEvent</code> to process |
3100 |
* @throws NullPointerException if e is null |
* @throws NullPointerException if e is null |
3101 |
* @see InputMethodListener |
* @see InputMethodListener |
3102 |
* @see #addInputMethodListener(InputMethodListener) |
* @see #addInputMethodListener(InputMethodListener) |
3123 |
* are enabled. This method passes the event along to any listeners that are |
* are enabled. This method passes the event along to any listeners that are |
3124 |
* attached. |
* attached. |
3125 |
* |
* |
3126 |
* @param event the <code>HierarchyEvent</code> to process |
* @param e the <code>HierarchyEvent</code> to process |
3127 |
* @throws NullPointerException if e is null |
* @throws NullPointerException if e is null |
3128 |
* @see HierarchyListener |
* @see HierarchyListener |
3129 |
* @see #addHierarchyListener(HierarchyListener) |
* @see #addHierarchyListener(HierarchyListener) |
3143 |
* are enabled. This method passes the event along to any listeners that are |
* are enabled. This method passes the event along to any listeners that are |
3144 |
* attached. |
* attached. |
3145 |
* |
* |
3146 |
* @param event the <code>HierarchyEvent</code> to process |
* @param e the <code>HierarchyEvent</code> to process |
3147 |
* @throws NullPointerException if e is null |
* @throws NullPointerException if e is null |
3148 |
* @see HierarchyBoundsListener |
* @see HierarchyBoundsListener |
3149 |
* @see #addHierarchyBoundsListener(HierarchyBoundsListener) |
* @see #addHierarchyBoundsListener(HierarchyBoundsListener) |
3596 |
* |
* |
3597 |
* @param id one of FORWARD_TRAVERSAL_KEYS, BACKWARD_TRAVERSAL_KEYS, |
* @param id one of FORWARD_TRAVERSAL_KEYS, BACKWARD_TRAVERSAL_KEYS, |
3598 |
* or UP_CYCLE_TRAVERSAL_KEYS |
* or UP_CYCLE_TRAVERSAL_KEYS |
3599 |
|
* |
3600 |
|
* @return set of traversal keys |
3601 |
|
* |
3602 |
* @throws IllegalArgumentException if id is invalid |
* @throws IllegalArgumentException if id is invalid |
3603 |
|
* |
3604 |
* @see #setFocusTraversalKeys (int, Set) |
* @see #setFocusTraversalKeys (int, Set) |
3605 |
* @see KeyboardFocusManager#FORWARD_TRAVERSAL_KEYS |
* @see KeyboardFocusManager#FORWARD_TRAVERSAL_KEYS |
3606 |
* @see KeyboardFocusManager#BACKWARD_TRAVERSAL_KEYS |
* @see KeyboardFocusManager#BACKWARD_TRAVERSAL_KEYS |
3607 |
* @see KeyboardFocusManager#UP_CYCLE_TRAVERSAL_KEYS |
* @see KeyboardFocusManager#UP_CYCLE_TRAVERSAL_KEYS |
3608 |
|
* |
3609 |
* @since 1.4 |
* @since 1.4 |
3610 |
*/ |
*/ |
3611 |
public Set getFocusTraversalKeys (int id) |
public Set getFocusTraversalKeys (int id) |
4101 |
/** |
/** |
4102 |
* Adds the specified popup menu to this component. |
* Adds the specified popup menu to this component. |
4103 |
* |
* |
4104 |
* @param menu the popup menu to be added |
* @param popup the popup menu to be added |
4105 |
|
* |
4106 |
* @see #remove(MenuComponent) |
* @see #remove(MenuComponent) |
4107 |
|
* |
4108 |
* @since 1.1 |
* @since 1.1 |
4109 |
*/ |
*/ |
4110 |
public synchronized void add(PopupMenu popup) |
public synchronized void add(PopupMenu popup) |
4123 |
/** |
/** |
4124 |
* Removes the specified popup menu from this component. |
* Removes the specified popup menu from this component. |
4125 |
* |
* |
4126 |
* @param menu the popup menu to remove |
* @param popup the popup menu to remove |
4127 |
* @see #add(PopupMenu) |
* @see #add(PopupMenu) |
4128 |
* @since 1.1 |
* @since 1.1 |
4129 |
*/ |
*/ |
4184 |
/** |
/** |
4185 |
* Prints a listing of this component to the specified print stream. |
* Prints a listing of this component to the specified print stream. |
4186 |
* |
* |
4187 |
* @param stream the <code>PrintStream</code> to print to |
* @param out the <code>PrintStream</code> to print to |
4188 |
*/ |
*/ |
4189 |
public void list(PrintStream out) |
public void list(PrintStream out) |
4190 |
{ |
{ |
4195 |
* Prints a listing of this component to the specified print stream, |
* Prints a listing of this component to the specified print stream, |
4196 |
* starting at the specified indentation point. |
* starting at the specified indentation point. |
4197 |
* |
* |
4198 |
* @param stream the <code>PrintStream</code> to print to |
* @param out the <code>PrintStream</code> to print to |
4199 |
* @param indent the indentation point |
* @param indent the indentation point |
4200 |
*/ |
*/ |
4201 |
public void list(PrintStream out, int indent) |
public void list(PrintStream out, int indent) |
4208 |
/** |
/** |
4209 |
* Prints a listing of this component to the specified print writer. |
* Prints a listing of this component to the specified print writer. |
4210 |
* |
* |
4211 |
* @param writer the <code>PrintWrinter</code> to print to |
* @param out the <code>PrintWrinter</code> to print to |
4212 |
* @since 1.1 |
* @since 1.1 |
4213 |
*/ |
*/ |
4214 |
public void list(PrintWriter out) |
public void list(PrintWriter out) |
4220 |
* Prints a listing of this component to the specified print writer, |
* Prints a listing of this component to the specified print writer, |
4221 |
* starting at the specified indentation point. |
* starting at the specified indentation point. |
4222 |
* |
* |
4223 |
* @param writer the <code>PrintWriter</code> to print to |
* @param out the <code>PrintWriter</code> to print to |
4224 |
* @param indent the indentation point |
* @param indent the indentation point |
4225 |
* @since 1.1 |
* @since 1.1 |
4226 |
*/ |
*/ |