Search in sources :

Example 11 with TableFigure

use of com.cubrid.common.ui.er.figures.TableFigure in project cubrid-manager by CUBRID.

the class TablePart method handleNameChange.

public void handleNameChange(String value) {
    TableFigure tableFigure = (TableFigure) getFigure();
    EditableLabel label = tableFigure.getNameLabel();
    label.setVisible(false);
    refreshVisuals();
}
Also used : TableFigure(com.cubrid.common.ui.er.figures.TableFigure) EditableLabel(com.cubrid.common.ui.er.figures.EditableLabel)

Example 12 with TableFigure

use of com.cubrid.common.ui.er.figures.TableFigure in project cubrid-manager by CUBRID.

the class TablePart method revertNameChange.

public void revertNameChange() {
    TableFigure tableFigure = (TableFigure) getFigure();
    EditableLabel label = tableFigure.getNameLabel();
    ERTable erTable = getTable();
    label.setText(erTable.getShownName());
    label.setVisible(true);
    refreshVisuals();
}
Also used : TableFigure(com.cubrid.common.ui.er.figures.TableFigure) EditableLabel(com.cubrid.common.ui.er.figures.EditableLabel) ERTable(com.cubrid.common.ui.er.model.ERTable)

Example 13 with TableFigure

use of com.cubrid.common.ui.er.figures.TableFigure in project cubrid-manager by CUBRID.

the class TablePart method directEditHitTest.

private boolean directEditHitTest(Point requestLoc) {
    TableFigure figure = (TableFigure) getFigure();
    EditableLabel nameLabel = figure.getNameLabel();
    nameLabel.translateToRelative(requestLoc);
    if (nameLabel.containsPoint(requestLoc)) {
        return true;
    }
    return false;
}
Also used : TableFigure(com.cubrid.common.ui.er.figures.TableFigure) EditableLabel(com.cubrid.common.ui.er.figures.EditableLabel)

Example 14 with TableFigure

use of com.cubrid.common.ui.er.figures.TableFigure 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)

Example 15 with TableFigure

use of com.cubrid.common.ui.er.figures.TableFigure in project cubrid-manager by CUBRID.

the class TablePart method handleBoundsChange.

protected void handleBoundsChange(PropertyChangeEvent evt) {
    TableFigure tableFigure = (TableFigure) getFigure();
    Rectangle constraint = (Rectangle) evt.getNewValue();
    SchemaDiagramPart parent = (SchemaDiagramPart) getParent();
    parent.setLayoutConstraint(this, tableFigure, constraint);
}
Also used : TableFigure(com.cubrid.common.ui.er.figures.TableFigure) Rectangle(org.eclipse.draw2d.geometry.Rectangle)

Aggregations

TableFigure (com.cubrid.common.ui.er.figures.TableFigure)18 Rectangle (org.eclipse.draw2d.geometry.Rectangle)8 EditableLabel (com.cubrid.common.ui.er.figures.EditableLabel)6 ERTable (com.cubrid.common.ui.er.model.ERTable)6 Iterator (java.util.Iterator)4 List (java.util.List)4 EventObject (java.util.EventObject)3 LinkedList (java.util.LinkedList)3 TablePart (com.cubrid.common.ui.er.part.TablePart)2 Point (org.eclipse.draw2d.geometry.Point)2 ValidationGraphicalViewer (com.cubrid.common.ui.er.ValidationGraphicalViewer)1 ValidationMessageHandler (com.cubrid.common.ui.er.ValidationMessageHandler)1 MoveTableCommand (com.cubrid.common.ui.er.commands.MoveTableCommand)1 ERDirectEditManager (com.cubrid.common.ui.er.directedit.ERDirectEditManager)1 LabelCellEditorLocator (com.cubrid.common.ui.er.directedit.LabelCellEditorLocator)1 TableNameCellEditorValidator (com.cubrid.common.ui.er.directedit.TableNameCellEditorValidator)1 TableNameCellEditor (com.cubrid.common.ui.er.editor.TableNameCellEditor)1 ConnectionFigure (com.cubrid.common.ui.er.figures.ConnectionFigure)1 RelationshipPart (com.cubrid.common.ui.er.part.RelationshipPart)1 SchemaDiagramPart (com.cubrid.common.ui.er.part.SchemaDiagramPart)1