Esempio n. 1
0
  @Override
  public void removeBend(final int index) {
    final CBend path = m_paths.get(index);

    m_paths.remove(index);

    for (final IViewEdgeListener listener : m_listeners) {
      listener.removedBend(this, index, path);
    }
  }
Esempio n. 2
0
  @Override
  public void clearBends() {
    m_paths.clear();

    for (final IViewEdgeListener listener : m_listeners) {
      try {
        listener.clearedBends(this);
      } catch (final Exception exception) {
        exception.printStackTrace();
      }
    }
  }
Esempio n. 3
0
  @Override
  public void setY2(final double y2) {
    if (Double.compare(m_y2, y2) == 0) {
      return;
    }

    m_y2 = y2;

    for (final IViewEdgeListener listener : m_listeners) {
      listener.changedTargetY(this, y2);
    }
  }
Esempio n. 4
0
  @Override
  public void setY1(final double y1) {
    if (Double.compare(m_y1, y1) == 0) {
      return;
    }

    m_y1 = y1;

    for (final IViewEdgeListener listener : m_listeners) {
      listener.changedSourceY(this, y1);
    }
  }
Esempio n. 5
0
  @Override
  public void setX2(final double x2) {
    if (Double.compare(m_x2, x2) == 0) {
      return;
    }

    m_x2 = x2;

    for (final IViewEdgeListener listener : m_listeners) {
      listener.changedTargetX(this, x2);
    }
  }
Esempio n. 6
0
  @Override
  public void setX1(final double x1) {
    if (Double.compare(m_x1, x1) == 0) {
      return;
    }

    m_x1 = x1;

    for (final IViewEdgeListener listener : m_listeners) {
      listener.changedSourceX(this, x1);
    }
  }
Esempio n. 7
0
  @Override
  public void setVisible(final boolean visible) {
    if (m_visible == visible) {
      return;
    }

    m_visible = visible;

    for (final IViewEdgeListener listener : m_listeners) {
      listener.changedVisibility(this, m_visible);
    }
  }
Esempio n. 8
0
  @Override
  public void setSelected(final boolean selected) {
    if (m_selected == selected) {
      return;
    }

    m_selected = selected;

    for (final IViewEdgeListener listener : m_listeners) {
      listener.changedSelection(this, selected);
    }
  }
Esempio n. 9
0
  @Override
  public void setEdgeType(final EdgeType type) {
    Preconditions.checkNotNull(type, "Error: Type argument can't be null");

    if (type == m_type) {
      return;
    }

    m_type = type;

    for (final IViewEdgeListener listener : m_listeners) {
      listener.changedType(this, type);
    }
  }
Esempio n. 10
0
  @Override
  public void setColor(final Color color) {
    Preconditions.checkNotNull(color, "Error: Color argument can not be null");

    if (m_color.equals(color)) {
      return;
    }

    m_color = color;

    for (final IViewEdgeListener listener : m_listeners) {
      listener.changedColor(this, color);
    }
  }
Esempio n. 11
0
  @Override
  public void addBend(final double x, final double y) {
    final CBend path = new CBend(x, y);

    // if (m_paths.contains(path))
    // {
    // return;
    // }

    m_paths.add(path);

    for (final IViewEdgeListener listener : m_listeners) {
      try {
        listener.addedBend(this, path);
      } catch (final Exception exception) {
        exception.printStackTrace();
      }
    }
  }