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

Výchozí třída pro pop-up fragmenty nástrojů s náhledem. More...

Inheritance diagram for mhr.app.fragments.toolbox.CancellableToolPopUpFragment:
mhr.app.fragments.toolbox.filters.DifferenceOfGaussianSharpenPopUpFragment mhr.app.fragments.toolbox.filters.GaussianBlurPopUpFragment mhr.app.fragments.toolbox.filters.GaussianSharpenPopUpFragment mhr.app.fragments.toolbox.filters.LaplaceSharpenPopUpFragment mhr.app.fragments.toolbox.filters.LaplacianOfGaussianSharpenPopUpFragment mhr.app.fragments.toolbox.pointops.BrightnessPopUpFragment mhr.app.fragments.toolbox.pointops.ContrastPopUpFragment mhr.app.fragments.toolbox.pointops.CurvesPopUpFragment mhr.app.fragments.toolbox.pointops.GammaPopUpFragment mhr.app.fragments.toolbox.transforms.ProjectiveTransformPopUpFragment

Public Member Functions

void onClick (View v)
 
void onCheckedChanged (CompoundButton buttonView, boolean isChecked)
 
void onAttach (Activity activity)
 
View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
 
void onResume ()
 
void onPause ()
 

Protected Member Functions

View initView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
 Provede inicializaci view.
 
abstract Tool getTool ()
 Odvozená třída musí vrátit nástroj, který představuje.
 
abstract CancelableToolActionData getUpdateToolData ()
 Odvozená třída musí vrátit data, pro aktualizaci náhledu nástroje.
 
abstract int getLayoutId ()
 Odvozená třída musí vrátit id svého layoutu pro inicializaci UI.
 
abstract void onInitView ()
 Voláno po načtení layoutu, odvozená třída zde nastavuje posluchače událostí atd.
 
abstract void onCancel ()
 Voláno, pokud je nástroj zrušen, odvozená třída provede potřebné operaci.
 

Protected Attributes

View root
 
AppMainActivity activity
 
boolean firstCreated = true
 
Button applyBtn
 
Button previewBtn
 
Button cancelBtn
 
ToggleButton livePreviewTBtn
 
boolean livePreviewOn = false
 

Detailed Description

Výchozí třída pro pop-up fragmenty nástrojů s náhledem.

Definition at line 26 of file CancellableToolPopUpFragment.java.

Member Function Documentation

abstract int mhr.app.fragments.toolbox.CancellableToolPopUpFragment.getLayoutId ( )
protectedpure virtual
abstract Tool mhr.app.fragments.toolbox.CancellableToolPopUpFragment.getTool ( )
protectedpure virtual
abstract CancelableToolActionData mhr.app.fragments.toolbox.CancellableToolPopUpFragment.getUpdateToolData ( )
protectedpure virtual
View mhr.app.fragments.toolbox.CancellableToolPopUpFragment.initView ( LayoutInflater  inflater,
ViewGroup  container,
Bundle  savedInstanceState 
)
inlineprotected

Provede inicializaci view.

Parameters
inflater
container
savedInstanceState
Returns

Definition at line 56 of file CancellableToolPopUpFragment.java.

{
root = inflater.inflate(getLayoutId(), container, false);
applyBtn = (Button) root.findViewById(R.id.PointOperationToolApplyBtn);
previewBtn = (Button) root.findViewById(R.id.PointOperationToolPreviewBtn);
cancelBtn = (Button) root.findViewById(R.id.PointOperationToolCancelBtn);
livePreviewTBtn = (ToggleButton) root.findViewById(R.id.PointOperationToolLivePreviewTBtn);
applyBtn.setOnClickListener(this);
previewBtn.setOnClickListener(this);
cancelBtn.setOnClickListener(this);
livePreviewTBtn.setOnCheckedChangeListener(this);
firstCreated = false;
return root;
}
void mhr.app.fragments.toolbox.CancellableToolPopUpFragment.onAttach ( Activity  activity)
inline

Definition at line 145 of file CancellableToolPopUpFragment.java.

