Search in sources :

Example 1 with PropertyChangeProvider

use of com.cubrid.common.ui.er.model.PropertyChangeProvider in project cubrid-manager by CUBRID.

the class DataElementFactory method getNewObject.

public Object getNewObject() {
    try {
        Object obj = template.newInstance();
        if (obj instanceof PropertyChangeProvider) {
            PropertyChangeProvider model = (PropertyChangeProvider) obj;
            model.setERSchema(erSchema);
        }
        return obj;
    } catch (Exception e) {
        return null;
    }
}
Also used : PropertyChangeProvider(com.cubrid.common.ui.er.model.PropertyChangeProvider)

Example 2 with PropertyChangeProvider

use of com.cubrid.common.ui.er.model.PropertyChangeProvider in project cubrid-manager by CUBRID.

the class AbstractBasicPart method deactivate.

public void deactivate() {
    super.deactivate();
    PropertyChangeProvider propertyChangeProvider = (PropertyChangeProvider) getModel();
    propertyChangeProvider.removePropertyChangeListener(this);
}
Also used : PropertyChangeProvider(com.cubrid.common.ui.er.model.PropertyChangeProvider)

Example 3 with PropertyChangeProvider

use of com.cubrid.common.ui.er.model.PropertyChangeProvider in project cubrid-manager by CUBRID.

the class NodeResizableEditPolicy method isDragAllowed.

/**
	 * Returns true if this EditPolicy allows its EditPart to be dragged.
	 * 
	 * @return true if the EditPart can be dragged.
	 */
@Override
public boolean isDragAllowed() {
    EditPart part = this.getHost();
    Object obj = part.getModel();
    if (obj instanceof PropertyChangeProvider) {
        PropertyChangeProvider model = (PropertyChangeProvider) obj;
        return model.getERSchema().isLayoutManualDesired();
    }
    return super.isDragAllowed();
}
Also used : PropertyChangeProvider(com.cubrid.common.ui.er.model.PropertyChangeProvider) EditPart(org.eclipse.gef.EditPart)

Example 4 with PropertyChangeProvider

use of com.cubrid.common.ui.er.model.PropertyChangeProvider in project cubrid-manager by CUBRID.

the class AbstractRelationshipPart method activate.

public void activate() {
    super.activate();
    PropertyChangeProvider propertyChangeProvider = (PropertyChangeProvider) getModel();
    propertyChangeProvider.addPropertyChangeListener(this);
}
Also used : PropertyChangeProvider(com.cubrid.common.ui.er.model.PropertyChangeProvider)

Example 5 with PropertyChangeProvider

use of com.cubrid.common.ui.er.model.PropertyChangeProvider in project cubrid-manager by CUBRID.

the class AbstractRelationshipPart method deactivate.

public void deactivate() {
    super.deactivate();
    PropertyChangeProvider propertyChangeProvider = (PropertyChangeProvider) getModel();
    propertyChangeProvider.removePropertyChangeListener(this);
}
Also used : PropertyChangeProvider(com.cubrid.common.ui.er.model.PropertyChangeProvider)

Aggregations

PropertyChangeProvider (com.cubrid.common.ui.er.model.PropertyChangeProvider)10 EditPart (org.eclipse.gef.EditPart)3 ERTable (com.cubrid.common.ui.er.model.ERTable)2 List (java.util.List)2 RenameTableDialog (com.cubrid.common.ui.cubrid.table.dialog.RenameTableDialog)1 ERTableColumn (com.cubrid.common.ui.er.model.ERTableColumn)1 Iterator (java.util.Iterator)1 ConnectionEditPart (org.eclipse.gef.ConnectionEditPart)1 GraphicalEditPart (org.eclipse.gef.GraphicalEditPart)1 AbstractGraphicalEditPart (org.eclipse.gef.editparts.AbstractGraphicalEditPart)1