本文整理汇总了Java中org.netbeans.api.visual.widget.ConnectionWidget.setStroke方法的典型用法代码示例。如果您正苦于以下问题:Java ConnectionWidget.setStroke方法的具体用法?Java ConnectionWidget.setStroke怎么用?Java ConnectionWidget.setStroke使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.api.visual.widget.ConnectionWidget
的用法示例。
在下文中一共展示了ConnectionWidget.setStroke方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: creaCandidateCorrespondence
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
private void creaCandidateCorrespondence(ValueCorrespondence valueCorrespondence, MappingTask mappingTask) {
INode iNodeSource = finder.findNodeInSchema(valueCorrespondence.getSourcePaths().get(0), mappingTask.getSourceProxy());
VMDPinWidgetSource sourceWidget = (VMDPinWidgetSource) iNodeSource.getAnnotation(Costanti.PIN_WIDGET_TREE_SPICY);
INode iNodeTarget = finder.findNodeInSchema(valueCorrespondence.getTargetPath(), mappingTask.getTargetProxy());
VMDPinWidgetTarget targetWidget = (VMDPinWidgetTarget) iNodeTarget.getAnnotation(Costanti.PIN_WIDGET_TREE_SPICY);
ConnectionWidget connection = new ConnectionWidget(glassPane.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createCenterAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = Costanti.DASHED_STROKE;
connection.setStroke(stroke);
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setConnectionWidget(connection);
connectionInfo.setValueCorrespondence(valueCorrespondence);
connection.setToolTipText(connectionInfo.getValueCorrespondence().toString());
setColorOnConfidence(connectionInfo, connection);
glassPane.getConnectionLayer().addChild(connection, connectionInfo);
connection.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderConnectionSpicy(glassPane.getScene())));
connection.getActions().addAction(ActionFactory.createSelectAction(new MySelectConnectionActionProvider(glassPane.getConnectionLayer())));
glassPane.getScene().validate();
}
示例2: creaCorrespondence
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
private void creaCorrespondence(VariableCorrespondence variableCorrespondence, ValueCorrespondence valueCorrespondence, MappingTask mappingTask) {
INode iNodeSource = finder.findNodeInSchema(valueCorrespondence.getSourcePaths().get(0), mappingTask.getSourceProxy());
VMDPinWidgetSource sourceWidget = (VMDPinWidgetSource) iNodeSource.getAnnotation(Costanti.PIN_WIDGET_TREE);
INode iNodeTarget = finder.findNodeInSchema(valueCorrespondence.getTargetPath(), mappingTask.getTargetProxy());
VMDPinWidgetTarget targetWidget = (VMDPinWidgetTarget) iNodeTarget.getAnnotation(Costanti.PIN_WIDGET_TREE);
ConnectionWidget connection = new ConnectionWidget(glassPane.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createCenterAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = Costanti.BASIC_STROKE;
connection.setStroke(stroke);
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setConnectionWidget(connection);
connectionInfo.setValueCorrespondence(valueCorrespondence);
connection.setToolTipText(connectionInfo.getValueCorrespondence().toString());
glassPane.getConnectionLayer().addChild(connection, connectionInfo);
connection.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderConnectionMappingTask(glassPane.getScene())));
connection.getActions().addAction(ActionFactory.createSelectAction(new MySelectConnectionActionProvider(glassPane.getConnectionLayer())));
// analisiFiltro.creaWidgetEsisteFiltro(connection, connectionInfo);
glassPane.getScene().validate();
}
示例3: createConnection
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
public void createConnection(Widget sourceWidget, Widget targetWidget) {
ConnectionWidget connection = new ConnectionWidget(scene);
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createCenterAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = creator.getStroke();
connection.setStroke(stroke);
if (targetWidget instanceof FunctionalDependencyWidget) {
setWidgetFunctionalDependency(sourceWidget, targetWidget, connection);
connectionLayer.addChild(connection);
}
if (targetWidget instanceof VMDPinWidgetTarget) {
if (createJoinCondition(sourceWidget, targetWidget)) {
return;
}
}
}
示例4: createConnection
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
public void createConnection(Widget sourceWidget, Widget targetWidget) {
try {
ConnectionWidget connection = new ConnectionWidget(sourceWidget.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createRectangularAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = Costanti.BASIC_STROKE;
connection.setStroke(stroke);
connection.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderConnectionConst(sourceWidget.getScene(), caratteristicheWidget)));
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setTargetWidget(targetWidget);
connectionInfo.setConnectionWidget(connection);
caratteristicheWidget.setFormValidation(new FormValidation(false));
creator.createCorrespondenceWithSourceValue(mainLayer, sourceWidget, targetWidget, connectionInfo);
caratteristicheWidget.addConnectionInfo(connectionInfo);
connectionLayer.addChild(connection, connectionInfo);
} catch (ExpressionSyntaxException ese) {
DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(NbBundle.getMessage(Costanti.class, Costanti.SYNTAX_WARNING) + " : " + ese, DialogDescriptor.WARNING_MESSAGE));
StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(Costanti.class, Costanti.SYNTAX_WARNING));
}
}
示例5: createConnection
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
public void createConnection(Widget sourceWidget, Widget targetWidget) {
try {
ConnectionWidget connection = new ConnectionWidget(sourceWidget.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createRectangularAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = Costanti.BASIC_STROKE;
connection.setStroke(stroke);
connection.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderConnectionFunctionalDep(sourceWidget.getScene(), mainLayer, caratteristiche)));
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setTargetWidget(targetWidget);
connectionInfo.setConnectionWidget(connection);
if (!caratteristiche.getTargetList().isEmpty()) {
review.removeFunctionalDependency(caratteristiche.getFunctionalDependency(), caratteristiche.isSource());
}
caratteristiche.addTargetWidget((VMDPinWidget) targetWidget);
creator.createCorrespondenceWithFunctionalDep(mainLayer, caratteristiche, connectionInfo);
caratteristiche.setConnectionInfo(connectionInfo);
connectionLayer.addChild(connection, connectionInfo);
} catch (ExpressionSyntaxException e) {
DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(NbBundle.getMessage(Costanti.class, Costanti.SYNTAX_WARNING) + " : " + e.getMessage(), DialogDescriptor.WARNING_MESSAGE));
}
}
示例6: createConnection
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
public void createConnection(Widget sourceWidget, Widget targetWidget) {
try {
ConnectionWidget connection = new ConnectionWidget(sourceWidget.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createRectangularAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = Costanti.BASIC_STROKE;
connection.setStroke(stroke);
connection.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderConnectionFunc(sourceWidget.getScene(), mainLayer, caratteristiche)));
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setTargetWidget(targetWidget);
connectionInfo.setConnectionWidget(connection);
caratteristiche.setTargetWidget((VMDPinWidgetTarget) targetWidget);
creator.createCorrespondenceWithFunction(mainLayer, targetWidget, caratteristiche, connectionInfo);
caratteristiche.setConnectionInfo(connectionInfo);
connectionLayer.addChild(connection, connectionInfo);
} catch (ExpressionSyntaxException e) {
DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(NbBundle.getMessage(Costanti.class, Costanti.SYNTAX_WARNING) + " : " + e.getMessage(), DialogDescriptor.WARNING_MESSAGE));
}
}
示例7: createConnection
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
public void createConnection(Widget sourceWidget, Widget targetWidget) {
ConnectionWidget connection = new ConnectionWidget(scene);
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createCenterAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = creator.getStroke();
connection.setStroke(stroke);
if (targetWidget instanceof FunctionWidget) {
setWidget(sourceWidget, targetWidget, connection);
connectionLayer.addChild(connection);
}
if (targetWidget instanceof FunctionalDependencyWidget) {
setWidgetFunctionalDependency(sourceWidget, targetWidget, connection);
connectionLayer.addChild(connection);
}
if (targetWidget instanceof VMDPinWidgetTarget) {
createCorrespondence(connection, sourceWidget, targetWidget);
}
if (targetWidget instanceof VMDPinWidgetSource) {
if (createJoinCondition(sourceWidget, targetWidget)) {
return;
}
}
}
示例8: createConnectionToTargetImpl
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
private ConnectionInfo createConnectionToTargetImpl(Widget sourceWidget, Widget targetWidget, LayerWidget mainLayer, LayerWidget connectionLayer, Stroke stroke) {
ConnectionWidget connection = new ConnectionWidget(sourceWidget.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createRectangularAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
connection.setStroke(stroke);
CaratteristicheWidgetInterConst caratteristicheWidget = (CaratteristicheWidgetInterConst) mainLayer.getChildConstraint(sourceWidget);
connection.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderConnectionConst(sourceWidget.getScene(), caratteristicheWidget)));
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setTargetWidget(targetWidget);
connectionInfo.setConnectionWidget(connection);
caratteristicheWidget.addConnectionInfo(connectionInfo);
connectionLayer.addChild(connection, connectionInfo);
return connectionInfo;
}
示例9: createConnectionFromFunctionalDependecyImpl
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
private ConnectionInfo createConnectionFromFunctionalDependecyImpl(Widget functionalDepWidget, Widget targetWidget, LayerWidget mainLayer, LayerWidget connectionLayer, Stroke stroke) {
ConnectionWidget connection = new ConnectionWidget(functionalDepWidget.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createRectangularAnchor(functionalDepWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
connection.setStroke(stroke);
connection.setVisible(true);
CaratteristicheWidgetInterFunctionalDep caratteristicheWidget = (CaratteristicheWidgetInterFunctionalDep) mainLayer.getChildConstraint(functionalDepWidget);
connection.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderConnectionFunctionalDep(functionalDepWidget.getScene(), mainLayer, caratteristicheWidget)));
caratteristicheWidget.addTargetWidget((VMDPinWidget) targetWidget);
ConnectionInfo connectionInfo = new ConnectionInfo();
// connectionInfo.setTargetWidget(targetWidget);
// connectionInfo.setConnectionWidget(connection);
connectionLayer.addChild(connection, connectionInfo);
return connectionInfo;
}
示例10: createConnectionFromFunctionImpl
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
private ConnectionInfo createConnectionFromFunctionImpl(Widget functionWidget, Widget targetWidget, LayerWidget mainLayer, LayerWidget connectionLayer, Stroke stroke) {
ConnectionWidget connection = new ConnectionWidget(functionWidget.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createRectangularAnchor(functionWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
connection.setStroke(stroke);
CaratteristicheWidgetInterFunction caratteristicheWidget = (CaratteristicheWidgetInterFunction) mainLayer.getChildConstraint(functionWidget);
connection.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderConnectionFunc(functionWidget.getScene(), mainLayer, caratteristicheWidget)));
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setTargetWidget(targetWidget);
connectionInfo.setConnectionWidget(connection);
connectionLayer.addChild(connection, connectionInfo);
return connectionInfo;
}
示例11: createConnection
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
public void createConnection(Widget sourceWidget, Widget targetWidget) {
try {
ConnectionWidget connection = new ConnectionWidget(sourceWidget.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createRectangularAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = Costanti.BASIC_STROKE;
connection.setStroke(stroke);
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setSourceWidget(sourceWidget);
connectionInfo.setTargetWidget(targetWidget);
connectionInfo.setConnectionWidget(connection);
setCompositionWidget(sourceWidget, targetWidget, connection, connectionInfo);
caratteristiche.setConnectionInfo(connectionInfo);
connectionLayer.addChild(connection, connectionInfo);
} catch (ExpressionSyntaxException e) {
DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(NbBundle.getMessage(Costanti.class, Costanti.SYNTAX_WARNING) + " : " + e.getMessage(), DialogDescriptor.WARNING_MESSAGE));
}
}
示例12: createConnection
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
public void createConnection(Widget sourceWidget, Widget targetWidget) {
try {
ConnectionWidget connection = new ConnectionWidget(sourceWidget.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createRectangularAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = Costanti.BASIC_STROKE;
connection.setStroke(stroke);
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setSourceWidget(sourceWidget);
connectionInfo.setTargetWidget(targetWidget);
connectionInfo.setConnectionWidget(connection);
if (targetWidget instanceof ChainWidget) {
setCompositionWidget(sourceWidget, targetWidget, connection, connectionInfo);
} else if (targetWidget instanceof MergeWidget) {
setMergeWidget(sourceWidget, targetWidget, connection, connectionInfo);
}
caratteristiche.setConnectionInfo(connectionInfo);
connectionLayer.addChild(connection, connectionInfo);
} catch (ExpressionSyntaxException e) {
DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(NbBundle.getMessage(Costanti.class, Costanti.SYNTAX_WARNING) + " : " + e.getMessage(), DialogDescriptor.WARNING_MESSAGE));
}
}
示例13: createConnectionWidget
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
@Override
public ConnectionWidget createConnectionWidget(Scene scene) {
ConnectionWidget widget = new ConnectionWidget(scene);
BasicStroke DEFAULT_DASH = new BasicStroke(1.2f,
BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL,
BasicStroke.JOIN_MITER, new float[]{4, 4}, 0);
widget.setStroke(DEFAULT_DASH);
// widget.setForeground(new Color(242, 132, 0));
// widget.setTargetAnchorShape(AnchorShape.NONE);
return widget;
}
示例14: creaCorrespondence
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
private void creaCorrespondence(VariableCorrespondence variableCorrespondence) {
// INode iNodeSource = finder.findNodeInSchema(variableCorrespondence.getSourcePaths().get(0), mappingTask.getSource());
INode iNodeSource = finder.findNodeInSchema(variableCorrespondence.getSourcePaths().get(0).getAbsolutePath(), mappingTask.getSourceProxy());
VMDPinWidgetSource sourceWidget = (VMDPinWidgetSource) iNodeSource.getAnnotation(Costanti.PIN_WIDGET_TREE_TGD);
// INode iNodeTarget = finder.findNodeInSchema(variableCorrespondence.getTargetPath(), mappingTask.getTarget());
INode iNodeTarget = finder.findNodeInSchema(variableCorrespondence.getTargetPath().getAbsolutePath(), mappingTask.getTargetProxy());
VMDPinWidgetTarget targetWidget = (VMDPinWidgetTarget) iNodeTarget.getAnnotation(Costanti.PIN_WIDGET_TREE_TGD);
ConnectionWidget connection = new ConnectionWidget(glassPane.getScene());
connection.setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
connection.setSourceAnchor(AnchorFactory.createCenterAnchor(sourceWidget));
connection.setTargetAnchor(AnchorFactory.createRectangularAnchor(targetWidget));
Stroke stroke = Costanti.BASIC_STROKE;
connection.setStroke(stroke);
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setConnectionWidget(connection);
// connectionInfo.setVariableCorrespondence(variableCorrespondence);
connectionInfo.setVariableCorrespondence(variableCorrespondence);
connection.setToolTipText(connectionInfo.getVariableCorrespondence().toString());
glassPane.getConnectionLayer().addChild(connection, connectionInfo);
// connection.getActions().addAction(ActionFactory.createPopupMenuAction(new MyPopupProviderConnectionMappingTask(glassPane.getScene())));
// connection.getActions().addAction(ActionFactory.createSelectAction(new MySelectConnectionActionProvider(glassPane.getConnectionLayer())));
// analisiFiltro.creaWidgetEsisteFiltro(connection, connectionInfo);
glassPane.getScene().validate();
}
示例15: changeMandatory
import org.netbeans.api.visual.widget.ConnectionWidget; //导入方法依赖的package包/类
public void changeMandatory(boolean mandatary, String joinString) {
this.suffixMandatory = Boolean.toString(mandatary);
this.joinString = joinString;
for (ConnectionWidget connectionWidget : connections) {
// connectionWidget.setToolTipText("Mandatory = " + this.suffixMandatory + " Monodirectional = " + this.suffixForeignKey);
connectionWidget.setToolTipText(joinString);
if (mandatary) {
connectionWidget.setStroke(Costanti.DASHED_STROKE_THICK);
} else {
connectionWidget.setStroke(Costanti.DASHED_STROKE);
}
}
}