本文整理汇总了Java中org.netbeans.api.visual.action.ConnectorState.REJECT_AND_STOP属性的典型用法代码示例。如果您正苦于以下问题:Java ConnectorState.REJECT_AND_STOP属性的具体用法?Java ConnectorState.REJECT_AND_STOP怎么用?Java ConnectorState.REJECT_AND_STOP使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.netbeans.api.visual.action.ConnectorState
的用法示例。
在下文中一共展示了ConnectorState.REJECT_AND_STOP属性的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isTargetWidget
public ConnectorState isTargetWidget(Widget source, Widget target) {
//TODO implementare acnhe la condizione verso una funzione
if ((source instanceof VMDPinWidgetSource && target instanceof VMDPinWidgetTarget) && (source != target) && (target.isEnabled())) {
return ConnectorState.ACCEPT;
}
if ((source instanceof VMDPinWidgetSource && target instanceof FunctionWidget) && (source != target)) {
return ConnectorState.ACCEPT;
}
if ((source instanceof VMDPinWidgetSource && target instanceof VMDPinWidgetSource) && (source != target) && (target.isEnabled())) {
return ConnectorState.ACCEPT;
}
if ((source instanceof VMDPinWidgetSource && target instanceof FunctionalDependencyWidget) && (source != target) && (target.isEnabled())) {
CaratteristicheWidgetInterFunctionalDep caratteristiche = (CaratteristicheWidgetInterFunctionalDep) target.getParentWidget().getChildConstraint(target);
if (caratteristiche.isSource() == null || caratteristiche.isSource()) {
caratteristiche.setSource(Boolean.TRUE);
return ConnectorState.ACCEPT;
}
}
return ConnectorState.REJECT_AND_STOP;
}
示例2: isTargetWidget
public ConnectorState isTargetWidget(Widget sourceWidget, Widget targetWidget) {
if ((sourceWidget instanceof ChainWidget && targetWidget instanceof ChainWidget) && (sourceWidget != targetWidget)) {
CaratteristicheWidgetChainComposition caratteristicheWidgetChainCompositionSource = (CaratteristicheWidgetChainComposition) mainLayer.getChildConstraint(sourceWidget);
CaratteristicheWidgetChainComposition caratteristicheWidgetChainCompositionTarget = (CaratteristicheWidgetChainComposition) mainLayer.getChildConstraint(targetWidget);
MutableMappingTask mutableMappingTaskSource = caratteristicheWidgetChainCompositionSource.getMutableMappingTask();
MutableMappingTask mutableMappingTaskTarget = caratteristicheWidgetChainCompositionTarget.getMutableMappingTask();
if ((caratteristicheWidgetChainCompositionTarget.getSourceScenario() == null) && !mutableMappingTaskTarget.mutableMappingTasksContains(mutableMappingTaskSource) && !mutableMappingTaskSource.mutableMappingTasksContains(mutableMappingTaskTarget)) {
return ConnectorState.ACCEPT;
}
} else if ((sourceWidget instanceof ChainWidget && targetWidget instanceof MergeWidget) && (sourceWidget != targetWidget)) {
// CaratteristicheWidgetComposition caratteristicheWidgetCompositionSource = (CaratteristicheWidgetComposition) mainLayer.getChildConstraint(sourceWidget);
// CaratteristicheWidgetMergeComposition CaratteristicheWidgetMergeCompositionTarget = (CaratteristicheWidgetMergeComposition) mainLayer.getChildConstraint(targetWidget);
// MutableMappingTask mutableMappingTaskSource = caratteristicheWidgetCompositionSource.getMutableMappingTask();
// MutableMappingTask mutableMappingTaskTarget = CaratteristicheWidgetMergeCompositionTarget.getMutableMappingTask();
// if (||!mutableMappingTaskTarget.mutableMappingTasksContains(mutableMappingTaskSource) && !mutableMappingTaskSource.mutableMappingTasksContains(mutableMappingTaskTarget)) {
return ConnectorState.ACCEPT;
// }
}
return ConnectorState.REJECT_AND_STOP;
}
示例3: dragEnter
public State dragEnter (Widget widget, WidgetDropTargetDragEvent event) {
ConnectorState acceptable = provider.isAcceptable (widget, event.getPoint (), event.getTransferable ());
if (acceptable == ConnectorState.ACCEPT) {
event.acceptDrag (DnDConstants.ACTION_COPY_OR_MOVE);
return State.CONSUMED;
} else if (acceptable == ConnectorState.REJECT_AND_STOP) {
event.rejectDrag ();
return State.CONSUMED;
}
return State.REJECTED;
}
示例4: dragOver
public State dragOver (Widget widget, WidgetDropTargetDragEvent event) {
ConnectorState acceptable = provider.isAcceptable (widget, event.getPoint (), event.getTransferable ());
if (acceptable == ConnectorState.ACCEPT) {
event.acceptDrag (DnDConstants.ACTION_COPY_OR_MOVE);
return State.CONSUMED;
} else if (acceptable == ConnectorState.REJECT_AND_STOP) {
event.rejectDrag ();
return State.CONSUMED;
}
return State.REJECTED;
}
示例5: dropActionChanged
public State dropActionChanged (Widget widget, WidgetDropTargetDragEvent event) {
ConnectorState acceptable = provider.isAcceptable (widget, event.getPoint (), event.getTransferable ());
if (acceptable == ConnectorState.ACCEPT) {
event.acceptDrag (DnDConstants.ACTION_COPY_OR_MOVE);
return State.CONSUMED;
} else if (acceptable == ConnectorState.REJECT_AND_STOP) {
event.rejectDrag ();
return State.CONSUMED;
}
return State.REJECTED;
}
示例6: drop
public State drop (Widget widget, WidgetDropTargetDropEvent event) {
ConnectorState acceptable = provider.isAcceptable (widget, event.getPoint (), event.getTransferable ());
if (acceptable == ConnectorState.ACCEPT) {
event.acceptDrop (DnDConstants.ACTION_COPY_OR_MOVE);
provider.accept (widget, event.getPoint (), event.getTransferable ());
return State.CONSUMED;
} else if (acceptable == ConnectorState.REJECT_AND_STOP) {
event.rejectDrop ();
return State.CONSUMED;
}
return State.REJECTED;
}
示例7: isTargetWidget
public ConnectorState isTargetWidget(Widget sourceWidget, Widget targetWidget) {
Object object = findObject(targetWidget);
target = isNode(object) ? (String) object : null;
if (target != null) {
return !source.equals(target) ? ConnectorState.ACCEPT : ConnectorState.REJECT_AND_STOP;
}
return object != null ? ConnectorState.REJECT_AND_STOP : ConnectorState.REJECT;
}
示例8: isReplacementWidget
public ConnectorState isReplacementWidget(ConnectionWidget connectionWidget, Widget replacementWidget, boolean reconnectingSource) {
Object object = findObject(replacementWidget);
replacementNode = isNode(object) ? (String) object : null;
if (replacementNode != null) {
return ConnectorState.ACCEPT;
}
return object != null ? ConnectorState.REJECT_AND_STOP : ConnectorState.REJECT;
}
示例9: isReplacementWidget
@Override
public ConnectorState isReplacementWidget(ConnectionWidget connectionWidget, Widget replacementWidget, boolean reconnectingSource) {
Object object = scene.findObject(replacementWidget);
replacementNode = scene.isNode(object) ? (NodeWidgetInfo) object : null;
if (replacementNode != null) {
return ConnectorState.ACCEPT;
}
return object != null ? ConnectorState.REJECT_AND_STOP : ConnectorState.REJECT;
}
示例10: isTargetWidget
public ConnectorState isTargetWidget(Widget source, Widget target) {
if ((source instanceof VMDPinWidgetTarget && target instanceof VMDPinWidgetTarget)) {
return ConnectorState.ACCEPT;
}
if ((source instanceof VMDPinWidgetTarget && target instanceof FunctionalDependencyWidget) && (source != target) && (target.isEnabled())) {
CaratteristicheWidgetInterFunctionalDep caratteristiche = (CaratteristicheWidgetInterFunctionalDep) target.getParentWidget().getChildConstraint(target);
if (caratteristiche.isSource() == null || !caratteristiche.isSource()) {
caratteristiche.setSource(Boolean.FALSE);
return ConnectorState.ACCEPT;
}
}
return ConnectorState.REJECT_AND_STOP;
}
示例11: isTargetWidget
public ConnectorState isTargetWidget(Widget source, Widget target) {
if (caratteristiche.isSource()) {
if ((source instanceof FunctionalDependencyWidget && target instanceof VMDPinWidgetSource) && (source != target) && target.isEnabled()) {
return ConnectorState.ACCEPT;
}
} else {
if ((source instanceof FunctionalDependencyWidget && target instanceof VMDPinWidgetTarget) && (source != target) && target.isEnabled()) {
return ConnectorState.ACCEPT;
}
}
return ConnectorState.REJECT_AND_STOP;
}
示例12: isTargetWidget
public ConnectorState isTargetWidget(Widget sourceWidget, Widget targetWidget) {
if ((sourceWidget instanceof MergeWidget && targetWidget instanceof ChainWidget) && (sourceWidget != targetWidget)) {
CaratteristicheWidgetMergeComposition caratteristicheWidgetMergeCompositionSource = (CaratteristicheWidgetMergeComposition) mainLayer.getChildConstraint(sourceWidget);
CaratteristicheWidgetChainComposition caratteristicheWidgetChainCompositionTarget = (CaratteristicheWidgetChainComposition) mainLayer.getChildConstraint(targetWidget);
if (controllaContenimento(caratteristicheWidgetMergeCompositionSource, caratteristicheWidgetChainCompositionTarget)) {
return ConnectorState.ACCEPT;
}
}
return ConnectorState.REJECT_AND_STOP;
}
示例13: isTargetWidget
public ConnectorState isTargetWidget(Widget sourceWidget, Widget targetWidget) {
if ((sourceWidget instanceof ConstantWidget && targetWidget instanceof VMDPinWidgetTarget) && (sourceWidget != targetWidget) && targetWidget.isEnabled()) {
return ConnectorState.ACCEPT;
}
return ConnectorState.REJECT_AND_STOP;
}
示例14: isTargetWidget
public ConnectorState isTargetWidget(Widget arg0, Widget arg1) {
if ((arg0 instanceof FunctionWidget && arg1 instanceof VMDPinWidgetTarget) && (arg0 != arg1) && arg1.isEnabled()) {
return ConnectorState.ACCEPT;
}
return ConnectorState.REJECT_AND_STOP;
}