use of com.servoy.j2db.ui.BaseEventExecutor in project servoy-client by Servoy.
the class TableView method editCellAt.
/*
* (non-Javadoc)
*
* @see com.servoy.j2db.gui.FixedJTable#editCellAt(int, int, java.util.EventObject)
*/
@Override
public boolean editCellAt(int row, int column, EventObject e) {
boolean b = super.editCellAt(row, column, e);
Component comp = getEditorComponent();
if (comp instanceof ISupportEventExecutor) {
// focus lost event comes after editor is removed from hierarchy
IEventExecutor executor = ((ISupportEventExecutor) comp).getEventExecutor();
if (executor instanceof BaseEventExecutor) {
((BaseEventExecutor) executor).setFormName(fc.getName());
}
}
if (b && !isEditable() && comp instanceof IScriptableProvider && ((IScriptableProvider) comp).getScriptObject() instanceof HasRuntimeReadOnly && !((HasRuntimeReadOnly) ((IScriptableProvider) comp).getScriptObject()).isReadOnly()) {
// the component is editable again, we have to set it back
((HasRuntimeReadOnly) ((IScriptableProvider) comp).getScriptObject()).setReadOnly(true);
}
return b;
}
Aggregations