001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (c) Alkacon Software GmbH & Co. KG (https://www.alkacon.com)
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * For further information about Alkacon Software, please see the
018 * company website: https://www.alkacon.com
019 *
020 * For further information about OpenCms, please see the
021 * project website: https://www.opencms.org
022 *
023 * You should have received a copy of the GNU Lesser General Public
024 * License along with this library; if not, write to the Free Software
025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026 */
027
028package org.opencms.ui.components.fileselect;
029
030import org.opencms.ui.CmsVaadinUtils;
031import org.opencms.ui.FontOpenCms;
032import org.opencms.ui.components.CmsBasicDialog;
033
034import com.vaadin.ui.Button;
035import com.vaadin.ui.FormLayout;
036import com.vaadin.ui.TextField;
037import com.vaadin.v7.ui.ComboBox;
038import com.vaadin.v7.ui.VerticalLayout;
039
040/**
041 * Contents of the resource select dialog, filled using the declarative layout mechanism.<p>
042 */
043public class CmsResourceSelectDialogContents extends CmsBasicDialog {
044
045    /** Serial version id. */
046    private static final long serialVersionUID = 1L;
047
048    /** Panel for additional widgets to be displayed. */
049    protected FormLayout m_additionalWidgets;
050
051    /** The whole content. */
052    private VerticalLayout m_container;
053
054    /** The site selector. */
055    private ComboBox m_siteSelector;
056
057    /** Container for the tree component. */
058    private VerticalLayout m_treeContainer;
059
060    /** The filter box. */
061    private TextField m_filterBox;
062
063    /** The filter button. */
064    private Button m_filterButton;
065
066    /**
067     * Creates a new widget instance.<p>
068     */
069    public CmsResourceSelectDialogContents() {
070
071        CmsVaadinUtils.readAndLocalizeDesign(this, CmsVaadinUtils.getWpMessagesForCurrentLocale(), null);
072        m_filterButton.setIcon(FontOpenCms.FILTER);
073
074    }
075
076    private static long getSerialversionuid() {
077
078        return serialVersionUID;
079    }
080
081    /**
082     * Gets the panel for additional widgets.
083     *
084     * @return the panel for additional widgets
085     */
086    public FormLayout getAdditionalWidgets() {
087
088        return m_additionalWidgets;
089    }
090
091    /**
092     * Returns the content container.<p>
093     *
094     * @return the content container
095     */
096    public VerticalLayout getContainer() {
097
098        return m_container;
099    }
100
101    /**
102     * Gets the filter box.
103     *
104     * @return the filter box
105     */
106    public TextField getFilterBox() {
107
108        return m_filterBox;
109    }
110
111    /**
112     * Gets the filter button.
113     *
114     * @return the filter button
115     */
116    public Button getFilterButton() {
117
118        return m_filterButton;
119    }
120
121    /**
122     * Gets the site selector.<p>
123     *
124     * @return the site selector
125     */
126    public ComboBox getSiteSelector() {
127
128        return m_siteSelector;
129    }
130
131    /**
132     * Gets the tree data container.<p>
133     *
134     * @return the tree data container
135     */
136    public VerticalLayout getTreeContainer() {
137
138        return m_treeContainer;
139    }
140
141}