|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.blogspot.applications4android.comicreader.core.ComicClassList
public class ComicClassList
Class which manages the list of comics
Field Summary | |
---|---|
static java.lang.String |
CLASSES
json file containing the list of supported classes |
static java.lang.String |
SELECTED
json file containing the list of selected classes |
static int |
SORT_ALPHABETICAL
sorting in ASCII order |
static int |
SORT_EDITORIAL_LAST
sorting with editorial comics at the last |
static int |
SORT_IGNORE_ARTICLES
sorting in ASCII order but ignoring the articles |
static int |
SORT_MOST_UNREAD_FIRST
sorting in most unread strips order |
static int |
SORT_NEWEST_FIRST
sorting in newly added first order |
static int |
SORT_SELECTED_FIRST
sorting in selected first order |
Constructor Summary | |
---|---|
ComicClassList(AssetManager mgr)
Constructor |
|
ComicClassList(AssetManager mgr,
java.lang.String path)
Constructor |
|
ComicClassList(AssetManager mgr,
java.lang.String path,
java.io.File selected)
Constructor |
Method Summary | |
---|---|
ComicClass |
getComicClassFromIndex(int idx)
get the comic class object from the index |
Comic |
getComicFromIndex(int idx)
Get the comic object from the index |
Comic |
getComicFromTitle(java.lang.String title)
Get the comic object from the title |
int |
getComicIndexFromTitle(java.lang.String title)
Return the index of the comic in the list from its title |
Comic |
getNextComic(java.lang.String title)
Get the comic next to the one wrt the input title |
Comic |
getNextMyComic(java.lang.String title)
Get the comic next to the one wrt the input title |
java.lang.String |
getPackage()
Gets the package to which all the classes belong to |
Comic |
getPreviousComic(java.lang.String title)
Get the comic previous to the one wrt the input title |
Comic |
getPreviousMyComic(java.lang.String title)
Get the comic previous to the one wrt the input title |
int[] |
getSelectedComicList()
Returns the list of selected comic indices |
boolean |
isSelected(int idx)
Tells whether the comic in the current index is selected or not |
int |
length()
Gets the number of comics in the list |
int |
numSelected()
Number of comics selected so far |
java.io.File |
selectedFile()
File which stores the list of selected comics |
void |
setAllSelected(boolean value)
Set all the comics to be selected |
void |
setSelected(java.lang.String title,
boolean value)
Set the comic to be selected |
void |
sortClasses(int type)
Sort the classes according to the pre-defined types |
void |
storeSelected()
Store the selected comics into the json file |
void |
toggleSelected(int idx)
Toggle the select bit for the given comic |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASSES
public static final java.lang.String SELECTED
public static final int SORT_ALPHABETICAL
public static final int SORT_IGNORE_ARTICLES
public static final int SORT_EDITORIAL_LAST
public static final int SORT_NEWEST_FIRST
public static final int SORT_SELECTED_FIRST
public static final int SORT_MOST_UNREAD_FIRST
Constructor Detail |
---|
public ComicClassList(AssetManager mgr) throws java.io.IOException, JSONException, ComicNotFoundException
mgr
- the asset manager
JSONException
java.io.IOException
ComicNotFoundException
public ComicClassList(AssetManager mgr, java.lang.String path) throws java.io.IOException, JSONException, ComicNotFoundException
mgr
- asset managerpath
- path to json file wrt assets
JSONException
java.io.IOException
ComicNotFoundException
public ComicClassList(AssetManager mgr, java.lang.String path, java.io.File selected) throws java.io.IOException, JSONException, ComicNotFoundException
mgr
- asset managerpath
- path to json file wrt assetsselected
- file containing the list of selected comics
JSONException
java.io.IOException
ComicNotFoundException
Method Detail |
---|
public java.lang.String getPackage()
public int length()
public void sortClasses(int type) throws ComicSortException
type
- sorting type
ComicSortException
public ComicClass getComicClassFromIndex(int idx) throws ComicNotFoundException
idx
- index
ComicNotFoundException
public Comic getComicFromIndex(int idx) throws ComicNotFoundException
idx
- comic index
ComicNotFoundException
public Comic getComicFromTitle(java.lang.String title) throws ComicNotFoundException
title
- comic english name
ComicNotFoundException
public Comic getNextComic(java.lang.String title) throws ComicNotFoundException
title
- comic english name
ComicNotFoundException
public Comic getNextMyComic(java.lang.String title) throws ComicNotFoundException
title
- comic english name
ComicNotFoundException
public Comic getPreviousComic(java.lang.String title) throws ComicNotFoundException
title
- comic english name
ComicNotFoundException
public Comic getPreviousMyComic(java.lang.String title) throws ComicNotFoundException
title
- comic english name
ComicNotFoundException
public int getComicIndexFromTitle(java.lang.String title)
title
- comic english name
public int[] getSelectedComicList()
public void setSelected(java.lang.String title, boolean value) throws ComicNotFoundException
title
- comic english namevalue
- true if it is to be selected
ComicNotFoundException
public boolean isSelected(int idx) throws ComicNotFoundException
idx
- index
ComicNotFoundException
public void toggleSelected(int idx) throws ComicNotFoundException
idx
- comic index
ComicNotFoundException
public void setAllSelected(boolean value)
value
- true if it is to be selectedpublic int numSelected()
public void storeSelected() throws java.io.IOException, ComicSDCardFull
java.io.IOException
ComicSDCardFull
public java.io.File selectedFile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |