1 package com.quantum.view.bookmark;
3 import com.quantum.model.Column;
8 public class ColumnNode extends TreeNode {
10 private Column column;
12 public ColumnNode(TreeNode parent, Column column) {
17 public Object[] getChildren() {
18 return BookmarkListNode.EMPTY_ARRAY;
21 public boolean hasChildren() {
25 public String getName() {
26 return this.column.getName();
29 protected String getImageName() {
30 return this.column.isPrimaryKey() ? "keycolumn.gif" : "column.gif";
33 public String getLabelName() {
34 String label = getName() + " : " + this.column.getTypeName(); //$NON-NLS-1$
35 if (this.column.isNumeric()) {
36 if (this.column.getSize() > 0 || this.column.getNumberOfFractionalDigits() > 0) {
37 label += "(" + Integer.toString(this.column.getSize()); //$NON-NLS-1$
38 if (this.column.getNumberOfFractionalDigits() > 0) {
39 label += "," + Integer.toString(this.column.getNumberOfFractionalDigits()); //$NON-NLS-1$
41 label += ")"; //$NON-NLS-1$
43 } else if (this.column.getSize() > 0) {
44 label += "(" + Integer.toString(this.column.getSize()) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
49 * @see com.quantum.view.bookmark.TreeNode#initializeChildren()
51 protected void initializeChildren() {
53 protected boolean isInitialized() {
60 public Column getColumn() {