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

📄 consolepane.java

📁 时空图计算和编辑程序
💻 JAVA
字号:
package my_cpt;
import super_cpt.*;
import java.awt.*;
import java.awt.event.*;
public class ConsolePane extends SuperPane implements ActionListener{

	/**
	 * @param args
	 */
	//private IActionExcutor iexcuter=null;
	TextArea txt=new TextArea("-------数据结果输出-------\n");
	public SuperBtn okbtn=new SuperBtn("-------清空-------");
	public ConsolePane()
	{
		super("结果输出面板");
		setLayout(null);
		add(okbtn);
		add(txt);
		txt.setEditable(false);
		txt.setIgnoreRepaint(true);
		txt.setBackground(Color.WHITE);
		okbtn.addActionListener(this);
		Direction=2;
		HidenSide=RIGHT;
	}
	public void actionPerformed(ActionEvent e)
	{//按钮事件处理
		if(e.getSource()==okbtn)
			clear();
	}
	public void showText(final String strtxt)
	{
		txt.append(strtxt);
	}
	public void clear()
	{
		txt.setText("-------数据结果输出-------\n");
	}
	public String getConsole()
	{
		return txt.getText();
	}
	boolean isbool=true;
	public void myPaint(Graphics2D g)
	{
		if(isbool)
		{
			txt.setBounds(5,25,getWidth()-10,getHeight()-50);
			okbtn.setBounds(getWidth()/2-50,txt.getY()+txt.getHeight()+2,96,16);
			isbool=false;
		}
	}

}

⌨️ 快捷键说明

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