Search in sources :

Example 1 with AeroFuelView

use of megameklab.com.ui.view.AeroFuelView in project megameklab by MegaMek.

the class DropshipStructureTab method setUpPanels.

private void setUpPanels() {
    masterPanel = new JPanel(new GridBagLayout());
    panInfo = new BasicInfoView(getSmallCraft().getConstructionTechAdvancement());
    panChassis = new DropshipChassisView(panInfo);
    panArmor = new MVFArmorView(panInfo);
    panMovement = new MovementView(panInfo);
    panFuel = new AeroFuelView();
    panHeat = new HeatSinkView(panInfo);
    panCrew = new AerospaceCrewView(panInfo);
    panArmorAllocation = new ArmorAllocationView(panInfo, Entity.ETYPE_AERO);
    panSummary = new SummaryView(eSource);
    GridBagConstraints gbc = new GridBagConstraints();
    JPanel leftPanel = new JPanel();
    JPanel midPanel = new JPanel();
    JPanel rightPanel = new JPanel();
    leftPanel.setLayout(new BoxLayout(leftPanel, BoxLayout.Y_AXIS));
    midPanel.setLayout(new BoxLayout(midPanel, BoxLayout.Y_AXIS));
    rightPanel.setLayout(new BoxLayout(rightPanel, BoxLayout.Y_AXIS));
    leftPanel.add(panInfo);
    leftPanel.add(panChassis);
    leftPanel.add(panHeat);
    leftPanel.add(panCrew);
    midPanel.add(panMovement);
    midPanel.add(panFuel);
    midPanel.add(panSummary);
    midPanel.add(Box.createHorizontalStrut(300));
    rightPanel.add(panArmor);
    rightPanel.add(panArmorAllocation);
    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);
    panInfo.setBorder(BorderFactory.createTitledBorder("Basic Information"));
    panChassis.setBorder(BorderFactory.createTitledBorder("Chassis"));
    panMovement.setBorder(BorderFactory.createTitledBorder("Movement"));
    panFuel.setBorder(BorderFactory.createTitledBorder("Fuel"));
    panHeat.setBorder(BorderFactory.createTitledBorder("Heat Sinks"));
    panArmor.setBorder(BorderFactory.createTitledBorder("Armor"));
    panCrew.setBorder(BorderFactory.createTitledBorder("Crew and Quarters"));
    panSummary.setBorder(BorderFactory.createTitledBorder("Summary"));
    panArmorAllocation.setBorder(BorderFactory.createTitledBorder("Armor Allocation"));
}
Also used : JPanel(javax.swing.JPanel) BasicInfoView(megameklab.com.ui.view.BasicInfoView) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout) BoxLayout(javax.swing.BoxLayout) AeroFuelView(megameklab.com.ui.view.AeroFuelView) DropshipChassisView(megameklab.com.ui.view.DropshipChassisView) HeatSinkView(megameklab.com.ui.view.HeatSinkView) MVFArmorView(megameklab.com.ui.view.MVFArmorView) ArmorAllocationView(megameklab.com.ui.view.ArmorAllocationView) SummaryView(megameklab.com.ui.Dropship.views.SummaryView) MovementView(megameklab.com.ui.view.MovementView) AerospaceCrewView(megameklab.com.ui.view.AerospaceCrewView)

Example 2 with AeroFuelView

use of megameklab.com.ui.view.AeroFuelView in project megameklab by MegaMek.

the class StructureTab method setUpPanels.

