]> gitweb.factorcode.org Git - factor.git/blob - factor/listener/FactorDesktop.java
Factor jEdit plugin!
[factor.git] / factor / listener / FactorDesktop.java
1 /* :folding=explicit:collapseFolds=1: */
2
3 /*
4  * $Id$
5  *
6  * Copyright (C) 2004 Slava Pestov.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice,
12  *    this list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright notice,
15  *    this list of conditions and the following disclaimer in the documentation
16  *    and/or other materials provided with the distribution.
17  *
18  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
19  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21  * DEVELOPERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28  */
29
30 package factor.listener;
31
32 import factor.*;
33 import java.awt.*;
34 import java.awt.event.*;
35 import java.util.*;
36 import javax.swing.*;
37 import javax.swing.text.*;
38 import javax.swing.text.html.*;
39
40 public class FactorDesktop extends JFrame
41 {
42         //{{{ main() method
43         public static void main(String[] args)
44         {
45                 new FactorDesktop(args,true);
46         } //}}}
47
48         //{{{ FactorDesktop constructor
49         public FactorDesktop(String[] args, boolean standalone)
50         {
51                 super("Factor");
52
53                 getContentPane().add(BorderLayout.CENTER,
54                         new FactorListenerPanel(
55                         FactorListenerPanel.newInterpreter(args)));
56
57                 setSize(640,480);
58                 setDefaultCloseOperation(standalone
59                         ? EXIT_ON_CLOSE
60                         : DISPOSE_ON_CLOSE);
61                 show();
62         } //}}}
63 }