home *** CD-ROM | disk | FTP | other *** search
/ BUG 15 / BUGCD1998_06.ISO / aplic / jbuilder / jruntime.z / ExampleSnippet.snippet < prev    next >
Text File  |  1997-08-25  |  2KB  |  67 lines

  1. //<Exclude>
  2. // The optional exclude tag is used to 'comment' out text.
  3. // Everything between the exclude tags is not added to the file.
  4. // This can be used to exclude comments, test code, etc
  5. //
  6. // A snippet file does not require any special tags.
  7. //
  8. // If no tags are found, the entire file is pasted into a
  9. // new file called "UntitledN"
  10.  
  11.  
  12. //<Target text="Name of Class" pattern=%class% default=ExampleSnippet2>
  13. // The optional target tag is only used with java files and ensures that
  14. // the classname and filename match.  It works the same as the prompt tag
  15.  
  16. //<Prompt text="Width of Panel" pattern=%width% default=500>
  17. // The optional prompt tag is used when you need to ask the user to
  18. // supply some additional data before the snippet is pasted.
  19. // The snippet file is searched for the pattern specified and the user
  20. // specified text is substituted.  In this case we are asking the user
  21. // to specify the initial width of the panel.
  22. // Note: If no prompt tags are found, the file is automatically created
  23. // without user intervention.  If you use this feature, we suggest that
  24. // you use the .snippet file extension to ensure that the file is not
  25. // accidently compiled.
  26.  
  27. //<File=ExampleSnippet.java>
  28. // The optional file tag is used to specify what the new file name will be.
  29. // If the file already exists, the user will be prompted for a new name.
  30. // If you don't specify this tag, the filename will be UntitledN.
  31. // Note: This tag should not be used with the target tag.  If both tags are
  32. // found, the file tag will be ignored.
  33.  
  34. //<Package>
  35. // The optional package tag is used to specify a package name for .java
  36. // files and should be put where you would normally put a package statement.
  37. // It will generate a reasonable package name, using the same rules as the new file
  38. // wizards.  If the file is being generated in a subdirectory of a directory
  39. // which is on the sourcepath, the subdirectory name will be used as the package
  40. // name.
  41.  
  42. //</Exclude>
  43.  
  44. import java.awt.*;
  45. import java.awt.event.*;
  46. import borland.jbcl.layout.*;
  47. import borland.jbcl.control.*;
  48.  
  49. public class %class% extends BevelPanel {
  50.   XYLayout xYLayout1 = new XYLayout();
  51.  
  52.   public %class%() {
  53.     try {
  54.       jbInit();
  55.     }
  56.     catch (Exception e) {
  57.       e.printStackTrace();
  58.     }
  59.   }
  60.  
  61.   public void jbInit() throws Exception {
  62.     xYLayout1.setWidth(%width%);
  63.     xYLayout1.setHeight(300);
  64.     this.setLayout(xYLayout1);
  65.   }
  66. }
  67.