App
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mhr.app.fragments.layers.lut.GammaLayerSettingsFragment Class Reference

Fragment pro nastavení vrstvy gamma korekce. More...

Inheritance diagram for mhr.app.fragments.layers.lut.GammaLayerSettingsFragment:
mhr.app.fragments.layers.LayerSettingsFragment

Public Member Functions

void onClick (View v)
 
void setParent (LayersPaneFragment parent)
 Nastaví rodiče, odkud se bere prezentace obrazu.
 
void setAssociatedLayerId (int id)
 Nastaví id vrstvy, se kterým je fragment asociován, pokud je vytvořeno view, aktualizuje view dle vrstvy.
 
void onAttach (Activity activity)
 
View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
 
void onResume ()
 

Protected Member Functions

View initView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
 Zde odvozená třída provede inicializaci svého obsahu.
 
void updateFromPresentation (LayerSpecificPresentation pres)
 Nastaví obsah fragmentu, aby odpovídal prezentaci.
 
void updatePresentation (LayerSpecificPresentation pres)
 Upraví prezentaci dle UI elementů.
 
void onSelectBtnClicked ()
 Slouží k potvrzení výběru parametrů
 

Protected Attributes

LabelledSeekBar gammaValueLSB
 
View root
 
LayoutInflater inflater
 
AppMainActivity activity
 
LayersPaneFragment parent
 
int associatedLayerId = -1
 Id vrstvy, kterou reprezentuje.
 
boolean firstCreated = true
 Pro cachování, aby se znovu nevytvářelo.
 
boolean initialized = false
 Udává informaci, jestli už je inicializováno view.
 
boolean updatePending = false
 Udává, že update nemohl být proveden, protože fragment ještě nebyl inicializován.
 
Button selectBtn
 

Detailed Description

Fragment pro nastavení vrstvy gamma korekce.

Definition at line 37 of file GammaLayerSettingsFragment.java.

Member Function Documentation

View mhr.app.fragments.layers.lut.GammaLayerSettingsFragment.initView ( LayoutInflater  inflater,
ViewGroup  container,
Bundle  savedInstanceState 
)
inlineprotectedvirtual

Zde odvozená třída provede inicializaci svého obsahu.

Parameters
inflater
container
savedInstanceState
Returns

Implements mhr.app.fragments.layers.LayerSettingsFragment.

Definition at line 53 of file GammaLayerSettingsFragment.java.

{
root = inflater.inflate(R.layout.fragment_gamma_layer_settings, container, false);
gammaValueLSB = (LabelledSeekBar) root.findViewById(R.id.LayerGammaValueLSB);
return root;
}
void mhr.app.fragments.layers.LayerSettingsFragment.onAttach ( Activity  activity)
inlineinherited

Definition at line 120 of file LayerSettingsFragment.java.

{
super.onAttach(activity);
/*
* called once the fragment is associated with its activity.
*/
this.activity = (AppMainActivity) activity;
}
void mhr.app.fragments.layers.lut.GammaLayerSettingsFragment.onClick ( View  v)
inline

Definition at line 78 of file GammaLayerSettingsFragment.java.

{
switch (v.getId()) {
default:
super.onClick(v);
break;
}
}
View mhr.app.fragments.layers.LayerSettingsFragment.onCreateView ( LayoutInflater  inflater,
ViewGroup  container,
Bundle  savedInstanceState 
)
inlineinherited

Definition at line 140 of file LayerSettingsFragment.java.

{
//return super.onCreateView(inflater, container, savedInstanceState);
/*
* creates and returns the view hierarchy associated with the fragment.
*
* 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
* 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.
*
* Zde začíná životní cyklus při návratu z backstacku
*/
if (firstCreated) {
firstCreated = false;
initView(inflater, container, savedInstanceState);
selectBtn = (Button) root.findViewById(R.id.LayerSettingsSelectBtn);
selectBtn.setOnClickListener(this);
initialized = true;
}
return root;
}
void mhr.app.fragments.layers.LayerSettingsFragment.onResume ( )
inlineinherited

Definition at line 185 of file LayerSettingsFragment.java.

{
super.onResume();
/*
* makes the fragment interacting with the user (based on its containing activity being resumed).
*/
updatePending = false;
setAssociatedLayerId(associatedLayerId); // Zde je již inicializovaný View, proto je bezepčné zavolat. Je zde kvůli prvnímu volání.
}
}
void mhr.app.fragments.layers.LayerSettingsFragment.onSelectBtnClicked ( )
inlineprotectedinherited

