Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: screengen/borders/BorderEditPanelBase.java


1   //  Screengen - A visual gui builder for java windows
2   //  Copyright (C) 1999 Mark O'Donohue 
3   //  <mark.odonohue@ludwig.edu.au>
4   //
5   //  This program is free software; you can redistribute it and/or modify
6   //  it under the terms of the GNU General Public License as published by
7   //  the Free Software Foundation; either version 2 of the License, or
8   //  any later version.
9   //  This program is distributed in the hope that it will be useful,
10  //  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  //  GNU General Public License for more details.
13  //  You should have received a copy of the GNU General Public License
14  //  along with this program; if not, write to the Free Software
15  //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16  //
17  
18  package screengen.borders;
19  
20  import java.awt.*;
21  import javax.swing.*;
22  
23  public class BorderEditPanelBase extends JPanel {
24      public JPanel JPanel0;
25      public JLabel JLabel0;
26      public JComboBox BorderTypeComboBox;
27      public JPanel BorderDetailPanel;
28      public JPanel ButtonPanel;
29      public JButton OkButton;
30      public JButton CancelButton;
31  
32      JPanel BuildJPanel0() {
33          JPanel JPanel0 = new JPanel();
34          GridBagLayout oLayout = new GridBagLayout();
35          JPanel0.setLayout(oLayout);
36          GridBagConstraints oConst;
37          JLabel0 = new JLabel();
38          JLabel0.setText("Border Type");
39          JPanel0.add(JLabel0);
40          oConst = new GridBagConstraints();
41          oLayout.setConstraints(JLabel0, oConst);
42  
43          BorderTypeComboBox = new JComboBox();
44          JPanel0.add(BorderTypeComboBox);
45          oConst = new GridBagConstraints();
46          oLayout.setConstraints(BorderTypeComboBox, oConst);
47  
48          return JPanel0;
49      }
50  
51      JPanel BuildBorderDetailPanel() {
52          JPanel BorderDetailPanel = new JPanel();
53          GridBagLayout oLayout = new GridBagLayout();
54          BorderDetailPanel.setLayout(oLayout);
55          GridBagConstraints oConst;
56          return BorderDetailPanel;
57      }
58  
59      JPanel BuildButtonPanel() {
60          JPanel ButtonPanel = new JPanel();
61          GridBagLayout oLayout = new GridBagLayout();
62          ButtonPanel.setLayout(oLayout);
63          GridBagConstraints oConst;
64          OkButton = new JButton();
65          OkButton.setText("Ok");
66          ButtonPanel.add(OkButton);
67          oConst = new GridBagConstraints();
68          oLayout.setConstraints(OkButton, oConst);
69  
70          CancelButton = new JButton();
71          CancelButton.setText("Cancel");
72          ButtonPanel.add(CancelButton);
73          oConst = new GridBagConstraints();
74          oLayout.setConstraints(CancelButton, oConst);
75  
76          return ButtonPanel;
77      }
78  
79      void BuildFrame() {
80          Container oPanel = this;
81          GridBagLayout oLayout = new GridBagLayout();
82          oPanel.setLayout(oLayout);
83          GridBagConstraints oConst;
84          JPanel0 = BuildJPanel0();
85          oPanel.add(JPanel0);
86          oConst = new GridBagConstraints();
87          oConst.gridy =0;
88          oLayout.setConstraints(JPanel0, oConst);
89  
90          BorderDetailPanel = BuildBorderDetailPanel();
91          oPanel.add(BorderDetailPanel);
92          oConst = new GridBagConstraints();
93          oConst.gridy =1;
94          oConst.weightx =1.0;
95          oConst.weighty =1.0;
96          oConst.fill =1;
97          oLayout.setConstraints(BorderDetailPanel, oConst);
98  
99          ButtonPanel = BuildButtonPanel();
100         oPanel.add(ButtonPanel);
101         oConst = new GridBagConstraints();
102         oConst.gridy =2;
103         oLayout.setConstraints(ButtonPanel, oConst);
104 
105     }
106 
107 
108     public BorderEditPanelBase() {
109         BuildFrame();
110     }
111 
112 }