1 package prefuse.visual.tuple; 2 3 import prefuse.data.Graph; 4 import prefuse.data.Table; 5 import prefuse.visual.DecoratorItem; 6 import prefuse.visual.VisualItem; 7 import prefuse.visual.VisualTable; 8 9 15 public class TableDecoratorItem extends TableVisualItem 16 implements DecoratorItem 17 { 18 27 protected void init(Table table, Graph graph, int row) { 28 m_table = table; 29 m_row = m_table.isValidRow(row) ? row : -1; 30 } 31 32 35 public VisualItem getDecoratedItem() { 36 VisualTable vt = (VisualTable)getTable(); 37 int prow = vt.getParentRow(getRow()); 38 return (VisualItem)vt.getParentTable().getTuple(prow); 39 } 40 41 } | Popular Tags |