ComponentFactory
来源:互联网 发布:firefox安装java插件 编辑:程序博客网 时间:2024/06/06 09:09
public class ComponentFactory {
public LineBorder jtextBorder = new LineBorder(new Color(190, 190, 190));
public JTextField getJTextField(){
return getJTextField("",SwingConstants.LEFT);
}
public JTextField getJTextField(int align){
return getJTextField("",align);
}
public JTextField getJTextField(String content){
return getJTextField(content,SwingConstants.LEFT);
}
public JTextField getJTextField(String content,int align){
JTextField textField = new JTextField(content);
textField.setHorizontalAlignment(align);
textField.setBorder(jtextBorder);
return textField;
}
public WordInputJTextPane getWordInputTextPane(){
WordInputJTextPane textField = new WordInputJTextPane();
textField.setBorder(jtextBorder);
return textField;
}
public JTextArea getJTextArea() {
JTextArea textField = new JTextArea(3, 10);
return textField;
}
public JScrollPane getScrollableJTextArea(Component compontent , int horizontalScrollbarAsNeeded, int verticalScrollbarAsNeeded){
JScrollPane scroll = new JScrollPane(compontent);
scroll.setBorder(jtextBorder);
scroll.setHorizontalScrollBarPolicy(horizontalScrollbarAsNeeded);
scroll.setVerticalScrollBarPolicy(verticalScrollbarAsNeeded);
return scroll;
}
}
public LineBorder jtextBorder = new LineBorder(new Color(190, 190, 190));
public JTextField getJTextField(){
return getJTextField("",SwingConstants.LEFT);
}
public JTextField getJTextField(int align){
return getJTextField("",align);
}
public JTextField getJTextField(String content){
return getJTextField(content,SwingConstants.LEFT);
}
public JTextField getJTextField(String content,int align){
JTextField textField = new JTextField(content);
textField.setHorizontalAlignment(align);
textField.setBorder(jtextBorder);
return textField;
}
public WordInputJTextPane getWordInputTextPane(){
WordInputJTextPane textField = new WordInputJTextPane();
textField.setBorder(jtextBorder);
return textField;
}
public JTextArea getJTextArea() {
JTextArea textField = new JTextArea(3, 10);
return textField;
}
public JScrollPane getScrollableJTextArea(Component compontent , int horizontalScrollbarAsNeeded, int verticalScrollbarAsNeeded){
JScrollPane scroll = new JScrollPane(compontent);
scroll.setBorder(jtextBorder);
scroll.setHorizontalScrollBarPolicy(horizontalScrollbarAsNeeded);
scroll.setVerticalScrollBarPolicy(verticalScrollbarAsNeeded);
return scroll;
}
}
0 0
- ComponentFactory
- ComponentFactory
- ComponentFactory取得DOM节点
- 函数指针和指针函数
- Android学习之路——Android四大组件之activity(一)
- Python 提取Twitter转发推文的元素(比如用户名)
- 8.5 Combinations
- BaseScreen
- ComponentFactory
- OneLineJTextArea
- WordInputJTextPane
- BaseDao
- 打发士大夫辅导费是
- BeanUtil
- 费鬼地方个梵蒂冈梵蒂冈
- 【翻译自mos文章】禁止写入日志到Sqlnet.log和Listener.log
- jquery-easyui组件combobox模糊查询在IE中数据太多导致浏览器崩溃