01: package Schmortopf.Main.ProjectDefinition.Panels;
02:
03: import java.awt.*;
04: import java.awt.event.*;
05: import javax.swing.*;
06:
07: import Schmortopf.Main.ProjectDefinition.*;
08: import Schmortopf.Main.IDE_MainFrameProvider;
09: import Schmortopf.Utility.gui.*;
10: import Language.Language;
11:
12: public class LaunchParametersPanel extends JPanel {
13: private ProjectDefinitionDialog projectDefinitionDialog;
14: private ProjectDefinition projectDefinition;
15: private IDE_MainFrameProvider mainFrameProvider;
16:
17: public LaunchParametersPanel(
18: ProjectDefinitionDialog _projectDefinitionDialog,
19: ProjectDefinition _projectDefinition,
20: IDE_MainFrameProvider _mainFrameProvider) {
21: super ();
22: this .projectDefinitionDialog = _projectDefinitionDialog;
23: this .projectDefinition = _projectDefinition;
24: this .mainFrameProvider = _mainFrameProvider;
25: this .setLayout(new BorderLayout());
26:
27: int bsp = UIManager.getFont("TextField.font").getSize() / 2;
28:
29: final JPanel mainPanel = new JPanel();
30: BoxLayout boxLayout = new BoxLayout(mainPanel, BoxLayout.Y_AXIS);
31: mainPanel.setLayout(boxLayout);
32: JPanel decoupler1 = new JPanel(new BorderLayout());
33: decoupler1.add(mainPanel, BorderLayout.NORTH);
34: decoupler1.setBorder(BorderFactory.createEmptyBorder(2, 2, bsp,
35: bsp));
36: this .add(new JScrollPane(decoupler1), BorderLayout.CENTER);
37:
38: // Add the detailDefinitions view :
39: final JPanel detailDefinitionsPanel = new JPanel();
40: BoxLayout boxLayout2 = new BoxLayout(detailDefinitionsPanel,
41: BoxLayout.Y_AXIS);
42: detailDefinitionsPanel.setLayout(boxLayout2);
43: JPanel decoupler2 = new JPanel(new BorderLayout());
44: decoupler2.setBorder(BorderFactory.createEmptyBorder(2, 2, bsp,
45: bsp));
46: decoupler2.add(detailDefinitionsPanel, BorderLayout.NORTH);
47: mainPanel.add(new JScrollPane(decoupler2));
48:
49: ProjectDefinitionEntry[] detailDefinitions = this .projectDefinition
50: .getDetailDefinitions();
51: for (int i = 0; i < detailDefinitions.length; i++) {
52: this .projectDefinitionDialog.addEditableEntryPanel(
53: detailDefinitions[i], detailDefinitionsPanel, true);
54: } // for
55:
56: } // Constructor
57:
58: } // LaunchParameterPanel
|