/**
   * Constructor.
   *
   * <p>
   *
   * @param hoverbar the hoverbar
   */
  public CmsGotoSubSitemapMenuEntry(CmsSitemapHoverbar hoverbar) {

    super(hoverbar);
    setImageClass(I_CmsImageBundle.INSTANCE.contextMenuIcons().gotoSub());
    setLabel(Messages.get().key(Messages.GUI_HOVERBAR_GOTO_SUB_0));
    setActive(true);
  }
  /**
   * Ensures the open close button for the additional info list is present.
   *
   * <p>
   */
  protected void ensureOpenCloseAdditionalInfo() {

    if (m_openClose == null) {
      m_openClose =
          new CmsPushButton(
              I_CmsImageBundle.INSTANCE.style().triangleRight(),
              I_CmsImageBundle.INSTANCE.style().triangleDown());
      m_openClose.setButtonStyle(ButtonStyle.TRANSPARENT, null);
      m_titleRow.insert(m_openClose, 0);
      m_openClose.addClickHandler(
          new ClickHandler() {

            /**
             * @see
             *     com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event.dom.client.ClickEvent)
             */
            public void onClick(ClickEvent event) {

              setAdditionalInfoVisible(
                  !getElement().getClassName().contains(CmsListItemWidget.OPENCLASS));
            }
          });
    }
  }
  /**
   * Internal method which opens the gallery dialog.
   *
   * <p>
   */
  protected void openGalleryDialog() {

    String title =
        org.opencms.gwt.client.Messages.get()
            .key(org.opencms.gwt.client.Messages.GUI_GALLERY_SELECT_DIALOG_TITLE_0);
    final CmsFramePopup popup = new CmsFramePopup(title, buildGalleryUrl());
    popup.setCloseHandler(
        new Runnable() {

          public void run() {

            m_textbox.setGhostMode(false);
          }
        });
    popup.setId(m_id);
    popup.getFrame().setSize("700px", "490px");
    popup.center();

    CmsPushButton button = new CmsPushButton(I_CmsImageBundle.INSTANCE.style().closeIcon());

    Style style = button.getElement().getStyle();
    style.setRight(4, Unit.PX);
    style.setTop(0, Unit.PX);
    style.setPosition(Position.ABSOLUTE);
    style.setCursor(Cursor.POINTER);
    button.addClickHandler(
        new ClickHandler() {

          /**
           * @see
           *     com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event.dom.client.ClickEvent)
           */
          public void onClick(ClickEvent event) {

            popup.hide();
          }
        });

    popup.insertFront(button);
  }