public class UMLEditor extends JApplet
{
public static void main(String[] args)
{
VersionChecker checker = new VersionChecker();
checker.check(JAVA_VERSION);
try
{
System.setProperty("apple.laf.useScreenMenuBar", "true");
}
catch (SecurityException ex)
{
// well, we tried...
}
EditorFrame frame = makeFrame();
frame.setVisible(true);
frame.readArgs(args);
}
public void init()
{
EditorFrame frame = makeFrame();
setContentPane(frame.getContentPane());
setJMenuBar(frame.getJMenuBar());
String url = getParameter("diagram");
if (url != null)
try
{
frame.openURL(new URL(getDocumentBase(), url));
}
catch (IOException ex)
{
ex.printStackTrace();
}
}
public static EditorFrame makeFrame()
{
EditorFrame frame = new EditorFrame(UMLEditor.class);
frame.addGraphType("class_diagram", ClassDiagramGraph.class);
frame.addGraphType("sequence_diagram", SequenceDiagramGraph.class);
frame.addGraphType("state_diagram", StateDiagramGraph.class);
frame.addGraphType("object_diagram", ObjectDiagramGraph.class);
frame.addGraphType("usecase_diagram", UseCaseDiagramGraph.class);
return frame;
}
private static final String JAVA_VERSION = "1.4";
}
posted on 2007-08-21 03:29
小丑鱼 阅读(771)
评论(0) 编辑 收藏