Slouží k potvrzení výběru parametrů

Definition at line 70 of file LayerSettingsFragment.java.

{
APDImagePresentation pres = parent.getImagePresentation();
if (pres != null) {
synchronized (pres) {
updatePresentation(pres.getLayerInfo(associatedLayerId).extra);
}
}
}
void mhr.app.fragments.layers.LayerSettingsFragment.setAssociatedLayerId ( int  id)
inlineinherited

Nastaví id vrstvy, se kterým je fragment asociován, pokud je vytvořeno view, aktualizuje view dle vrstvy.

Parameters
id

Definition at line 92 of file LayerSettingsFragment.java.

{
this.associatedLayerId = id;
updatePending = true;
return;
}
APDImagePresentation pres = parent.getImagePresentation();
if (pres != null) {
synchronized (pres) {
updateFromPresentation(pres.getLayerInfo(associatedLayerId).extra);
}
}
}
void mhr.app.fragments.layers.LayerSettingsFragment.setParent ( LayersPaneFragment  parent)
inlineinherited

Nastaví rodiče, odkud se bere prezentace obrazu.

Parameters
parent

Definition at line 84 of file LayerSettingsFragment.java.

{
this.parent = parent;
}
void mhr.app.fragments.layers.lut.GammaLayerSettingsFragment.updateFromPresentation ( LayerSpecificPresentation  pres)
inlineprotectedvirtual

Nastaví obsah fragmentu, aby odpovídal prezentaci.

Parameters
pres

Implements mhr.app.fragments.layers.LayerSettingsFragment.

Definition at line 63 of file GammaLayerSettingsFragment.java.

{
GammaLUTLayerSpecificPresentation p = (GammaLUTLayerSpecificPresentation) pres;
gammaValueLSB.setProgress((float)p.gamma);
}
void mhr.app.fragments.layers.lut.GammaLayerSettingsFragment.updatePresentation ( LayerSpecificPresentation  pres)
inlineprotectedvirtual

Upraví prezentaci dle UI elementů.

Parameters
pres

Implements mhr.app.fragments.layers.LayerSettingsFragment.

Definition at line 69 of file GammaLayerSettingsFragment.java.

{
GammaLUTLayerSpecificPresentation p = (GammaLUTLayerSpecificPresentation) pres;
}

Member Data Documentation

AppMainActivity mhr.app.fragments.layers.LayerSettingsFragment.activity
protectedinherited

Definition at line 32 of file LayerSettingsFragment.java.

int mhr.app.fragments.layers.LayerSettingsFragment.associatedLayerId = -1
protectedinherited

Id vrstvy, kterou reprezentuje.

Definition at line 34 of file LayerSettingsFragment.java.

boolean mhr.app.fragments.layers.LayerSettingsFragment.firstCreated = true
protectedinherited

Pro cachování, aby se znovu nevytvářelo.

Definition at line 35 of file LayerSettingsFragment.java.

LabelledSeekBar mhr.app.fragments.layers.lut.GammaLayerSettingsFragment.gammaValueLSB
protected

Definition at line 46 of file GammaLayerSettingsFragment.java.

LayoutInflater mhr.app.fragments.layers.LayerSettingsFragment.inflater
protectedinherited

Definition at line 31 of file LayerSettingsFragment.java.

boolean mhr.app.fragments.layers.LayerSettingsFragment.initialized = false
protectedinherited

Udává informaci, jestli už je inicializováno view.

Definition at line 36 of file LayerSettingsFragment.java.

LayersPaneFragment mhr.app.fragments.layers.LayerSettingsFragment.parent
protectedinherited

Definition at line 33 of file LayerSettingsFragment.java.

View mhr.app.fragments.layers.LayerSettingsFragment.root
protectedinherited

Definition at line 30 of file LayerSettingsFragment.java.

Button mhr.app.fragments.layers.LayerSettingsFragment.selectBtn
protectedinherited

Definition at line 38 of file LayerSettingsFragment.java.

boolean mhr.app.fragments.layers.LayerSettingsFragment.updatePending = false
protectedinherited

Udává, že update nemohl být proveden, protože fragment ještě nebyl inicializován.

Definition at line 37 of file LayerSettingsFragment.java.


The documentation for this class was generated from the following file: