org.gephi.graph.api.Edge.getLabel()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(181)

本文整理了Java中org.gephi.graph.api.Edge.getLabel()方法的一些代码示例,展示了Edge.getLabel()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Edge.getLabel()方法的具体详情如下:
包路径:org.gephi.graph.api.Edge
类名称:Edge
方法名:getLabel

Edge.getLabel介绍

暂无

代码示例

代码示例来源:origin: org.gephi/preview-plugin

private String getLabel(Edge e, Column[] cols, GraphView view) {
  String str = "";
  if (cols != null) {
    int i = 0;
    for (Column c : cols) {
      if (i++ > 0) {
        str += " - ";
      }
      Object val = e.getAttribute(c, view);
      str += val != null ? val : "";
    }
  }
  if (str.isEmpty()) {
    str = e.getLabel();
  }
  if (str == null) {
    str = "";
  }
  return str;
}

代码示例来源:origin: gephi/graphstore

private void copyEdgeProperties(Edge edge, Edge edgeCopy) {
  edgeCopy.setColor(edge.getColor());
  edgeCopy.setLabel(edge.getLabel());
}

代码示例来源:origin: org.gephi/graphstore

private void copyEdgeProperties(Edge edge, Edge edgeCopy) {
  edgeCopy.setColor(edge.getColor());
  edgeCopy.setLabel(edge.getLabel());
}

代码示例来源:origin: org.gephi/tools-plugin

/**
 * Single edge edition mode will always be enabled with this single node
 * constructor
 *
 * @param edge
 */
public EditEdges(Edge edge) {
  super(Children.LEAF);
  this.edges = new Edge[]{edge};
  setName(edge.getLabel());
  multipleEdges = false;
  GraphController gc = Lookup.getDefault().lookup(GraphController.class);
  currentTimeFormat = gc.getGraphModel().getTimeFormat();
  dateTimeZone = gc.getGraphModel().getTimeZone();
}

代码示例来源:origin: org.gephi/datalab-plugin

private void refreshRows() {
  rows = columnsAndRowChooser.getRows();
  Object sourceRow = columnsAndRowChooser.getRow();
  Node node;
  Edge edge;
  //Prepare combo box with nodes/edges data:
  for (int i = 0; i < rows.length; i++) {
    if (rows[i] instanceof Node) {
      node = (Node) rows[i];
      rowComboBox.addItem(node.getId() + " - " + node.getLabel());
    } else {
      edge = (Edge) rows[i];
      rowComboBox.addItem(edge.getId() + " - " + edge.getLabel());
    }
    if (rows[i] == sourceRow) {
      rowComboBox.setSelectedIndex(i);
    }
  }
}

代码示例来源:origin: org.gephi/tools-plugin

/**
 * If the edges array has more than one element, multiple edges edition mode
 * will be enabled.
 *
 * @param edges
 */
public EditEdges(Edge[] edges) {
  super(Children.LEAF);
  this.edges = edges;
  multipleEdges = edges.length > 1;
  if (multipleEdges) {
    setName(NbBundle.getMessage(EditEdges.class, "EditEdges.multiple.elements"));
  } else {
    setName(edges[0].getLabel());
  }
  GraphController gc = Lookup.getDefault().lookup(GraphController.class);
  currentTimeFormat = gc.getGraphModel().getTimeFormat();
  dateTimeZone = gc.getGraphModel().getTimeZone();
}

代码示例来源:origin: org.gephi/tools-plugin

set.setDisplayName(NbBundle.getMessage(EditEdges.class, "EditEdges.attributes.text.multiple"));
} else {
  set.setDisplayName(NbBundle.getMessage(EditEdges.class, "EditEdges.attributes.text", edges[0].getLabel()));

代码示例来源:origin: org.gephi/tools-plugin

Sheet.Set set = new Sheet.Set();
set.setName("properties");
set.setDisplayName(NbBundle.getMessage(EditEdges.class, "EditEdges.properties.text", edge.getLabel()));

相关文章