本文整理了Java中org.gephi.graph.api.Edge.getTextProperties()
方法的一些代码示例,展示了Edge.getTextProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Edge.getTextProperties()
方法的具体详情如下:
包路径:org.gephi.graph.api.Edge
类名称:Edge
方法名:getTextProperties
暂无
代码示例来源:origin: org.gephi/tools-plugin
public void setLabelsSize(Float size) {
labelsSize = size;
for (Edge edge : edges) {
TextProperties textProps = edge.getTextProperties();
textProps.setSize(size);
}
}
代码示例来源:origin: org.gephi/visualization
@Override
public float getTextB() {
return edge.getTextProperties().getB();
}
代码示例来源:origin: org.gephi/tools-plugin
public void setLabelColor(Color c) {
if (c != null) {
TextProperties textProps = edge.getTextProperties();
textProps.setColor(c);
}
}
}
代码示例来源:origin: org.gephi/tools-plugin
public void setLabelsVisible(Boolean visible) {
labelsVisible = visible;
for (Edge edge : edges) {
TextProperties textProps = edge.getTextProperties();
textProps.setVisible(visible);
}
}
}
代码示例来源:origin: org.gephi/visualization
@Override
public float getTextSize() {
return edge.getTextProperties().getSize();
}
代码示例来源:origin: org.gephi/visualization
@Override
public float getTextR() {
return edge.getTextProperties().getR();
}
代码示例来源:origin: org.gephi/visualization
@Override
public float getTextG() {
return edge.getTextProperties().getG();
}
代码示例来源:origin: org.gephi/visualization
@Override
public boolean isTextVisible() {
return edge.getTextProperties().isVisible();
}
代码示例来源:origin: org.gephi/visualization
@Override
public boolean hasCustomTextColor() {
return edge.getTextProperties().getAlpha() > 0;
}
代码示例来源:origin: org.gephi/visualization
@Override
public void setText(String text) {
edge.getTextProperties().setText(text);
}
代码示例来源:origin: org.gephi/visualization
@Override
public float getTextWidth() {
return edge.getTextProperties().getWidth();
}
代码示例来源:origin: org.gephi/visualization
@Override
public float getTextHeight() {
return edge.getTextProperties().getHeight();
}
代码示例来源:origin: org.gephi/visualization
@Override
public String getText() {
return edge.getTextProperties().getText();
}
代码示例来源:origin: org.gephi/visualization
@Override
public float getTextAlpha() {
return edge.getTextProperties().getAlpha();
}
代码示例来源:origin: org.gephi/tools-plugin
public Color getLabelColor() {
TextProperties textProps = edge.getTextProperties();
if (textProps.getAlpha() == 0) {
return null;//Not specific color for label
}
return textProps.getColor();
}
代码示例来源:origin: org.gephi/tools-plugin
public void setLabelsColor(Color c) {
if (c != null) {
labelsColor = c;
for (Edge edge : edges) {
TextProperties textProps = edge.getTextProperties();
textProps.setR(c.getRed() / 255f);
textProps.setG(c.getGreen() / 255f);
textProps.setB(c.getBlue() / 255f);
textProps.setAlpha(c.getAlpha() / 255f);
}
}
}
代码示例来源:origin: org.gephi/visualization
@Override
public void actionPerformed(ActionEvent evt) {
GraphController gc = Lookup.getDefault().lookup(GraphController.class);
GraphModel gm = gc.getGraphModel();
Graph graph = gm.getGraphVisible();
for (Node n : graph.getNodes()) {
n.getTextProperties().setVisible(true);
}
for (Edge e : graph.getEdges()) {
e.getTextProperties().setVisible(true);
}
}
});
代码示例来源:origin: org.gephi/visualization
public boolean refreshEdge(Graph graph, EdgeModel edge, TextModelImpl modelImpl) {
TextProperties textData = edge.getEdge().getTextProperties();
if (textData != null) {
String txt = textData.getText();
String newTxt = buildText(graph, edge.getEdge(), modelImpl.getEdgeTextColumns());
if ((txt == null && newTxt != null) || (txt != null && newTxt == null)
|| (txt != null && newTxt != null && !txt.equals(newTxt))) {
edge.setText(newTxt);
return true;
}
}
edgeRefresh = true;
return false;
}
代码示例来源:origin: org.gephi/visualization
@Override
public void actionPerformed(ActionEvent evt) {
GraphController gc = Lookup.getDefault().lookup(GraphController.class);
GraphModel gm = gc.getGraphModel();
Graph graph = gm.getGraphVisible();
for (Node n : graph.getNodes().toArray()) {
n.getTextProperties().setColor(Color.BLACK);
n.getTextProperties().setAlpha(0f);
}
for (Edge e : graph.getEdges().toArray()) {
e.getTextProperties().setColor(Color.BLACK);
e.getTextProperties().setAlpha(0f);
}
}
});
代码示例来源:origin: org.gephi/preview-plugin
@Override
public Item[] getItems(Graph graph) {
//Build text
VisualizationController vizController = Lookup.getDefault().lookup(VisualizationController.class);
Column[] edgeColumns = vizController != null ? vizController.getEdgeTextColumns() : null;
List<Item> items = new ArrayList<>();
for (Edge e : graph.getEdges()) {
EdgeLabelItem labelItem = new EdgeLabelItem(e);
String label = getLabel(e, edgeColumns, graph.getView());
labelItem.setData(EdgeLabelItem.LABEL, label);
TextProperties textData = e.getTextProperties();
if (textData != null) {
if (textData.getAlpha() != 0) {
labelItem.setData(EdgeLabelItem.COLOR, textData.getColor());
}
// labelItem.setData(EdgeLabelItem.WIDTH, textData.getWidth());
// labelItem.setData(EdgeLabelItem.HEIGHT, textData.getHeight());
labelItem.setData(EdgeLabelItem.SIZE, textData.getSize());
labelItem.setData(EdgeLabelItem.VISIBLE, textData.isVisible());
if (textData.isVisible()) {
items.add(labelItem);
}
} else if (label != null && !label.isEmpty()) {
items.add(labelItem);
}
}
return items.toArray(new Item[0]);
}
内容来源于网络,如有侵权,请联系作者删除!