FileDocCategorySizeDatePackage
SystemPropsPlugin.javaAPI DocExample1181Wed Jul 17 00:28:14 BST 2002com.wiverson.macosbook.plugin

SystemPropsPlugin.java

/*
 * SystemProps.java
 *
 */

package com.wiverson.macosbook.plugin;

import com.wiverson.macosbook.SimpleEdit;
/**
 *
 * @author  wiverson
 */
public class SystemPropsPlugin implements com.wiverson.macosbook.SimpleEditPlugin 
{
    public void init(SimpleEdit in) 
    {
            in.setStatusText("Loaded SystemPropsPlugin");
    };
    
    public SystemPropsPlugin() 
    {
    }
    
    public String getAction()
    {
        return "Properties";
    }
    
    public void doAction (SimpleEdit frame, java.awt.event.ActionEvent evt)
     {
        java.util.Properties myProps = System.getProperties();
        java.util.Enumeration myPropsKeys = myProps.keys();
        StringBuffer myResults = new StringBuffer();
        while(myPropsKeys.hasMoreElements()) 
        {
            String currentKey = (String)myPropsKeys.nextElement();
            myResults.append(currentKey);
            myResults.append("=");
            myResults.append(System.getProperty(currentKey));
            myResults.append(System.getProperty("line.separator"));
        }
        frame.appendDocumentText(myResults.toString());
    }
    
}