diff options
author | John Hoford <hoford@google.com> | 2013-07-15 17:44:31 -0700 |
---|---|---|
committer | John Hoford <hoford@google.com> | 2013-07-17 18:28:31 +0000 |
commit | 3f0034140c165b86fbaf5c0369f39431548308e9 (patch) | |
tree | aaef85b9dad46528cc1a027a33109e5f2287b354 /src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java | |
parent | 5138b28530301bf751adecb87ed58a214cd55116 (diff) | |
download | android_packages_apps_Gallery2-3f0034140c165b86fbaf5c0369f39431548308e9.tar.gz android_packages_apps_Gallery2-3f0034140c165b86fbaf5c0369f39431548308e9.tar.bz2 android_packages_apps_Gallery2-3f0034140c165b86fbaf5c0369f39431548308e9.zip |
remove clone
Change-Id: Ia9f4c1778e06416018eeb07be657bcdd0af1496b
Diffstat (limited to 'src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java')
-rw-r--r-- | src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java index d9e211723..94eb20631 100644 --- a/src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java +++ b/src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java @@ -40,16 +40,18 @@ public class FilterColorBorderRepresentation extends FilterRepresentation { } @Override - public FilterRepresentation clone() throws CloneNotSupportedException { - setFilterClass(ImageFilterParametricBorder.class); - FilterColorBorderRepresentation representation = (FilterColorBorderRepresentation) super.clone(); - representation.setName(getName()); - representation.setColor(getColor()); - representation.setBorderSize(getBorderSize()); - representation.setBorderRadius(getBorderRadius()); + public FilterRepresentation copy() { + FilterColorBorderRepresentation representation = new FilterColorBorderRepresentation(0,0,0); + copyAllParameters(representation); return representation; } + @Override + protected void copyAllParameters(FilterRepresentation representation) { + super.copyAllParameters(representation); + representation.useParametersFrom(this); + } + public void useParametersFrom(FilterRepresentation a) { if (a instanceof FilterColorBorderRepresentation) { FilterColorBorderRepresentation representation = (FilterColorBorderRepresentation) a; |