📄 defaultlayout.java
字号:
//Title: Curriculum Development Tool
//Copyright: Copyright (c) 2001
//Author: David Bradford - dbrad@medstat.med.utah.edu
//Company: Knowledge Weavers - http://medstat.med.utah.edu/kw/
//File: projects/style/layout/DefaultLayout.java
//Description: The Default Layout
package cdt.projects.style.layout;
/**
* This class is the default layout. If you want to create a new layout, here
* are the instructions. First follow the directions in the select style wizard to add
* the apporiate gui elements. Then create a class in the same directory as this one.
* Define three function all public and static and they should all return Strings. The
* first function should be called <b>getBeginCode</b>. It should take 2 strings as parameters.
* It should put code that the user should have at the top of the html for this layout.
* The second is <b>getSampleCode</b>. It should also take two strings and should return the
* same as getBeginCode but should be for a smaller area. The last function should be
* <b>getEndCode</b>. This should return what should be at the end of the file to close the layout.
*
* @version 1.0
* @author David Bradford
*/
public class DefaultLayout {
/**
* Gets the code to begin this layout.
*
* @param inside1 text to put as a header(Not used).
* @param inside2 text to be put at the top of the main frame.
* @return top section of the layout code.
*/
public static String getBeginCode(String inside1, String inside2) {
StringBuffer sb = new StringBuffer();
sb.append("<body>\n");
sb.append(inside2);
return sb.toString();
}
/**
* Sample of the top of the layout. Used for a smaller space.
*
* @param inside1 text to put as a header(Not used).
* @param inside2 text to be put at the top of the main frame.
* @return top section of the layout code.
*/
public static String getSampleCode(String inside1, String inside2) {
StringBuffer sb = new StringBuffer();
sb.append("<body>\n");
sb.append(inside2);
return sb.toString();
}
/**
* Gets the ending of the layout code.
*
* @return end of the layout code.
*/
public static String getEndCode() {
StringBuffer sb = new StringBuffer();
sb.append("</body>\n");
return sb.toString();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -