Exemplo n.º 1
0
 @Override
 public void localRender(OrchidContext oc) throws IOException, OrchidException {
   if (isExpanded()) {
     foldImage.render(oc);
     foldTrigger.render(oc);
   } else {
     expandImage.render(oc);
     expandTrigger.render(oc);
   }
 }
Exemplo n.º 2
0
  public void initSelf(OrchidContext oc) throws OrchidException {
    expandImage = new OImage();
    expandImage.setAltText("Expand month");
    expandImage.setSrc(oc.getPathHandler().getImageDirPath() + "/icons/expand_arrow_right.png");
    expandImage.setStyle("position: relative; vertical-align: middle");
    addAndInitChild(oc, expandImage);

    foldImage = new OImage();
    addAndInitChild(oc, foldImage);
    foldImage.setAltText("V");
    foldImage.setSrc(oc.getPathHandler().getImageDirPath() + "/icons/fold_arrow_down.png");
    foldImage.setStyle("position: relative; vertical-align: middle");

    expandListener = new ExpandListener(parent);

    foldListener = new FoldListener(parent);

    expandTrigger = initAjaxTriggerAndListener(oc, expandListener, expandImage);
    foldTrigger = initAjaxTriggerAndListener(oc, foldListener, foldImage);
  }