Example #1
0
  @Override
  public Component build() {
    gkToolBarIC toolBar = new gkToolBarIC();
    super.initComponent(toolBar);
    // 設定訊息欄位是否visible
    if (!msg.equals("")) {
      toolBar.setMsgVisible(Boolean.parseBoolean(msg));
    }

    toolBar.setMsgWidth(msgWidth);

    Iterator<UIGen> it = widgets.iterator();
    while (it.hasNext()) {
      UIGen ui = it.next();
      Component com = ui.build();
      if (!(com instanceof Window)) {
        toolBar.add(com);
        if (Boolean.parseBoolean(separator)) {
          toolBar.add(new SeparatorToolItem());
        }
      }
    }
    return toolBar;
  }
Example #2
0
 @Override
 protected void initComponent(Component com) {
   super.initComponent(com);
   super.addEventListener(com, Events.Select, onClick);
 }