FileDocCategorySizeDatePackage
AquaPLAFPlugin.javaAPI DocExample1026Wed Jul 17 00:28:14 BST 2002com.wiverson.macosbook.plugin

AquaPLAFPlugin.java

/*
 * AquaPLAFPlugin.java
 *
 * Created on June 5, 2002, 3:18 PM
 */

package com.wiverson.macosbook.plugin;

import com.wiverson.macosbook.SimpleEdit;

public class AquaPLAFPlugin implements com.wiverson.macosbook.SimpleEditPlugin
{
    
    /** Creates a new instance of AquaPLAFPlugin */
    public AquaPLAFPlugin()
    {
    }
    
    public void doAction(SimpleEdit frame, java.awt.event.ActionEvent evt)
    {
                try
        {
            javax.swing.UIManager.setLookAndFeel("com.apple.mrj.swing.MacLookAndFeel");
            javax.swing.SwingUtilities.updateComponentTreeUI(frame);
                        frame.setStatusText("Using Aqua.");

        } catch (Exception ex)
        {
            frame.setStatusText("Failed loading Aqua L&F.");
        }
    }
    
    public String getAction()
    {
         return "Use Aqua";
    }
    
    public void init(SimpleEdit frame)
    {
                frame.setStatusText("Loaded AquaPLAFPlugin");
    }
    
}