Package com.google.devtools.depan.model

Examples of com.google.devtools.depan.model.GraphEdge


  }

  @Override
  public Object getValue(Object element, String property) {
    if (element instanceof GraphEdge) {
      GraphEdge edge = (GraphEdge) element;
      if (property.equals(COL_SOURCE)) {
        return edge.getHead().friendlyString();
      }
      if (property.equals(COL_RELATION)) {
        return edge.getRelation().toString();
      }
      if (property.equals(COL_TARGET)) {
        return edge.getTail().friendlyString();
      }

      EdgeDisplayProperty edgeProps = getDisplayProperty(edge);
      if (property.equals(COL_LINE_STYLE)) {
        return edgeProps.getLineStyle().ordinal();
View Full Code Here


    Object modifiedObject = ((TableItem) element).getData();
    if (!(modifiedObject instanceof GraphEdge)) {
      return;
    }

    GraphEdge edge = (GraphEdge) modifiedObject;
    EdgeDisplayProperty edgeProps = getMutableDisplayProperty(edge);

    if (property.equals(COL_LINE_STYLE) && (value instanceof Integer)) {
      edgeProps.setLineStyle(LineStyle.values()[(Integer) value]);
    } else if (property.equals(COL_ARROWHEAD) && (value instanceof Integer)) {
View Full Code Here

     * @return Text associated with this element for the given index.
     */
    @Override
    public String getColumnText(Object element, int columnIndex) {
      if (element instanceof GraphEdge) {
        GraphEdge edge = (GraphEdge) element;
        EdgeDisplayProperty edgeProps = getDisplayProperty(edge);
        switch (columnIndex) {
        case 0:
          // return the displayName of the path matcher term, trim just in case
          return edge.getHead().friendlyString();
        case 1:
          return edge.getRelation().toString();
        case 2:
          return edge.getTail().friendlyString();
        case 3:
          return edgeProps.getLineStyle().getDisplayName().toLowerCase();
        case 4:
          return edgeProps.getArrowhead().getDisplayName().toLowerCase();
        case 5:
View Full Code Here

TOP

Related Classes of com.google.devtools.depan.model.GraphEdge

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.