本文整理了Java中org.zkoss.zul.Listbox.setItemRenderer()
方法的一些代码示例,展示了Listbox.setItemRenderer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Listbox.setItemRenderer()
方法的具体详情如下:
包路径:org.zkoss.zul.Listbox
类名称:Listbox
方法名:setItemRenderer
[英]Sets the renderer by use of a class name. It creates an instance automatically.
[中]使用类名设置渲染器。它会自动创建一个实例。
代码示例来源:origin: org.carewebframework/org.carewebframework.cal.ui.reporting
/**
* Sets the list item renderer.
*
* @param itemRenderer The item renderer.
*/
public void setItemRenderer(ListitemRenderer<M> itemRenderer) {
this.itemRenderer = itemRenderer;
if (listBox != null) {
listBox.setItemRenderer(itemRenderer);
}
}
代码示例来源:origin: org.zkoss.zk/zul
/**
* Sets the renderer by use of a class name. It creates an instance
* automatically.
*/
@SuppressWarnings("rawtypes")
public void setItemRenderer(String clsnm) throws ClassNotFoundException, NoSuchMethodException,
IllegalAccessException, InstantiationException, java.lang.reflect.InvocationTargetException {
if (clsnm != null)
setItemRenderer((ListitemRenderer) Classes.newInstanceByThread(clsnm));
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.context.encounter
public void onCreate() {
ZKUtil.wireController(this, this);
lstAllProviders.setItemRenderer(providerRenderer);
lstAllProviders.setModel(modelProviders);
lstEncounterProviders.setItemRenderer(providerRenderer);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.cal.ui.patientselection.v1
/**
* Initializes renderers for list boxes.
*/
private void initRenderers() {
lstPatientList.setItemRenderer(PatientListItemRenderer.getInstance());
lstSearch.setItemRenderer(PatientListItemRenderer.getInstance());
lstManagedList.setItemRenderer(PatientListItemRenderer.getInstance());
lstFilter.setItemRenderer(PatientListFilterRenderer.getInstance());
lstManagedListFilter.setItemRenderer(PatientListFilterRenderer.getInstance());
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.encounter
/**
* Wire variables and events.
*/
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
lstInpatient.setItemRenderer(new EncounterRenderer());
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.cwad
private void initListbox(Listbox lb, List<String> data, ListitemRenderer<?> renderer) {
lb.setItemRenderer(renderer);
lb.setModel(new ListModelList<String>(data));
}
代码示例来源:origin: org.zkoss.zk/zkplus
public void setupBindingRenderer(Component comp, DataBinder binder) {
if (comp instanceof Listitem) {
final Listitem li = (Listitem) comp;
final Listbox lbx = li.getListbox();
if (lbx.getItemRenderer() == null) {
lbx.setItemRenderer(new BindingListitemRenderer(li, binder));
}
}
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.notification
/**
* Retrieve passed arguments. Initialize listbox renderers and models.
*/
@SuppressWarnings("unchecked")
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
recipients = (Collection<Recipient>) arg.get("recipients");
ZKUtil.updateStyle(txtComment, "visibility", (Boolean) arg.get("showComment") ? null : "hidden");
lstRecipients.setItemRenderer(new ItemRenderer(btnRemove));
lstRecipients.setModel(modelRecipients);
lstGroups.setItemRenderer(new ItemRenderer(btnAdd));
lstGroups.setModel(modelGroups);
lstUsers.setItemRenderer(new ItemRenderer(btnAdd));
lstUsers.setModel(modelUsers);
modelRecipients.addAll(recipients);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.encounter
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
ZKUtil.wireController(ZKUtil.loadZulPage(PARTICIPANT_SELECTOR, comp), this);
broker = VistAUtil.getBrokerSession();
lstAllParticipants.setItemRenderer(new ParticipantRenderer());
lstAllParticipants.setModel(allParticipantsModel);
lstEncounterParticipants.setItemRenderer(encounterParticipantRenderer);
lstEncounterParticipants.setModel(encounterParticipantsModel);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.notification
/**
* Initialize the dialog.
*/
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
lstScheduled.setItemRenderer(renderer);
refresh();
getEventManager().subscribe("ALERT.SCHEDULE", alertEventListener);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.encounter
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
lstOutpatient.setItemRenderer(new EncounterRenderer());
rngDateRange.getItemAtIndex(0).setLabel("Default Date Range");
rngDateRange.setSelectedIndex(0);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.skintest
/**
* @see org.carewebframework.ui.FrameworkController#doAfterCompose(org.zkoss.zk.ui.Component)
*/
@Override
public void doAfterCompose(final Component comp) throws Exception {
super.doAfterCompose(comp);
bgoSecurity = BgoUtil.initSecurity("BGO DISABLE SK EDITING", null);
lbTests.setItemRenderer(skinTestRenderer);
RowComparator.autowireColumnComparators(lbTests.getListhead().getChildren());
getAppFramework().registerObject(patientContextEventHandler);
getAppFramework().registerObject(encounterContextEventHandler);
patientContextEventHandler.committed();
log.trace("Controller composed");
}
代码示例来源:origin: org.carewebframework/org.carewebframework.cal.ui.reporting
/**
* Initializes the controller. Loads user preferences and properties.
*/
@Override
protected void initializeController() {
setMeshElement(listBox, "list");
super.initializeController();
listBox.setItemRenderer(itemRenderer);
setMultiple(listBox.isMultiple());
if (listBox.getListhead() != null) {
RowComparator.autowireColumnComparators(listBox.getListhead().getChildren());
}
}
代码示例来源:origin: org.carewebframework/org.carewebframework.rpms.ui.problem
/**
* @see org.carewebframework.ui.FrameworkController#doAfterCompose(org.zkoss.zk.ui.Component)
*/
@Override
public void doAfterCompose(final Component comp) throws Exception {
super.doAfterCompose(comp);
bgoSecurity = BgoUtil.initSecurity("BGO DISABLE PROB LIST EDITING", "BGOZ PROBLEM LIST EDIT");
lbProblems.setItemRenderer(problemRenderer);
RowComparator.autowireColumnComparators(lbProblems.getListhead().getChildren());
m_bPersHistAndAct = SecurityUtil.isGranted("BGO PL INCLUDE PERS HIST W ACT");
for (Object item : cboFilter.getItems()) {
Comboitem ci = (Comboitem) item;
ProblemFilter filter = ProblemFilter.valueOf(ci.getValue().toString());
ci.setValue(m_bPersHistAndAct && filter == ProblemFilter.ACTIVE ? ProblemFilter.ACTIVE_PERSONAL : filter);
}
setFilter(getDefaultFilter());
getAppFramework().registerObject(patientContextEventHandler);
getAppFramework().registerObject(encounterContextEventHandler);
patientContextEventHandler.committed();
log.trace("Controller composed");
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.notification
/**
* Set up display.
*/
@Override
public void init() {
super.init();
getContainer().registerProperties(this, "showAll", "alertDuration", "alertThreshold");
rgFilter.setSelectedItem(showAll ? radAll : radPatient);
processingController = ProcessingController.create(this);
lstNotification.setItemRenderer(renderer);
RowComparator.autowireColumnComparators(lstNotification.getListhead().getChildren());
model.setMultiple(true);
updatePatient(true);
subscribe(true);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.context.encounter
FrameworkUtil.getAppFramework().registerObject(this);
ZKUtil.wireController(this, this);
lstInpatient.setItemRenderer(encounterRenderer);
lstOutpatient.setItemRenderer(encounterRenderer);
rngDateRange.getItemAtIndex(0).setLabel("Default Date Range");
rngDateRange.setSelectedIndex(0);
内容来源于网络,如有侵权,请联系作者删除!