Search in sources :

Example 1 with FuelView

use of megameklab.ui.generalUnit.FuelView in project megameklab by MegaMek.

the class SVStructureTab method setupPanels.

private void setupPanels() {
    masterPanel = new JPanel(new GridBagLayout());
    panBasicInfo = new BasicInfoView(getSV().getConstructionTechAdvancement());
    panChassis = new SVChassisView(panBasicInfo);
    panMovement = new MovementView(panBasicInfo);
    panFuel = new FuelView();
    panSummary = new SVSummaryView(eSource);
    panChassisMod = new SVChassisModView(panBasicInfo);
    panCrew = new SVCrewView();
    JPanel leftPanel = new JPanel();
    JPanel midPanel = new JPanel();
    JPanel rightPanel = new JPanel();
    leftPanel.setLayout(new GridBagLayout());
    midPanel.setLayout(new GridBagLayout());
    rightPanel.setLayout(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    gbc.anchor = GridBagConstraints.WEST;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.insets = new Insets(5, 5, 5, 5);
    gbc.gridwidth = 1;
    gbc.gridx = 0;
    gbc.gridy = 0;
    leftPanel.add(panBasicInfo, gbc);
    gbc.gridy++;
    leftPanel.add(panChassis, gbc);
    gbc.gridx = 1;
    gbc.gridy = 0;
    midPanel.add(panMovement, gbc);
    gbc.gridy++;
    midPanel.add(panFuel, gbc);
    gbc.gridy++;
    midPanel.add(panSummary, gbc);
    gbc.gridx = 2;
    gbc.gridy = 0;
    rightPanel.add(panChassisMod, gbc);
    gbc.gridy++;
    rightPanel.add(panCrew, gbc);
    gbc = new GridBagConstraints();
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.fill = java.awt.GridBagConstraints.NONE;
    gbc.weightx = 0.0;
    gbc.weighty = 1.0;
    gbc.anchor = GridBagConstraints.NORTHWEST;
    masterPanel.add(leftPanel, gbc);
    gbc.gridx = 1;
    masterPanel.add(midPanel, gbc);
    gbc.gridx = 2;
    masterPanel.add(rightPanel, gbc);
    panBasicInfo.setBorder(BorderFactory.createTitledBorder("Basic Information"));
    panChassis.setBorder(BorderFactory.createTitledBorder("Chassis"));
    panMovement.setBorder(BorderFactory.createTitledBorder("Movement"));
    panFuel.setBorder(BorderFactory.createTitledBorder("Fuel"));
    panSummary.setBorder(BorderFactory.createTitledBorder("Summary"));
    panChassisMod.setBorder(BorderFactory.createTitledBorder("Chassis Modifications"));
    panCrew.setBorder(BorderFactory.createTitledBorder("Crew and Quarters"));
}
Also used : BasicInfoView(megameklab.ui.generalUnit.BasicInfoView) FuelView(megameklab.ui.generalUnit.FuelView) MovementView(megameklab.ui.generalUnit.MovementView)

Aggregations

BasicInfoView (megameklab.ui.generalUnit.BasicInfoView)1 FuelView (megameklab.ui.generalUnit.FuelView)1 MovementView (megameklab.ui.generalUnit.MovementView)1