@Override public Dateitem getSelectedItem() { return (Dateitem) super.getSelectedItem(); }
/** * Returns the index of the currently selected item. * * @return The index of the currently selected item, or -1 if no item is selected. */ public int getSelectedIndex() { Comboitem item = getSelectedItem(); return item == null ? -1 : item.getIndex(); }
/** * Returns the currently selected scenario, or null if none. * * @return The currently selected scenario. */ private Scenario getSelectedScenario() { Comboitem item = cboScenarios.getSelectedItem(); return item == null ? null : (Scenario) item.getData(); }
/** * Returns date type from picker. * * @return The date type. */ protected DateType getDateType() { Comboitem item = dateTypePicker == null ? null : dateTypePicker.getSelectedItem(); return item == null ? dateFilter.getDateType() : (DateType) item.getData(); }
@EventHandler(value = "change", target = "@cboLibrary", onFailure = OnFailure.IGNORE) private void onChange$cboLibrary() { iconLibrary = (IIconLibrary) cboLibrary.getSelectedItem().getData(); libraryChanged(); } }
@Override protected Object getValue() { Comboitem item = editor.getSelectedItem(); Object value = item != null ? item.getData() : editor.isReadonly() ? null : editor.getValue(); return value; }
@EventHandler(value = "click", target = "btnSendMessage") private void onClick$btnSendMessage() { Comboitem item = cboxChannels.getSelectedItem(); if (item != null) { String type = item.getLabel(); String channel = chkAsEvent.isChecked() ? EventUtil.getChannelName(type) : type; Message message = chkAsEvent.isChecked() ? new EventMessage(type, memoMessage.getValue()) : new Message(channel, memoMessage.getValue()); producerService.publish(channel, message); } }