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

📄 entry.java

📁 这是自定义工作流的图形定义部分
💻 JAVA
字号:
import javax.swing.*;import java.applet.AppletContext;import java.util.HashMap;public class Entry extends JApplet{//The methods in this interface can be used by an applet to obtain information about its environment.    public static AppletContext appletContext;    public static HashMap parameters = new HashMap();  //记录系统的参数表路径    private boolean isStandalone = false;    MainWindow mainWindow = null;    /**Get a parameter value*/    public String getParameter(String key, String def)    {        return isStandalone ? System.getProperty(key, def) :                (getParameter(key) != null ? getParameter(key) : def);    }    public Entry()    {    }    public void init()    {        try        {            jbInit();        }        catch (Exception e)        {            e.printStackTrace();        }    }    public void start()    {        try        {            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());        }        catch (Exception ex)        {        }    }    /**Component initialization*/    private void jbInit() throws Exception    {        //   String configDirect = new String("file://e:/java/run_java/workflow-code/XML-INF/");//    char[] tmpp = new char[System.getProperty("user.home").length()];        String tmpp =  ""+System.getProperties().getProperty("user.dir");        tmpp = tmpp.replace('\\','/');        String configDirect = "file:/" + tmpp + "/work-flow/";//        System.out.println("codeBase=" + this.getCodeBase());        parameters.put("SYSTEMCLASS", configDirect + "SystemClass.xml");        parameters.put("IMAGELOCATION", configDirect + "IMAGES/");        parameters.put("HELPFILE", configDirect + "help.html");        parameters.put("CSUCLASS", configDirect);        parameters.put("PICTURE", configDirect + "picture/");        if (mainWindow == null)        {            mainWindow = new MainWindow();  //建立程序主窗口            mainWindow.setBounds(0, 0, (int) this.getToolkit().getScreenSize().getWidth(),                    (int) this.getToolkit().getScreenSize().getHeight());        }        mainWindow.setVisible(true);    }    /**Get parameter info*/    static public String getPara(String key)    {        return parameters.get(key).toString();    }    //static initializer for setting look & feel    static    {        try        {            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());//      UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());        }        catch (Exception e)        {        }    }    public static void main(String[] args)    {        Entry sd = new Entry();        sd.init();        sd.start();    }}

⌨️ 快捷键说明

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