home *** CD-ROM | disk | FTP | other *** search
- ********************************************************
- **** Skeletons are pretty simple.
- ****
- **** // {{description (until it finds newline)
- **** body of skeleton
- **** // }}
- ****
- **** Anything not bracketed by // {{ and // }} is ignored
- ****
- **** Note: There can be no spaces in the // {{ and // }} tokens.
- ****
- **** // {{{Description - start a new tree root
- ****
- **** If the body contains $SEL$, the current selection in the
- **** source code will be substituted. For example:
- **** <B>$SEL$$</B>
- **** will surround the selected text with HTML Bold tags
- ****
- **** Please send updated skeletons to : FRISKEL@INCH.COM and they
- **** will be available for all to use.
- ********************************************************
- *********************************************************
- //{{{Program templates with Designer Tags
- //{{Main program with a Frame
-
-
- import java.awt.*;
-
- //-------------------------------
- // Code generation by the Diva
- //-------------------------------
- public class $SEL$ extends Frame {
- private boolean inAnApplet = true;
- private boolean laidOut = false;
- //{{StartDeclaration
- //{{EndDeclaration
- //-------------------------------
- public $SEL$() {
- super();
- setLayout(null);
- setFont(new Font("Helvetica", Font.PLAIN,10));
- //{{StartConstruction
- //{{EndConstruction
- }
- //-------------------------------
- //{{StartHandlers
-
- //-------------------------------
- public void reshapeControls(Graphics g) {
- if (!laidOut) {
- Insets insets = insets();
- insets = insets();
- //{{StartReshape
- //{{EndReshape
- laidOut = true;
- }
- }
- //-------------------------------
- public void paint(Graphics g) {
- reshapeControls(g);
- //ToDo: Add you paint code...
- }
- //-------------------------------
- public synchronized boolean handleEvent(Event e) {
- //{{StartEventTriggers
- //{{EndEventTriggers
- if (e.id == Event.WINDOW_DESTROY) {
- if (inAnApplet) {
- dispose();
- return false;
- } else {
- System.exit(0);
- }
- }
- return super.handleEvent(e);
- }
- public static void main(String args[]) {
- $SEL$ window = new $SEL$();
- Insets insets = window.insets();
- window.inAnApplet = false;
- window.setTitle("NoneWindow Application");
- window.resize(250 + insets.left + insets.right,
- 250 + insets.top + insets.bottom);
- window.show();
- }
- }
-
- //}}
- ******************************************************************
- //{{Basic Applet
-
-
- import java.awt.*;
-
- //-------------------------------
- public class $SEL$ extends java.applet.Applet {
- private boolean laidOut = false;
- //{{StartDeclaration
- //{{EndDeclaration
- //-------------------------------
- public void init() {
- setLayout(null);
- setFont(new Font("Helvetica", Font.PLAIN,10));
- resize(250 , 250) ;
- //{{StartConstruction
- //{{EndConstruction
- }
- //-------------------------------
- //{{StartHandlers
-
- //-------------------------------
- public void reshapeControls(Graphics g) {
- if (!laidOut) {
- Insets insets = insets();
- insets = insets();
- //{{StartReshape
- //{{EndReshape
- laidOut = true;
- }
- }
- //-------------------------------
- public void paint(Graphics g) {
- reshapeControls(g);
- //ToDo: Add you paint code...
- }
-
- //-------------------------------
- public synchronized boolean handleEvent(Event e) {
- //{{StartEventTriggers
- //{{EndEventTriggers
-
- //Todo: Handle events here
- if (e.id == Event.MOUSE_MOVE) {
-
- }
-
- return super.handleEvent(e);
- }
- }
-
- //}}
-
-