/************************************************************************** /* A JPanel with two components (top: search-entry, bottom: search results). /* /* Copyright (c) 2003-2004 by Bernhard Bablok (mail@bablokb.de) /* /* This library is free software; you can redistribute it and/or modify /* it under the terms of the GNU Lesser General Public License as published /* by the Free Software Foundation; either version 2 of the License or /* (at your option) any later version. /* /* This library is distributed in the hope that it will be useful, but /* WITHOUT ANY WARRANTY; without even the implied warranty of /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the /* GNU Lesser General Public License for more details. /* /* You should have received a copy of the GNU Lesser General Public License /* along with this library; see the file COPYING.LESSER. If not, write to /* the Free Software Foundation Inc., 59 Temple Place - Suite 330, /* Boston, MA 02111-1307 USA /**************************************************************************/ package de.bablokb.luala.app; import java.awt.*; import javax.swing.*; import de.bablokb.luala.lib.gui.*; /** A JPanel with two components (top: search-entry, bottom: search results). @version $Revision: 1.7 $ @author $Author: bablokb $ */ public class GuiSearcherPanel extends JPanel { //////////////////////////////////////////////////////////////////////////// /** Instance of {@link SimpleSearchPanel}. */ private SimpleSearchPanel iSearchPanel; //////////////////////////////////////////////////////////////////////////// /** Instance of {@link HtmlResultView}. */ private HtmlResultView iResultView; //////////////////////////////////////////////////////////////////////////// /** Create a GuiSearcherPanel with given components. */ public GuiSearcherPanel(SearchPanel searchPanel,ResultView resultView) { setLayout(new GridBagLayout()); GridBagConstraints constraint = new GridBagConstraints(); constraint.insets = new Insets(5,5,5,5); // border-pixels constraint.ipadx = 2; constraint.ipady = 2; // inner-pixels constraint.gridx = 0; constraint.gridy = 0; constraint.gridwidth = 1; constraint.gridheight = 1; constraint.weightx = 0; constraint.weighty = 0; constraint.fill = GridBagConstraints.HORIZONTAL; constraint.anchor = GridBagConstraints.WEST; add(searchPanel.getGUI(),constraint); constraint.gridx = 0; constraint.gridy = 1; constraint.gridwidth = 1; constraint.gridheight = 1; constraint.weightx = 1; constraint.weighty = 1; constraint.fill = GridBagConstraints.BOTH; constraint.anchor = GridBagConstraints.NORTHWEST; add(resultView.getGUI(),constraint); } }