/** * Constructor. * * @param page the {@link CloudCoderPage} * @param labelText the label text */ public LabeledCourseSelectionListBox(CloudCoderPage page, String labelText) { FlowPanel panel = new FlowPanel(); panel.setStyleName("cc-inlineFlowPanel", true); if (!labelText.endsWith(" ")) { labelText = labelText + " "; } InlineLabel label = new InlineLabel(labelText); panel.add(label); this.courseSelectionListBox = new CourseSelectionListBox(page, 1); panel.add(courseSelectionListBox); courseSelectionListBox.setWidth(LISTBOX_WIDTH_PX + "px"); courseSelectionListBox.setHeight(HEIGHT_PX + "px"); initWidget(panel); }
/** * Set the {@link CourseSelectionListBox}'s display mode. * * @param mode the display mode */ public void setDisplayMode(DisplayMode mode) { courseSelectionListBox.setDisplayMode(mode); }
@Override public void activate(Session session, SubscriptionRegistrar subscriptionRegistrar) { courseSelectionListBox.activate(session, subscriptionRegistrar); }