CloneSet62


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
95220.985class_body_declarations[5]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
194452
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedRangeCategoryPlot.java
295605
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedRangeXYPlot.java
Next
Last
Clone Instance
1
Line Count
94
Source Line
452
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedRangeCategoryPlot.java

/**
 * Sets the size (width or height, depending on the orientation of the 
 * plot) for the domain axis of each subplot.
 *
 * @param space  the space.
 */
protected void setFixedDomainAxisSpaceForSubplots(AxisSpace space) {
  Iterator iterator = this.subplots.iterator();
  while (iterator.hasNext()) {
    CategoryPlot plot = (CategoryPlot) iterator.next();
    plot.setFixedDomainAxisSpace(space, false);
  }
}

/**
 * Handles a 'click' on the plot by updating the anchor value.
 *
 * @param x  x-coordinate of the click.
 * @param y  y-coordinate of the click.
 * @param info  information about the plot's dimensions.
 *
 */
public void handleClick(int x, int y, PlotRenderingInfo info) {
  Rectangle2D dataArea = info.getDataArea();
  if (dataArea.contains(x, y)) {
    for (int i = 0; i < this.subplots.size(); i++) {
      CategoryPlot subplot = (CategoryPlot) this.subplots.get(i);
      PlotRenderingInfo subplotInfo = info.getSubplotInfo(i);
      subplot.handleClick(x, y, subplotInfo);
    }
  }
}

/**
 * Receives a {@link PlotChangeEvent} and responds by notifying all 
 * listeners.
 * 
 * @param event  the event.
 */
public void plotChanged(PlotChangeEvent event) {
  notifyListeners(event);
}

/** 
 * Tests the plot for equality with an arbitrary object.
 * 
 * @param obj  the object (<code>null</code> permitted).
 * 
 * @return <code>true</code> or <code>false</code>.
 */
public boolean equals(Object obj) {
  if (obj == this ) {
    return true;
  }
  if ( !(obj instanceof CombinedRangeCategoryPlot)) {
    return false;
  }
  if ( !super.equals(obj)) {
    return false;
  }
  CombinedRangeCategoryPlot that = (CombinedRangeCategoryPlot) obj;
  if ( !ObjectUtilities.equal(this.subplots, that.subplots)) {
    return false;
  }
  if (this.totalWeight != that.totalWeight) {
    return false;
  }
  if (this.gap != that.gap) {
    return false;
  }
  return true;
}

/**
 * Returns a clone of the plot.
 * 
 * @return A clone.
 * 
 * @throws CloneNotSupportedException  this class will not throw this 
 *         exception, but subclasses (if any) might.
 */
public Object clone() throws CloneNotSupportedException {
  CombinedRangeCategoryPlot result = (CombinedRangeCategoryPlot) super.clone();
  result.subplots = (List) ObjectUtilities.deepClone(this.subplots);
  for (Iterator it = result.subplots.iterator(); it.hasNext();) {
    Plot child = (Plot) it.next();
    child.setParent(result);
  }
  // after setting up all the subplots, the shared range axis may need 
  // reconfiguring
  ValueAxis rangeAxis = result.getRangeAxis();
  if (rangeAxis != null) {
    rangeAxis.configure();
  }
  return result;
}


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

/**
 * Sets the space (width or height, depending on the orientation of the
 * plot) for the domain axis of each subplot.
 *
 * @param space  the space.
 */
protected void setFixedDomainAxisSpaceForSubplots(AxisSpace space) {
  Iterator iterator = this.subplots.iterator();
  while (iterator.hasNext()) {
    XYPlot plot = (XYPlot) iterator.next();
    plot.setFixedDomainAxisSpace(space, false);
  }
}

/**
 * Handles a 'click' on the plot by updating the anchor values...
 *
 * @param x  x-coordinate, where the click occured.
 * @param y  y-coordinate, where the click occured.
 * @param info  object containing information about the plot dimensions.
 */
public void handleClick(int x, int y, PlotRenderingInfo info) {
  Rectangle2D dataArea = info.getDataArea();
  if (dataArea.contains(x, y)) {
    for (int i = 0; i < this.subplots.size(); i++) {
      XYPlot subplot = (XYPlot) this.subplots.get(i);
      PlotRenderingInfo subplotInfo = info.getSubplotInfo(i);
      subplot.handleClick(x, y, subplotInfo);
    }
  }
}

/**
 * Receives a {@link PlotChangeEvent} and responds by notifying all
 * listeners.
 *
 * @param event  the event.
 */
public void plotChanged(PlotChangeEvent event) {
  notifyListeners(event);
}

/**
 * Tests this plot for equality with another object.
 *
 * @param obj  the other object.
 *
 * @return <code>true</code> or <code>false</code>.
 */
public boolean equals(Object obj) {
  if (obj == this ) {
    return true;
  }
  if ( !(obj instanceof CombinedRangeXYPlot)) {
    return false;
  }
  if ( !super.equals(obj)) {
    return false;
  }
  CombinedRangeXYPlot that = (CombinedRangeXYPlot) obj;
  if ( !ObjectUtilities.equal(this.subplots, that.subplots)) {
    return false;
  }
  if (this.totalWeight != that.totalWeight) {
    return false;
  }
  if (this.gap != that.gap) {
    return false;
  }
  return true;
}

