View Javadoc

1   /*
2    * $Id$
3    *
4    * The contents of this file are subject to the Mozilla Public License 
5    * Version 1.1 (the "License"); you may not use this file except in 
6    * compliance with the License. You may obtain a copy of the License at 
7    * http://www.mozilla.org/MPL/ 
8    *
9    * Software distributed under the License is distributed on an "AS IS" basis, 
10   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
11   * for the specific language governing rights and limitations under the License.
12   *
13   * The Original Code is XML Hammer code. (org.xmlhammer.*)
14   *
15   * The Initial Developer of the Original Code is Edwin Dankert. Portions created 
16   * by the Initial Developer are Copyright (C) 2005 - 2006 the Initial Developer. 
17   * All Rights Reserved.
18   *
19   * Contributor(s): Edwin Dankert <edankert@gmail.com>
20   */
21  
22  package org.xmlhammer.gui.output;
23  
24  import java.awt.FlowLayout;
25  import java.awt.LayoutManager;
26  
27  import javax.swing.JPanel;
28  import javax.swing.border.EmptyBorder;
29  
30  import org.bounce.FormConstraints;
31  
32  public class DetailsPanel extends JPanel {
33      private static final long serialVersionUID = 2259471077931263865L;
34      protected static final FormConstraints LABEL_CONSTRAINTS = new FormConstraints(FormConstraints.LEFT, FormConstraints.RIGHT, FormConstraints.TOP);
35  
36      private String helpID = null;
37      
38      public DetailsPanel(String helpID) {
39          this(true, helpID);
40      }
41  
42      public DetailsPanel(LayoutManager layout, String helpID) {
43          this(layout, true, helpID);
44      }
45  
46      public DetailsPanel(boolean flag, String helpID) {
47          this(new FlowLayout(), flag, helpID);
48      }
49  
50      public DetailsPanel(LayoutManager layout, boolean flag, String helpID) {
51          super(layout, flag);
52          
53          this.helpID = helpID;
54  
55          setBorder(new EmptyBorder(10, 10, 10, 10));
56      }
57  
58      public String getHelpID() {
59          return helpID;
60      }
61  }