⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aimproperties.java

📁 100%Java编写及时报信工具
💻 JAVA
字号:
package aimplugin;

import java.io.*;
import javax.swing.*;
/**
 * Insert the type's description here.
 * Creation date: (11/23/2001 10:38:28 AM)
 * @author: 
 */
public class AimProperties extends JPanel {
	private JCheckBox ivjCHSound = null;
	private JLabel ivjLPassword = null;
	private JLabel ivjLPort = null;
	private JLabel ivjLServer = null;
	private JLabel ivjLUsername = null;
	private JTextField ivjTFPort = null;
	private JTextField ivjTFServer = null;
	private JTextField ivjTFUsername = null;
	private JTextField ivjTFPassword = null;
	private AimPlugin ivjAimPlugin = null;
	private JCheckBox ivjCHAutoSignon = null;
/**
 * AimProperties constructor comment.
 */
public AimProperties() {
	super();
	initialize();
}
/**
 * AimProperties constructor comment.
 * @param layout java.awt.LayoutManager
 */
public AimProperties(java.awt.LayoutManager layout) {
	super(layout);
}
/**
 * AimProperties constructor comment.
 * @param layout java.awt.LayoutManager
 * @param isDoubleBuffered boolean
 */
public AimProperties(java.awt.LayoutManager layout, boolean isDoubleBuffered) {
	super(layout, isDoubleBuffered);
}
/**
 * AimProperties constructor comment.
 * @param isDoubleBuffered boolean
 */
public AimProperties(boolean isDoubleBuffered) {
	super(isDoubleBuffered);
}
/**
 * Return the AimPlugin property value.
 * @return aimplugin.AimPlugin
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private AimPlugin getAimPlugin() {
	// user code begin {1}
	// user code end
	return ivjAimPlugin;
}
/**
 * Method generated to support the promotion of the aimPluginThis attribute.
 * @return aimplugin.AimPlugin
 */
public AimPlugin getAimPluginThis() {
	return getAimPlugin();
}
/**
 * Return the JCheckBox2 property value.
 * @return javax.swing.JCheckBox
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JCheckBox getCHAutoSignon() {
	if (ivjCHAutoSignon == null) {
		try {
			ivjCHAutoSignon = new javax.swing.JCheckBox();
			ivjCHAutoSignon.setName("CHAutoSignon");
			ivjCHAutoSignon.setText("Auto-Signon");
			ivjCHAutoSignon.setForeground(new java.awt.Color(102,102,153));
			// user code begin {1}
			// user code end
		} catch (java.lang.Throwable ivjExc) {
			// user code begin {2}
			// user code end
			handleException(ivjExc);
		}
	}
	return ivjCHAutoSignon;
}
/**
 * Return the CHSound property value.
 * @return javax.swing.JCheckBox
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JCheckBox getCHSound() {
	if (ivjCHSound == null) {
		try {
			ivjCHSound = new javax.swing.JCheckBox();
			ivjCHSound.setName("CHSound");
			ivjCHSound.setSelected(true);
			ivjCHSound.setText("Play Sounds");
			ivjCHSound.setForeground(new java.awt.Color(102,102,153));
			// user code begin {1}
			// user code end
		} catch (java.lang.Throwable ivjExc) {
			// user code begin {2}
			// user code end
			handleException(ivjExc);
		}
	}
	return ivjCHSound;
}
/**
 * Return the LPassword property value.
 * @return javax.swing.JLabel
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JLabel getLPassword() {
	if (ivjLPassword == null) {
		try {
			ivjLPassword = new javax.swing.JLabel();
			ivjLPassword.setName("LPassword");
			ivjLPassword.setText("Password");
			// user code begin {1}
			// user code end
		} catch (java.lang.Throwable ivjExc) {
			// user code begin {2}
			// user code end
			handleException(ivjExc);
		}
	}
	return ivjLPassword;
}
/**
 * Return the JLabel2 property value.
 * @return javax.swing.JLabel
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JLabel getLPort() {
	if (ivjLPort == null) {
		try {
			ivjLPort = new javax.swing.JLabel();
			ivjLPort.setName("LPort");
			ivjLPort.setPreferredSize(new java.awt.Dimension(38, 14));
			ivjLPort.setText("Port");
			// user code begin {1}
			// user code end
		} catch (java.lang.Throwable ivjExc) {
			// user code begin {2}
			// user code end
			handleException(ivjExc);
		}
	}
	return ivjLPort;
}
/**
 * Return the JLabel1 property value.
 * @return javax.swing.JLabel
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JLabel getLServer() {
	if (ivjLServer == null) {
		try {
			ivjLServer = new javax.swing.JLabel();
			ivjLServer.setName("LServer");
			ivjLServer.setText("Server");
			// user code begin {1}
			// user code end
		} catch (java.lang.Throwable ivjExc) {
			// user code begin {2}
			// user code end
			handleException(ivjExc);
		}
	}
	return ivjLServer;
}
/**
 * Return the LUsername property value.
 * @return javax.swing.JLabel
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JLabel getLUsername() {
	if (ivjLUsername == null) {
		try {
			ivjLUsername = new javax.swing.JLabel();
			ivjLUsername.setName("LUsername");
			ivjLUsername.setText("Username");
			// user code begin {1}
			// user code end
		} catch (java.lang.Throwable ivjExc) {
			// user code begin {2}
			// user code end
			handleException(ivjExc);
		}
	}
	return ivjLUsername;
}
/**
 * Return the TFPassword property value.
 * @return javax.swing.JTextField
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JTextField getTFPassword() {
	if (ivjTFPassword == null) {
		try {
			ivjTFPassword = new javax.swing.JTextField();
			ivjTFPassword.setName("TFPassword");
			ivjTFPassword.setText("");
			// user code begin {1}
			// user code end
		} catch (java.lang.Throwable ivjExc) {
			// user code begin {2}
			// user code end
			handleException(ivjExc);
		}
	}
	return ivjTFPassword;
}
/**
 * Return the JTextField2 property value.
 * @return javax.swing.JTextField
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JTextField getTFPort() {
	if (ivjTFPort == null) {
		try {
			ivjTFPort = new javax.swing.JTextField();
			ivjTFPort.setName("TFPort");
			ivjTFPort.setPreferredSize(new java.awt.Dimension(60, 20));
			ivjTFPort.setText("");
			// user code begin {1}
			// user code end
		} catch (java.lang.Throwable ivjExc) {
			// user code begin {2}
			// user code end
			handleException(ivjExc);
		}
	}
	return ivjTFPort;
}
/**
 * Return the JTextField1 property value.
 * @return javax.swing.JTextField
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JTextField getTFServer() {
	if (ivjTFServer == null) {
		try {
			ivjTFServer = new javax.swing.JTextField();
			ivjTFServer.setName("TFServer");
			ivjTFServer.setPreferredSize(new java.awt.Dimension(150, 20));
			ivjTFServer.setText("");
			// user code begin {1}
			// user code end
		} catch (java.lang.Throwable ivjExc) {
			// user code begin {2}
			// user code end
			handleException(ivjExc);
		}
	}
	return ivjTFServer;
}
/**
 * Return the TFUsername property value.
 * @return javax.swing.JTextField
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private javax.swing.JTextField getTFUsername() {
	if (ivjTFUsername == null) {
		try {
			ivjTFUsername = new javax.swing.JTextField();
			ivjTFUsername.setName("TFUsername");
			ivjTFUsername.setText("");
			// user code begin {1}
			// user code end
		} catch (java.lang.Throwable ivjExc) {
			// user code begin {2}
			// user code end
			handleException(ivjExc);
		}
	}
	return ivjTFUsername;
}
/**
 * Called whenever the part throws an exception.
 * @param exception java.lang.Throwable
 */
private void handleException(java.lang.Throwable exception) {

	/* Uncomment the following lines to print uncaught exceptions to stdout */
	// System.out.println("--------- UNCAUGHT EXCEPTION ---------");
	// exception.printStackTrace(System.out);
}
/**
 * Initialize the class.
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private void initialize() {
	try {
		// user code begin {1}
		// user code end
		setName("AimProperties");
		setLayout(new java.awt.GridBagLayout());
		setSize(257, 180);

		java.awt.GridBagConstraints constraintsLServer = new java.awt.GridBagConstraints();
		constraintsLServer.gridx = 0; constraintsLServer.gridy = 0;
		constraintsLServer.insets = new java.awt.Insets(8, 17, 4, 3);
		add(getLServer(), constraintsLServer);

		java.awt.GridBagConstraints constraintsTFServer = new java.awt.GridBagConstraints();
		constraintsTFServer.gridx = 1; constraintsTFServer.gridy = 0;
		constraintsTFServer.gridwidth = 2;
		constraintsTFServer.fill = java.awt.GridBagConstraints.HORIZONTAL;
		constraintsTFServer.weightx = 1.0;
		constraintsTFServer.ipadx = 179;
		constraintsTFServer.insets = new java.awt.Insets(5, 2, 1, 14);
		add(getTFServer(), constraintsTFServer);

		java.awt.GridBagConstraints constraintsLPort = new java.awt.GridBagConstraints();
		constraintsLPort.gridx = 0; constraintsLPort.gridy = 1;
		constraintsLPort.ipadx = 14;
		constraintsLPort.insets = new java.awt.Insets(1, 19, 15, 1);
		add(getLPort(), constraintsLPort);

		java.awt.GridBagConstraints constraintsTFPort = new java.awt.GridBagConstraints();
		constraintsTFPort.gridx = 1; constraintsTFPort.gridy = 1;
		constraintsTFPort.gridwidth = 2;
		constraintsTFPort.fill = java.awt.GridBagConstraints.HORIZONTAL;
		constraintsTFPort.weightx = 1.0;
		constraintsTFPort.ipadx = 89;
		constraintsTFPort.insets = new java.awt.Insets(1, 2, 9, 104);
		add(getTFPort(), constraintsTFPort);

		java.awt.GridBagConstraints constraintsLUsername = new java.awt.GridBagConstraints();
		constraintsLUsername.gridx = 0; constraintsLUsername.gridy = 2;
		constraintsLUsername.gridwidth = 2;
		constraintsLUsername.ipadx = 1;
		constraintsLUsername.insets = new java.awt.Insets(9, 15, 7, 5);
		add(getLUsername(), constraintsLUsername);

		java.awt.GridBagConstraints constraintsTFUsername = new java.awt.GridBagConstraints();
		constraintsTFUsername.gridx = 2; constraintsTFUsername.gridy = 2;
		constraintsTFUsername.fill = java.awt.GridBagConstraints.HORIZONTAL;
		constraintsTFUsername.weightx = 1.0;
		constraintsTFUsername.ipadx = 120;
		constraintsTFUsername.insets = new java.awt.Insets(9, 1, 1, 52);
		add(getTFUsername(), constraintsTFUsername);

		java.awt.GridBagConstraints constraintsLPassword = new java.awt.GridBagConstraints();
		constraintsLPassword.gridx = 0; constraintsLPassword.gridy = 3;
		constraintsLPassword.gridwidth = 2;
		constraintsLPassword.ipadx = 3;
		constraintsLPassword.insets = new java.awt.Insets(1, 18, 14, 1);
		add(getLPassword(), constraintsLPassword);

		java.awt.GridBagConstraints constraintsTFPassword = new java.awt.GridBagConstraints();
		constraintsTFPassword.gridx = 2; constraintsTFPassword.gridy = 3;
		constraintsTFPassword.fill = java.awt.GridBagConstraints.HORIZONTAL;
		constraintsTFPassword.weightx = 1.0;
		constraintsTFPassword.ipadx = 120;
		constraintsTFPassword.insets = new java.awt.Insets(1, 1, 8, 52);
		add(getTFPassword(), constraintsTFPassword);

		java.awt.GridBagConstraints constraintsCHSound = new java.awt.GridBagConstraints();
		constraintsCHSound.gridx = 1; constraintsCHSound.gridy = 4;
		constraintsCHSound.gridwidth = 2;
		constraintsCHSound.ipadx = -7;
		constraintsCHSound.insets = new java.awt.Insets(8, 10, 2, 101);
		add(getCHSound(), constraintsCHSound);

		java.awt.GridBagConstraints constraintsCHAutoSignon = new java.awt.GridBagConstraints();
		constraintsCHAutoSignon.gridx = 1; constraintsCHAutoSignon.gridy = 5;
		constraintsCHAutoSignon.gridwidth = 2;
		constraintsCHAutoSignon.ipadx = -5;
		constraintsCHAutoSignon.insets = new java.awt.Insets(2, 11, 9, 99);
		add(getCHAutoSignon(), constraintsCHAutoSignon);
	} catch (java.lang.Throwable ivjExc) {
		handleException(ivjExc);
	}
	// user code begin {2}
	// user code end
}
/**
 * main entrypoint - starts the part when it is run as an application
 * @param args java.lang.String[]
 */
public static void main(java.lang.String[] args) {
	try {
		javax.swing.JFrame frame = new javax.swing.JFrame();
		AimProperties aAimProperties;
		aAimProperties = new AimProperties();
		frame.setContentPane(aAimProperties);
		frame.setSize(aAimProperties.getSize());
		frame.addWindowListener(new java.awt.event.WindowAdapter() {
			public void windowClosing(java.awt.event.WindowEvent e) {
				System.exit(0);
			};
		});
		frame.show();
		java.awt.Insets insets = frame.getInsets();
		frame.setSize(frame.getWidth() + insets.left + insets.right, frame.getHeight() + insets.top + insets.bottom);
		frame.setVisible(true);
	} catch (Throwable exception) {
		System.err.println("Exception occurred in main() of javax.swing.JPanel");//$NON-NLS-1$
		exception.printStackTrace(System.out);
	}
}
/**
 * Insert the method's description here.
 * Creation date: (11/23/2001 1:38:01 PM)
 */
public void saveProp() {
	getAimPlugin().aimProp.setProperty("PasswordProp", getTFPassword().getText());
	getAimPlugin().aimProp.setProperty("PortProp", getTFPort().getText());
	getAimPlugin().aimProp.setProperty("ServerProp", getTFServer().getText());
	getAimPlugin().aimProp.setProperty("UsernameProp", getTFUsername().getText());
	Boolean SoundBoolean = new Boolean(getCHSound().isSelected());
	getAimPlugin().aimProp.setProperty("SoundProp", SoundBoolean.toString());
	Boolean AutoOnBoolean = new Boolean(getCHAutoSignon().isSelected());
	getAimPlugin().aimProp.setProperty("AutoOnProp", SoundBoolean.toString());
	//getAimPlugin().aimProp.setProperty("Sound", 
	try{
		getAimPlugin().aimProp.store(new FileOutputStream(new File("aim.properties")), "*******Properties for the AIM Plugin*******");
	} catch (java.io.IOException e){ }
	}
/**
 * Set the AimPlugin to a new value.
 * @param newValue aimplugin.AimPlugin
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private void setAimPlugin(AimPlugin newValue) {
	if (ivjAimPlugin != newValue) {
		try {
			aimplugin.AimPlugin oldValue = getAimPlugin();
			ivjAimPlugin = newValue;
			firePropertyChange("aimPluginThis", oldValue, newValue);
			// user code begin {1}
			// user code end
		} catch (java.lang.Throwable ivjExc) {
			// user code begin {2}
			// user code end
			handleException(ivjExc);
		}
	};
	// user code begin {3}
	// user code end
}
/**
 * Method generated to support the promotion of the aimPluginThis attribute.
 * @param arg1 aimplugin.AimPlugin
 */
public void setAimPluginThis(AimPlugin arg1) {
	setAimPlugin(arg1);
}
/**
 * Insert the method's description here.
 * Creation date: (11/23/2001 1:35:40 PM)
 */
public void setDefaults() {
	getTFPassword().setText(getAimPlugin().aimProp.getProperty("PasswordProp"));
	getTFPort().setText(getAimPlugin().aimProp.getProperty("PortProp"));
	getTFServer().setText(getAimPlugin().aimProp.getProperty("ServerProp"));
	getTFUsername().setText(getAimPlugin().aimProp.getProperty("UsernameProp"));
	Boolean SoundBoolean = new Boolean(getAimPlugin().aimProp.getProperty("SoundProp"));
	getCHSound().setSelected(SoundBoolean.booleanValue());
	Boolean AutoOn = new Boolean(getAimPlugin().aimProp.getProperty("AutoOnProp"));
	getCHAutoSignon().setSelected(AutoOn.booleanValue());
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -