summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-01-28 16:36:46 -0800
committernicolasroard <nicolasroard@google.com>2013-02-05 00:03:18 -0800
commitda4de5aa86b49be455efe396455b77be44dec684 (patch)
tree4d35214fecb7af9f2f09cd44b4910cf793d2af6d /src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java
parent465e25bd3cb2c76732102d7be98bc0335962f715 (diff)
downloadandroid_packages_apps_Snap-da4de5aa86b49be455efe396455b77be44dec684.tar.gz
android_packages_apps_Snap-da4de5aa86b49be455efe396455b77be44dec684.tar.bz2
android_packages_apps_Snap-da4de5aa86b49be455efe396455b77be44dec684.zip
Refactor filters parameters
- introduce FilterRepresentations - change filters lifecycle Change-Id: I9416fca47a334d532a347cd5577795738c870933
Diffstat (limited to 'src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java')
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java
index 04fd1e42e..e69fe3542 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterNegative.java
@@ -10,6 +10,16 @@ public class ImageFilterNegative extends ImageFilter {
mName = "Negative";
}
+ public FilterRepresentation getDefaultRepresentation() {
+ FilterRepresentation representation = new FilterDirectRepresentation("Negative");
+ representation.setFilterClass(ImageFilterNegative.class);
+ return representation;
+ }
+
+ public boolean hasDefaultRepresentation() {
+ return true;
+ }
+
@Override
public int getButtonId() {
return R.id.negativeButton;
@@ -21,11 +31,6 @@ public class ImageFilterNegative extends ImageFilter {
}
@Override
- public boolean isNil() {
- return false;
- }
-
- @Override
public boolean showEditingControls() {
return false;
}