App
LayerPDInfo.java
Go to the documentation of this file.
1 package mhr.appcore.image.layers;
2 
3 import mhr.appcore.interfaces.PDBitmap;
4 import mhr.appcore.interfaces.PDImageDataPresentation;
5 
9 public class LayerPDInfo {
10 
11  //===== INTERFACES, CLASSES, ENUMS ==========================================================================================================//
12  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
13  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
14 
15  //===== FIELDS ==============================================================================================================================//
16  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
18  protected PDBitmap layerThumb;
19  protected PDBitmap maskThumb;
20  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
21  public int id;
22  public LayerType type;
23  public double opacity;
24  public boolean visible;
25  public boolean maskActive;
26  public volatile boolean isChanged;
28 
29  //===== CONSTRUCTORS, DESTRUCTORS, RELATED METHODS ==========================================================================================//
30  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
31  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
37  public LayerPDInfo(PDImageDataPresentation owner) throws NullPointerException {
38  if (owner == null) {
39  throw new NullPointerException("Owner must not be null");
40  }
41  this.owner = owner;
42  }
43 
44  //===== METHODS =============================================================================================================================//
45  //----- NON-PUBLIC --------------------------------------------------------------------------------------------------------------------------//
46  //----- PUBLIC ------------------------------------------------------------------------------------------------------------------------------//
47 
54  public PDBitmap getLayerThumb(boolean createIfNotExist) {
55  if (createIfNotExist && layerThumb == null) {
57  }
58  return layerThumb;
59  }
60 
66  public PDBitmap getMaskThumb(boolean createIfNotExist) {
67  if (createIfNotExist && maskThumb == null) {
69  }
70  return maskThumb;
71  }
72 }