use of org.eclipse.draw2d.PolygonDecoration in project cubrid-manager by CUBRID.
the class HAConnectionPart method createFigure.
/**
* create figure used by edit part.
*
* @return IFigure connectin figure
*/
protected IFigure createFigure() {
HAConnectionFigure conn = new HAConnectionFigure();
conn.setTargetDecoration(new PolygonDecoration());
conn.setConnectionRouter(new ManhattanConnectionRouter());
conn.setForegroundColor(CONNECTION_DEFAULT_COLOR);
conn.setLineWidth(3);
return conn;
}
use of org.eclipse.draw2d.PolygonDecoration in project cubrid-manager by CUBRID.
the class BrokerConnectionPart method createFigure.
/**
* create figure used by edit part.
*
* @return IFigure connectin figure
*/
protected IFigure createFigure() {
PolylineConnection conn = new PolylineConnection();
conn.setTargetDecoration(new PolygonDecoration());
conn.setConnectionRouter(new ManhattanConnectionRouter());
conn.setForegroundColor(CONNECTION_DEFAULT_COLOR);
conn.setLineWidth(3);
return conn;
}
use of org.eclipse.draw2d.PolygonDecoration in project tdi-studio-se by Talend.
the class LookupConnectionPart method createFigure.
@Override
protected IFigure createFigure() {
PolylineConnection connection = new PolylineConnection();
connection.setTargetDecoration(new PolygonDecoration());
// connection.setBackgroundColor(ColorConstants.yellow);
connection.setForegroundColor(ColorProviderMapper.getColor(ColorInfo.COLOR_UNSELECTED_LOOKUP_LINKS));
connection.setLineWidth(2);
cr = new LookupConnectionRouter();
connection.setConnectionRouter(cr);
return connection;
}
use of org.eclipse.draw2d.PolygonDecoration in project tdi-studio-se by Talend.
the class ConnectionFigure method setDecoration.
private void setDecoration() {
if (!DesignerPlugin.getDefault().getPreferenceStore().getBoolean(TalendDesignerPrefConstants.EDITOR_LINESTYLE)) {
this.setTargetDecoration(new PolygonDecoration());
this.setLineWidth(1);
return;
}
this.setLineWidth(2);
PointList template = new PointList();
PolygonDecoration targetDecoration = new DecorationFigure(this, false);
targetDecoration.setScale(1, 1);
template.addPoint(new Point(-11, -5.5));
template.addPoint(new Point(-2, -5.5));
template.addPoint(0, -1);
template.addPoint(0, 1);
template.addPoint(new Point(-2, 5.5));
template.addPoint(new Point(-11, 5.5));
targetDecoration.setTemplate(template);
setTargetDecoration(targetDecoration);
PolygonDecoration sourceDecoration = new DecorationFigure(this, true);
sourceDecoration.setScale(1, 1);
template = new PointList();
template.addPoint(new Point(0, 5.5));
template.addPoint(new Point(-9, 5.5));
template.addPoint(-11, 1);
template.addPoint(-11, -1);
template.addPoint(new Point(-9, -5.5));
template.addPoint(new Point(0, -5.5));
sourceDecoration.setTemplate(template);
setSourceDecoration(sourceDecoration);
}
Aggregations