本文整理汇总了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());
}
}
}
}
}
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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());
}
}
}
}
}
}
示例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)");
}
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}