co.uk.sentinelweb.views.draw.file
Class SaveFile

java.lang.Object
  extended by co.uk.sentinelweb.views.draw.file.SaveFile

public class SaveFile
extends java.lang.Object


Nested Class Summary
static class SaveFile.Option
           
 
Field Summary
 java.util.ArrayList<java.lang.Object> _assetList
           
 java.util.ArrayList<SaveFile.Option> _options
           
static java.lang.String AUTOSAVE_FILE_EXT
           
static java.lang.String BMP_FILE_EXT
           
static java.lang.String JSON_FILE_EXT
           
static java.lang.String NOMEDIA_EXT
           
static java.lang.String PREVIEW_FILE_EXT
           
static java.lang.String PROPS_FILE_EXT
           
static java.lang.String SVG_FILE_EXT
           
static java.lang.String TMP_FILE_EXT
           
static java.lang.String ZIP_FILE_EXT
           
 
Constructor Summary
SaveFile(java.lang.String _name, FileRepository _fr, Context c)
           
 
Method Summary
 void addDrawingToSet(Drawing d)
           
 void addDrawingToSetIfNessecary(Drawing d)
           
 void delete()
           
 java.lang.String ensureUnique(java.lang.String newID)
           
 AssetManager getAssetManager()
           
 Bitmap getBitmapBitmap(java.lang.String id)
           
 java.io.File getBitmapFile(java.lang.String id)
           
 java.io.File getBitmapOutputFile(java.lang.String id)
           
 java.io.File getDataDir()
           
 java.io.File getDrawingAutoSaveFile(java.lang.String id)
           
 java.io.File getDrawingFile(java.lang.String id)
           
 java.lang.String getName()
           
 Bitmap getPreviewBitmap()
           
 Bitmap getPreviewBitmap(java.lang.String id)
           
 java.io.File getPreviewFile()
           
 java.io.File getPreviewFile(java.lang.String id)
           
 DrawingSet getSet()
           
 java.io.File getSetFile()
           
 java.io.File getSVGFile(java.lang.String id)
           
 Drawing loadJSON(java.lang.String drawingId)
           
 Drawing loadJSON(java.lang.String drawingId, java.io.File file)
           
 DrawingSet loadSet()
           
 void makeAssetList(Drawing d)
           
 boolean renderFull(Drawing drawing, AndGraphicsRenderer agr, java.io.File f)
           
 void renderPreview(Drawing drawing, AndGraphicsRenderer agr, java.io.File f)
           
 void saveBitmaps(Drawing drawing)
           
 void saveBitmaps(Drawing drawing, boolean makeVisible, boolean previewOnly)
           
 boolean saveJSON(Drawing d, java.util.ArrayList<SaveFile.Option> options)
           
 boolean saveJSON(Drawing d, java.util.ArrayList<SaveFile.Option> options, java.io.File file)
           
 boolean saveSet()
           
 void setDataDir(java.lang.String id)
           
 void setPublished(Drawing drawing, boolean makeVisible)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREVIEW_FILE_EXT

public static final java.lang.String PREVIEW_FILE_EXT
See Also:
Constant Field Values

PROPS_FILE_EXT

public static final java.lang.String PROPS_FILE_EXT
See Also:
Constant Field Values

JSON_FILE_EXT

public static final java.lang.String JSON_FILE_EXT
See Also:
Constant Field Values

SVG_FILE_EXT

public static final java.lang.String SVG_FILE_EXT
See Also:
Constant Field Values

ZIP_FILE_EXT

public static final java.lang.String ZIP_FILE_EXT
See Also:
Constant Field Values

BMP_FILE_EXT

public static final java.lang.String BMP_FILE_EXT
See Also:
Constant Field Values

TMP_FILE_EXT

public static final java.lang.String TMP_FILE_EXT
See Also:
Constant Field Values

AUTOSAVE_FILE_EXT

public static final java.lang.String AUTOSAVE_FILE_EXT
See Also:
Constant Field Values

NOMEDIA_EXT

public static final java.lang.String NOMEDIA_EXT
See Also:
Constant Field Values

_options

public java.util.ArrayList<SaveFile.Option> _options

_assetList

public java.util.ArrayList<java.lang.Object> _assetList
Constructor Detail

SaveFile

public SaveFile(java.lang.String _name,
                FileRepository _fr,
                Context c)
         throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getSet

public DrawingSet getSet()
Returns:
the _set

getAssetManager

public AssetManager getAssetManager()
Returns:
the _assetManager

getDataDir

public java.io.File getDataDir()
Returns:
the _dataDir

getName

public java.lang.String getName()
Returns:
the _name

setDataDir

public void setDataDir(java.lang.String id)
                throws java.lang.Exception
Parameters:
_dataDir - the _dataDir to set
Throws:
java.lang.Exception

makeAssetList

public void makeAssetList(Drawing d)

saveSet

public boolean saveSet()

loadSet

public DrawingSet loadSet()

saveJSON

public boolean saveJSON(Drawing d,
                        java.util.ArrayList<SaveFile.Option> options)

saveJSON

public boolean saveJSON(Drawing d,
                        java.util.ArrayList<SaveFile.Option> options,
                        java.io.File file)

loadJSON

public Drawing loadJSON(java.lang.String drawingId)

loadJSON

public Drawing loadJSON(java.lang.String drawingId,
                        java.io.File file)

saveBitmaps

public void saveBitmaps(Drawing drawing)

saveBitmaps

public void saveBitmaps(Drawing drawing,
                        boolean makeVisible,
                        boolean previewOnly)

renderPreview

public void renderPreview(Drawing drawing,
                          AndGraphicsRenderer agr,
                          java.io.File f)

renderFull

public boolean renderFull(Drawing drawing,
                          AndGraphicsRenderer agr,
                          java.io.File f)

setPublished

public void setPublished(Drawing drawing,
                         boolean makeVisible)

getPreviewFile

public java.io.File getPreviewFile()

getPreviewFile

public java.io.File getPreviewFile(java.lang.String id)

getPreviewBitmap

public Bitmap getPreviewBitmap()

getPreviewBitmap

public Bitmap getPreviewBitmap(java.lang.String id)

getBitmapFile

public java.io.File getBitmapFile(java.lang.String id)

getBitmapBitmap

public Bitmap getBitmapBitmap(java.lang.String id)

getBitmapOutputFile

public java.io.File getBitmapOutputFile(java.lang.String id)

getSVGFile

public java.io.File getSVGFile(java.lang.String id)

getSetFile

public java.io.File getSetFile()

getDrawingFile

public java.io.File getDrawingFile(java.lang.String id)

getDrawingAutoSaveFile

public java.io.File getDrawingAutoSaveFile(java.lang.String id)

ensureUnique

public java.lang.String ensureUnique(java.lang.String newID)

addDrawingToSet

public void addDrawingToSet(Drawing d)

addDrawingToSetIfNessecary

public void addDrawingToSetIfNessecary(Drawing d)

delete

public void delete()