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


Java Properties.PropertySelector方法代码示例

本文整理汇总了Java中com.sun.hotspot.igv.data.Properties.PropertySelector方法的典型用法代码示例。如果您正苦于以下问题:Java Properties.PropertySelector方法的具体用法?Java Properties.PropertySelector怎么用?Java Properties.PropertySelector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.hotspot.igv.data.Properties的用法示例。


在下文中一共展示了Properties.PropertySelector方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: apply

import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
@Override
public void apply(Diagram diagram) {

    Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<>(diagram.getFigures());
    for (ConnectionStyleRule rule : connectionStyleRules) {
        List<Figure> figures = null;
        if (rule.getSelector() != null) {
            figures = rule.getSelector().selected(diagram);
        } else {
            figures = diagram.getFigures();
        }

        for (Figure f : figures) {
            for (OutputSlot os : f.getOutputSlots()) {
                for (Connection c : os.getConnections()) {
                    if (figures.contains(c.getInputSlot().getFigure())) {
                        c.setStyle(rule.getLineStyle());
                        c.setColor(rule.getLineColor());
                    }
                }
            }
        }
    }
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:25,代码来源:ConnectionFilter.java

示例2: BytecodeNode

import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
public BytecodeNode(InputBytecode bytecode, InputGraph graph, String bciValue) {

        super(Children.LEAF);
        String displayName = bytecode.getBci() + " " + bytecode.getName() + " " + bytecode.getOperands();

        bciValue = bytecode.getBci() + " " + bciValue;
        bciValue = bciValue.trim();

        Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<>(graph.getNodes());
        StringPropertyMatcher matcher = new StringPropertyMatcher("bci", bciValue);
        List<InputNode> nodeList = selector.selectMultiple(matcher);
        if (nodeList.size() > 0) {
            nodes = new LinkedHashSet<>();
            for (InputNode n : nodeList) {
                nodes.add(n);
            }
            displayName += " (" + nodes.size() + " nodes)";
        }
        
        if (bytecode.getComment() != null) {
            displayName += " // " + bytecode.getComment();
        }
        
        this.setDisplayName(displayName);
    }
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:26,代码来源:BytecodeNode.java

示例3: getRootFigure

import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
public Figure getRootFigure() {
    Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<>(figures);
    Figure root = selector.selectSingle(new StringPropertyMatcher("name", "Root"));
    if (root == null) {
        root = selector.selectSingle(new StringPropertyMatcher("name", "Start"));
    }
    if (root == null) {
        List<Figure> rootFigures = getRootFigures();
        if (rootFigures.size() > 0) {
            root = rootFigures.get(0);
        } else if (figures.size() > 0) {
            root = figures.get(0);
        }
    }

    return root;
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:18,代码来源:Diagram.java

示例4: findMatches

import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
private List<InputNode> findMatches(String name, String value, InputGraph inputGraph, SearchResponse response) {
    try {
        RegexpPropertyMatcher matcher = new RegexpPropertyMatcher(name, value, Pattern.CASE_INSENSITIVE);
        Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<>(inputGraph.getNodes());
        List<InputNode> matches = selector.selectMultiple(matcher);
        return matches.size() == 0 ? null : matches;
    } catch (Exception e) {
        final String msg = e.getMessage();
        response.addResult(new Runnable() {
            @Override
            public void run() {
                Message desc = new NotifyDescriptor.Message("An exception occurred during the search, "
                        + "perhaps due to a malformed query string:\n" + msg,
                        NotifyDescriptor.WARNING_MESSAGE);
                DialogDisplayer.getDefault().notify(desc);
            }
        },
                "(Error during search)"
        );
    }
    return null;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:NodeQuickSearch.java

示例5: BytecodeNode

import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
public BytecodeNode(InputBytecode bytecode, InputGraph graph, String bciValue) {

        super(Children.LEAF);
        String displayName = bytecode.getBci() + " " + bytecode.getName() + " " + bytecode.getOperands();

        bciValue = bytecode.getBci() + " " + bciValue;
        bciValue = bciValue.trim();

        Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<>(graph.getNodes());
        StringPropertyMatcher matcher = new StringPropertyMatcher("bci", bciValue);
        List<InputNode> nodeList = selector.selectMultiple(matcher);
        if (nodeList.size() > 0) {
            nodes = new LinkedHashSet<>();
            for (InputNode n : nodeList) {
                nodes.add(n);
            }
            displayName += " (" + nodes.size() + " nodes)";
        }

        if (bytecode.getComment() != null) {
            displayName += " // " + bytecode.getComment();
        }

        this.setDisplayName(displayName);
    }
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:26,代码来源:BytecodeNode.java

示例6: apply

import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
public void apply(Diagram diagram) {

        Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(diagram.getFigures());
        for (ConnectionStyleRule rule : connectionStyleRules) {
            List<Figure> figures = null;
            if (rule.getSelector() != null) {
                figures = rule.getSelector().selected(diagram);
            } else {
                figures = diagram.getFigures();
            }

            for (Figure f : figures) {
                for (OutputSlot os : f.getOutputSlots()) {
                    for (Connection c : os.getConnections()) {
                        if (figures.contains(c.getInputSlot().getFigure())) {
                            c.setStyle(rule.getLineStyle());
                            c.setColor(rule.getLineColor());
                        }
                    }
                }
            }
        }
    }
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:24,代码来源:ConnectionFilter.java

示例7: BytecodeNode

import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
public BytecodeNode(InputBytecode bytecode, InputGraph graph, String bciValue) {

        super(Children.LEAF);
        this.setDisplayName(bytecode.getBci() + " " + bytecode.getName());

        bciValue = bytecode.getBci() + " " + bciValue;
        bciValue = bciValue.trim();

        Properties.PropertySelector<InputNode> selector = new Properties.PropertySelector<InputNode>(graph.getNodes());
        StringPropertyMatcher matcher = new StringPropertyMatcher("bci", bciValue);
        List<InputNode> nodeList = selector.selectMultiple(matcher);
        if (nodeList.size() > 0) {
            nodes = new HashSet<InputNode>();
            for (InputNode n : nodeList) {
                nodes.add(n);
            }
            this.setDisplayName(this.getDisplayName() + " (" + nodes.size() + " nodes)");
        }
    }
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:20,代码来源:BytecodeNode.java

示例8: getRootFigure

import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
public Figure getRootFigure() {
    Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(figures);
    Figure root = selector.selectSingle("name", "Root");
    if (root == null) {
        root = selector.selectSingle("name", "Start");
    }
    if (root == null) {
        List<Figure> rootFigures = getRootFigures();
        if (rootFigures.size() > 0) {
            root = rootFigures.get(0);
        } else if (figures.size() > 0) {
            root = figures.get(0);
        }
    }

    return root;
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:18,代码来源:Diagram.java

示例9: setSelection

import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
public void setSelection(PropertyMatcher matcher) {

        Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(scene.getModel().getDiagramToView().getFigures());
        List<Figure> list = selector.selectMultiple(matcher);
        boolean b = scene.getUndoRedoEnabled();
        scene.setUndoRedoEnabled(false);
        scene.gotoFigures(list);
        scene.setUndoRedoEnabled(b);
        scene.setSelection(list);
    }
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:11,代码来源:EditorTopComponent.java

示例10: setSelection

import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
public void setSelection(PropertyMatcher matcher) {

        Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<>(getModel().getDiagramToView().getFigures());
        List<Figure> list = selector.selectMultiple(matcher);
        setSelectedFigures(list);
    }
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:7,代码来源:EditorTopComponent.java

示例11: selected

import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
@Override
public List<Figure> selected(Diagram d) {
    Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<>(d.getFigures());
    List<Figure> list = selector.selectMultiple(matcher);
    return list;
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:7,代码来源:MatcherSelector.java

示例12: selected

import com.sun.hotspot.igv.data.Properties; //导入方法依赖的package包/类
public List<Figure> selected(Diagram d) {
    Properties.PropertySelector<Figure> selector = new Properties.PropertySelector<Figure>(d.getFigures());
    List<Figure> list = selector.selectMultiple(matcher);
    return list;
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:6,代码来源:MatcherSelector.java


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