Search in sources :

Example 1 with ERDirectEditManager

use of com.cubrid.common.ui.er.directedit.ERDirectEditManager in project cubrid-manager by CUBRID.

the class ColumnPart method createDirectEditManager.

private void createDirectEditManager() {
    if (manager == null) {
        ValidationGraphicalViewer viewer = (ValidationGraphicalViewer) getViewer();
        ValidationMessageHandler handler = viewer.getValidationHandler();
        Label label = (Label) getFigure();
        ColumnNameTypeCellEditorValidator columnNameTypeCellEditorValidator = new ColumnNameTypeCellEditorValidator(handler, (ERTableColumn) getModel());
        manager = new ERDirectEditManager(label, columnNameTypeCellEditorValidator, this, TextCellEditor.class, new LabelCellEditorLocator(label));
    }
}
Also used : ValidationGraphicalViewer(com.cubrid.common.ui.er.ValidationGraphicalViewer) ERDirectEditManager(com.cubrid.common.ui.er.directedit.ERDirectEditManager) LabelCellEditorLocator(com.cubrid.common.ui.er.directedit.LabelCellEditorLocator) ValidationMessageHandler(com.cubrid.common.ui.er.ValidationMessageHandler) EditableLabel(com.cubrid.common.ui.er.figures.EditableLabel) Label(org.eclipse.draw2d.Label) TextCellEditor(org.eclipse.jface.viewers.TextCellEditor) ColumnNameTypeCellEditorValidator(com.cubrid.common.ui.er.directedit.ColumnNameTypeCellEditorValidator)

Example 2 with ERDirectEditManager

use of com.cubrid.common.ui.er.directedit.ERDirectEditManager in project cubrid-manager by CUBRID.

the class TablePart method performDirectEdit.

protected void performDirectEdit() {
    if (manager == null) {
        ValidationGraphicalViewer viewer = (ValidationGraphicalViewer) getViewer();
        ValidationMessageHandler handler = viewer.getValidationHandler();
        TableFigure figure = (TableFigure) getFigure();
        EditableLabel nameLabel = figure.getNameLabel();
        manager = new ERDirectEditManager(nameLabel, new TableNameCellEditorValidator(handler), this, TableNameCellEditor.class, new LabelCellEditorLocator(nameLabel));
    }
    manager.show();
}
Also used : ValidationGraphicalViewer(com.cubrid.common.ui.er.ValidationGraphicalViewer) TableFigure(com.cubrid.common.ui.er.figures.TableFigure) EditableLabel(com.cubrid.common.ui.er.figures.EditableLabel) ERDirectEditManager(com.cubrid.common.ui.er.directedit.ERDirectEditManager) LabelCellEditorLocator(com.cubrid.common.ui.er.directedit.LabelCellEditorLocator) ValidationMessageHandler(com.cubrid.common.ui.er.ValidationMessageHandler) TableNameCellEditor(com.cubrid.common.ui.er.editor.TableNameCellEditor) TableNameCellEditorValidator(com.cubrid.common.ui.er.directedit.TableNameCellEditorValidator)

Aggregations

ValidationGraphicalViewer (com.cubrid.common.ui.er.ValidationGraphicalViewer)2 ValidationMessageHandler (com.cubrid.common.ui.er.ValidationMessageHandler)2 ERDirectEditManager (com.cubrid.common.ui.er.directedit.ERDirectEditManager)2 LabelCellEditorLocator (com.cubrid.common.ui.er.directedit.LabelCellEditorLocator)2 EditableLabel (com.cubrid.common.ui.er.figures.EditableLabel)2 ColumnNameTypeCellEditorValidator (com.cubrid.common.ui.er.directedit.ColumnNameTypeCellEditorValidator)1 TableNameCellEditorValidator (com.cubrid.common.ui.er.directedit.TableNameCellEditorValidator)1 TableNameCellEditor (com.cubrid.common.ui.er.editor.TableNameCellEditor)1 TableFigure (com.cubrid.common.ui.er.figures.TableFigure)1 Label (org.eclipse.draw2d.Label)1 TextCellEditor (org.eclipse.jface.viewers.TextCellEditor)1