📄 listbridge.java
字号:
import java.awt.*;
import java.util.*;
import javax.swing.*;
//this is the Implementor class
//that decides which class to return
public class listBridge extends Bridger {
public static final int LIST=1, TABLE=2, TREE=3;
protected visList list;
public listBridge(int type) {
setLayout(new BorderLayout());
switch (type) {
case LIST:
list = new productList();
add("Center", (JComponent)list);
break;
case TABLE:
list = new productTable();
add("Center", (JComponent)list);
break;
case TREE:
list = new productTree();
add("Center", (JComponent)list);
break;
default:
list = null;
}
}
public void addData(Vector v) {
for(int i=0; i<v.size(); i++) {
String s = (String)v.elementAt (i);
list.addLine (s);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -