BrightSide Workbench Full Report + Source Code
org.turro.command.CommandUtil Class Reference

Static Public Member Functions

static HtmlBasedComponent getEntityControl (Object entity)
 
static HtmlBasedComponent getEntityControl (Object entity, boolean showDescription, boolean linkEntity)
 
static ControlAdapter getNameAdapter (Object entity)
 
static ControlAdapter getAdapterOrSpace (Object entity)
 
static ControlAdapter getAdapter (Object entity)
 
static HtmlBasedComponent getLinkOrSpace (Object entity)
 
static HtmlBasedComponent getLink (Object entity)
 
static ControlAdapter getLabelAdapter (Object entity)
 
static HtmlBasedComponent getLabel (Object entity)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 34 of file CommandUtil.java.

Member Function Documentation

◆ getAdapter()

static ControlAdapter org.turro.command.CommandUtil.getAdapter ( Object  entity)
static

Definition at line 56 of file CommandUtil.java.

56  {
57  return new ControlAdapter(getLink(entity));
58  }
static HtmlBasedComponent getLink(Object entity)
Here is the call graph for this function:

◆ getAdapterOrSpace()

static ControlAdapter org.turro.command.CommandUtil.getAdapterOrSpace ( Object  entity)
static

Definition at line 51 of file CommandUtil.java.

51  {
52  IElephantEntity iee = Entities.getController(entity);
53  return new ControlAdapter(getLinkOrSpace(entity));
54  }
static HtmlBasedComponent getLinkOrSpace(Object entity)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEntityControl() [1/2]

static HtmlBasedComponent org.turro.command.CommandUtil.getEntityControl ( Object  entity)
static

Definition at line 36 of file CommandUtil.java.

36  {
37  return getEntityControl(entity, true, true);
38  }
static HtmlBasedComponent getEntityControl(Object entity)

◆ getEntityControl() [2/2]

static HtmlBasedComponent org.turro.command.CommandUtil.getEntityControl ( Object  entity,
boolean  showDescription,
boolean  linkEntity 
)
static

Definition at line 40 of file CommandUtil.java.

40  {
41  EntityControl e = new EntityControl(entity, showDescription, linkEntity);
42  e.afterCompose();
43  return e;
44  }
Here is the call graph for this function:

◆ getLabel()

static HtmlBasedComponent org.turro.command.CommandUtil.getLabel ( Object  entity)
static

Definition at line 78 of file CommandUtil.java.

78  {
79  IElephantEntity iee = Entities.getController(entity);
80  if(iee != null) {
81  Hlayout hbox = new Hlayout();
82  String img = (String) iee.getImage(),
83  name = (String) iee.getName();
84  if(img != null) {
85  hbox.appendChild(new Image(img));
86  }
87  if(name != null) {
88  hbox.appendChild(new Label(name));
89  }
90  return hbox;
91  }
92  return null;
93  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLabelAdapter()

static ControlAdapter org.turro.command.CommandUtil.getLabelAdapter ( Object  entity)
static

Definition at line 74 of file CommandUtil.java.

74  {
75  return new ControlAdapter(getLabel(entity));
76  }
static HtmlBasedComponent getLabel(Object entity)
Here is the call graph for this function:

◆ getLink()

static HtmlBasedComponent org.turro.command.CommandUtil.getLink ( Object  entity)
static

Definition at line 65 of file CommandUtil.java.

65  {
66  IElephantEntity iee = Entities.getController(entity);
67  HtmlBasedComponent hbc = (HtmlBasedComponent) iee.getLabelCtrl();
68  if(hbc instanceof AfterCompose) {
69  ((AfterCompose) hbc).afterCompose();
70  }
71  return hbc;
72  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLinkOrSpace()

static HtmlBasedComponent org.turro.command.CommandUtil.getLinkOrSpace ( Object  entity)
static

Definition at line 60 of file CommandUtil.java.

60  {
61  HtmlBasedComponent comp = getLink(entity);
62  return comp == null ? new Space() : comp;
63  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNameAdapter()

static ControlAdapter org.turro.command.CommandUtil.getNameAdapter ( Object  entity)
static

Definition at line 46 of file CommandUtil.java.

46  {
47  IElephantEntity iee = Entities.getController(entity);
48  return new ControlAdapter(new Label(iee.getName()));
49  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: