App
ContrastLayerSettingsFragment.java
Go to the documentation of this file.
1 package mhr.app.fragments.layers.lut;
2 
3 import mhr.app.AppMainActivity;
4 import mhr.app.R;
5 import mhr.app.fragments.layers.LayerSettingsFragment;
6 import mhr.appandroid.adapters.APDImagePresentation;
7 import mhr.appandroid.views.LabelledSeekBar;
8 import mhr.appandroid.views.colorpicker.ColorPickerView;
9 
10 import mhr.appcore.blending.BlendMode;
11 
12 import mhr.appcore.image.layers.ColorLayerSpecificPresentation;
13 import mhr.appcore.image.layers.LayerSpecificPresentation;
14 import mhr.appcore.image.layers.RasterLayerSpecificPresentation;
15 import mhr.appcore.image.layers.lut.ContrastLUTLayerSpecificPresentation;
16 
17 import android.app.Activity;
18 import android.app.Fragment;
19 import android.os.Bundle;
20 import android.view.LayoutInflater;
21 import android.view.View;
22 import android.view.View.OnClickListener;
23 import android.view.ViewGroup;
24 import android.widget.ArrayAdapter;
25 import android.widget.Button;
26 import android.widget.SeekBar;
27 import android.widget.SeekBar.OnSeekBarChangeListener;
28 import android.widget.Spinner;
29 import android.widget.TextView;
30 import android.widget.Toast;
31 
32 
36 public class ContrastLayerSettingsFragment extends LayerSettingsFragment implements OnClickListener {
37 
38 
39  //===== INTERFACES, CLASSES, ENUMS ==========================================================================================================//
40  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
41  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
42 
43  //===== FIELDS ==============================================================================================================================//
44  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
46 
47 
48  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
49 
50  //===== CONSTRUCTORS, DESTRUCTORS, RELATED METHODS ==========================================================================================//
51  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
52  @Override
53  protected View initView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
54  root = inflater.inflate(R.layout.fragment_contrast_layer_settings, container, false);
55  contrastValueLSB = (LabelledSeekBar) root.findViewById(R.id.LayerContrastValueLSB);
56  return root;
57  }
58  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
59 
60  //===== METHODS =============================================================================================================================//
61  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
62  @Override
66  }
67 
68  @Override
72  }
73 
74  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
75 
76  //===== CALLBACKS ===========================================================================================================================//
77  @Override
78  public void onClick(View v) {
79  switch (v.getId()) {
80  default:
81  super.onClick(v);
82  break;
83  }
84  }
85 
86  //----- LIFE CYCLE --------------------------------------------------------------------------------------------------------------------------//
87 
88  // @Override
89  // public void onAttach(Activity activity) {
90  // super.onAttach(activity);
91  // /*
92  // * called once the fragment is associated with its activity.
93  // */
94  // }
95 
96  // @Override
97  // public void onCreate(Bundle savedInstanceState) {
98  // super.onCreate(savedInstanceState);
99  // /*
100  // * called to do initial creation of the fragment.
101  // *
102  // * The system calls this when creating the fragment. Within your implementation, you should initialize essential components of the fragment that you want
103  // * to retain when the fragment is paused or stopped, then resumed.
104  // */
105  // }
106 
107  // @Override
108  // public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
109  // return super.onCreateView(inflater, container, savedInstanceState);
110  // /*
111  // * creates and returns the view hierarchy associated with the fragment.
112  // *
113  // * 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
114  // * 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.
115  // *
116  // * Zde začíná životní cyklus při návratu z backstacku
117  // */
118  // }
119 
120  // @Override
121  // public void onActivityCreated(Bundle savedInstanceState) {
122  // super.onActivityCreated(savedInstanceState);
123  // /*
124  // * tells the fragment that its activity has completed its own Activity.onCreate().
125  // */
126  // }
127 
128  // @Override // Vyžaduje API 17
129  // public void onViewStateRestored(Bundle savedInstanceState) {
130  // super.onViewStateRestored(savedInstanceState);
131  // /*
132  // * tells the fragment that all of the saved state of its view hierarchy has been restored.
133  // */
134  // }
135 
136  // @Override
137  // public void onStart() {
138  // super.onStart();
139  // /*
140  // * makes the fragment visible to the user (based on its containing activity being started).
141  // */
142  // }
143  //
144  // @Override
145  // public void onResume() {
146  // super.onResume();
147  // /*
148  // * makes the fragment interacting with the user (based on its containing activity being resumed).
149  // */
150  // }
151 
152  // @Override
153  // public void onPause() {
154  // super.onPause();
155  // /*
156  // * 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.
157  // *
158  // * 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).
159  // * 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).
160  // */
161  // }
162 
163  // @Override
164  // public void onStop() {
165  // super.onStop();
166  // /*
167  // * 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.
168  // */
169  // }
170 
171  // @Override
172  // public void onDestroyView() {
173  // super.onDestroyView();
174  // /*
175  // * allows the fragment to clean up resources associated with its View.
176  // *
177  // * Zde končí životní cyklus při umístění do backstacku
178  // */
179  // }
180 
181  // @Override
182  // public void onDestroy() {
183  // super.onDestroy();
184  // /*
185  // * called to do final cleanup of the fragment's state.
186  // */
187  // }
188 
189  // @Override
190  // public void onDetach() {
191  // super.onDetach();
192  // /*
193  // * called immediately prior to the fragment no longer being associated with its activity.
194  // */
195  // }
196 }