001: /*
002: * File : $Source: /usr/local/cvs/opencms/src/org/opencms/workplace/tools/CmsExplorerDialog.java,v $
003: * Date : $Date: 2008-02-27 12:05:31 $
004: * Version: $Revision: 1.14 $
005: *
006: * This library is part of OpenCms -
007: * the Open Source Content Management System
008: *
009: * Copyright (c) 2002 - 2008 Alkacon Software GmbH (http://www.alkacon.com)
010: *
011: * This library is free software; you can redistribute it and/or
012: * modify it under the terms of the GNU Lesser General Public
013: * License as published by the Free Software Foundation; either
014: * version 2.1 of the License, or (at your option) any later version.
015: *
016: * This library is distributed in the hope that it will be useful,
017: * but WITHOUT ANY WARRANTY; without even the implied warranty of
018: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019: * Lesser General Public License for more details.
020: *
021: * For further information about Alkacon Software GmbH, please see the
022: * company website: http://www.alkacon.com
023: *
024: * For further information about OpenCms, please see the
025: * project website: http://www.opencms.org
026: *
027: * You should have received a copy of the GNU Lesser General Public
028: * License along with this library; if not, write to the Free Software
029: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
030: */
031:
032: package org.opencms.workplace.tools;
033:
034: import org.opencms.jsp.CmsJspActionElement;
035: import org.opencms.workplace.CmsDialog;
036:
037: import java.util.ArrayList;
038: import java.util.List;
039:
040: import javax.servlet.http.HttpServletRequest;
041: import javax.servlet.http.HttpServletResponse;
042: import javax.servlet.jsp.JspWriter;
043: import javax.servlet.jsp.PageContext;
044:
045: /**
046: * Dialog for explorer views in the administration view.<p>
047: *
048: * @author Michael Moossen
049: *
050: * @version $Revision: 1.14 $
051: *
052: * @since 6.0.0
053: */
054: public class CmsExplorerDialog extends CmsDialog {
055:
056: /** List of explorer tools. */
057: public static final List EXPLORER_TOOLS = new ArrayList();
058:
059: /**
060: * Public constructor with JSP action element.<p>
061: *
062: * @param jsp an initialized JSP action element
063: */
064: public CmsExplorerDialog(CmsJspActionElement jsp) {
065:
066: super (jsp);
067: setParamStyle(CmsToolDialog.STYLE_NEW);
068: }
069:
070: /**
071: * Public constructor with JSP variables.<p>
072: *
073: * @param context the JSP page context
074: * @param req the JSP request
075: * @param res the JSP response
076: */
077: public CmsExplorerDialog(PageContext context,
078: HttpServletRequest req, HttpServletResponse res) {
079:
080: this (new CmsJspActionElement(context, req, res));
081: }
082:
083: /* fill the explorer tools list, do not forget to add the message bundle also */
084: static {
085: EXPLORER_TOOLS.add("/galleryoverview/downloadgallery");
086: EXPLORER_TOOLS.add("/galleryoverview/htmlgallery");
087: EXPLORER_TOOLS.add("/galleryoverview/imagegallery");
088: EXPLORER_TOOLS.add("/galleryoverview/linkgallery");
089: EXPLORER_TOOLS.add("/galleryoverview/tablegallery");
090: }
091:
092: /**
093: * Generates the html code for the title frame.<p>
094: *
095: * @throws Exception if writing to the JSP out fails
096: */
097: public void displayTitle() throws Exception {
098:
099: JspWriter out = getJsp().getJspContext().getOut();
100: out.println(htmlStart());
101: out.println(bodyStart(null));
102: out.println(dialogStart());
103: out.println(dialogContentStart(getParamTitle()));
104: out.println(dialogContentEnd());
105: out.println(dialogEnd());
106: out.println(bodyEnd());
107: out.println(htmlEnd());
108: }
109: }
|