/** * The event handler for checkbox events. Expand/close all the nodes in pharmacy orders when * check/uncheck checkbox. */ @EventHandler(value = "change", target = "@chkExpandAll", onFailure = OnFailure.IGNORE) private void onChange$chkExpandAll() { if (log.isTraceEnabled()) { log.trace("onCheck : expand detail event fired"); } boolean expandAll = this.chkExpandAll.isChecked(); if (log.isDebugEnabled()) { log.debug("Expand Detail: " + expandAll); } //AbstractRowRenderer.setExpandDetail(grid, expandAll); }
/** * Handler for change events sent from the client. * * @param event A change event. */ @EventHandler(value = "change", syncToClient = false, mode = "init") protected void _onChange(ChangeEvent event) { _setChecked(defaultify(event.getValue(Boolean.class), true), false); }
/** * Update the checked state and optionally notify the client. * * @param checked The new checked state. * @param notifyClient If true, notify the client. */ public void _setChecked(boolean checked, boolean notifyClient) { propertyChange("checked", this.checked, this.checked = checked, notifyClient); }
/** * Initializes the controller. Loads user preferences and properties. */ @Override protected void initializeController() { if (grid.getRows() == null) { grid.addChild(new Rows()); } setComponents(grid, grid.getRows()); super.initializeController(); boolean expandAll = getPropertyValue(Constants.PROPERTY_ID_EXPAND_DETAIL, Boolean.class, chkExpandAll != null && chkExpandAll.isChecked()); if (this.chkExpandAll != null) { this.chkExpandAll.setChecked(expandAll); } }
/** * Initialize the dialog. */ @SuppressWarnings("unchecked") @Override public void afterInitialized(BaseComponent comp) { super.afterInitialized(comp); sessionId = (String) comp.findAttribute("sessionId"); Collection<IPublisherInfo> exclusions = (Collection<IPublisherInfo>) comp.findAttribute("exclusions"); renderer = new ParticipantRenderer(chatService.getSelf(), exclusions); lstSessions.setRenderer(renderer); chkHideActive.setChecked(getAppFramework().getAttribute(ATTR_HIDE) != null); refresh(); }
/** * Sets the checked state of the check box. * * @param checked if the check box is checked, false if not. */ @PropertySetter(value = "checked", defaultValue = "false", description = "The checked state of the check box.") public void setChecked(boolean checked) { _setChecked(checked, true); }
/** * Augments change event handling by notifying the containing radio group, if any. * * @see org.fujion.component.Checkbox#_onChange(org.fujion.event.ChangeEvent) */ @Override protected void _onChange(ChangeEvent event) { super._onChange(event); if (this.isChecked()) { Radiogroup group = getGroup(); if (group != null) { event = new ChangeEvent(group, event.getData(), this); EventUtil.send(event); } } } }
@EventHandler(value = "change", target = "chkAutoRefresh") private void onCheck$chkAutoRefresh() { enableAutoRefresh(chkAutoRefresh.isChecked()); }
/** * Update display when hide active participants setting changes. */ @EventHandler(value = "change", target = "@chkHideActive") private void onCheck$chkHideActive() { getAppFramework().setAttribute(ATTR_HIDE, chkHideActive.isChecked() ? true : null); refresh(); }
@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); } }
/** * Test alert. */ public void onClick$btnPushAlert() { pushAlert(newAlertitem(chkAssociate.isChecked())); }
/** * Push a drop item to the info panel. */ public void onClick$btnPushDrop() { pushDrop(newListitem(chkAssociate.isChecked())); }
/** * Pushes the alert to the alert manager. * * @param root The root component. */ private void pushAlert(BaseComponent root) { if (chkEvents.isChecked()) { eventManager.fireLocalEvent(IInfoPanel.ALERT_EVENT_NAME, root); } else { infoPanel.showAlert(root); } }
/** * Pushes the item to the info panel. * * @param item The list item. */ private void pushDrop(Listitem item) { if (item != null) { if (chkEvents.isChecked()) { eventManager.fireLocalEvent(IInfoPanel.DROP_EVENT_NAME, item); } else { infoPanel.drop(item); } } }
@EventHandler(value = "click", target = "btnSend") private void onClick$btnSend() { messageCount++; if (chkAutoGenerate.isChecked()) { tboxEventData.setValue("Sending test event #" + messageCount); } eventManager.fireRemoteEvent(tboxEventName.getValue(), tboxEventData.getValue(), parseRecipients(tboxEventRecipients.getValue())); info("Fired", tboxEventName.getValue()); }
/** * Refresh the participant list. */ @Override public void refresh() { lstSessions.setModel(null); model.clear(); model.addAll(chatService.getChatCandidates()); renderer.setHideExclusions(chkHideActive.isChecked()); model.sort(sessionComparator); lstSessions.setModel(model); updateControls(); }
@Override public void eventCallback(String eventName, Object eventData) { String s = tboxEventResults.getValue(); if (!(eventData instanceof String)) { try { eventData = JSONUtil.serialize(eventData, true); } catch (Exception e) {} } s += "\n\n" + eventName + ":\n" + eventData; tboxEventResults.setValue(s); info("Received", eventName); if (!chkScrollLock.isChecked()) { String js = StrUtil.formatMessage("$('#%1$s').scrollTop($('#%1$s')[0].scrollHeight);", tboxEventResults.getId()); ClientUtil.eval(js); } }