?? templatemanagermain.java
字號:
package com.sutternow.templates;import org.exolab.castor.xml.*;import com.sutternow.swingkar.gui.TemplateManagerPane;import com.javanovic.karapansapi.xml.Strutscreator;import javax.swing.*;import java.awt.*;import java.io.FileReader;import java.io.FileNotFoundException;import java.io.File;import java.net.URL;import net.sf.easylayouts.RowLayout;/** * Created by IntelliJ IDEA. * User: payne * Date: Aug 22, 2003 * Time: 11:14:38 AM * Just a test class for view the template manager without running the main Reog app. */public class TemplateManagerMain { public static void main(String[] args) { TemplatesDefs def = new TemplatesDefs(); Unmarshaller um = new Unmarshaller(def); try { URL configURL = def.getClass().getResource("/templates.xml"); System.out.println(configURL.getPath()); um.unmarshal(new FileReader(configURL.getPath())); // def = (TemplatesDefs)Unmarshaller.unmarshal(TemplatesDefs.class, new FileReader("c:/test/templates.xml")); } catch (MarshalException e) { e.printStackTrace(); //To change body of catch statement use Options | File Templates. } catch (ValidationException e) { e.printStackTrace(); //To change body of catch statement use Options | File Templates. } catch (java.io.IOException e) { e.printStackTrace(); //To change body of catch statement use Options | File Templates. } JFrame frame = new JFrame("Bean Templates"); TemplateManagerPane tm = new TemplateManagerPane(def); frame.setTitle("Bean Templates"); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); frame.setSize(screenSize.width/2, screenSize.height/2); Container panel = frame.getContentPane(); RowLayout rowLayout = new RowLayout(panel, 1, 25); rowLayout.add(tm.getEditForm(), 0); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.show(); }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -