/** Returns a reference to the static editor shared among all instances * of SheetTable */ public TableCellEditor getCellEditor(int row, int column) { return getEditor(); }
/** Returns a reference to the static editor shared among all instances * of SheetTable */ public TableCellEditor getCellEditor(int row, int column) { return getEditor(); }
/** Returns a reference to the static editor shared among all instances * of SheetTable */ @Override public TableCellEditor getCellEditor(int row, int column) { if( 0 == column ) { TableCellEditor res = getCustomEditor( row ); if( null != res ) return res; } return getEditor(); }
/** Overridden to check if the edit failed, and if so, set a focus event * countdown for re-initiating editing */ public void editingStopped(ChangeEvent e) { super.editingStopped(e); //Po Ting's request for Rave - if commit on focus loss is on, all //edits look like failures and trigger a new call to editCellAt() if(!PropUtils.psCommitOnFocusLoss && !getEditor().isLastUpdateSuccessful()) { //The last update failed, we're two focus events away from really //having focus again - we'll get one, then the error dialog will //steal focus. On the second one we've got focus back. countDown = 2; } }
/** Overridden to check if the edit failed, and if so, set a focus event * countdown for re-initiating editing */ public void editingStopped(ChangeEvent e) { super.editingStopped(e); //Po Ting's request for Rave - if commit on focus loss is on, all //edits look like failures and trigger a new call to editCellAt() if(!PropUtils.psCommitOnFocusLoss && !getEditor().isLastUpdateSuccessful()) { //The last update failed, we're two focus events away from really //having focus again - we'll get one, then the error dialog will //steal focus. On the second one we've got focus back. countDown = 2; } }
/** Overridden to check if the edit failed, and if so, set a focus event * countdown for re-initiating editing */ @Override public void editingStopped(ChangeEvent e) { super.editingStopped(e); //Po Ting's request for Rave - if commit on focus loss is on, all //edits look like failures and trigger a new call to editCellAt() if (!PropUtils.psCommitOnFocusLoss && !getEditor().isLastUpdateSuccessful()) { //The last update failed, we're two focus events away from really //having focus again - we'll get one, then the error dialog will //steal focus. On the second one we've got focus back. countDown = 2; } }
protected void focusLostCancel() { if (PropUtils.psCommitOnFocusLoss && isEditing()) { getEditor().stopCellEditing(); } else { super.focusLostCancel(); } }
@Override protected void focusLostCancel() { if (PropUtils.psCommitOnFocusLoss && isEditing()) { getEditor().stopCellEditing(); } else { super.focusLostCancel(); } }
protected void focusLostCancel() { if (PropUtils.psCommitOnFocusLoss && isEditing()) { getEditor().stopCellEditing(); } else { super.focusLostCancel(); } }
@Override public void run() { SheetCellEditor cellEditor = getEditor(); if( null != cellEditor ) { InplaceEditor inplace = cellEditor.getInplaceEditor(); if( null != inplace && null != inplace.getComponent() ) { inplace.getComponent().requestFocus(); } } } });
/** Temporarily store the currently edited feature descriptor and partial * value from the editor. This info is used to restore the editing state * after temporary losses of focus and recoverable changes like reordering * the model, or changes that derive from the underlying node */ void saveEditingState() { storedFd = _getSelection(); if (isEditing()) { InplaceEditor ine = getEditor().getInplaceEditor(); if (ine != null) { partialValue = ine.getValue(); } } }
/** Temporarily store the currently edited feature descriptor and partial * value from the editor. This info is used to restore the editing state * after temporary losses of focus and recoverable changes like reordering * the model, or changes that derive from the underlying node */ void saveEditingState() { storedFd = _getSelection(); if (isEditing()) { InplaceEditor ine = getEditor().getInplaceEditor(); if (ine != null) { partialValue = ine.getValue(); } } }
/** Temporarily store the currently edited feature descriptor and partial * value from the editor. This info is used to restore the editing state * after temporary losses of focus and recoverable changes like reordering * the model, or changes that derive from the underlying node */ void saveEditingState() { storedFd = _getSelection(); if (isEditing()) { InplaceEditor ine = getEditor().getInplaceEditor(); if (ine != null) { partialValue = ine.getValue(); } } }
/** Toggle the expanded state of a property set. If editing, the edit is * cancelled. */ private void toggleExpanded (int index) { if (isEditing()) getEditor().cancelCellEditing(); PropertySetModel psm = getSheetModel().getPropertySetModel(); psm.toggleExpanded (index); }
/** Toggle the expanded state of a property set. If editing, the edit is * cancelled. */ private void toggleExpanded(int index) { if (isEditing()) { getEditor().cancelCellEditing(); } PropertySetModel psm = getSheetModel().getPropertySetModel(); psm.toggleExpanded(index); }
/** Toggle the expanded state of a property set. If editing, the edit is * cancelled. */ private void toggleExpanded (int index) { if (isEditing()) getEditor().cancelCellEditing(); PropertySetModel psm = getSheetModel().getPropertySetModel(); psm.toggleExpanded (index); }
/** Overridden to store some data in the event of a recoverable change, * such as the row currently being edited */ @Override public void tableChanged(TableModelEvent e) { boolean ed = isEditing(); lastSelectedRow = ed ? getEditingRow() : getSelectionModel().getAnchorSelectionIndex(); if (ed) { getEditor().stopCellEditing(); } super.tableChanged(e); restoreEditingState(); }
/** Overridden to store some data in the event of a recoverable change, * such as the row currently being edited */ public void tableChanged (TableModelEvent e) { boolean ed = isEditing(); lastSelectedRow = ed ? getEditingRow() : getSelectionModel().getAnchorSelectionIndex(); if (ed) getEditor().cancelCellEditing(); super.tableChanged (e); restoreEditingState(); }
/** Overridden to store some data in the event of a recoverable change, * such as the row currently being edited */ public void tableChanged (TableModelEvent e) { boolean ed = isEditing(); lastSelectedRow = ed ? getEditingRow() : getSelectionModel().getAnchorSelectionIndex(); if (ed) getEditor().cancelCellEditing(); super.tableChanged (e); restoreEditingState(); }
protected boolean accept(Component aComponent) { //Do not allow focus to go to a child of the editor we're using if //we are in the process of removing the editor if (isEditing() && inEditorRemoveRequest()) { InplaceEditor ine = getEditor().getInplaceEditor(); if (ine != null) { if (aComponent == ine.getComponent() || ine.isKnownComponent(aComponent)) { return false; } } } return super.accept (aComponent) && aComponent.isShowing(); } }