private void setUpPanels() {
    masterPanel = new JPanel(new GridBagLayout());
    panInfo = new BasicInfoView(getAero().getConstructionTechAdvancement());
    panChassis = new FighterChassisView(panInfo);
    panArmor = new MVFArmorView(panInfo);
    panMovement = new MovementView(panInfo);
    panFuel = new AeroFuelView();
    panHeat = new HeatSinkView(panInfo);
    panArmorAllocation = new ArmorAllocationView(panInfo, Entity.ETYPE_AERO);
    panPatchwork = new PatchworkArmorView(panInfo);
    panSummary = new SummaryView(eSource);
    if (getAero().hasPatchworkArmor()) {
        panArmorAllocation.showPatchwork(true);
    } else {
        panPatchwork.setVisible(false);
    }
    GridBagConstraints gbc = new GridBagConstraints();
    JPanel leftPanel = new JPanel();
    JPanel midPanel = new JPanel();
    JPanel rightPanel = new JPanel();
    leftPanel.setLayout(new BoxLayout(leftPanel, BoxLayout.Y_AXIS));
    midPanel.setLayout(new BoxLayout(midPanel, BoxLayout.Y_AXIS));
    rightPanel.setLayout(new BoxLayout(rightPanel, BoxLayout.Y_AXIS));
    leftPanel.add(panInfo);
    leftPanel.add(panChassis);
    leftPanel.add(panHeat);
    // leftPanel.add(Box.createGlue());
    // leftPanel.add(Box.createVerticalGlue());
    midPanel.add(panMovement);
    midPanel.add(panFuel);
    midPanel.add(panSummary);
    midPanel.add(Box.createHorizontalStrut(300));
    rightPanel.add(panArmor);
    rightPanel.add(panArmorAllocation);
    rightPanel.add(panPatchwork);
    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);
    panInfo.setBorder(BorderFactory.createTitledBorder("Basic Information"));
    panChassis.setBorder(BorderFactory.createTitledBorder("Chassis"));
    panMovement.setBorder(BorderFactory.createTitledBorder("Movement"));
    panFuel.setBorder(BorderFactory.createTitledBorder("Fuel"));
    panHeat.setBorder(BorderFactory.createTitledBorder("Heat Sinks"));
    panArmor.setBorder(BorderFactory.createTitledBorder("Armor"));
    panSummary.setBorder(BorderFactory.createTitledBorder("Summary"));
    panArmorAllocation.setBorder(BorderFactory.createTitledBorder("Armor Allocation"));
    panPatchwork.setBorder(BorderFactory.createTitledBorder("Patchwork Armor"));
}
Also used : JPanel(javax.swing.JPanel) BasicInfoView(megameklab.com.ui.view.BasicInfoView) FighterChassisView(megameklab.com.ui.view.FighterChassisView) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout) BoxLayout(javax.swing.BoxLayout) AeroFuelView(megameklab.com.ui.view.AeroFuelView) HeatSinkView(megameklab.com.ui.view.HeatSinkView) PatchworkArmorView(megameklab.com.ui.view.PatchworkArmorView) MVFArmorView(megameklab.com.ui.view.MVFArmorView) ArmorAllocationView(megameklab.com.ui.view.ArmorAllocationView) SummaryView(megameklab.com.ui.Aero.views.SummaryView) MovementView(megameklab.com.ui.view.MovementView)

Aggregations

GridBagConstraints (java.awt.GridBagConstraints)2 GridBagLayout (java.awt.GridBagLayout)2 BoxLayout (javax.swing.BoxLayout)2 JPanel (javax.swing.JPanel)2 AeroFuelView (megameklab.com.ui.view.AeroFuelView)2 ArmorAllocationView (megameklab.com.ui.view.ArmorAllocationView)2 BasicInfoView (megameklab.com.ui.view.BasicInfoView)2 HeatSinkView (megameklab.com.ui.view.HeatSinkView)2 MVFArmorView (megameklab.com.ui.view.MVFArmorView)2 MovementView (megameklab.com.ui.view.MovementView)2 SummaryView (megameklab.com.ui.Aero.views.SummaryView)1 SummaryView (megameklab.com.ui.Dropship.views.SummaryView)1 AerospaceCrewView (megameklab.com.ui.view.AerospaceCrewView)1 DropshipChassisView (megameklab.com.ui.view.DropshipChassisView)1 FighterChassisView (megameklab.com.ui.view.FighterChassisView)1 PatchworkArmorView (megameklab.com.ui.view.PatchworkArmorView)1