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

📄 rrbethemeelementchooser.java

📁 RoboRally Board editor 是一个用来创建战棋类游戏的Java程序。
💻 JAVA
字号:
import javax.swing.*;import java.awt.*;import java.awt.event.*;public class RRBEThemeElementChooser extends JFrame     implements ActionListener {    private RRBEMainWindow window;    private boolean active;    private static RRBEThemeElementChooser instance;    private static boolean initiated = false;    private RRBEElementFactory selectedElement;    private JList destination;    public RRBEThemeElementChooser(RRBEMainWindow window) {	this.window = window;	setTitle("Error in theme conversion");	destination = new JList();	getContentPane().add(destination);    }    public void actionPerformed(ActionEvent e) {	    }    public RRBEElementFactory getConversion(String elementName) {	return null;    }    public RRBEElementFactory activate(String elementName) {	active = true;	this.show();	Object[] f = window.getElementFactories();		for (int i = 0; i < f.length; i++) {	    //destination.add((RRBEElementFactory) f[i]);	}	while(active)	    try {Thread.sleep(1);} catch (Exception e) {}	this.hide();	return selectedElement;    }    public static RRBEElementFactory getConverted(RRBEMainWindow window						  , String elementName) {	if (!initiated) {	    instance = new RRBEThemeElementChooser(window);	    initiated = true;	}	RRBEElementFactory ret = instance.activate(elementName);	if (ret == null) {	    ret = instance.activate(elementName);	}	return ret;    }}

⌨️ 快捷键说明

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