Java Code Examples for com.alee.laf.WebLookAndFeel#playSound()

The following examples show how to use com.alee.laf.WebLookAndFeel#playSound() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WInternalFrameUI.java    From weblaf with GNU General Public License v3.0 5 votes vote down vote up
/**
 * This method is called when the user wants to close the frame.
 * The {@code playCloseSound} Action is fired.
 * This action is delegated to the desktopManager.
 */
public void closeFrame ()
{
    // Internal Frame Auditory Cue Activation
    WebLookAndFeel.playSound ( internalFrame, "InternalFrame.closeSound" );

    // Delegate to desktop manager
    getDesktopManager ().closeFrame ( internalFrame );
}
 
Example 2
Source File: WInternalFrameUI.java    From weblaf with GNU General Public License v3.0 5 votes vote down vote up
/**
 * This method is called when the user wants to maximize the frame.
 * The {@code playMaximizeSound} Action is fired.
 * This action is delegated to the desktopManager.
 */
public void maximizeFrame ()
{
    // Internal Frame Auditory Cue Activation
    WebLookAndFeel.playSound ( internalFrame, "InternalFrame.maximizeSound" );

    // Delegate to desktop manager
    getDesktopManager ().maximizeFrame ( internalFrame );
}
 
Example 3
Source File: WInternalFrameUI.java    From weblaf with GNU General Public License v3.0 5 votes vote down vote up
/**
 * This method is called when the user wants to minimize the frame.
 * The {@code playRestoreDownSound} Action is fired.
 * This action is delegated to the desktopManager.
 */
public void minimizeFrame ()
{
    // Internal Frame Auditory Cue Activation
    if ( !internalFrame.isIcon () )
    {
        // This method seems to regularly get called after an
        // internal frame is iconified. Don't play this sound then.
        WebLookAndFeel.playSound ( internalFrame, "InternalFrame.restoreDownSound" );
    }

    // Delegate to desktop manager
    getDesktopManager ().minimizeFrame ( internalFrame );
}
 
Example 4
Source File: WInternalFrameUI.java    From weblaf with GNU General Public License v3.0 5 votes vote down vote up
/**
 * This method is called when the user wants to iconify the frame.
 * The {@code playMinimizeSound} Action is fired.
 * This action is delegated to the desktopManager.
 */
public void iconifyFrame ()
{
    // Internal Frame Auditory Cue Activation
    WebLookAndFeel.playSound ( internalFrame, "InternalFrame.minimizeSound" );

    // Delegate to desktop manager
    getDesktopManager ().iconifyFrame ( internalFrame );
}
 
Example 5
Source File: WInternalFrameUI.java    From weblaf with GNU General Public License v3.0 5 votes vote down vote up
/**
 * This method is called when the user wants to deiconify the frame.
 * The {@code playRestoreUpSound} Action is fired.
 * This action is delegated to the desktopManager.
 */
public void deiconifyFrame ()
{
    // Internal Frame Auditory Cue Activation
    if ( !internalFrame.isMaximum () )
    {
        // This method seems to regularly get called after an
        // internal frame is maximized. Don't play this sound then.
        WebLookAndFeel.playSound ( internalFrame, "InternalFrame.restoreUpSound" );
    }

    // Delegate to desktop manager
    getDesktopManager ().deiconifyFrame ( internalFrame );
}