/** Restarts inline edit mode if the the preceding custom edit failed */ public void editorClosed() { if (lastFailed) { editCellAt(getSelectedRow(), 1, null); } repaint(); customEditorIsOpen = false; }
/** Restarts inline edit mode if the the preceding custom edit failed */ @Override public void editorClosed() { if (lastFailed) { editCellAt(getSelectedRow(), 1, null); } repaint(); customEditorIsOpen = false; }
/** Restarts inline edit mode if the the preceding custom edit failed */ public void editorClosed() { if (lastFailed) { editCellAt(getSelectedRow(), 1, null); } repaint(); customEditorIsOpen = false; }
/** Initiate editing automatically - triggered by the focus event countdown */ private void autoEdit() { editCellAt(getSelectedRow(), getSelectedColumn(), null); if (editorComp != null) { editorComp.requestFocus(); } countDown = -1; }
/** Initiate editing automatically - triggered by the focus event countdown */ private void autoEdit() { editCellAt(getSelectedRow(), getSelectedColumn(), null); if (editorComp != null) { editorComp.requestFocus(); } countDown = -1; }
/** Initiate editing automatically - triggered by the focus event countdown */ private void autoEdit() { editCellAt(getSelectedRow(), getSelectedColumn(), null); if (editorComp != null) { editorComp.requestFocus(); } countDown = -1; }
/** * Select (and start editing) the given property. * @param fd * @param startEditing */ public void select( FeatureDescriptor fd, boolean startEditing ) { PropertySetModel psm = getPropertySetModel(); final int index = psm.indexOf( fd ); if( index < 0 ) { return; //not in our list } getSelectionModel().setSelectionInterval( index, index ); if( startEditing && psm.isProperty( index ) ) { editCellAt( index, 1, new MouseEvent( SheetTable.this, 0, System.currentTimeMillis(), 0, 0, 0, 1, false) ); SwingUtilities.invokeLater( new Runnable() { @Override public void run() { SheetCellEditor cellEditor = getEditor(); if( null != cellEditor ) { InplaceEditor inplace = cellEditor.getInplaceEditor(); if( null != inplace && null != inplace.getComponent() ) { inplace.getComponent().requestFocus(); } } } }); } }
/** Restore the previous editing state, if the previously edited * FeatureDescriptor is still available for editing */ void restoreEditingState() { int idx = indexOfLastSelected(); boolean canResumeEditing = idx != -1; if (!canResumeEditing) { idx = lastSelectedRow; } if (idx == -1) { clearSavedEditingState(); return; } if (idx < getRowCount()) { changeSelection(idx, 1, false, false); if ((canResumeEditing) && wasEditing) { editCellAt(idx, 1); InplaceEditor ine = getEditor().getInplaceEditor(); if ((ine != null) && (partialValue != null)) { ine.setValue(partialValue); } } } clearSavedEditingState(); }
/** Restore the previous editing state, if the previously edited * FeatureDescriptor is still available for editing */ void restoreEditingState() { int idx = indexOfLastSelected(); boolean canResumeEditing = idx != -1; if (!canResumeEditing) idx = lastSelectedRow; if (idx == -1) { clearSavedEditingState(); return; } if (idx < getRowCount()) { changeSelection(idx, 1, false, false); if ((canResumeEditing) && wasEditing) { editCellAt (idx, 1); InplaceEditor ine = getEditor().getInplaceEditor(); if ((ine != null) && (partialValue != null)) { ine.setValue (partialValue); } } } clearSavedEditingState(); }
/** Restore the previous editing state, if the previously edited * FeatureDescriptor is still available for editing */ void restoreEditingState() { int idx = indexOfLastSelected(); boolean canResumeEditing = idx != -1; if (!canResumeEditing) idx = lastSelectedRow; if (idx == -1) { clearSavedEditingState(); return; } if (idx < getRowCount()) { changeSelection(idx, 1, false, false); if ((canResumeEditing) && wasEditing) { editCellAt (idx, 1); InplaceEditor ine = getEditor().getInplaceEditor(); if ((ine != null) && (partialValue != null)) { ine.setValue (partialValue); } } } clearSavedEditingState(); }