summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java')
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterColorBorderRepresentation.java16
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;