This is your resource to discuss support topics with your peers, and learn from each other.
Create an application that displays a sequence of complex records in a grid with selectable rows. Prerequisite: You should have completed the lab entitled Introduction to User Interface managers before starting this exercise.
Apply your understanding of managers in building a useful custom UI component.
Discover how to use a ListField and ListFieldCallback for showing a sequence of selectable items.
Discover how to manipulate a Graphics context.
Experience some uses of BitmapField, NullField and DateField.
In the IDE, open the table_list_field.jdw workspace
Open the TableListApp.java source file.
Open the TableListField.java source file.
Create a row manager for each row that is to be the content of a newly-created TableListField.
Set the size and callback of the newly-created TableListField.
Implement getColumnStart to calculate the horizontal position at which a given column should begin.
When a TableRowManager is called upon to draw a row, transform and restore the Graphics context before and after the call to paint, so that the row paints into the correct region.
Complete the sublayout, getPreferredWidth, and getPreferredHeight methods of the TableRowManager.
When the framework invokes the RENDERER callback to draw a row from a list, have the RENDERER delegate to the proper TableRowManager.
Within the TableListApp constructor, instantiate appropriate tableContent fields to represent the FAKE_DATA array.
Within the TableListApp constructor, create the table and add it to the screen.
In this exercise, you discovered the following things:
how to build a custom UI component.
to use a ListField and ListFieldCallback for showing a sequence of selectable items.
to manipulate a Graphics context.
some uses of BitmapField, NullField and DateField.