/** * Returns the button's label text. * * @return The label text. */ public String getLabel() { return label.getLabel(); }
/** * Returns the caption of the panel. * * @return The panel caption. */ public String getCaption() { return lblTitle.getLabel(); }
private void test(BaseComponent root, String eventName, int eventData, int expectedSize) { String labelText = eventName + "." + eventData; EventManager.getInstance().fireLocalEvent(eventName, labelText); getMockEnvironment().flushEvents(); assertEquals(expectedSize, root.getChildren().size()); Label label = (Label) root.getChildren().get(expectedSize - 1).getFirstChild(); assertEquals(labelText, label.getLabel()); } }
@Override public void afterInitialized(BaseComponent comp) { super.afterInitialized(comp); noSelection = lblName.getLabel(); IUser user = SecurityUtil.getAuthenticatedUser(); lblUser.setVisible(showUser); if (user == null) { setLabel(lblUser, "Unknown User", null); } else { setLabel(lblUser, user.getFullName() + " @ " + user.getSecurityDomain().getName(), null); } setPatient(PatientContext.getActivePatient()); PatientContext.getPatientContext().addListener(patientChangeListener); }
@Override public Row render(Message message) { Row row = new Row(); createCell(row, message.getCreated()); createCell(row, message.getMetadata("cwf.pub.channel")); createCell(row, message.getType()); createCell(row, message.getId()); Cell cell = createCell(row, message.getPayload()); cell.setHint(cell.getChild(Label.class).getLabel()); row.addEventForward(DblclickEvent.TYPE, grid, null); return row; }