/** * Set acceptable values. * * @param newValues the new values */ public void setAcceptableValues(Collection<T> newValues) { values.clear(); valueKeyToIndex.clear(); ListBox listBox = getListBox(); listBox.clear(); for (T nextNewValue : newValues) { addValue(nextNewValue); } updateListBox(); }
public void setAcceptableValues(Collection<T> newValues) { values.clear(); valueKeyToIndex.clear(); ListBox listBox = getListBox(); listBox.clear(); for (T nextNewValue : newValues) { addValue(nextNewValue); } updateListBox(); }
private void setDate(Date date) { if (getDatePicker().isYearAndMonthDropdownVisible()) { // setup months dropdown int month = date.getMonth(); monthSelect.setSelectedIndex(month); // setup years dropdown yearSelect.clear(); int year = date.getYear(); int startYear = year - getNoOfYearsToDisplayBefore(); int endYear = year + getNoOfYearsToDisplayAfter(); Date newDate = new Date(); for (int i = startYear; i <= endYear; i++) { newDate.setYear(i); yearSelect.addItem(getModel().getYearFormatter().format(newDate)); } yearSelect.setSelectedIndex(year - startYear); } else { grid.setText(0, monthColumn, getModel().formatCurrentMonthAndYear()); } }
/** {@inheritDoc} */ @Override public void setLocalBranches(@NotNull List<String> branches) { this.localBranch.clear(); for (String branch : branches) { this.localBranch.addItem(branch); } }
@Override protected void setValue(Iterable<V> value) { this.value = value; control.clear(); comboItems.clear(); for (V item : value) { control.addItem(item.toString()); comboItems.add(item); } } };
@Override public void setTypes(List<JavaSourceFileType> types) { sourceFileTypes.clear(); typeField.clear(); sourceFileTypes.addAll(types); for (JavaSourceFileType type : sourceFileTypes) { typeField.addItem(type.toString()); } }
public void setAcceptableValues(Collection<T> newValues) { values.clear(); valueKeyToIndex.clear(); ListBox listBox = getListBox(); listBox.clear(); for (T nextNewValue : newValues) { addValue(nextNewValue); } updateListBox(); }
private void load(final List<T> options){ this.values = options; this.listBox.clear(); if (options!=null) populateListItem(); if (value!=null) setValue(value, false); //if we have only one element in the list => setValue if (options!=null && value==null){ if (options.size()>=1) setValue(options.get(0), true); } }
@Override public void setMachines(List<? extends MachineImpl> machines) { machinesList.clear(); machinesById.clear(); machines.forEach( machine -> { machinesById.put(machine.getName(), machine); machinesList.addItem(machine.getName()); }); machinesList.setVisibleItemCount(machines.size()); machinesList.setSelectedIndex(0); }
@Override public void setupPatternList(final List<String> patterns) { patternList.clear(); patternList.setEnabled(true); patternList.addItem(translate(GuidedDecisionTableErraiConstants.PatternToDeletePageView_Choose)); patterns.forEach(patternList::addItem); }
public void setBackgroundColorLocaleMap(Map<String, String> localeMap) { backColors.clear(); backColors.addItem(localeMap.get(CubaRichTextAreaState.RICH_TEXT_AREA_BACKGROUND_LABEL)); backColors.addItem(localeMap.get(CubaRichTextAreaState.RICH_TEXT_AREA_WHITE_LABEL), "white"); backColors.addItem(localeMap.get(CubaRichTextAreaState.RICH_TEXT_AREA_BLACK_LABEL), "black"); backColors.addItem(localeMap.get(CubaRichTextAreaState.RICH_TEXT_AREA_RED_LABEL), "red"); backColors.addItem(localeMap.get(CubaRichTextAreaState.RICH_TEXT_AREA_GREEN_LABEL), "green"); backColors.addItem(localeMap.get(CubaRichTextAreaState.RICH_TEXT_AREA_YELLOW_LABEL), "yellow"); backColors.addItem(localeMap.get(CubaRichTextAreaState.RICH_TEXT_AREA_BLUE_LABEL), "blue"); backColors.setTabIndex(-1); }
@Override public void setCommandTypes(List<CommandType> commandTypes) { typesList.clear(); commandTypesById.clear(); commandTypes.forEach( commandType -> { commandTypesById.put(commandType.getId(), commandType); typesList.addItem(commandType.getDisplayName(), commandType.getId()); }); typesList.setVisibleItemCount(commandTypes.size()); typesList.setSelectedIndex(0); }
@Override public void setItems( final List<Pair<String, String>> items ) { listItems.clear(); for ( Pair<String, String> item : items ) { listItems.addItem( item.getK1(), item.getK2() ); } }
@Override public void setupEmptyPatternList() { patternList.clear(); patternList.setEnabled(false); patternList.addItem(translate(GuidedDecisionTableErraiConstants.PatternToDeletePageView_None)); }
/** * Need to do some additional clean up to really clear the list */ public void clear() { super.clear(); // remove the option group elements Element elm = getElement(); while (elm.hasChildNodes()) { elm.removeChild(elm.getFirstChild()); } groupMap.clear(); }
@Override public void setupWorkItemList() { workItems.clear(); workItems.setEnabled(true); workItems.addItem(translate(GuidedDecisionTableErraiConstants.WorkItemPageView_Choose), ""); }
private void fillDates() { setVisible( false ); dates.clear(); // Check month int days = daysInMonth( months.getSelectedIndex() + 1 ); for ( int i = 1; i <= days; i++ ) { dates.addItem( Integer.toString( i ) ); } setVisible( true ); }
@Override public void loadPluginList(final List<DecisionTableColumnPlugin> plugins) { pluginsList.clear(); for (final DecisionTableColumnPlugin plugin : plugins) { pluginsList.addItem(plugin.getTitle(), plugin.getIdentifier()); } pluginsList.setVisibleItemCount(pluginsList.getItemCount()); }
private void updateBootSequenceItems() { // Update list box bootSequenceBox.clear(); bootSequenceBox.setVisibleItemCount(bootSequenceModel.getItems().size()); // Set items for (EntityModel bootItem : bootSequenceModel.getItems()) { bootSequenceBox.addItem(bootItem.getTitle()); updateItemAvailability(bootItem.getTitle(), bootItem.getIsChangable()); } }
public void redraw(){ String selectedItem = getSelectedItem(); listBox.clear(); if(blankFirstItem){ listBox.addItem(EMPTY_ITEM); } for (String id: super.getListItems().getItemIds()){ listBox.addItem(super.getListItems().getItemText(id),id); } selectItem(selectedItem); setInitialized(true); }