1 5 package com.opensymphony.webwork.components.table; 6 7 import com.opensymphony.webwork.components.table.renderer.CellRenderer; 8 import com.opensymphony.webwork.components.table.renderer.DefaultCellRenderer; 9 10 11 15 public class WebTableColumn { 16 18 static final private CellRenderer DEFAULT_RENDERER = new DefaultCellRenderer(); 19 20 22 CellRenderer _renderer = null; 23 String _displayName = null; 24 String _name = null; 25 boolean _hidden = false; 26 int _offset = -1; 27 28 30 public WebTableColumn(String name, int offset) { 31 _name = name; 32 _offset = offset; 33 _displayName = name; 34 _renderer = DEFAULT_RENDERER; 35 } 36 37 39 public void setDisplayName(String displayName) { 40 _displayName = displayName; 41 } 42 43 public String getDisplayName() { 44 return (_displayName); 45 } 46 47 public void setHidden(boolean hidden) { 48 _hidden = hidden; 49 } 50 51 public boolean isHidden() { 52 return _hidden; 53 } 54 55 public String getName() { 56 return (_name); 57 } 58 59 public int getOffset() { 60 return (_offset); 61 } 62 63 public void setRenderer(CellRenderer renderer) { 64 _renderer = renderer; 65 } 66 67 public CellRenderer getRenderer() { 68 return (_renderer); 69 } 70 71 public boolean isVisible() { 72 return !isHidden(); 73 } 74 } 75 | Popular Tags |