19 package org.turro.command;
21 import org.turro.entities.Entities;
22 import org.turro.entities.IElephantEntity;
23 import org.zkoss.zk.ui.HtmlBasedComponent;
24 import org.zkoss.zk.ui.ext.AfterCompose;
25 import org.zkoss.zul.Hlayout;
26 import org.zkoss.zul.Image;
27 import org.zkoss.zul.Label;
28 import org.zkoss.zul.Space;
40 public static HtmlBasedComponent
getEntityControl(Object entity,
boolean showDescription,
boolean linkEntity) {
61 HtmlBasedComponent comp =
getLink(entity);
62 return comp ==
null ?
new Space() : comp;
65 public static HtmlBasedComponent
getLink(Object entity) {
67 HtmlBasedComponent hbc = (HtmlBasedComponent) iee.
getLabelCtrl();
68 if(hbc instanceof AfterCompose) {
69 ((AfterCompose) hbc).afterCompose();
78 public static HtmlBasedComponent
getLabel(Object entity) {
81 Hlayout hbox =
new Hlayout();
82 String img = (String) iee.
getImage(),
85 hbox.appendChild(
new Image(img));
88 hbox.appendChild(
new Label(name));
static ControlAdapter getAdapterOrSpace(Object entity)
static HtmlBasedComponent getLink(Object entity)
static HtmlBasedComponent getLinkOrSpace(Object entity)
static HtmlBasedComponent getLabel(Object entity)
static ControlAdapter getAdapter(Object entity)
static HtmlBasedComponent getEntityControl(Object entity, boolean showDescription, boolean linkEntity)
static ControlAdapter getNameAdapter(Object entity)
static ControlAdapter getLabelAdapter(Object entity)
static HtmlBasedComponent getEntityControl(Object entity)
static IElephantEntity getController(String path)