App
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mhr.app.fragments.layers.LayerSettingsFragment Class Referenceabstract

Výchozí třída pro fragmenty nastavení jednotlivých druhů vrstev. More...

Inheritance diagram for mhr.app.fragments.layers.LayerSettingsFragment:
mhr.app.fragments.layers.ColorLayerSettingsFragment mhr.app.fragments.layers.filter.DifferenceOfGaussianSharpenLayerSettingsFragment mhr.app.fragments.layers.filter.GaussianBlurLayerSettingsFragment mhr.app.fragments.layers.filter.GaussianSharpenLayerSettingsFragment mhr.app.fragments.layers.filter.LaplaceSharpenLayerSettingsFragment mhr.app.fragments.layers.filter.LaplacianOfGaussianSharpenLayerSettingsFragment mhr.app.fragments.layers.lut.BrightnessLayerSettingsFragment mhr.app.fragments.layers.lut.ContrastLayerSettingsFragment mhr.app.fragments.layers.lut.CurvesLayerSettingsFragment mhr.app.fragments.layers.lut.GammaLayerSettingsFragment mhr.app.fragments.layers.RasterLayerSettingsFragment

Public Member Functions

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 onClick (View v)
 
void onAttach (Activity activity)
 
View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
 
void onResume ()
 

Protected Member Functions

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

Protected Attributes

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

Výchozí třída pro fragmenty nastavení jednotlivých druhů vrstev.

Definition at line 22 of file LayerSettingsFragment.java.

Member Function Documentation

abstract View mhr.app.fragments.layers.LayerSettingsFragment.initView ( LayoutInflater  inflater,
ViewGroup  container,
Bundle  savedInstanceState 
)
protectedpure virtual
void mhr.app.fragments.layers.LayerSettingsFragment.onAttach ( Activity  activity)
inline

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.LayerSettingsFragment.onClick ( View  v)
inline

Definition at line 108 of file LayerSettingsFragment.java.

{
switch (v.getId()) {
case R.id.LayerSettingsSelectBtn:
break;
default:
break;
}
}
View mhr.app.fragments.layers.LayerSettingsFragment.onCreateView ( LayoutInflater  inflater,
ViewGroup  container,
Bundle  savedInstanceState 
)
inline

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 ( )
inline

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 ( )
inlineprotected

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)
inline

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)
inline

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

Parameters
parent

Definition at line 84 of file LayerSettingsFragment.java.

{
this.parent = parent;
}
abstract void mhr.app.fragments.layers.LayerSettingsFragment.updateFromPresentation ( LayerSpecificPresentation  pres)
protectedpure virtual
abstract void mhr.app.fragments.layers.LayerSettingsFragment.updatePresentation ( LayerSpecificPresentation  pres)
protectedpure virtual

Member Data Documentation

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

Definition at line 32 of file LayerSettingsFragment.java.

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

Id vrstvy, kterou reprezentuje.

Definition at line 34 of file LayerSettingsFragment.java.

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

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

Definition at line 35 of file LayerSettingsFragment.java.

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

Definition at line 31 of file LayerSettingsFragment.java.

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

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

Definition at line 36 of file LayerSettingsFragment.java.

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

Definition at line 33 of file LayerSettingsFragment.java.

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

Definition at line 30 of file LayerSettingsFragment.java.

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

Definition at line 38 of file LayerSettingsFragment.java.

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

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: