Search in sources :

Example 1 with BasicInfoView

use of megameklab.com.ui.view.BasicInfoView 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 BasicInfoView

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

the class StructureTab method setUpPanels.

private void setUpPanels() {
    masterPanel = new JPanel(new GridBagLayout());
    panBasicInfo = new BasicInfoView(getMech().getConstructionTechAdvancement());
    panChassis = new MekChassisView(panBasicInfo);
    panArmor = new MVFArmorView(panBasicInfo);
    panMovement = new MovementView(panBasicInfo);
    panHeat = new HeatSinkView(panBasicInfo);
    panArmorAllocation = new ArmorAllocationView(panBasicInfo, Entity.ETYPE_MECH);
    panPatchwork = new PatchworkArmorView(panBasicInfo);
    panSummary = new SummaryView(eSource);
    if (getMech().hasPatchworkArmor()) {
        panArmorAllocation.showPatchwork(true);
    } else {
        panPatchwork.setVisible(false);
    }
    GridBagConstraints gbc;
    panBasicInfo.setFromEntity(getMech());
    panChassis.setFromEntity(getMech());
    panArmor.setFromEntity(getMech());
    panMovement.setFromEntity(getMech());
    panHeat.setFromMech(getMech());
    panArmorAllocation.setFromEntity(getMech());
    panPatchwork.setFromEntity(getMech());
    JPanel leftPanel = new JPanel();
    JPanel centerPanel = new JPanel();
    JPanel rightPanel = new JPanel();
    leftPanel.setLayout(new BoxLayout(leftPanel, BoxLayout.Y_AXIS));
    centerPanel.setLayout(new BoxLayout(centerPanel, BoxLayout.Y_AXIS));
    rightPanel.setLayout(new BoxLayout(rightPanel, BoxLayout.Y_AXIS));
    leftPanel.add(panBasicInfo);
    leftPanel.add(Box.createVerticalStrut(11));
    leftPanel.add(panChassis);
    leftPanel.add(Box.createVerticalStrut(11));
    leftPanel.add(panHeat);
    leftPanel.add(Box.createGlue());
    centerPanel.add(panArmor);
    centerPanel.add(panMovement);
    centerPanel.add(panSummary);
    centerPanel.add(Box.createVerticalGlue());
    rightPanel.add(panArmorAllocation);
    rightPanel.add(panPatchwork);
    rightPanel.add(Box.createVerticalGlue());
    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(centerPanel, gbc);
    gbc.gridx = 2;
    masterPanel.add(rightPanel, gbc);
    panBasicInfo.setBorder(BorderFactory.createTitledBorder("Basic Information"));
    panChassis.setBorder(BorderFactory.createTitledBorder("Chassis"));
    panMovement.setBorder(BorderFactory.createTitledBorder("Movement"));
    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 : HeatSinkView(megameklab.com.ui.view.HeatSinkView) JPanel(javax.swing.JPanel) BasicInfoView(megameklab.com.ui.view.BasicInfoView) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout) PatchworkArmorView(megameklab.com.ui.view.PatchworkArmorView) BoxLayout(javax.swing.BoxLayout) MVFArmorView(megameklab.com.ui.view.MVFArmorView) MekChassisView(megameklab.com.ui.view.MekChassisView) ArmorAllocationView(megameklab.com.ui.view.ArmorAllocationView) SummaryView(megameklab.com.ui.Mek.views.SummaryView) MovementView(megameklab.com.ui.view.MovementView)

Example 3 with BasicInfoView

use of megameklab.com.ui.view.BasicInfoView 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)

Example 4 with BasicInfoView

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

the class StructureTab method setUpPanels.

