EVALUATION
Optional package.
david.biagini@Eng 2000-01-20
Name: db100478 Date: 09/08/2000
Committing to merlin release
======================================================================
Here is the spec for the new API:
Add the following to javax.swing.plaf.basic.BasicLookAndFeel
/**
* Returns an <code>ActionMap</code>.
* <P>
* This <code>ActionMap</code> contains <code>Actions</code> that
* embody the ability to render an auditory cue. These auditory
* cues map onto user and system activities that may be useful
* for an end user to know about (such as a dialog box appearing).
* <P>
* At the appropriate time in a <code>JComponent</code> UI's lifecycle,
* the ComponentUI is responsible for getting the appropriate
* <code>Action</code> out of the <code>ActionMap</code> and passing
* it on to <code>playSound<code>.
* <P>
* The <code>Actions</code> in this <code>ActionMap<code> are
* created by the <code>createAudioAction</code> method.
*
* @return an ActionMap containing Actions
* responsible for rendering auditory cues
* @see #createActionMap(Object)
* @see #playSound(Action)
* @since 1.4
*/
protected ActionMap getAudioActionMap()
/**
* Returns an <code>Action</code>.
* <P>
* This Action contains the information and logic to render an
* auditory cue. The <code>Object</code> that is passed to this
* method contains the information needed to render the auditory
* cue. Normally, this <code>Object</code> is a <code>String</code>
* that points to an audio file relative to the current package.
* This <code>Action</code>'s <code>actionPerformed</code> method
* is fired by the <code>playSound</code> method.
*
* @return an Action which knows how to render the auditory
* cue for one particular system or user activity
* @see #playSound(Action)
* @since 1.4
*/
protected Action createAudioAction(Object key)
/**
* Decides whether to fire the <code>Action</code> that is passed into
* it and, if needed, fires the <code>Action</code>'s
* <code>actionPerformed</code> method. This has the effect
* of rendering the audio appropriate for the situation.
* <P>
* The set of possible cues to be played are stored in the default
* table value "AuditoryCues.cueList". The cues that will be played
* are stored in "AuditoryCues.playList".
*
* @param audioAction an Action that knows how to render the audio
* associated with the system or user activity
* that is occurring
* @since 1.4
*/
protected void playSound(Action audioAction) {
Add the following to javax.swing.plaf.basic.BasicLookAndFeel
/**
* Returns an <code>Action</code>.
* <P>
* This Action contains the information and logic to render an
* auditory cue. The <code>Object</code> that is passed to this
* method contains the information needed to render the auditory
* cue. Normally, this <code>Object</code> is a <code>String</code>
* that points to a <code>Toolkit</code> <code>desktopProperty</code>.
* This <code>desktopProperty</code> is resolved by AWT and the
* Windows OS.
* <P>
* This <code>Action</code>'s <code>actionPerformed</code> method
* is fired by the <code>playSound</code> method.
*
* @return an Action which knows how to render the auditory
* cue for one particular system or user activity
* @see #playSound(Action)
* @since 1.4
*/
protected Action createAudioAction(Object key)
Add the following to javax.swing.plaf.basic.BasicMenuItemUI
/**
* Call this method when a menu item is to be activated.
* This method handles some of the details of menu item activation
* such as clearing the selected path and messaging the
* JMenuItem's doClick() method.
*
* @param msm A MenuSelectionManager. The visual feedback and
* internal bookkeeping tasks are delegated to
* this MenuSelectionManager. If <code>null</code> is
* passed as this argument, the
* <code>MenuSelectionManager.defaultManager</code> is
* used.
* @see MenuSelectionManager
* @see JMenuItem#doClick(int)
* @since 1.4
*/
protected void doClick(MenuSelectionManager msm)
Add the following audio files to javax\swing\plaf\metal\soundsFrameClose.wav
FrameMaximize.wav
FrameMinimize.wav
FrameRestoreDown.wav
FrameRestoreUp.wav
MenuItemCommand.wav
OptionPaneError.wav
OptionPaneInformation.wav
OptionPaneQuestion.wav
OptionPaneWarning.wav
PopupMenuPopup.wav
scott.violet@eng 2000-11-17
|