@ -12,6 +12,7 @@ import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane ;
import com.fr.design.dialog.BasicPane ;
import com.fr.design.dialog.DialogActionAdapter ;
import com.fr.design.dialog.DialogActionAdapter ;
import com.fr.design.editor.ValueEditorPaneFactory ;
import com.fr.design.editor.ValueEditorPaneFactory ;
import com.fr.design.editor.editor.Editor ;
import com.fr.design.gui.controlpane.NameObjectCreator ;
import com.fr.design.gui.controlpane.NameObjectCreator ;
import com.fr.design.gui.controlpane.NameableCreator ;
import com.fr.design.gui.controlpane.NameableCreator ;
import com.fr.design.gui.ilable.UILabel ;
import com.fr.design.gui.ilable.UILabel ;
@ -47,7 +48,9 @@ import java.awt.Component;
import java.awt.Container ;
import java.awt.Container ;
import java.awt.Dialog ;
import java.awt.Dialog ;
import java.awt.event.ActionEvent ;
import java.awt.event.ActionEvent ;
import java.awt.event.MouseEvent ;
import java.util.ArrayList ;
import java.util.ArrayList ;
import java.util.EventObject ;
import java.util.List ;
import java.util.List ;
import static com.fine.theme.utils.FineUIScale.scale ;
import static com.fine.theme.utils.FineUIScale.scale ;
@ -374,7 +377,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
ColumnRowGroupCellRenderer2 cellRenderer2 = new ColumnRowGroupCellRenderer2 ( ) ;
ColumnRowGroupCellRenderer2 cellRenderer2 = new ColumnRowGroupCellRenderer2 ( ) ;
cellRenderer2 . setHorizontalAlignment ( SwingConstants . LEFT ) ;
cellRenderer2 . setHorizontalAlignment ( SwingConstants . LEFT ) ;
column2 . setCellRenderer ( cellRenderer2 ) ;
column2 . setCellRenderer ( cellRenderer2 ) ;
column2 . setCellEditor ( new ColumnValueEditor ( ValueEditorPaneFactory . cellGroupEditor ( ) ) ) ;
column2 . setCellEditor ( new Smart ColumnValueEditor( ValueEditorPaneFactory . cellGroupEditor ( ) ) ) ;
} else {
} else {
SelectedColumnValueTableCellRenderer renderer = new SelectedColumnValueTableCellRenderer ( ) ;
SelectedColumnValueTableCellRenderer renderer = new SelectedColumnValueTableCellRenderer ( ) ;
renderer . setHorizontalAlignment ( SwingConstants . LEFT ) ;
renderer . setHorizontalAlignment ( SwingConstants . LEFT ) ;
@ -612,4 +615,24 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane {
}
}
}
}
}
}
protected class SmartColumnValueEditor extends ColumnValueEditor {
protected SmartColumnValueEditor ( Editor < ? > [ ] types ) {
super ( types ) ;
}
/ * *
* 双击修改
* @param anEvent 事件
* @return 是否可编辑
* /
@Override
public boolean isCellEditable ( EventObject anEvent ) {
if ( anEvent instanceof MouseEvent ) {
return ( ( MouseEvent ) anEvent ) . getClickCount ( ) > = 2 ;
}
return true ;
}
}
}
}