public void setUpPanels() {
    JPanel previewPanel = new JPanel();
    previewPanel.setLayout(new BoxLayout(previewPanel, BoxLayout.Y_AXIS));
    panelMekView = new MechViewPanel(450, 480, false);
    // mekViewScrollPane.setMinimumSize(new java.awt.Dimension(450, 550));
    // mekViewScrollPane.setMaximumSize(new java.awt.Dimension(450, 550));
    // mekViewScrollPane.setPreferredSize(new java.awt.Dimension(450, 550));
    previewPanel.add(panelMekView);
    JPanel leftPanel = new JPanel();
    leftPanel.setLayout(new BoxLayout(leftPanel, BoxLayout.Y_AXIS));
    JPanel rightPanel = new JPanel();
    rightPanel.setLayout(new BoxLayout(rightPanel, BoxLayout.Y_AXIS));
    panBasicInfo = new BasicInfoView(getBattleArmor().getConstructionTechAdvancement());
    panChassis = new BAChassisView(panBasicInfo);
    panMovement = new MovementView(panBasicInfo);
    panArmor = new BAProtoArmorView(panBasicInfo);
    JPanel manipPanel = new JPanel(new GridBagLayout());
    panEnhancements = new BAEnhancementView(panBasicInfo);
    GridBagConstraints gbc = new GridBagConstraints();
    Dimension comboSize = new Dimension(250, 25);
    gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gbc.anchor = GridBagConstraints.WEST;
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.anchor = GridBagConstraints.NORTHWEST;
    gbc.fill = GridBagConstraints.NONE;
    manipPanel.add(createLabel("Left Arm:", labelSize), gbc);
    gbc.gridy = 1;
    manipPanel.add(createLabel("Right Arm:", labelSize), gbc);
    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.gridx = 1;
    gbc.gridy = 0;
    manipPanel.add(leftManipSelect, gbc);
    gbc.gridy = 1;
    manipPanel.add(rightManipSelect, gbc);
    setFieldSize(leftManipSelect, comboSize);
    setFieldSize(rightManipSelect, comboSize);
    panBasicInfo.setBorder(BorderFactory.createTitledBorder("Basic Information"));
    panChassis.setBorder(BorderFactory.createTitledBorder("Chassis"));
    panMovement.setBorder(BorderFactory.createTitledBorder("Movement"));
    panArmor.setBorder(BorderFactory.createTitledBorder("Armor"));
    // weaponView.setBorder(BorderFactory.createTitledBorder("Weapon Selection"));
    manipPanel.setBorder(BorderFactory.createTitledBorder("Manipulators"));
    panEnhancements.setBorder(BorderFactory.createTitledBorder("Enhancements"));
    leftPanel.add(panBasicInfo);
    leftPanel.add(panChassis);
    leftPanel.add(panMovement);
    leftPanel.add(panArmor);
    // leftPanel.add(Box.createVerticalGlue());
    rightPanel.add(Box.createVerticalStrut(5));
    rightPanel.add(previewPanel);
    rightPanel.add(panEnhancements);
    rightPanel.add(manipPanel);
    setLayout(new GridBagLayout());
    gbc = new GridBagConstraints();
    gbc.insets = new Insets(0, 30, 0, 30);
    gbc.gridx = 0;
    gbc.gridy = 0;
    gbc.anchor = GridBagConstraints.NORTH;
    gbc.fill = java.awt.GridBagConstraints.NONE;
    gbc.weightx = 0.0;
    gbc.weighty = 0;
    add(leftPanel, gbc);
    gbc.gridx = 1;
    add(rightPanel, gbc);
}
Also used : JPanel(javax.swing.JPanel) BasicInfoView(megameklab.com.ui.view.BasicInfoView) BAEnhancementView(megameklab.com.ui.view.BAEnhancementView) GridBagConstraints(java.awt.GridBagConstraints) BAChassisView(megameklab.com.ui.view.BAChassisView) Insets(java.awt.Insets) BAProtoArmorView(megameklab.com.ui.view.BAProtoArmorView) GridBagLayout(java.awt.GridBagLayout) BoxLayout(javax.swing.BoxLayout) MechViewPanel(megamek.client.ui.swing.MechViewPanel) Dimension(java.awt.Dimension) MovementView(megameklab.com.ui.view.MovementView)

Example 5 with BasicInfoView

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

the class StructureTab method setUpPanels.

