/** Creates a new instance of BaseTable. */ public BaseTable(TableModel dm, TableColumnModel cm, ListSelectionModel sm) { super(dm, cm, sm); //set single selection mode getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); setSurrendersFocusOnKeystroke(true); setCellSelectionEnabled(false); setRowSelectionAllowed(true); setAutoResizeMode(JTable.AUTO_RESIZE_NEXT_COLUMN); //See the sources for JTable for what these do putClientProperty("JTable.autoStartsEdit", Boolean.FALSE); //NOI18N putClientProperty("terminateEditOnFocusLost", PropUtils.psCommitOnFocusLoss ? Boolean.FALSE : Boolean.TRUE); //NOI18N //create a listener for dragging the grid center line to resize columns dragListener = new LineDragListener(); addMouseListener(dragListener); addMouseMotionListener(dragListener); //If we are not focus cycle root, when an editor is removed, focus //will get set to a random component which is usually not the property //sheet setFocusCycleRoot(true); enableEvents(AWTEvent.FOCUS_EVENT_MASK); //JDK 1.5 if (getClass() != SheetTable.class) { throw new NoClassDefFoundError("Only SheetTable may subclass BaseTable, for good reasons"); //NOI18N } }
enableEvents(AWTEvent.FOCUS_EVENT_MASK); //JDK 1.5 if (getClass() != SheetTable.class) { throw new NoClassDefFoundError(
enableEvents(AWTEvent.FOCUS_EVENT_MASK); //JDK 1.5 if (getClass() != SheetTable.class) { throw new NoClassDefFoundError(