mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
8138838: docs cleanup for java.desktop
Docs cleanup for java.desktop Reviewed-by: serb
This commit is contained in:
parent
aeccbee0e7
commit
73fb68a80d
609 changed files with 19168 additions and 19160 deletions
|
@ -35,9 +35,9 @@ import sun.awt.AWTAccessor;
|
|||
|
||||
/**
|
||||
* All items in a menu must belong to the class
|
||||
* <code>MenuItem</code>, or one of its subclasses.
|
||||
* {@code MenuItem}, or one of its subclasses.
|
||||
* <p>
|
||||
* The default <code>MenuItem</code> object embodies
|
||||
* The default {@code MenuItem} object embodies
|
||||
* a simple labeled menu item.
|
||||
* <p>
|
||||
* This picture of a menu bar shows five menu items:
|
||||
|
@ -45,24 +45,24 @@ import sun.awt.AWTAccessor;
|
|||
* style="float:center; margin: 7px 10px;">
|
||||
* <br style="clear:left;">
|
||||
* The first two items are simple menu items, labeled
|
||||
* <code>"Basic"</code> and <code>"Simple"</code>.
|
||||
* {@code "Basic"} and {@code "Simple"}.
|
||||
* Following these two items is a separator, which is itself
|
||||
* a menu item, created with the label <code>"-"</code>.
|
||||
* Next is an instance of <code>CheckboxMenuItem</code>
|
||||
* labeled <code>"Check"</code>. The final menu item is a
|
||||
* a menu item, created with the label {@code "-"}.
|
||||
* Next is an instance of {@code CheckboxMenuItem}
|
||||
* labeled {@code "Check"}. The final menu item is a
|
||||
* submenu labeled <code>"More Examples"</code>,
|
||||
* and this submenu is an instance of <code>Menu</code>.
|
||||
* and this submenu is an instance of {@code Menu}.
|
||||
* <p>
|
||||
* When a menu item is selected, AWT sends an action event to
|
||||
* the menu item. Since the event is an
|
||||
* instance of <code>ActionEvent</code>, the <code>processEvent</code>
|
||||
* instance of {@code ActionEvent}, the {@code processEvent}
|
||||
* method examines the event and passes it along to
|
||||
* <code>processActionEvent</code>. The latter method redirects the
|
||||
* event to any <code>ActionListener</code> objects that have
|
||||
* {@code processActionEvent}. The latter method redirects the
|
||||
* event to any {@code ActionListener} objects that have
|
||||
* registered an interest in action events generated by this
|
||||
* menu item.
|
||||
* <P>
|
||||
* Note that the subclass <code>Menu</code> overrides this behavior and
|
||||
* Note that the subclass {@code Menu} overrides this behavior and
|
||||
* does not send any event to the frame until one of its subitems is
|
||||
* selected.
|
||||
*
|
||||
|
@ -103,8 +103,8 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
|
||||
/**
|
||||
* A value to indicate whether a menu item is enabled
|
||||
* or not. If it is enabled, <code>enabled</code> will
|
||||
* be set to true. Else <code>enabled</code> will
|
||||
* or not. If it is enabled, {@code enabled} will
|
||||
* be set to true. Else {@code enabled} will
|
||||
* be set to false.
|
||||
*
|
||||
* @serial
|
||||
|
@ -114,7 +114,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
boolean enabled = true;
|
||||
|
||||
/**
|
||||
* <code>label</code> is the label of a menu item.
|
||||
* {@code label} is the label of a menu item.
|
||||
* It can be any string.
|
||||
*
|
||||
* @serial
|
||||
|
@ -124,9 +124,9 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
String label;
|
||||
|
||||
/**
|
||||
* This field indicates the command tha has been issued
|
||||
* This field indicates the command that has been issued
|
||||
* by a particular menu item.
|
||||
* By default the <code>actionCommand</code>
|
||||
* By default the {@code actionCommand}
|
||||
* is the label of the menu item, unless it has been
|
||||
* set using setActionCommand.
|
||||
*
|
||||
|
@ -204,7 +204,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
* a separator between menu items. By default, all menu
|
||||
* items except for separators are enabled.
|
||||
* @param label the label for this menu item.
|
||||
* @param s the instance of <code>MenuShortcut</code>
|
||||
* @param s the instance of {@code MenuShortcut}
|
||||
* associated with this menu item.
|
||||
* @exception HeadlessException if GraphicsEnvironment.isHeadless()
|
||||
* returns true.
|
||||
|
@ -239,7 +239,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
|
||||
/**
|
||||
* Gets the label for this menu item.
|
||||
* @return the label of this menu item, or <code>null</code>
|
||||
* @return the label of this menu item, or {@code null}
|
||||
if this menu item has no label.
|
||||
* @see java.awt.MenuItem#setLabel
|
||||
* @since 1.0
|
||||
|
@ -250,7 +250,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
|
||||
/**
|
||||
* Sets the label for this menu item to the specified label.
|
||||
* @param label the new label, or <code>null</code> for no label.
|
||||
* @param label the new label, or {@code null} for no label.
|
||||
* @see java.awt.MenuItem#getLabel
|
||||
* @since 1.0
|
||||
*/
|
||||
|
@ -276,8 +276,8 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
|
||||
/**
|
||||
* Sets whether or not this menu item can be chosen.
|
||||
* @param b if <code>true</code>, enables this menu item;
|
||||
* if <code>false</code>, disables it.
|
||||
* @param b if {@code true}, enables this menu item;
|
||||
* if {@code false}, disables it.
|
||||
* @see java.awt.MenuItem#isEnabled
|
||||
* @since 1.1
|
||||
*/
|
||||
|
@ -287,7 +287,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
|
||||
/**
|
||||
* @deprecated As of JDK version 1.1,
|
||||
* replaced by <code>setEnabled(boolean)</code>.
|
||||
* replaced by {@code setEnabled(boolean)}.
|
||||
*/
|
||||
@Deprecated
|
||||
public synchronized void enable() {
|
||||
|
@ -304,7 +304,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
* @param b if {@code true}, enables this menu item;
|
||||
* otherwise disables
|
||||
* @deprecated As of JDK version 1.1,
|
||||
* replaced by <code>setEnabled(boolean)</code>.
|
||||
* replaced by {@code setEnabled(boolean)}.
|
||||
*/
|
||||
@Deprecated
|
||||
public void enable(boolean b) {
|
||||
|
@ -317,7 +317,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
|
||||
/**
|
||||
* @deprecated As of JDK version 1.1,
|
||||
* replaced by <code>setEnabled(boolean)</code>.
|
||||
* replaced by {@code setEnabled(boolean)}.
|
||||
*/
|
||||
@Deprecated
|
||||
public synchronized void disable() {
|
||||
|
@ -329,10 +329,10 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the <code>MenuShortcut</code> object associated with this
|
||||
* Get the {@code MenuShortcut} object associated with this
|
||||
* menu item,
|
||||
* @return the menu shortcut associated with this menu item,
|
||||
* or <code>null</code> if none has been specified.
|
||||
* or {@code null} if none has been specified.
|
||||
* @see java.awt.MenuItem#setShortcut
|
||||
* @since 1.1
|
||||
*/
|
||||
|
@ -341,7 +341,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set the <code>MenuShortcut</code> object associated with this
|
||||
* Set the {@code MenuShortcut} object associated with this
|
||||
* menu item. If a menu shortcut is already associated with
|
||||
* this menu item, it is replaced.
|
||||
* @param s the menu shortcut to associate
|
||||
|
@ -358,7 +358,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
}
|
||||
|
||||
/**
|
||||
* Delete any <code>MenuShortcut</code> object associated
|
||||
* Delete any {@code MenuShortcut} object associated
|
||||
* with this menu item.
|
||||
* @since 1.1
|
||||
*/
|
||||
|
@ -454,8 +454,8 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
* <p>
|
||||
* Since event types are automatically enabled when a listener for
|
||||
* that type is added to the menu item, this method only needs
|
||||
* to be invoked by subclasses of <code>MenuItem</code> which desire to
|
||||
* have the specified event types delivered to <code>processEvent</code>
|
||||
* to be invoked by subclasses of {@code MenuItem} which desire to
|
||||
* have the specified event types delivered to {@code processEvent}
|
||||
* regardless of whether a listener is registered.
|
||||
*
|
||||
* @param eventsToEnable the event mask defining the event types
|
||||
|
@ -562,7 +562,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
* Returns an array of all the action listeners
|
||||
* registered on this menu item.
|
||||
*
|
||||
* @return all of this menu item's <code>ActionListener</code>s
|
||||
* @return all of this menu item's {@code ActionListener}s
|
||||
* or an empty array if no action
|
||||
* listeners are currently registered
|
||||
*
|
||||
|
@ -579,16 +579,16 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
/**
|
||||
* Returns an array of all the objects currently registered
|
||||
* as <code><em>Foo</em>Listener</code>s
|
||||
* upon this <code>MenuItem</code>.
|
||||
* upon this {@code MenuItem}.
|
||||
* <code><em>Foo</em>Listener</code>s are registered using the
|
||||
* <code>add<em>Foo</em>Listener</code> method.
|
||||
*
|
||||
* <p>
|
||||
* You can specify the <code>listenerType</code> argument
|
||||
* You can specify the {@code listenerType} argument
|
||||
* with a class literal, such as
|
||||
* <code><em>Foo</em>Listener.class</code>.
|
||||
* For example, you can query a
|
||||
* <code>MenuItem</code> <code>m</code>
|
||||
* {@code MenuItem m}
|
||||
* for its action listeners with the following code:
|
||||
*
|
||||
* <pre>ActionListener[] als = (ActionListener[])(m.getListeners(ActionListener.class));</pre>
|
||||
|
@ -598,14 +598,14 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
* @param <T> the type of the listeners
|
||||
* @param listenerType the type of listeners requested; this parameter
|
||||
* should specify an interface that descends from
|
||||
* <code>java.util.EventListener</code>
|
||||
* {@code java.util.EventListener}
|
||||
* @return an array of all objects registered as
|
||||
* <code><em>Foo</em>Listener</code>s on this menu item,
|
||||
* or an empty array if no such
|
||||
* listeners have been added
|
||||
* @exception ClassCastException if <code>listenerType</code>
|
||||
* @exception ClassCastException if {@code listenerType}
|
||||
* doesn't specify a class or interface that implements
|
||||
* <code>java.util.EventListener</code>
|
||||
* {@code java.util.EventListener}
|
||||
*
|
||||
* @see #getActionListeners
|
||||
* @since 1.3
|
||||
|
@ -620,12 +620,12 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
|
||||
/**
|
||||
* Processes events on this menu item. If the event is an
|
||||
* instance of <code>ActionEvent</code>, it invokes
|
||||
* <code>processActionEvent</code>, another method
|
||||
* defined by <code>MenuItem</code>.
|
||||
* instance of {@code ActionEvent}, it invokes
|
||||
* {@code processActionEvent}, another method
|
||||
* defined by {@code MenuItem}.
|
||||
* <p>
|
||||
* Currently, menu items only support action events.
|
||||
* <p>Note that if the event parameter is <code>null</code>
|
||||
* <p>Note that if the event parameter is {@code null}
|
||||
* the behavior is unspecified and may result in an
|
||||
* exception.
|
||||
*
|
||||
|
@ -654,16 +654,16 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
/**
|
||||
* Processes action events occurring on this menu item,
|
||||
* by dispatching them to any registered
|
||||
* <code>ActionListener</code> objects.
|
||||
* {@code ActionListener} objects.
|
||||
* This method is not called unless action events are
|
||||
* enabled for this component. Action events are enabled
|
||||
* when one of the following occurs:
|
||||
* <ul>
|
||||
* <li>An <code>ActionListener</code> object is registered
|
||||
* via <code>addActionListener</code>.
|
||||
* <li>Action events are enabled via <code>enableEvents</code>.
|
||||
* <li>An {@code ActionListener} object is registered
|
||||
* via {@code addActionListener}.
|
||||
* <li>Action events are enabled via {@code enableEvents}.
|
||||
* </ul>
|
||||
* <p>Note that if the event parameter is <code>null</code>
|
||||
* <p>Note that if the event parameter is {@code null}
|
||||
* the behavior is unspecified and may result in an
|
||||
* exception.
|
||||
*
|
||||
|
@ -681,11 +681,11 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a string representing the state of this <code>MenuItem</code>.
|
||||
* Returns a string representing the state of this {@code MenuItem}.
|
||||
* This method is intended to be used only for debugging purposes, and the
|
||||
* content and format of the returned string may vary between
|
||||
* implementations. The returned string may be empty but may not be
|
||||
* <code>null</code>.
|
||||
* {@code null}.
|
||||
*
|
||||
* @return the parameter string of this menu item
|
||||
*/
|
||||
|
@ -710,17 +710,17 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
|
||||
/**
|
||||
* Writes default serializable fields to stream. Writes
|
||||
* a list of serializable <code>ActionListeners</code>
|
||||
* a list of serializable {@code ActionListeners}
|
||||
* as optional data. The non-serializable listeners are
|
||||
* detected and no attempt is made to serialize them.
|
||||
*
|
||||
* @param s the <code>ObjectOutputStream</code> to write
|
||||
* @serialData <code>null</code> terminated sequence of 0
|
||||
* or more pairs; the pair consists of a <code>String</code>
|
||||
* and an <code>Object</code>; the <code>String</code>
|
||||
* @param s the {@code ObjectOutputStream} to write
|
||||
* @serialData {@code null} terminated sequence of 0
|
||||
* or more pairs; the pair consists of a {@code String}
|
||||
* and an {@code Object}; the {@code String}
|
||||
* indicates the type of object and is one of the following:
|
||||
* <code>actionListenerK</code> indicating an
|
||||
* <code>ActionListener</code> object
|
||||
* {@code actionListenerK} indicating an
|
||||
* {@code ActionListener} object
|
||||
*
|
||||
* @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener)
|
||||
* @see #readObject(ObjectInputStream)
|
||||
|
@ -735,15 +735,15 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
}
|
||||
|
||||
/**
|
||||
* Reads the <code>ObjectInputStream</code> and if it
|
||||
* isn't <code>null</code> adds a listener to receive
|
||||
* action events fired by the <code>Menu</code> Item.
|
||||
* Reads the {@code ObjectInputStream} and if it
|
||||
* isn't {@code null} adds a listener to receive
|
||||
* action events fired by the {@code Menu} Item.
|
||||
* Unrecognized keys or values will be ignored.
|
||||
*
|
||||
* @param s the <code>ObjectInputStream</code> to read
|
||||
* @param s the {@code ObjectInputStream} to read
|
||||
* @exception HeadlessException if
|
||||
* <code>GraphicsEnvironment.isHeadless</code> returns
|
||||
* <code>true</code>
|
||||
* {@code GraphicsEnvironment.isHeadless} returns
|
||||
* {@code true}
|
||||
* @see #removeActionListener(ActionListener)
|
||||
* @see #addActionListener(ActionListener)
|
||||
* @see #writeObject(ObjectOutputStream)
|
||||
|
@ -800,7 +800,7 @@ public class MenuItem extends MenuComponent implements Accessible {
|
|||
* subclassed by menu component developers.
|
||||
* <p>
|
||||
* This class implements accessibility support for the
|
||||
* <code>MenuItem</code> class. It provides an implementation of the
|
||||
* {@code MenuItem} class. It provides an implementation of the
|
||||
* Java Accessibility API appropriate to menu item user-interface elements.
|
||||
* @since 1.3
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue