/*
* 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());
}
}
|