private void setUpPanels() {
    masterPanel = new JPanel(new GridBagLayout());
    panBasicInfo = new BasicInfoView(getTank().getConstructionTechAdvancement());
    panChassis = new CVChassisView(panBasicInfo);
    panArmor = new MVFArmorView(panBasicInfo);
    panMovement = new MovementView(panBasicInfo);
    panArmorAllocation = new ArmorAllocationView(panBasicInfo, Entity.ETYPE_TANK);
    panPatchwork = new PatchworkArmorView(panBasicInfo);
    panSummary = new SummaryView(eSource);
    panTransport = new CVTransportView();
    if (getTank().hasPatchworkArmor()) {
        panArmorAllocation.showPatchwork(true);
    } else {
        panPatchwork.setVisible(false);
    }
    GridBagConstraints gbc;
    panBasicInfo.setFromEntity(getTank());
    panChassis.setFromEntity(getTank());
    panMovement.setFromEntity(getTank());
    panArmor.setFromEntity(getTank());
    panArmorAllocation.setFromEntity(getTank());
    panPatchwork.setFromEntity(getTank());
    panTransport.setFromEntity(getTank());
    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(panBasicInfo);
    leftPanel.add(Box.createVerticalStrut(6));
    leftPanel.add(panChassis);
    leftPanel.add(Box.createVerticalStrut(6));
    leftPanel.add(panMovement);
    leftPanel.add(Box.createGlue());
    midPanel.add(panArmor);
    midPanel.add(panTransport);
    midPanel.add(panSummary);
    midPanel.add(Box.createVerticalGlue());
    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);
    panBasicInfo.setBorder(BorderFactory.createTitledBorder("Basic Information"));
    panChassis.setBorder(BorderFactory.createTitledBorder("Chassis"));
    panMovement.setBorder(BorderFactory.createTitledBorder("Movement"));
    panArmor.setBorder(BorderFactory.createTitledBorder("Armor"));
    panSummary.setBorder(BorderFactory.createTitledBorder("Summary"));
    panArmorAllocation.setBorder(BorderFactory.createTitledBorder("Armor Allocation"));
    panPatchwork.setBorder(BorderFactory.createTitledBorder("Patchwork Armor"));
    panTransport.setBorder(BorderFactory.createTitledBorder("Transport"));
}
Also used : JPanel(javax.swing.JPanel) BasicInfoView(megameklab.com.ui.view.BasicInfoView) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout) PatchworkArmorView(megameklab.com.ui.view.PatchworkArmorView) BoxLayout(javax.swing.BoxLayout) MVFArmorView(megameklab.com.ui.view.MVFArmorView) ArmorAllocationView(megameklab.com.ui.view.ArmorAllocationView) SummaryView(megameklab.com.ui.Vehicle.views.SummaryView) CVChassisView(megameklab.com.ui.view.CVChassisView) MovementView(megameklab.com.ui.view.MovementView) CVTransportView(megameklab.com.ui.view.CVTransportView)

Aggregations

GridBagConstraints (java.awt.GridBagConstraints)5 GridBagLayout (java.awt.GridBagLayout)5 BoxLayout (javax.swing.BoxLayout)5 JPanel (javax.swing.JPanel)5 BasicInfoView (megameklab.com.ui.view.BasicInfoView)5 MovementView (megameklab.com.ui.view.MovementView)5 ArmorAllocationView (megameklab.com.ui.view.ArmorAllocationView)4 MVFArmorView (megameklab.com.ui.view.MVFArmorView)4 HeatSinkView (megameklab.com.ui.view.HeatSinkView)3 PatchworkArmorView (megameklab.com.ui.view.PatchworkArmorView)3 AeroFuelView (megameklab.com.ui.view.AeroFuelView)2 Dimension (java.awt.Dimension)1 Insets (java.awt.Insets)1 MechViewPanel (megamek.client.ui.swing.MechViewPanel)1 SummaryView (megameklab.com.ui.Aero.views.SummaryView)1 SummaryView (megameklab.com.ui.Dropship.views.SummaryView)1 SummaryView (megameklab.com.ui.Mek.views.SummaryView)1 SummaryView (megameklab.com.ui.Vehicle.views.SummaryView)1 AerospaceCrewView (megameklab.com.ui.view.AerospaceCrewView)1 BAChassisView (megameklab.com.ui.view.BAChassisView)1