Package megameklab.ui.supportVehicle
Class SVStructureTab
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
megameklab.ui.util.ITab
megameklab.ui.supportVehicle.SVStructureTab
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
,BuildListener
,SVBuildListener
Structure tab for support vehicle construction
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface megameklab.ui.listeners.SVBuildListener
FIRECON_ADVANCED, FIRECON_BASIC, FIRECON_NONE, TURRET_CHIN, TURRET_DUAL, TURRET_NONE, TURRET_SINGLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
chassisChanged
(String chassis) void
engineChanged
(megamek.common.Engine engine) Notify of a change in the type of enginevoid
engineTechRatingChanged
(int techRating) Notify of a change in the engine tech ratingvoid
fireConChanged
(int index) Notify of a change the type of fire controlvoid
fireConWtChanged
(double weight) Notify of a change in the base chassis fire control weight for omni vehiclesvoid
fuelCapacityChanged
(int capacity) Notify of a change in the amount of fuel.void
fuelTonnageChanged
(double tonnage) void
fuelTypeChanged
(megamek.common.FuelType fuelType) Notify of a change in ICE engine fuel type.megamek.common.ITechManager
void
jumpChanged
(int jumpMP, megamek.common.EquipmentType jumpJet) void
jumpTypeChanged
(megamek.common.EquipmentType jumpJet) void
manualBVChanged
(int manualBV) Notifies of a change of the manually entered BV.void
modelChanged
(String model) void
mulIdChanged
(int mulId) void
pintleTurretChanged
(boolean addPintle, int loc) Notify that a pintle turret has been added or removedvoid
refresh()
void
void
Removes all pod-mounted equipment from an omni.void
roleChanged
(megamek.common.UnitRole role) void
Disables controls that cannot be changed when customizing a refit.void
setChassisMod
(megamek.common.EquipmentType mod, boolean installed) Notify of the addition or removal of a chassis modificationvoid
setQuarters
(int firstClass, int firstClassPod, int secondClass, int secondClassPod, int crew, int crewPod, int steerage, int steeragePod) Notify of a change in the size of crew quartersvoid
setSeating
(int standard, int standardPod, int pillion, int pillionPod, int ejection, int ejectionPod) Notify of a change in the number of crew seatsvoid
setTechFaction
(int techFaction) void
sourceChanged
(String source) void
sponsonPintleBaseWtChanged
(double turretWeight) Notify of a change in the base chassis sponson/pintle weight for omnivehicles.void
sponsonTurretChanged
(boolean installed) Notify that sponson turrets have been added or removedvoid
structuralTechRatingChanged
(int techRating) Notify of a change in the structural tech ratingvoid
techBaseChanged
(boolean clan, boolean mixed) void
techLevelChanged
(megamek.common.SimpleTechLevel techLevel) void
tonnageChanged
(double tonnage) Notify of a change in the unit tonnagevoid
turretBaseWtChanged
(double turret1, double turret2) Notify of a change in the base chassis turret weight for omni vehiclesvoid
turretChanged
(int turretConfig) Notify that the turret configuration has changedvoid
typeChanged
(megamek.common.verifier.TestSupportVehicle.SVType type) Notify of a change in the support vehicle typevoid
void
walkChanged
(int walkMP) void
yearChanged
(int year) Methods inherited from class megameklab.ui.util.ITab
getAero, getBattleArmor, getEntity, getInfantry, getJumpship, getMek, getProtoMek, getSmallCraft, getTank, getVTOL, setFieldSize
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface megameklab.ui.listeners.BuildListener
clanNameChanged, heatSinkBaseCountChanged, heatSinksChanged, heatSinksChanged, redistributePrototypeHS, riscHeatSinkOverrideKitChanged
-
Constructor Details
-
SVStructureTab
-
-
Method Details
-
refresh
public void refresh() -
getTechManager
public megamek.common.ITechManager getTechManager() -
setTechFaction
public void setTechFaction(int techFaction) -
addRefreshedListener
-
setAsCustomization
public void setAsCustomization()Disables controls that cannot be changed when customizing a refit. -
refreshSummary
public void refreshSummary()- Specified by:
refreshSummary
in interfaceBuildListener
-
chassisChanged
- Specified by:
chassisChanged
in interfaceBuildListener
-
modelChanged
- Specified by:
modelChanged
in interfaceBuildListener
-
yearChanged
public void yearChanged(int year) - Specified by:
yearChanged
in interfaceBuildListener
-
updateTechLevel
public void updateTechLevel()- Specified by:
updateTechLevel
in interfaceBuildListener
-
sourceChanged
- Specified by:
sourceChanged
in interfaceBuildListener
-
techBaseChanged
public void techBaseChanged(boolean clan, boolean mixed) - Specified by:
techBaseChanged
in interfaceBuildListener
-
techLevelChanged
public void techLevelChanged(megamek.common.SimpleTechLevel techLevel) - Specified by:
techLevelChanged
in interfaceBuildListener
-
manualBVChanged
public void manualBVChanged(int manualBV) Description copied from interface:BuildListener
Notifies of a change of the manually entered BV. When manualBV is 0 or less, the unit should be set to not use a manual BV value and the manual BV set to -1.- Specified by:
manualBVChanged
in interfaceBuildListener
- Parameters:
manualBV
- The entered manual BV; may be invalid (0 or less)
-
walkChanged
public void walkChanged(int walkMP) - Specified by:
walkChanged
in interfaceBuildListener
-
jumpChanged
public void jumpChanged(int jumpMP, megamek.common.EquipmentType jumpJet) - Specified by:
jumpChanged
in interfaceBuildListener
-
jumpTypeChanged
public void jumpTypeChanged(megamek.common.EquipmentType jumpJet) - Specified by:
jumpTypeChanged
in interfaceBuildListener
-
tonnageChanged
public void tonnageChanged(double tonnage) Description copied from interface:SVBuildListener
Notify of a change in the unit tonnage- Specified by:
tonnageChanged
in interfaceSVBuildListener
- Parameters:
tonnage
- The new tonnage
-
typeChanged
public void typeChanged(megamek.common.verifier.TestSupportVehicle.SVType type) Description copied from interface:SVBuildListener
Notify of a change in the support vehicle type- Specified by:
typeChanged
in interfaceSVBuildListener
- Parameters:
type
- The new vehicle type
-
structuralTechRatingChanged
public void structuralTechRatingChanged(int techRating) Description copied from interface:SVBuildListener
Notify of a change in the structural tech rating- Specified by:
structuralTechRatingChanged
in interfaceSVBuildListener
- Parameters:
techRating
- The new tech rating. This should be one of the constantsITechnology.RATING_A
throughITechnology.RATING_F
-
engineChanged
public void engineChanged(megamek.common.Engine engine) Description copied from interface:SVBuildListener
Notify of a change in the type of engine- Specified by:
engineChanged
in interfaceSVBuildListener
- Parameters:
engine
- The new engine
-
engineTechRatingChanged
public void engineTechRatingChanged(int techRating) Description copied from interface:SVBuildListener
Notify of a change in the engine tech rating- Specified by:
engineTechRatingChanged
in interfaceSVBuildListener
- Parameters:
techRating
- The new tech rating. This should be one of the constantsITechnology.RATING_A
throughITechnology.RATING_F
-
setChassisMod
public void setChassisMod(megamek.common.EquipmentType mod, boolean installed) Description copied from interface:SVBuildListener
Notify of the addition or removal of a chassis modification- Specified by:
setChassisMod
in interfaceSVBuildListener
- Parameters:
mod
- The modification to add or removeinstalled
- Whether the chassis mod is to be installed or removed
-
turretChanged
public void turretChanged(int turretConfig) Description copied from interface:SVBuildListener
Notify that the turret configuration has changed- Specified by:
turretChanged
in interfaceSVBuildListener
- Parameters:
turretConfig
- The turret configuration constant fromSVChassisView
-
sponsonTurretChanged
public void sponsonTurretChanged(boolean installed) Description copied from interface:SVBuildListener
Notify that sponson turrets have been added or removed- Specified by:
sponsonTurretChanged
in interfaceSVBuildListener
- Parameters:
installed
- Whether the vehicle has a pair of sponson turrets.
-
pintleTurretChanged
public void pintleTurretChanged(boolean addPintle, int loc) Description copied from interface:SVBuildListener
Notify that a pintle turret has been added or removed- Specified by:
pintleTurretChanged
in interfaceSVBuildListener
- Parameters:
addPintle
- Whether there is a pintle turret on the left sideloc
- The location to add or remove the pintle mount
-
turretBaseWtChanged
public void turretBaseWtChanged(double turret1, double turret2) Description copied from interface:SVBuildListener
Notify of a change in the base chassis turret weight for omni vehicles- Specified by:
turretBaseWtChanged
in interfaceSVBuildListener
- Parameters:
turret1
- The weight of the first turret or chin turretturret2
- The weight of the second turret, if any
-
sponsonPintleBaseWtChanged
public void sponsonPintleBaseWtChanged(double turretWeight) Description copied from interface:SVBuildListener
Notify of a change in the base chassis sponson/pintle weight for omnivehicles.- Specified by:
sponsonPintleBaseWtChanged
in interfaceSVBuildListener
- Parameters:
turretWeight
- The weight of the sponson or pintle turrets.
-
fireConChanged
public void fireConChanged(int index) Description copied from interface:SVBuildListener
Notify of a change the type of fire control- Specified by:
fireConChanged
in interfaceSVBuildListener
- Parameters:
index
- One of the FIRECON_* constants
-
fireConWtChanged
public void fireConWtChanged(double weight) Description copied from interface:SVBuildListener
Notify of a change in the base chassis fire control weight for omni vehicles- Specified by:
fireConWtChanged
in interfaceSVBuildListener
- Parameters:
weight
- The new weight
-
resetChassis
public void resetChassis()Description copied from interface:SVBuildListener
Removes all pod-mounted equipment from an omni.- Specified by:
resetChassis
in interfaceSVBuildListener
-
setSeating
public void setSeating(int standard, int standardPod, int pillion, int pillionPod, int ejection, int ejectionPod) Description copied from interface:SVBuildListener
Notify of a change in the number of crew seats- Specified by:
setSeating
in interfaceSVBuildListener
- Parameters:
standard
- The number of fixed standard combat crew seatsstandardPod
- The number of pod-mounted standard combat crew seatspillion
- The number of fixed pillion seatspillionPod
- The number of pod-mounted pillion seatsejection
- The number of fixed ejection seatsejectionPod
- The number of pod-mounted ejection seats
-
setQuarters
public void setQuarters(int firstClass, int firstClassPod, int secondClass, int secondClassPod, int crew, int crewPod, int steerage, int steeragePod) Description copied from interface:SVBuildListener
Notify of a change in the size of crew quarters- Specified by:
setQuarters
in interfaceSVBuildListener
- Parameters:
firstClass
- The crew capacity of fixed first class/officer quartersfirstClassPod
- The crew capacity of pod-mounted first class/officer quarterssecondClass
- The crew capacity of fixed second class quarterssecondClassPod
- The crew capacity of pod-mounted second class quarterscrew
- The capacity of fixed standard crew quarterscrewPod
- The capacity of pod-mounted standard crew quarterssteerage
- The capacity of fixed steerage class quarterssteeragePod
- The capacity of pod-mounted steerage class quarters
-
fuelTonnageChanged
public void fuelTonnageChanged(double tonnage) - Specified by:
fuelTonnageChanged
in interfaceBuildListener
-
fuelCapacityChanged
public void fuelCapacityChanged(int capacity) Description copied from interface:BuildListener
Notify of a change in the amount of fuel. For aerospace this is number of fuel points. For ground support vehicles this is the range in km.- Specified by:
fuelCapacityChanged
in interfaceBuildListener
- Parameters:
capacity
- The number of fuel points or range as appropriate to the unit type
-
fuelTypeChanged
public void fuelTypeChanged(megamek.common.FuelType fuelType) Description copied from interface:BuildListener
Notify of a change in ICE engine fuel type. This is only used for vehicles.- Specified by:
fuelTypeChanged
in interfaceBuildListener
- Parameters:
fuelType
- The engine fuel type
-
mulIdChanged
public void mulIdChanged(int mulId) - Specified by:
mulIdChanged
in interfaceBuildListener
-
roleChanged
public void roleChanged(megamek.common.UnitRole role) - Specified by:
roleChanged
in interfaceBuildListener
-