Open main menu

CDOT Wiki β

Changes

no edit summary
private String email;
</source>
 
3.3. Add three argument constructor:
<source lang="java">
}
</source>
 
3.4. Add getter method for e-mail and override the <code>toString()</code> from the Object class(it will be used to implement <code>Comparator</code> interface):
<source lang="java">
}
</source>
 
3.5. Add class that will hold all Student objects and make necessary manipulations:
<source lang="java">
}
}
  </source>
3.6. The following elements are added to the <code>MyScreen()</code> constructor:<br/>
// Obtain a reference to the UiApplication's KeywordFilterField
_keywordFilterField = _app.getKeywordFilterField();
</source>
3.7. Other elements are added inside the <code>ViewStudentApp</code> class. Add necessary private fields:
private StudentList _studentList;
private Vector _students;
</source> 
3.8. Add search field and students list:
<source lang="java">
_mainScreen.add(_keywordFilterField);
</source>
 
3.9. Add background to the ''keywordFilterField'':
</source>
3.910. Add inner class for custom search field:
<source lang="java">
final static class CustomKeywordField extends BasicEditField {
</source>
3.1011. Add the method that creates lists of students:
<source lang="java">
private Vector getFromList() {
</source>
3.1112. Add the method to access the <code>KeywordFilterField</code> object:
<source lang="java">
KeywordFilterField getKeywordFilterField() {
</source>
3.1213. Run the application:<br/>
[[Image: BB_mainscreen.png | 300px]]<br/>
3.1314. Type the desired student name in the search field:<br/>
[[Image: BB_search.png | 300px]]
1
edit