App
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
mhr.appcore.interfaces.PDImageDataPresentation Class Referenceabstract

Třída slouží k platformě závislé reprezentaci obrazu. More...

Inheritance diagram for mhr.appcore.interfaces.PDImageDataPresentation:
mhr.appandroid.adapters.APDImagePresentation

Public Member Functions

void addLayerInfo (LayerPDInfo info)
 Přidá informace o vrstvě na konec seznamu vrstev. Vrstva bude úplně nahoře.
 
void addLayerInfo (LayerPDInfo info, int overId)
 Přidá informace o vrstvě tak, že budou těsně nad informacemi o vrstvě s overId.
 
abstract PDBitmap createLayerThumb ()
 Vytvoří platformě závislou bitmapu pro náhled vrstvy.
 
abstract PDBitmap createMaskThumb ()
 Vytvoří platformě závislou bitmapu pro náhled masky.
 
abstract void hasChanged ()
 Slouží k oznámení klientovy, že se něco na prezentaci změnilo.
 
LayerPDInfo getLayerInfo (int id) throws LayerNotFoundException
 Vrací informace o vrstvě s daným ID.
 
int getLayersCount ()
 Vrací počet vrstev v obraze.
 
void removeLayer (int id) throws LayerNotFoundException
 Odebere vrstvu s daným id.
 
void moveLayer (int id, int beforeId) throws LayerNotFoundException
 -1 znamená přesun úplně dospod
 
ArrayList< LayerPDInfogetLayers ()
 Vrátí pole, ve kterém jsou uložené jednotlivé vrstvy.
 

Public Attributes

ImageSelectedState selectedState
 Udává, co je vlastně vybráno.
 
int selectedLayerId
 Udává id vybrané vrstvy, pokud je vybrána vrstva nebo její maska.
 
PDBitmap masterMask
 Náhled masterMask.
 
boolean masterMaskActive
 Udává, jestli je masterMask použita.
 

Protected Member Functions

int getLayerPosition (int id)
 Vrátí pozici, na které je vrstva uložena.
 

Protected Attributes

ArrayList< LayerPDInfolayers = new ArrayList<LayerPDInfo>()
 Pole, ve kterém jsou uloženy informace o vrstvách.
 

Detailed Description

Třída slouží k platformě závislé reprezentaci obrazu.

Třída slouží k platformě závislé reprezentaci obrazu. Obsahuje zpětnou vazbu pro klientskou aplikaci. Udržuje informace o struktuře obrazu a platformě závislé náhledy vrstev.

Definition at line 15 of file PDImageDataPresentation.java.

Member Function Documentation

void mhr.appcore.interfaces.PDImageDataPresentation.addLayerInfo ( LayerPDInfo  info)
inline

Přidá informace o vrstvě na konec seznamu vrstev. Vrstva bude úplně nahoře.

Parameters
info

Definition at line 34 of file PDImageDataPresentation.java.

{
layers.add(info);
}
void mhr.appcore.interfaces.PDImageDataPresentation.addLayerInfo ( LayerPDInfo  info,
int  overId 
)
inline

Přidá informace o vrstvě tak, že budou těsně nad informacemi o vrstvě s overId.

Parameters
info
overId

Definition at line 43 of file PDImageDataPresentation.java.

{
layers.add(getLayerPosition(overId) + 1, info);
}
abstract PDBitmap mhr.appcore.interfaces.PDImageDataPresentation.createLayerThumb ( )
pure virtual

Vytvoří platformě závislou bitmapu pro náhled vrstvy.

Returns

Implemented in mhr.appandroid.adapters.APDImagePresentation.

abstract PDBitmap mhr.appcore.interfaces.PDImageDataPresentation.createMaskThumb ( )
pure virtual

Vytvoří platformě závislou bitmapu pro náhled masky.

Returns

Implemented in mhr.appandroid.adapters.APDImagePresentation.

LayerPDInfo mhr.appcore.interfaces.PDImageDataPresentation.getLayerInfo ( int  id) throws LayerNotFoundException
inline

Vrací informace o vrstvě s daným ID.

Parameters
id
Returns
Exceptions
LayerNotFoundException

Definition at line 70 of file PDImageDataPresentation.java.

{
for (LayerPDInfo l : layers) {
if (l.id == id) {
return l;
}
}
throw new LayerNotFoundException("Layer info not found");
}
int mhr.appcore.interfaces.PDImageDataPresentation.getLayerPosition ( int  id)
inlineprotected

Vrátí pozici, na které je vrstva uložena.

Parameters
id
Returns

Definition at line 134 of file PDImageDataPresentation.java.

{
LayerPDInfo l = getLayerInfo(id);
return layers.indexOf(l);
}
ArrayList<LayerPDInfo> mhr.appcore.interfaces.PDImageDataPresentation.getLayers ( )
inline

Vrátí pole, ve kterém jsou uložené jednotlivé vrstvy.

Returns

Definition at line 118 of file PDImageDataPresentation.java.

{
return layers;
}
int mhr.appcore.interfaces.PDImageDataPresentation.getLayersCount ( )
inline

Vrací počet vrstev v obraze.

Returns

Definition at line 83 of file PDImageDataPresentation.java.

{
return layers.size();
}
abstract void mhr.appcore.interfaces.PDImageDataPresentation.hasChanged ( )
pure virtual

Slouží k oznámení klientovy, že se něco na prezentaci změnilo.

Implemented in mhr.appandroid.adapters.APDImagePresentation.

void mhr.appcore.interfaces.PDImageDataPresentation.moveLayer ( int  id,
int  beforeId 
) throws LayerNotFoundException
inline

-1 znamená přesun úplně dospod

Přesune vrstvu s daným id před vrstvu s beforeId.

Parameters
id
beforeId
Exceptions
LayerNotFoundException

Definition at line 103 of file PDImageDataPresentation.java.

{
LayerPDInfo l = getLayerInfo(id);
int oldIndex = layers.indexOf(l);
int newIndex = (beforeId < 0) ? layers.size() : layers.indexOf(getLayerInfo(beforeId));
layers.remove(l);
if (oldIndex < newIndex) {
newIndex--;
}
layers.add(newIndex, l);
}
void mhr.appcore.interfaces.PDImageDataPresentation.removeLayer ( int  id) throws LayerNotFoundException
inline

Odebere vrstvu s daným id.

Parameters
id
Exceptions
LayerNotFoundException

Definition at line 92 of file PDImageDataPresentation.java.

{
layers.remove(getLayerInfo(id));
}

Member Data Documentation

ArrayList<LayerPDInfo> mhr.appcore.interfaces.PDImageDataPresentation.layers = new ArrayList<LayerPDInfo>()
protected

Pole, ve kterém jsou uloženy informace o vrstvách.

Definition at line 126 of file PDImageDataPresentation.java.

PDBitmap mhr.appcore.interfaces.PDImageDataPresentation.masterMask

Náhled masterMask.

Definition at line 23 of file PDImageDataPresentation.java.

boolean mhr.appcore.interfaces.PDImageDataPresentation.masterMaskActive

Udává, jestli je masterMask použita.

Definition at line 24 of file PDImageDataPresentation.java.

int mhr.appcore.interfaces.PDImageDataPresentation.selectedLayerId

Udává id vybrané vrstvy, pokud je vybrána vrstva nebo její maska.

Definition at line 22 of file PDImageDataPresentation.java.

ImageSelectedState mhr.appcore.interfaces.PDImageDataPresentation.selectedState

Udává, co je vlastně vybráno.

Definition at line 21 of file PDImageDataPresentation.java.


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