FileDocCategorySizeDatePackage
MetalPLAFPlugin.javaAPI DocExample965Wed Jul 17 00:28:14 BST 2002com.wiverson.macosbook.plugin

MetalPLAFPlugin.java

/*
 * MetalPLAFPlugin.java
 *
 */

package com.wiverson.macosbook.plugin;

import com.wiverson.macosbook.SimpleEdit;

public class MetalPLAFPlugin implements com.wiverson.macosbook.SimpleEditPlugin
{
    /** Creates a new instance of MetalPLAFPlugin */
    public MetalPLAFPlugin()
    {
    }
    
    public void doAction(SimpleEdit frame, java.awt.event.ActionEvent evt)
    {
        try
        {
            javax.swing.UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
            javax.swing.SwingUtilities.updateComponentTreeUI(frame);
            frame.setStatusText("Using Metal.");
        } catch (Exception ex)
        {
            frame.setStatusText("Failed loading Metal L&F.");
        }
    }
    
    public String getAction()
    {
        return "Use Metal";
    }
    
    public void init(SimpleEdit frame)
    {
        frame.setStatusText("Loaded MetalPLAFPlugin");
    }
    
}