App
LaplaceSharpenLayerSettingsFragment.java
Go to the documentation of this file.
1 package mhr.app.fragments.layers.filter;
2 
3 import java.text.DecimalFormat;
4 
5 import mhr.app.R;
6 import mhr.app.fragments.layers.LayerSettingsFragment;
7 
8 import mhr.appandroid.views.LabelledSeekBar;
9 import mhr.appcore.image.layers.LayerSpecificPresentation;
10 import mhr.appcore.image.layers.filter.DifferenceOfGaussianSharpenFilterLayerSpecificPresentation;
11 import mhr.appcore.image.layers.filter.GaussianBlurFilterLayerSpecificPresentation;
12 import mhr.appcore.image.layers.filter.GaussianSharpenFilterLayerSpecificPresentation;
13 import mhr.appcore.image.layers.filter.LaplaceSharpenFilterLayerSpecificPresentation;
14 import mhr.appcore.image.layers.filter.LaplacianOfGaussianSharpenFilterLayerSpecificPresentation;
15 
16 import android.os.Bundle;
17 import android.view.LayoutInflater;
18 import android.view.View;
19 import android.view.View.OnClickListener;
20 import android.view.ViewGroup;
21 import android.widget.CheckBox;
22 import android.widget.SeekBar;
23 import android.widget.SeekBar.OnSeekBarChangeListener;
24 import android.widget.TextView;
25 
26 
30 public class LaplaceSharpenLayerSettingsFragment extends LayerSettingsFragment implements OnClickListener {
31 
32 
33  //===== INTERFACES, CLASSES, ENUMS ==========================================================================================================//
34  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
35  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
36 
37  //===== FIELDS ==============================================================================================================================//
38  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
40 
41  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
42 
43  //===== CONSTRUCTORS, DESTRUCTORS, RELATED METHODS ==========================================================================================//
44  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
45  @Override
46  protected View initView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
47  root = inflater.inflate(R.layout.fragment_laplace_sharpen_layer_settings, container, false);
48  forceLSB = (LabelledSeekBar) root.findViewById(R.id.ForceValueLSB);
49  return root;
50  }
51  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
52 
53  //===== METHODS =============================================================================================================================//
54  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
55  @Override
58  forceLSB.setProgress((float)p.force);
59  }
60 
61  @Override
65  }
66 
67  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
68 
69  //===== CALLBACKS ===========================================================================================================================//
70  @Override
71  public void onClick(View v) {
72  switch (v.getId()) {
73  default:
74  super.onClick(v);
75  break;
76  }
77  }
78 
79  //----- LIFE CYCLE --------------------------------------------------------------------------------------------------------------------------//
80 
81  // @Override
82  // public void onAttach(Activity activity) {
83  // super.onAttach(activity);
84  // /*
85  // * called once the fragment is associated with its activity.
86  // */
87  // }
88 
89  // @Override
90  // public void onCreate(Bundle savedInstanceState) {
91  // super.onCreate(savedInstanceState);
92  // /*
93  // * called to do initial creation of the fragment.
94  // *
95  // * The system calls this when creating the fragment. Within your implementation, you should initialize essential components of the fragment that you want
96  // * to retain when the fragment is paused or stopped, then resumed.
97  // */
98  // }
99 
100  // @Override
101  // public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
102  // return super.onCreateView(inflater, container, savedInstanceState);
103  // /*
104  // * creates and returns the view hierarchy associated with the fragment.
105  // *
106  // * The system calls this when it's time for the fragment to draw its user interface for the first time. To draw a UI for your fragment, you must return a
107  // * View from this method that is the root of your fragment's layout. You can return null if the fragment does not provide a UI.
108  // *
109  // * Zde začíná životní cyklus při návratu z backstacku
110  // */
111  // }
112 
113  // @Override
114  // public void onActivityCreated(Bundle savedInstanceState) {
115  // super.onActivityCreated(savedInstanceState);
116  // /*
117  // * tells the fragment that its activity has completed its own Activity.onCreate().
118  // */
119  // }
120 
121  // @Override // Vyžaduje API 17
122  // public void onViewStateRestored(Bundle savedInstanceState) {
123  // super.onViewStateRestored(savedInstanceState);
124  // /*
125  // * tells the fragment that all of the saved state of its view hierarchy has been restored.
126  // */
127  // }
128 
129  // @Override
130  // public void onStart() {
131  // super.onStart();
132  // /*
133  // * makes the fragment visible to the user (based on its containing activity being started).
134  // */
135  // }
136  //
137  // @Override
138  // public void onResume() {
139  // super.onResume();
140  // /*
141  // * makes the fragment interacting with the user (based on its containing activity being resumed).
142  // */
143  // }
144 
145  // @Override
146  // public void onPause() {
147  // super.onPause();
148  // /*
149  // * fragment is no longer interacting with the user either because its activity is being paused or a fragment operation is modifying it in the activity.
150  // *
151  // * The system calls this method as the first indication that the user is leaving the fragment (though it does not always mean the fragment is being destroyed).
152  // * This is usually where you should commit any changes that should be persisted beyond the current user session (because the user might not come back).
153  // */
154  // }
155 
156  // @Override
157  // public void onStop() {
158  // super.onStop();
159  // /*
160  // * fragment is no longer visible to the user either because its activity is being stopped or a fragment operation is modifying it in the activity.
161  // */
162  // }
163 
164  // @Override
165  // public void onDestroyView() {
166  // super.onDestroyView();
167  // /*
168  // * allows the fragment to clean up resources associated with its View.
169  // *
170  // * Zde končí životní cyklus při umístění do backstacku
171  // */
172  // }
173 
174  // @Override
175  // public void onDestroy() {
176  // super.onDestroy();
177  // /*
178  // * called to do final cleanup of the fragment's state.
179  // */
180  // }
181 
182  // @Override
183  // public void onDetach() {
184  // super.onDetach();
185  // /*
186  // * called immediately prior to the fragment no longer being associated with its activity.
187  // */
188  // }
189 }