@Override public void addTableListener(TableListener arg0) { super.addTableListener(arg0); }
/** * Create a new JPrefuseTable. * @param t the Table to display. */ public JPrefuseTable(Table t) { super(); m_table = t; PrefuseTableModel model = new PrefuseTableModel(m_table); super.setModel(model); m_table.addTableListener(model); }
/** * @see prefuse.controls.Control#itemEntered(prefuse.visual.VisualItem, java.awt.event.MouseEvent) */ public void itemEntered(VisualItem item, MouseEvent e) { Display d = (Display)e.getSource(); d.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); activeItem = item; if ( fixOnMouseOver ) { wasFixed = item.isFixed(); resetItem = true; item.setFixed(true); item.getTable().addTableListener(this); } }
/** * @see prefuse.controls.Control#itemPressed(prefuse.visual.VisualItem, java.awt.event.MouseEvent) */ public void itemPressed(VisualItem item, MouseEvent e) { if (!SwingUtilities.isLeftMouseButton(e)) return; if ( !fixOnMouseOver ) { wasFixed = item.isFixed(); resetItem = true; item.setFixed(true); item.getTable().addTableListener(this); } dragged = false; Display d = (Display)e.getComponent(); d.getAbsoluteCoordinate(e.getPoint(), down); }
/** * Create a new CascadedTable. * @param parent the parent Table to use * @param rowFilter a Predicate determining which rows of the parent * table to include in this one. * @param colFilter a ColumnProjection determining which columns of the * parent table to include in this one. * @param tupleType the class type of the Tuple instances to use */ protected CascadedTable(Table parent, Predicate rowFilter, ColumnProjection colFilter, Class tupleType) { super(0, 0, tupleType); m_parent = parent; m_pnames = new ArrayList(); m_rows = new CascadedRowManager(this); m_listener = new Listener(); setColumnProjection(colFilter); setRowFilter(rowFilter); m_parent.addTableListener(m_listener); }
/** * Create a new TreeIndex. * @param t the Table containing the data column to index * @param rows the RowManager of the Table * @param col the Column instance to index * @param cmp the Comparator to use to sort data values * @throws IncompatibleComparatorException if the comparator is not * compatible with the column's data type */ public TreeIndex(Table t, RowManager rows, Column col, Comparator cmp) throws IncompatibleComparatorException { m_table = t; m_rows = rows; m_col = col; m_index = SortedMapFactory.getMap(col.getColumnType(), cmp, false); index(); m_col.addColumnListener(this); m_table.addTableListener(this); }
nodes.addTableListener(m_listener); edges.addTableListener(m_listener); m_listener.setEdgeTable(edges);