Tabnine Logo
ObjectUtilities.clone
Code IndexAdd Tabnine to your IDE (free)

How to use
clone
method
in
org.jfree.util.ObjectUtilities

Best Java code snippets using org.jfree.util.ObjectUtilities.clone (Showing top 18 results out of 315)

origin: jfree/jcommon

/**
 * Returns a clone of the specified shape, or <code>null</code>.  At the
 * current time, this method supports cloning for instances of
 * <code>Line2D</code>, <code>RectangularShape</code>, <code>Area</code>
 * and <code>GeneralPath</code>.
 * <p>
 * <code>RectangularShape</code> includes <code>Arc2D</code>,
 * <code>Ellipse2D</code>, <code>Rectangle2D</code>,
 * <code>RoundRectangle2D</code>.
 *
 * @param shape  the shape to clone (<code>null</code> permitted,
 *               returns <code>null</code>).
 *
 * @return A clone or <code>null</code>.
 */
public static Shape clone(final Shape shape) {
  if (shape instanceof Cloneable) {
    try {
      return (Shape) ObjectUtilities.clone(shape);
    }
    catch (CloneNotSupportedException cnse) {
    }
  }
  final Shape result = null;
  return result;
}
origin: org.jfree/jcommon

/**
 * Returns a clone of the specified shape, or <code>null</code>.  At the
 * current time, this method supports cloning for instances of
 * <code>Line2D</code>, <code>RectangularShape</code>, <code>Area</code>
 * and <code>GeneralPath</code>.
 * <p>
 * <code>RectangularShape</code> includes <code>Arc2D</code>,
 * <code>Ellipse2D</code>, <code>Rectangle2D</code>,
 * <code>RoundRectangle2D</code>.
 *
 * @param shape  the shape to clone (<code>null</code> permitted,
 *               returns <code>null</code>).
 *
 * @return A clone or <code>null</code>.
 */
