public abstract class FileContentHandler extends URIContentHandler implements VisibilityListener
Modifier and Type | Field and Description |
---|---|
protected java.io.File |
_file |
protected boolean |
_previouslyVisible |
protected int |
_visCond |
uri
Modifier | Constructor and Description |
---|---|
protected |
FileContentHandler(java.io.File file) |
Modifier and Type | Method and Description |
---|---|
void |
deleteContent()
Delete content from ATAK
This may kick off a delete task or do nothing if the content
isn't imported or deletion is N/A
|
abstract java.lang.String |
getContentType()
Get the content type used for removing via Import Manager
|
java.io.File |
getFile()
Get the file for this handler
|
abstract java.lang.String |
getMIMEType()
Get the MIME type used for removing via Import Manager
|
java.lang.String |
getTitle()
Get a title that represents this content
|
void |
importContent()
Import content into ATAK
This may kick off an import task or simply do nothing if
the content is already imported or import is N/A
|
protected boolean |
isConditionVisible() |
boolean |
isVisible()
Check if this file is visible based on visibility condition state
|
void |
onVisibilityConditions(java.util.List<VisibilityCondition> conditions)
Visibility conditions have changed or should be processed
This is where implementations should go through their contents and apply
visibility based on these conditions
|
boolean |
setVisible(boolean visible)
Set the visibility of this file
|
protected boolean |
setVisibleImpl(boolean visible)
Sub-classes should override this
|
getIcon, getIconColor, getIconDrawable, getMenu, getURI, getView, getViewState, isActionSupported, setViewState
protected final java.io.File _file
protected int _visCond
protected boolean _previouslyVisible
public java.io.File getFile()
public abstract java.lang.String getContentType()
public abstract java.lang.String getMIMEType()
public boolean setVisible(boolean visible)
visible
- True if visibleprotected boolean setVisibleImpl(boolean visible)
public boolean isVisible()
protected boolean isConditionVisible()
public void onVisibilityConditions(java.util.List<VisibilityCondition> conditions)
VisibilityListener
onVisibilityConditions
in interface VisibilityListener
conditions
- List of visibility conditionspublic void importContent()
URIContentHandler
importContent
in class URIContentHandler
public void deleteContent()
URIContentHandler
deleteContent
in class URIContentHandler
public java.lang.String getTitle()
URIContentHandler
getTitle
in interface URIContent
getTitle
in class URIContentHandler