/**
 * Returns a clone of the plot.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  this class will not throw this
 *         exception, but subclasses (if any) might.
 */
public Object clone() throws CloneNotSupportedException {
  CombinedRangeXYPlot result = (CombinedRangeXYPlot) super.clone();
  result.subplots = (List) ObjectUtilities.deepClone(this.subplots);
  for (Iterator it = result.subplots.iterator(); it.hasNext();) {
    Plot child = (Plot) it.next();
    child.setParent(result);
  }
  // after setting up all the subplots, the shared range axis may need
  // reconfiguring
  ValueAxis rangeAxis = result.getRangeAxis();
  if (rangeAxis != null) {
    rangeAxis.configure();
  }
  return result;
}


Clone AbstractionParameter Count: 2Parameter Bindings

/**
     * Sets the space (width or height, depending on the orientation of the
     * plot) for the domain axis of each subplot.
     *
     * @param space  the space.
     */
/**
     * Sets the size (width or height, depending on the orientation of the 
     * plot) for the domain axis of each subplot.
     *
     * @param space  the space.
     */
protected void setFixedDomainAxisSpaceForSubplots(AxisSpace space) {
  Iterator iterator = this.subplots.iterator();
  while (iterator.hasNext()) {
     [[#variable150b0900]] plot = ( [[#variable150b0900]]) iterator.next();
    plot.setFixedDomainAxisSpace(space, false);
  }
}

/**
     * Handles a 'click' on the plot by updating the anchor values...
     *
     * @param x  x-coordinate, where the click occured.
     * @param y  y-coordinate, where the click occured.
     * @param info  object containing information about the plot dimensions.
     */
/**
     * Handles a 'click' on the plot by updating the anchor value.
     *
     * @param x  x-coordinate of the click.
     * @param y  y-coordinate of the click.
     * @param info  information about the plot's dimensions.
     *
     */
public void handleClick(int x, int y, PlotRenderingInfo info) {
  Rectangle2D dataArea = info.getDataArea();
  if (dataArea.contains(x, y)) {
    for (int i = 0; i < this.subplots.size(); i++) {
       [[#variable150b0900]] subplot = ( [[#variable150b0900]]) this.subplots.get(i);
      PlotRenderingInfo subplotInfo = info.getSubplotInfo(i);
      subplot.handleClick(x, y, subplotInfo);
    }
  }
}

/**
     * Receives a {@link PlotChangeEvent} and responds by notifying all
     * listeners.
     *
     * @param event  the event.
     */
/**
     * Receives a {@link PlotChangeEvent} and responds by notifying all 
     * listeners.
     * 
     * @param event  the event.
     */
public void plotChanged(PlotChangeEvent event) {
  notifyListeners(event);
}

/**
     * Tests this plot for equality with another object.
     *
     * @param obj  the other object.
     *
     * @return <code>true</code> or <code>false</code>.
     */
/** 
     * Tests the plot for equality with an arbitrary object.
     * 
     * @param obj  the object (<code>null</code> permitted).
     * 
     * @return <code>true</code> or <code>false</code>.
     */
public boolean equals(Object obj) {
  if (obj == this ) {
    return true;
  }
  if ( !(obj instanceof [[#variable150b08c0]])) {
    return false;
  }
  if ( !super.equals(obj)) {
    return false;
  }
   [[#variable150b08c0]] that = ( [[#variable150b08c0]]) obj;
  if ( !ObjectUtilities.equal(this.subplots, that.subplots)) {
    return false;
  }
  if (this.totalWeight != that.totalWeight) {
    return false;
  }
  if (this.gap != that.gap) {
    return false;
  }
  return true;
}

/**
     * Returns a clone of the plot.
     *
     * @return A clone.
     *
     * @throws CloneNotSupportedException  this class will not throw this
     *         exception, but subclasses (if any) might.
     */
/**
     * Returns a clone of the plot.
     * 
     * @return A clone.
     * 
     * @throws CloneNotSupportedException  this class will not throw this 
     *         exception, but subclasses (if any) might.
     */
public Object clone() throws CloneNotSupportedException {
   [[#variable150b08c0]] result = ( [[#variable150b08c0]]) super.clone();
  result.subplots = (List) ObjectUtilities.deepClone(this.subplots);
  for (Iterator it = result.subplots.iterator(); it.hasNext();) {
    Plot child = (Plot) it.next();
    child.setParent(result);
  }
  // after setting up all the subplots, the shared range axis may need
  // after setting up all the subplots, the shared range axis may need 
  // reconfiguring
  ValueAxis rangeAxis = result.getRangeAxis();
  if (rangeAxis != null) {
    rangeAxis.configure();
  }
  return result;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#150b0900]]
CategoryPlot 
12[[#150b0900]]
XYPlot 
21[[#150b08c0]]
CombinedRangeCategoryPlot 
22[[#150b08c0]]
CombinedRangeXYPlot