use of com.cubrid.common.ui.er.figures.ConnectionFigure in project cubrid-manager by CUBRID.
the class RelationshipPart method setSelected.
/**
* Sets the width of the line when selected
*/
public void setSelected(int value) {
super.setSelected(value);
ConnectionFigure line = (ConnectionFigure) this.getFigure();
line.setSelected(isSelected());
setRelationLinesFocus(isSelected());
}
use of com.cubrid.common.ui.er.figures.ConnectionFigure in project cubrid-manager by CUBRID.
the class RelationshipPart method setSyncColorWithTable.
/**
* Set the connection color by the table border color,if the table border
* color.
*
* @param tablePart
*/
public void setSyncColorWithTable(TablePart tablePart) {
TableFigure tableFigure = (TableFigure) tablePart.getFigure();
ConnectionFigure line = (ConnectionFigure) this.getFigure();
if (!tableFigure.isNormalState()) {
Color color = tableFigure.getBorderColor();
this.getFigure().setForegroundColor(color);
} else if (this.isSelected()) {
line.setSelected(true);
} else {
line.setDefaultState();
}
}
use of com.cubrid.common.ui.er.figures.ConnectionFigure in project cubrid-manager by CUBRID.
the class RelationshipPart method setSource.
/**
* Sets the <i>source</i> of this connection.
*
* @param source the source of this connection
*/
public void setSource(EditPart source) {
TablePart tablePart = (TablePart) source;
ConnectionFigure connFigure = (ConnectionFigure) this.getFigure();
IFigure figure = tablePart == null ? null : tablePart.getFigure();
connFigure.setSourceFigure(figure);
super.setSource(source);
}
use of com.cubrid.common.ui.er.figures.ConnectionFigure in project cubrid-manager by CUBRID.
the class RelationshipPart method setTarget.
/**
* Sets the<i>target</i> of this connection.
*
* @param target the target of this connection
*/
public void setTarget(EditPart target) {
TablePart tablePart = (TablePart) target;
ConnectionFigure connFigure = (ConnectionFigure) this.getFigure();
IFigure figure = tablePart == null ? null : tablePart.getFigure();
connFigure.setTargetFigure(figure);
super.setTarget(target);
}
use of com.cubrid.common.ui.er.figures.ConnectionFigure in project cubrid-manager by CUBRID.
the class RelationshipPart method createFigure.
@Override
protected IFigure createFigure() {
TablePart sourceTablePart = (TablePart) this.getSource();
TablePart targetTablePart = (TablePart) this.getTarget();
IFigure source = sourceTablePart == null ? null : sourceTablePart.getFigure();
IFigure target = targetTablePart == null ? null : targetTablePart.getFigure();
ConnectionFigure conn = new ConnectionFigure(source, target);
conn.setConnectionRouter(new ERConnectionRouter());
conn.setTargetDecoration(new PolygonDecoration());
return conn;
}
Aggregations