Class CustomPilotViewPanel

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
megamek.client.ui.dialogs.customMek.CustomPilotViewPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable

public class CustomPilotViewPanel extends JPanel implements Scrollable
Controls for customizing crew in the chat lounge. For most crew types this is part of the pilot tab. For multi-crew cockpits there is a separate tab for each crew member and another that shows common options for the entire crew.
See Also:
  • Constructor Details

    • CustomPilotViewPanel

      public CustomPilotViewPanel(CustomMekDialog parent, Entity entity, int slot, boolean editable)
  • Method Details

    • addClanPilotAdvancedRow

      public void addClanPilotAdvancedRow()
      Adds the clan pilot flag as an Advanced pair. Called at construction for multi-crew units; for single-pilot units the dialog calls it at the agreed point while interleaving its command controls.
    • addAdvancedRow

      public void addAdvancedRow(String labelText, JComponent control)
      Adds one label+control pair to the Advanced section, flowing 3 pairs to a line, and shows the section on the first pair. Lets the dialog fold its crew-level controls (initiative bonuses, commander flag) into this section for single-pilot units instead of showing a separate Command section.
      Parameters:
      labelText - the pair's label, already localized
      control - the input component; its minimum size is locked so it cannot be squeezed to a sliver
    • getMissing

      public boolean getMissing()
    • getPilotName

      public String getPilotName()
    • getNickname

      public String getNickname()
    • getGender

      public Gender getGender()
    • isClanPilot

      public boolean isClanPilot()
    • getGunnery

      public int getGunnery()
    • getGunneryL

      public int getGunneryL()
    • getGunneryM

      public int getGunneryM()
    • getGunneryB

      public int getGunneryB()
    • getGunneryAero

      public int getGunneryAero()
    • getGunneryAeroL

      public int getGunneryAeroL()
    • getGunneryAeroM

      public int getGunneryAeroM()
    • getGunneryAeroB

      public int getGunneryAeroB()
    • getArtillery

      public int getArtillery()
    • getPiloting

      public int getPiloting()
    • getPilotingAero

      public int getPilotingAero()
    • getToughness

      public int getToughness()
    • getCrewFatigue

      public int getCrewFatigue()
    • getPortrait

      public Portrait getPortrait()
    • getEntityUnitNumSwap

      public Entity getEntityUnitNumSwap()
    • getBackup

      public int getBackup()
    • enableMissing

      public void enableMissing(boolean enable)
    • getPreferredScrollableViewportSize

      public Dimension getPreferredScrollableViewportSize()
      Specified by:
      getPreferredScrollableViewportSize in interface Scrollable
    • getScrollableUnitIncrement

      public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
      Specified by:
      getScrollableUnitIncrement in interface Scrollable
    • getScrollableBlockIncrement

      public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
      Specified by:
      getScrollableBlockIncrement in interface Scrollable
    • getScrollableTracksViewportWidth

      public boolean getScrollableTracksViewportWidth()
      Specified by:
      getScrollableTracksViewportWidth in interface Scrollable
    • getScrollableTracksViewportHeight

      public boolean getScrollableTracksViewportHeight()
      Specified by:
      getScrollableTracksViewportHeight in interface Scrollable