{
super.onAttach(activity);
/*
* called once the fragment is associated with its activity.
*/
this.activity = (AppMainActivity) activity;
}
abstract void mhr.app.fragments.toolbox.CancellableToolPopUpFragment.onCancel ( )
protectedpure virtual
void mhr.app.fragments.toolbox.CancellableToolPopUpFragment.onCheckedChanged ( CompoundButton  buttonView,
boolean  isChecked 
)
inline

Definition at line 133 of file CancellableToolPopUpFragment.java.

{
if (buttonView == livePreviewTBtn) {
livePreviewOn = isChecked;
}
activity.addCommand(new CancelableToolUpdateCommand(getUpdateToolData()));
}
}
void mhr.app.fragments.toolbox.CancellableToolPopUpFragment.onClick ( View  v)
inline

Definition at line 112 of file CancellableToolPopUpFragment.java.

{
int id = v.getId();
switch (id) {
//(biasSeekBar.getProgress() - 100) / 100.0)
case R.id.PointOperationToolApplyBtn:
activity.addCommand(new CancelableToolUpdateCommand(getUpdateToolData()));
activity.addCommand(new CancelableToolCommitCommand(new CancelableToolActionData(Action.COMMIT_PREVIEW)));
break;
case R.id.PointOperationToolPreviewBtn:
activity.addCommand(new CancelableToolUpdateCommand(getUpdateToolData()));
break;
case R.id.PointOperationToolCancelBtn:
activity.addCommand(new CancelableToolCommitCommand(new CancelableToolActionData(Action.CANCEL_PREVIEW)));
break;
}
}
View mhr.app.fragments.toolbox.CancellableToolPopUpFragment.onCreateView ( LayoutInflater  inflater,
ViewGroup  container,
Bundle  savedInstanceState 
)
inline

Definition at line 165 of file CancellableToolPopUpFragment.java.

{
/*
* 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;
return initView(inflater, container, savedInstanceState);
} else {
return root;
}
}
abstract void mhr.app.fragments.toolbox.CancellableToolPopUpFragment.onInitView ( )
protectedpure virtual
void mhr.app.fragments.toolbox.CancellableToolPopUpFragment.onPause ( )
inline

Definition at line 216 of file CancellableToolPopUpFragment.java.

{
super.onPause();
/*
* 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.
*
* 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).
* 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).
*/
}
void mhr.app.fragments.toolbox.CancellableToolPopUpFragment.onResume ( )
inline

Definition at line 207 of file CancellableToolPopUpFragment.java.

{
super.onResume();
/*
* makes the fragment interacting with the user (based on its containing activity being resumed).
*/
activity.addCommand(new SelectToolCommand(getTool()));
}

Member Data Documentation

AppMainActivity mhr.app.fragments.toolbox.CancellableToolPopUpFragment.activity
protected

Definition at line 35 of file CancellableToolPopUpFragment.java.

Button mhr.app.fragments.toolbox.CancellableToolPopUpFragment.applyBtn
protected

Definition at line 38 of file CancellableToolPopUpFragment.java.

Button mhr.app.fragments.toolbox.CancellableToolPopUpFragment.cancelBtn
protected

Definition at line 40 of file CancellableToolPopUpFragment.java.

boolean mhr.app.fragments.toolbox.CancellableToolPopUpFragment.firstCreated = true
protected

Definition at line 36 of file CancellableToolPopUpFragment.java.

boolean mhr.app.fragments.toolbox.CancellableToolPopUpFragment.livePreviewOn = false
protected

Definition at line 43 of file CancellableToolPopUpFragment.java.

ToggleButton mhr.app.fragments.toolbox.CancellableToolPopUpFragment.livePreviewTBtn
protected

Definition at line 41 of file CancellableToolPopUpFragment.java.

Button mhr.app.fragments.toolbox.CancellableToolPopUpFragment.previewBtn
protected

Definition at line 39 of file CancellableToolPopUpFragment.java.

View mhr.app.fragments.toolbox.CancellableToolPopUpFragment.root
protected

Definition at line 34 of file CancellableToolPopUpFragment.java.


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