use of org.eclipse.draw2d.IFigure in project tdi-studio-se by Talend.
the class BusinessItemRelationshipNameEditPart method createFigure.
/**
* @generated
*/
protected IFigure createFigure() {
IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
return label;
}
use of org.eclipse.draw2d.IFigure in project cubrid-manager by CUBRID.
the class AbstractBasicPart method propertyChange.
public void propertyChange(PropertyChangeEvent evt) {
String property = evt.getPropertyName();
if (PropertyChangeProvider.CHILD_CHANGE.equals(property)) {
handleChildChange(evt);
} else if (PropertyChangeProvider.REORDER_CHANGE.equals(property)) {
handleReorderChange(evt);
} else if (PropertyChangeProvider.OUTPUT_CHANGE.equals(property)) {
handleOutputChange(evt);
} else if (PropertyChangeProvider.INPUT_CHANGE.equals(property)) {
handleInputChange(evt);
} else if (PropertyChangeProvider.TEXT_CHANGE.equals(property)) {
handleLabelChange(evt);
} else if (PropertyChangeProvider.BOUNDS_CHANGE.equals(property)) {
handleBoundsChange(evt);
} else if (PropertyChangeProvider.LAYOUT_CHANGE.equals(property)) {
handleLayoutChange(evt);
} else if (PropertyChangeProvider.AUTO_LAYOUT_TEMP.equals(property)) {
handleTmpAutoLayout(evt);
} else if (PropertyChangeProvider.VIEW_MODEL_CHANGE.equals(property)) {
handleViewModelChange(evt);
} else if (PropertyChangeProvider.RELATION_MAP_CHANGE.equals(property)) {
handleRelationMapChange(evt);
}
if (PropertyChangeProvider.TEXT_CHANGE.equals(property)) {
GraphicalEditPart graphicalEditPart = (GraphicalEditPart) (getViewer().getContents());
IFigure partFigure = graphicalEditPart.getFigure();
partFigure.getUpdateManager().performUpdate();
}
postSchemaDataChanged(evt);
}
use of org.eclipse.draw2d.IFigure in project cubrid-manager by CUBRID.
the class ERScalableFreeformRootEditPart method getLayer.
public IFigure getLayer(Object key) {
IFigure innerLayer = innerLayers == null ? null : innerLayers.getLayer(key);
if (innerLayer != null) {
return innerLayer;
}
LayeredPane scaledLayers = getScaledLayers();
IFigure layer = scaledLayers == null ? null : scaledLayers.getLayer(key);
if (layer != null) {
return layer;
}
if (getPrintableLayers() == null) {
return null;
}
return getPrintableLayers().getLayer(key);
}
use of org.eclipse.draw2d.IFigure in project cubrid-manager by CUBRID.
the class SchemaXYLayoutPolicy method getCurrentConstraintFor.
@Override
public Rectangle getCurrentConstraintFor(GraphicalEditPart child) {
IFigure fig = child.getFigure();
Rectangle rectangle = (Rectangle) fig.getParent().getLayoutManager().getConstraint(fig);
if (rectangle == null) {
rectangle = fig.getBounds();
}
return rectangle;
}
use of org.eclipse.draw2d.IFigure in project cubrid-manager by CUBRID.
the class RelationshipPart method addHoverListener.
/**
* Add hovering listener for the figure
*/
protected void addHoverListener() {
final IFigure figure = this.getFigure();
hoverListener = new MouseMotionListener() {
public void mouseEntered(MouseEvent me) {
setHoverState(true);
setRelationLinesFocus(true);
}
public void mouseExited(MouseEvent me) {
setHoverState(false);
setRelationLinesFocus(false);
setSelectedTableColor();
}
public void mouseHover(MouseEvent me) {
}
public void mouseDragged(MouseEvent me) {
}
public void mouseMoved(MouseEvent me) {
}
};
figure.addMouseMotionListener(hoverListener);
}
Aggregations