public static Shape clone(final Shape shape) {
  if (shape instanceof Cloneable) {
    try {
      return (Shape) ObjectUtilities.clone(shape);
    }
    catch (CloneNotSupportedException cnse) {
    }
  }
  final Shape result = null;
  return result;
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns a clone of the specified shape, or <code>null</code>.  At the 
 * current time, this method supports cloning for instances of 
 * <code>Line2D</code>, <code>RectangularShape</code>, <code>Area</code> 
 * and <code>GeneralPath</code>.
 * <p>
 * <code>RectangularShape</code> includes <code>Arc2D</code>, 
 * <code>Ellipse2D</code>, <code>Rectangle2D</code>, 
 * <code>RoundRectangle2D</code>.
 * 
 * @param shape  the shape to clone (<code>null</code> permitted, 
 *               returns <code>null</code>).
 * 
 * @return A clone or <code>null</code>.
 */
public static Shape clone(final Shape shape) {
  if (shape instanceof Cloneable) {
    try {
      return (Shape) ObjectUtilities.clone(shape);
    }
    catch (CloneNotSupportedException cnse) {
    }
  }
  final Shape result = null;
  return result;
}
 
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Creates a clone of the plot.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException if some component of the plot does not
 *         support cloning.
 */
public Object clone() throws CloneNotSupportedException {
  Plot clone = (Plot) super.clone();
  // private Plot parent <-- don't clone the parent plot, but take care
  // childs in combined plots instead
  if (this.datasetGroup != null) {
    clone.datasetGroup
      = (DatasetGroup) ObjectUtilities.clone(this.datasetGroup);
  }
  clone.drawingSupplier
    = (DrawingSupplier) ObjectUtilities.clone(this.drawingSupplier);
  clone.listenerList = new EventListenerList();
  return clone;
}
origin: jfree/jcommon

  = (Collection) ObjectUtilities.clone(collection);
result.clear();
final Iterator iterator = collection.iterator();
  final Object item = iterator.next();
  if (item != null) {
    result.add(clone(item));
origin: org.jfree/jcommon

  = (Collection) ObjectUtilities.clone(collection);
result.clear();
final Iterator iterator = collection.iterator();
  final Object item = iterator.next();
  if (item != null) {
    result.add(clone(item));
origin: jfree/jcommon

/**
 * Creates a deep copy of this HashNMap.
 *
 * @return a clone.
 * @throws CloneNotSupportedException this should never happen.
 */
public Object clone() throws CloneNotSupportedException {
  final HashNMap map = (HashNMap) super.clone();
  map.table = new HashMap();
  final Iterator iterator = keys();
  while (iterator.hasNext()) {
    final Object key = iterator.next();
    final List list = (List) map.table.get(key);
    if (list != null) {
      map.table.put(key, ObjectUtilities.clone(list));
    }
  }
  return map;
}
origin: org.jfree/com.springsource.org.jfree

  = (Collection) ObjectUtilities.clone(collection);
result.clear();
final Iterator iterator = collection.iterator();
  final Object item = iterator.next();
  if (item != null) {
    result.add(clone(item));
origin: org.jfree/jcommon

/**
 * Creates a deep copy of this HashNMap.
 *
 * @return a clone.
 * @throws CloneNotSupportedException this should never happen.
 */
public Object clone() throws CloneNotSupportedException {
  final HashNMap map = (HashNMap) super.clone();
  map.table = new HashMap();
  final Iterator iterator = keys();
  while (iterator.hasNext()) {
    final Object key = iterator.next();
    final List list = (List) map.table.get(key);
    if (list != null) {
      map.table.put(key, ObjectUtilities.clone(list));
    }
  }
  return map;
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Creates a deep copy of this HashNMap.
 *
 * @return a clone.
 * @throws CloneNotSupportedException this should never happen.
 */
public Object clone() throws CloneNotSupportedException {
  final HashNMap map = (HashNMap) super.clone();
  map.table = new HashMap();
  final Iterator iterator = keys();
  while (iterator.hasNext()) {
    final Object key = iterator.next();
    final List list = (List) map.table.get(key);
    if (list != null) {
      map.table.put(key, ObjectUtilities.clone(list));
    }
  }
  return map;
}
origin: org.codehaus.jtstand/jtstand-chart

  clone.urlGenerator = (PieURLGenerator) ObjectUtilities.clone(
      this.urlGenerator);
if (this.legendLabelGenerator != null) {
  clone.legendLabelGenerator = (PieSectionLabelGenerator)
      ObjectUtilities.clone(this.legendLabelGenerator);
      ObjectUtilities.clone(this.legendLabelToolTipGenerator);
      ObjectUtilities.clone(this.legendLabelURLGenerator);
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
public Object clone() throws CloneNotSupportedException {
  XYBarRenderer result = (XYBarRenderer) super.clone();
  if (this.gradientPaintTransformer != null) {
    result.gradientPaintTransformer = (GradientPaintTransformer)
      ObjectUtilities.clone(this.gradientPaintTransformer);
  }
  result.legendBar = ShapeUtilities.clone(this.legendBar);
  return result;
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns a clone of the plot.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  this can occur if some component of
 *         the plot cannot be cloned.
 */
public Object clone() throws CloneNotSupportedException {
  PolarPlot clone = (PolarPlot) super.clone();
  if (this.axis != null) {
    clone.axis = (ValueAxis) ObjectUtilities.clone(this.axis);
    clone.axis.setPlot(clone);
    clone.axis.addChangeListener(clone);
  }
  if (clone.dataset != null) {
    clone.dataset.addChangeListener(clone);
  }
  if (this.renderer != null) {
    clone.renderer
      = (PolarItemRenderer) ObjectUtilities.clone(this.renderer);
  }
  clone.cornerTextItems = new ArrayList(this.cornerTextItems);
  return clone;
}
origin: org.codehaus.jtstand/jtstand-chart

ObjectUtilities.clone(this.legendItemLabelGenerator);
ObjectUtilities.clone(this.legendItemToolTipGenerator);
ObjectUtilities.clone(this.legendItemURLGenerator);
ObjectUtilities.clone(this.legendItemLabelGenerator);
ObjectUtilities.clone(this.legendItemToolTipGenerator);
ObjectUtilities.clone(this.legendItemURLGenerator);
origin: org.codehaus.jtstand/jtstand-chart

clone.domainAxes = (ObjectList) ObjectUtilities.clone(this.domainAxes);
for (int i = 0; i < this.domainAxes.size(); i++) {
  ValueAxis axis = (ValueAxis) this.domainAxes.get(i);
clone.rangeAxes = (ObjectList) ObjectUtilities.clone(this.rangeAxes);
for (int i = 0; i < this.rangeAxes.size(); i++) {
  ValueAxis axis = (ValueAxis) this.rangeAxes.get(i);
clone.rangeAxisLocations = (ObjectList) ObjectUtilities.clone(
    this.rangeAxisLocations);
clone.datasets = (ObjectList) ObjectUtilities.clone(this.datasets);
for (int i = 0; i < clone.datasets.size(); ++i) {
  XYDataset d = getDataset(i);
clone.renderers = (ObjectList) ObjectUtilities.clone(this.renderers);
for (int i = 0; i < this.renderers.size(); i++) {
  XYItemRenderer renderer2 = (XYItemRenderer) this.renderers.get(i);
clone.foregroundDomainMarkers = (Map) ObjectUtilities.clone(
    this.foregroundDomainMarkers);
clone.backgroundDomainMarkers = (Map) ObjectUtilities.clone(
    this.backgroundDomainMarkers);
clone.foregroundRangeMarkers = (Map) ObjectUtilities.clone(
    this.foregroundRangeMarkers);
clone.backgroundRangeMarkers = (Map) ObjectUtilities.clone(
    this.backgroundRangeMarkers);
clone.annotations = (List) ObjectUtilities.deepClone(this.annotations);
if (this.fixedDomainAxisSpace != null) {
origin: org.codehaus.jtstand/jtstand-chart

ObjectUtilities.clone(this.legendItemLabelGenerator);
ObjectUtilities.clone(this.legendItemToolTipGenerator);
ObjectUtilities.clone(this.legendItemURLGenerator);
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns a clone of the plot.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the plot cannot be cloned.
 */
public Object clone() throws CloneNotSupportedException {
  ThermometerPlot clone = (ThermometerPlot) super.clone();
  if (clone.dataset != null) {
    clone.dataset.addChangeListener(clone);
  }
  clone.rangeAxis = (ValueAxis) ObjectUtilities.clone(this.rangeAxis);
  if (clone.rangeAxis != null) {
    clone.rangeAxis.setPlot(clone);
    clone.rangeAxis.addChangeListener(clone);
  }
  clone.valueFormat = (NumberFormat) this.valueFormat.clone();
  clone.subrangePaint = (Paint[]) this.subrangePaint.clone();
  return clone;
}
origin: org.codehaus.jtstand/jtstand-chart

clone.fixedDomainAxisSpace = (AxisSpace) ObjectUtilities.clone(
    this.fixedDomainAxisSpace);
clone.fixedRangeAxisSpace = (AxisSpace) ObjectUtilities.clone(
    this.fixedRangeAxisSpace);
org.jfree.utilObjectUtilitiesclone

Javadoc

Returns a clone of the specified object, if it can be cloned, otherwise throws a CloneNotSupportedException.

Popular methods of ObjectUtilities

  • equal
    Returns true if the two objects are equal OR bothnull.
  • convertName
    Transform the class-relative resource name into a global name by appending it to the classes package
  • getClassLoader
    Returns the classloader, which was responsible for loading the given class.
  • getClassLoaderSource
    Returns the internal configuration entry, whether the classloader of the thread context or the conte
  • getResource
    Returns the resource specified by the absolute name.
  • getResourceRelative
    Returns the resource specified by the relative name.
  • getResourceRelativeAsStream
    Returns the inputstream for the resource specified by therelative name.
  • loadAndInstantiate
    Tries to create a new instance of the given class. This is a short cut for the common bean instantia
  • parseVersions
  • setClassLoaderSource
    Defines the internal configuration entry, whether the classloader of the thread context or the conte
  • deepClone
    Returns a new collection containing clones of all the items in the specified collection.
  • hashCode
    Returns a hash code for an object, or zero if the object isnull.
  • deepClone,
  • hashCode

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Permission (java.security)
    Legacy security code; do not use.
  • JButton (javax.swing)
  • JTextField (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now