home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
inprise
/
JRUNTIME.Z
/
ExampleSnippet.snippet
< prev
next >
Wrap
Text File
|
1998-05-08
|
2KB
|
67 lines
//<Exclude>
// The optional exclude tag is used to 'comment' out text.
// Everything between the exclude tags is not added to the file.
// This can be used to exclude comments, test code, etc
//
// A snippet file does not require any special tags.
//
// If no tags are found, the entire file is pasted into a
// new file called "UntitledN"
//<Target text="Name of Class" pattern=%class% default=ExampleSnippet2>
// The optional target tag is only used with java files and ensures that
// the classname and filename match. It works the same as the prompt tag
//<Prompt text="Width of Panel" pattern=%width% default=500>
// The optional prompt tag is used when you need to ask the user to
// supply some additional data before the snippet is pasted.
// The snippet file is searched for the pattern specified and the user
// specified text is substituted. In this case we are asking the user
// to specify the initial width of the panel.
// Note: If no prompt tags are found, the file is automatically created
// without user intervention. If you use this feature, we suggest that
// you use the .snippet file extension to ensure that the file is not
// accidently compiled.
//<File=ExampleSnippet.java>
// The optional file tag is used to specify what the new file name will be.
// If the file already exists, the user will be prompted for a new name.
// If you don't specify this tag, the filename will be UntitledN.
// Note: This tag should not be used with the target tag. If both tags are
// found, the file tag will be ignored.
//<Package>
// The optional package tag is used to specify a package name for .java
// files and should be put where you would normally put a package statement.
// It will generate a reasonable package name, using the same rules as the new file
// wizards. If the file is being generated in a subdirectory of a directory
// which is on the sourcepath, the subdirectory name will be used as the package
// name.
//</Exclude>
import java.awt.*;
import java.awt.event.*;
import borland.jbcl.layout.*;
import borland.jbcl.control.*;
public class %class% extends BevelPanel {
XYLayout xYLayout1 = new XYLayout();
public %class%() {
try {
jbInit();
}
catch (Exception e) {
e.printStackTrace();
}
}
public void jbInit() throws Exception {
xYLayout1.setWidth(%width%);
xYLayout1.setHeight(300);
this.setLayout(xYLayout1);
}
}