public Table(String title, Display d) {
super(title);
display = d;
setDefaultCommand(CMD_EDIT);
setItemCommandListener(this);
int interactionMode = getInteractionModes();
horz = ((interactionMode & CustomItem.TRAVERSE_HORIZONTAL) != 0);
vert = ((interactionMode & CustomItem.TRAVERSE_VERTICAL) != 0);
}
protected int getMinContentHeight() {
return (rows * dy) + 1;
}
protected int getMinContentWidth() {
return (cols * dx) + 1;
}
protected int getPrefContentHeight(int width) {
return (rows * dy) + 1;
}
protected int getPrefContentWidth(int height) {
return (cols * dx) + 1;
}
protected void paint(Graphics g, int w, int h) {
for (int i = 0; i <= rows; i++) {
g.drawLine(0, i * dy, cols * dx, i * dy);