CloneSet54


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
126210.963class_body_declarations[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11322337
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java
21262428
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java
Next
Last
Clone Instance
1
Line Count
132
Source Line
2337
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java

/**
 * Clears all the range markers for the specified renderer.
 *
 * @param index  the renderer index.
 *
 * @see #clearDomainMarkers(int)
 */
public void clearRangeMarkers(int index) {
  Integer key = new Integer(index);
  if (this.backgroundRangeMarkers != null) {
    Collection markers = (Collection) this.backgroundRangeMarkers.get(key);
    if (markers != null) {
      Iterator iterator = markers.iterator();
      while (iterator.hasNext()) {
        Marker m = (Marker) iterator.next();
        m.removeChangeListener(this );
      }
      markers.clear();
    }
  }
  if (this.foregroundRangeMarkers != null) {
    Collection markers = (Collection) this.foregroundRangeMarkers.get(key);
    if (markers != null) {
      Iterator iterator = markers.iterator();
      while (iterator.hasNext()) {
        Marker m = (Marker) iterator.next();
        m.removeChangeListener(this );
      }
      markers.clear();
    }
  }
  fireChangeEvent();
}

/**
 * Removes a marker for the range axis and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 *
 * @param marker the marker.
 *
 * @return A boolean indicating whether or not the marker was actually
 *         removed.
 *
 * @since 1.0.7
 *
 * @see #addRangeMarker(Marker)
 */
public boolean removeRangeMarker(Marker marker) {
  return removeRangeMarker(marker, Layer.FOREGROUND);
}

/**
 * Removes a marker for the range axis in the specified layer and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param marker the marker (<code>null</code> not permitted).
 * @param layer the layer (foreground or background).
 *
 * @return A boolean indicating whether or not the marker was actually
 *         removed.
 *
 * @since 1.0.7
 *
 * @see #addRangeMarker(Marker, Layer)
 */
public boolean removeRangeMarker(Marker marker, Layer layer) {
  return removeRangeMarker(0, marker, layer);
}

/**
 * Removes a marker for a specific dataset/renderer and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param index the dataset/renderer index.
 * @param marker the marker.
 * @param layer the layer (foreground or background).
 *
 * @return A boolean indicating whether or not the marker was actually
 *         removed.
 *
 * @since 1.0.7
 *
 * @see #addRangeMarker(int, Marker, Layer)
 */
public boolean removeRangeMarker(int index, Marker marker, Layer layer) {
  return removeRangeMarker(index, marker, layer, true);
}

/**
 * Removes a marker for a specific dataset/renderer and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param index  the dataset/renderer index.
 * @param marker  the marker.
 * @param layer  the layer (foreground or background).
 * @param notify  notify listeners.
 *
 * @return A boolean indicating whether or not the marker was actually
 *         removed.
 *
 * @since 1.0.10
 *
 * @see #addRangeMarker(int, Marker, Layer, boolean)
 */
public boolean removeRangeMarker(int index, Marker marker, Layer layer, boolean notify) {
  if (marker == null) {
    throw new IllegalArgumentException("Null \'marker\' argument.");
  }
  ArrayList markers;
  if (layer == Layer.FOREGROUND) {
    markers = (ArrayList) this.foregroundRangeMarkers.get(new Integer(index));
  }
  else {
    markers = (ArrayList) this.backgroundRangeMarkers.get(new Integer(index));
  }
  if (markers == null) {
    return false;
  }
  boolean removed = markers.remove(marker);
  if (removed && notify) {
    fireChangeEvent();
  }
  return removed;
}

/**
 * Returns a flag indicating whether or not the range crosshair is visible.
 *
 * @return The flag.
 *
 * @see #setRangeCrosshairVisible(boolean)
 */
public boolean isRangeCrosshairVisible() {
  return this.rangeCrosshairVisible;
}


First
Previous
Clone Instance
2
Line Count
126
Source Line
2428
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java

/**
 * Clears the (foreground and background) range markers for a particular
 * renderer.
 *
 * @param index  the renderer index.
 */
public void clearRangeMarkers(int index) {
  Integer key = new Integer(index);
  if (this.backgroundRangeMarkers != null) {
    Collection markers = (Collection) this.backgroundRangeMarkers.get(key);
    if (markers != null) {
      Iterator iterator = markers.iterator();
      while (iterator.hasNext()) {
        Marker m = (Marker) iterator.next();
        m.removeChangeListener(this );
      }
      markers.clear();
    }
  }
  if (this.foregroundRangeMarkers != null) {
    Collection markers = (Collection) this.foregroundRangeMarkers.get(key);
    if (markers != null) {
      Iterator iterator = markers.iterator();
      while (iterator.hasNext()) {
        Marker m = (Marker) iterator.next();
        m.removeChangeListener(this );
      }
      markers.clear();
    }
  }
  fireChangeEvent();
}

/**
 * Removes a marker for the range axis and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 *
 * @param marker the marker.
 *
 * @return A boolean indicating whether or not the marker was actually
 *         removed.
 *
 * @since 1.0.7
 */
public boolean removeRangeMarker(Marker marker) {
  return removeRangeMarker(marker, Layer.FOREGROUND);
}

/**
 * Removes a marker for the range axis in the specified layer and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param marker the marker (<code>null</code> not permitted).
 * @param layer the layer (foreground or background).
 *
 * @return A boolean indicating whether or not the marker was actually
 *         removed.
 *
 * @since 1.0.7
 */
public boolean removeRangeMarker(Marker marker, Layer layer) {
  return removeRangeMarker(0, marker, layer);
}

/**
 * Removes a marker for a specific dataset/renderer and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param index the dataset/renderer index.
 * @param marker the marker.
 * @param layer the layer (foreground or background).
 *
 * @return A boolean indicating whether or not the marker was actually
 *         removed.
 *
 * @since 1.0.7
 */
public boolean removeRangeMarker(int index, Marker marker, Layer layer) {
  return removeRangeMarker(index, marker, layer, true);
}

/**
 * Removes a marker for a specific dataset/renderer and sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param index  the dataset/renderer index.
 * @param marker  the marker.
 * @param layer  the layer (foreground or background).
 * @param notify  notify listeners?
 *
 * @return A boolean indicating whether or not the marker was actually
 *         removed.
 *
 * @since 1.0.10
 */
public boolean removeRangeMarker(int index, Marker marker, Layer layer, boolean notify) {
  if (marker == null) {
    throw new IllegalArgumentException("Null \'marker\' argument.");
  }
  ArrayList markers;
  if (layer == Layer.FOREGROUND) {
    markers = (ArrayList) this.foregroundRangeMarkers.get(new Integer(index));
  }
  else {
    markers = (ArrayList) this.backgroundRangeMarkers.get(new Integer(index));
  }
  if (markers == null) {
    return false;
  }
  boolean removed = markers.remove(marker);
  if (removed && notify) {
    fireChangeEvent();
  }
  return removed;
}

/**
 * Adds an annotation to the plot and sends a {@link PlotChangeEvent} to
 * all registered listeners.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 *
 * @see #getAnnotations()
 * @see #removeAnnotation(XYAnnotation)
 */
public void addAnnotation(XYAnnotation annotation) {
  addAnnotation(annotation, true);
}


Clone AbstractionParameter Count: 1Parameter Bindings

/**
     * Clears the (foreground and background) range markers for a particular
     * renderer.
     *
     * @param index  the renderer index.
     */
/**
     * Clears all the range markers for the specified renderer.
     *
     * @param index  the renderer index.
     *
     * @see #clearDomainMarkers(int)
     */
public void clearRangeMarkers(int index) {
  Integer key = new Integer(index);
  if (this.backgroundRangeMarkers != null) {
    Collection markers = (Collection) this.backgroundRangeMarkers.get(key);
    if (markers != null) {
      Iterator iterator = markers.iterator();
      while (iterator.hasNext()) {
        Marker m = (Marker) iterator.next();
        m.removeChangeListener(this );
      }
      markers.clear();
    }
  }
  if (this.foregroundRangeMarkers != null) {
    Collection markers = (Collection) this.foregroundRangeMarkers.get(key);
    if (markers != null) {
      Iterator iterator = markers.iterator();
      while (iterator.hasNext()) {
        Marker m = (Marker) iterator.next();
        m.removeChangeListener(this );
      }
      markers.clear();
    }
  }
  fireChangeEvent();
}

/**
     * Removes a marker for the range axis and sends a {@link PlotChangeEvent}
     * to all registered listeners.
     *
     * @param marker the marker.
     *
     * @return A boolean indicating whether or not the marker was actually
     *         removed.
     *
     * @since 1.0.7
     */
/**
     * Removes a marker for the range axis and sends a {@link PlotChangeEvent}
     * to all registered listeners.
     *
     * @param marker the marker.
     *
     * @return A boolean indicating whether or not the marker was actually
     *         removed.
     *
     * @since 1.0.7
     *
     * @see #addRangeMarker(Marker)
     */
public boolean removeRangeMarker(Marker marker) {
  return removeRangeMarker(marker, Layer.FOREGROUND);
}

/**
     * Removes a marker for the range axis in the specified layer and sends a
     * {@link PlotChangeEvent} to all registered listeners.
     *
     * @param marker the marker (<code>null</code> not permitted).
     * @param layer the layer (foreground or background).
     *
     * @return A boolean indicating whether or not the marker was actually
     *         removed.
     *
     * @since 1.0.7
     */
/**
     * Removes a marker for the range axis in the specified layer and sends a
     * {@link PlotChangeEvent} to all registered listeners.
     *
     * @param marker the marker (<code>null</code> not permitted).
     * @param layer the layer (foreground or background).
     *
     * @return A boolean indicating whether or not the marker was actually
     *         removed.
     *
     * @since 1.0.7
     *
     * @see #addRangeMarker(Marker, Layer)
     */
public boolean removeRangeMarker(Marker marker, Layer layer) {
  return removeRangeMarker(0, marker, layer);
}

/**
     * Removes a marker for a specific dataset/renderer and sends a
     * {@link PlotChangeEvent} to all registered listeners.
     *
     * @param index the dataset/renderer index.
     * @param marker the marker.
     * @param layer the layer (foreground or background).
     *
     * @return A boolean indicating whether or not the marker was actually
     *         removed.
     *
     * @since 1.0.7
     */
/**
     * Removes a marker for a specific dataset/renderer and sends a
     * {@link PlotChangeEvent} to all registered listeners.
     *
     * @param index the dataset/renderer index.
     * @param marker the marker.
     * @param layer the layer (foreground or background).
     *
     * @return A boolean indicating whether or not the marker was actually
     *         removed.
     *
     * @since 1.0.7
     *
     * @see #addRangeMarker(int, Marker, Layer)
     */
public boolean removeRangeMarker(int index, Marker marker, Layer layer) {
  return removeRangeMarker(index, marker, layer, true);
}

/**
     * Removes a marker for a specific dataset/renderer and sends a
     * {@link PlotChangeEvent} to all registered listeners.
     *
     * @param index  the dataset/renderer index.
     * @param marker  the marker.
     * @param layer  the layer (foreground or background).
     * @param notify  notify listeners?
     *
     * @return A boolean indicating whether or not the marker was actually
     *         removed.
     *
     * @since 1.0.10
     */
/**
     * Removes a marker for a specific dataset/renderer and sends a
     * {@link PlotChangeEvent} to all registered listeners.
     *
     * @param index  the dataset/renderer index.
     * @param marker  the marker.
     * @param layer  the layer (foreground or background).
     * @param notify  notify listeners.
     *
     * @return A boolean indicating whether or not the marker was actually
     *         removed.
     *
     * @since 1.0.10
     *
     * @see #addRangeMarker(int, Marker, Layer, boolean)
     */
public boolean removeRangeMarker(int index, Marker marker, Layer layer, boolean notify) {
  if (marker == null) {
    throw new IllegalArgumentException("Null \'marker\' argument.");
  }
  ArrayList markers;
  if (layer == Layer.FOREGROUND) {
    markers = (ArrayList) this.foregroundRangeMarkers.get(new Integer(index));
  }
  else {
    markers = (ArrayList) this.backgroundRangeMarkers.get(new Integer(index));
  }
  if (markers == null) {
    return false;
  }
  boolean removed = markers.remove(marker);
  if (removed && notify) {
    fireChangeEvent();
  }
  return removed;
}

 [[#variable15079520]]
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#15079520]]
/**
 * Returns a flag indicating whether or not the range crosshair is visible.
 *
 * @return The flag.
 *
 * @see #setRangeCrosshairVisible(boolean)
 */
public boolean isRangeCrosshairVisible() {
  return this.rangeCrosshairVisible;
} 
12[[#15079520]]
/**
 * Adds an annotation to the plot and sends a {@link PlotChangeEvent} to
 * all registered listeners.
 *
 * @param annotation  the annotation (<code>null</code> not permitted).
 *
 * @see #getAnnotations()
 * @see #removeAnnotation(XYAnnotation)
 */
public void addAnnotation(XYAnnotation annotation) {
  addAnnotation(annotation, true);
}