当前位置: 首页>>代码示例>>Java>>正文


Java ConnectorState.REJECT_AND_STOP属性代码示例

本文整理汇总了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;
}
 
开发者ID:dbunibas,项目名称:spicy,代码行数:20,代码来源:ActionSceneConnection.java

示例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;
    }
 
开发者ID:dbunibas,项目名称:spicy,代码行数:21,代码来源:ActionUndefinedChainConnection.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:AcceptAction.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:AcceptAction.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:AcceptAction.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:AcceptAction.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:Utils.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:Utils.java

示例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;
}
 
开发者ID:jeddict,项目名称:NBModeler,代码行数:9,代码来源:SequenceFlowReconnectProvider.java

示例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;
}
 
开发者ID:dbunibas,项目名称:spicy,代码行数:13,代码来源:ActionSceneConnectionTarget.java

示例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;
}
 
开发者ID:dbunibas,项目名称:spicy,代码行数:12,代码来源:ActionFunctionalDepConnection.java

示例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;
}
 
开发者ID:dbunibas,项目名称:spicy,代码行数:10,代码来源:ActionMergeConnection.java

示例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;
}
 
开发者ID:dbunibas,项目名称:spicy,代码行数:6,代码来源:ActionConstantConnection.java

示例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;
}
 
开发者ID:dbunibas,项目名称:spicy,代码行数:6,代码来源:ActionFunctionConnection.java


注:本文中的org.netbeans.api.visual.action.ConnectorState.REJECT_AND_STOP属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。