public void mouseReleased(MouseEvent event) { PropertySheetTable table = (PropertySheetTable) event.getComponent(); int row = table.rowAtPoint(event.getPoint()); int column = table.columnAtPoint(event.getPoint()); if (row != -1 && column == 0) { // if we clicked on an Item, see if we clicked on its hotspot Item item = table.getSheetModel().getPropertySheetElement(row); int x = event.getX() - getIndent(table, item); if (x > 0 && x < HOTSPOT_SIZE) item.toggle(); } }
public void actionPerformed(ActionEvent e) { int row = PropertySheetTable.this.getSelectedRow(); Item item = PropertySheetTable.this.getSheetModel().getPropertySheetElement(row); item.toggle(); PropertySheetTable.this.addRowSelectionInterval(row, row); }