Lines Matching defs:corpus
65 public void setCurrentCorpus(Corpus corpus) {
66 mCurrentCorpusName = corpus == null ? null : corpus.getName();
73 for (Corpus corpus : enabledCorpora) {
74 if (!corpus.isCorpusHidden()) {
75 sorted.add(corpus);
85 // Comparing a corpus against itself
116 * Gets the position of the given corpus.
118 public int getCorpusPosition(Corpus corpus) {
119 if (corpus == null) {
124 if (corpus.equals(getItem(i))) {
128 Log.w(TAG, "Corpus not in adapter: " + corpus);
137 Corpus corpus = getItem(position);
138 if (DBG) Log.d(TAG, "Binding " + position + ", corpus=" + corpus);
139 bindView(view, corpus);
143 protected void bindView(CorpusView view, Corpus corpus) {
144 Drawable icon = getCorpusIcon(corpus);
145 CharSequence label = getCorpusLabel(corpus);
146 boolean isCurrent = isCurrentCorpus(corpus);
147 if (DBG) Log.d(TAG, "bind:name=" + corpus + ",label=" + label + ",current=" + isCurrent);
153 protected Drawable getCorpusIcon(Corpus corpus) {
154 if (corpus == null) {
157 return corpus.getCorpusIcon();
161 protected CharSequence getCorpusLabel(Corpus corpus) {
162 if (corpus == null) {
165 return corpus.getLabel();
169 protected boolean isCurrentCorpus(Corpus corpus) {
170 if (corpus == null) {
173 return corpus.getName().equals(mCurrentCorpusName);