Package megameklab.ui.largeAero
Class WSStructureTab
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
megameklab.ui.util.ITab
megameklab.ui.largeAero.WSStructureTab
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
,AdvancedAeroBuildListener
,AeroVesselBuildListener
,ArmorAllocationListener
,BuildListener
public class WSStructureTab
extends ITab
implements AdvancedAeroBuildListener, ArmorAllocationListener
- 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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
armorPointsChanged
(int location, int front, int rear) Notifies of a change to the number of armor points assigned to a particular locationvoid
armorTonnageChanged
(double tonnage) Notifies of a change in armor tonnage.void
armorTypeChanged
(int at, int aTechLevel) Notifies of a change in the armor typevoid
Signals that the armor should be automatically distributed to the various locations.void
void
baMarinesChanged
(int nBAMarines) void
baseCrewChanged
(int nCrew) void
baseTypeChanged
(int type) void
chassisChanged
(String chassis) void
escapeChanged
(int lifeBoats, int escapePods) void
fuelCapacityChanged
(int capacity) Notify of a change in the amount of fuel.void
fuelTonnageChanged
(double tonnage) megamek.common.ITechManager
void
gravDecksChanged
(List<Integer> deckSizes) void
gunnersChanged
(int nGunners) void
heatSinkBaseCountChanged
(int count) Notifies of a change in the number of heat sinks that are part of the base chassis of an omni unitvoid
heatSinksChanged
(int index, int count) Notifies of a change in heat sink type or count for aerospace unitsvoid
jumpChanged
(int jumpMP, megamek.common.EquipmentType jumpJet) void
jumpTypeChanged
(megamek.common.EquipmentType jumpJet) void
lfBatteryChanged
(boolean battery) void
manualBVChanged
(int manualBV) Notifies of a change of the manually entered BV.void
marinesChanged
(int nMarines) void
Signals that the armor should be set to the maximum value for the unit.void
militaryChanged
(boolean military) void
modelChanged
(String model) void
modularChanged
(boolean modular) void
mulIdChanged
(int mulId) void
officersChanged
(int nOfficers) void
passengersChanged
(int nPassengers) void
patchworkChanged
(int location, megamek.common.equipment.ArmorType armor) Notifies of a change in the type of armor assigned to a specific location of a unit with patchwork armor.void
quartersChanged
(int officer, int standard, int secondClass, int steerage) void
rangeChanged
(int range) void
refresh()
void
void
void
roleChanged
(megamek.common.UnitRole role) void
sailChanged
(boolean sail) void
void
setTechFaction
(megamek.common.ITechnology.Faction techFaction) void
siChanged
(int si) void
sourceChanged
(String source) void
techBaseChanged
(boolean clan, boolean mixed) void
techLevelChanged
(megamek.common.SimpleTechLevel techLevel) void
tonnageChanged
(double tonnage) void
void
Signals that any remaining weight that has not been allocated should be used for armor, up to the armor limit for the unit.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.ArmorAllocationListener
armorBARRatingChanged, armorFactorChanged, armorTechRatingChanged, armorTypeChanged
Methods inherited from interface megameklab.ui.listeners.BuildListener
clanNameChanged, fuelTypeChanged, heatSinksChanged, redistributePrototypeHS, riscHeatSinkOverrideKitChanged
-
Constructor Details
-
WSStructureTab
-
-
Method Details
-
getTechManager
public megamek.common.ITechManager getTechManager() -
setTechFaction
public void setTechFaction(megamek.common.ITechnology.Faction techFaction) -
refresh
public void refresh() -
removeAllListeners
public void removeAllListeners() -
addAllListeners
public void addAllListeners() -
addRefreshedListener
-
setAsCustomization
public void setAsCustomization() -
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
-
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
-
updateTechLevel
public void updateTechLevel()- Specified by:
updateTechLevel
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)
-
heatSinksChanged
public void heatSinksChanged(int index, int count) Description copied from interface:BuildListener
Notifies of a change in heat sink type or count for aerospace units- Specified by:
heatSinksChanged
in interfaceBuildListener
- Parameters:
index
- EitherHeatSinkView.TYPE_SINGLE
orHeatSinkView.TYPE_DOUBLE_AERO
count
- The number of heat sinks
-
heatSinkBaseCountChanged
public void heatSinkBaseCountChanged(int count) Description copied from interface:BuildListener
Notifies of a change in the number of heat sinks that are part of the base chassis of an omni unit- Specified by:
heatSinkBaseCountChanged
in interfaceBuildListener
- Parameters:
count
- The number of fixed heat sinks
-
armorTypeChanged
public void armorTypeChanged(int at, int aTechLevel) Description copied from interface:ArmorAllocationListener
Notifies of a change in the armor type- Specified by:
armorTypeChanged
in interfaceArmorAllocationListener
- Parameters:
at
- The armor type constant fromEquipmentType
aTechLevel
- The tech level constant fromTechConstants
, used to distinguish between IS and Clan versions
-
armorTonnageChanged
public void armorTonnageChanged(double tonnage) Description copied from interface:ArmorAllocationListener
Notifies of a change in armor tonnage. This is not used by units that assign armor by point.- Specified by:
armorTonnageChanged
in interfaceArmorAllocationListener
- Parameters:
tonnage
- The total weight of armor on the unit.
-
maximizeArmor
public void maximizeArmor()Description copied from interface:ArmorAllocationListener
Signals that the armor should be set to the maximum value for the unit.- Specified by:
maximizeArmor
in interfaceArmorAllocationListener
-
useRemainingTonnageArmor
public void useRemainingTonnageArmor()Description copied from interface:ArmorAllocationListener
Signals that any remaining weight that has not been allocated should be used for armor, up to the armor limit for the unit.- Specified by:
useRemainingTonnageArmor
in interfaceArmorAllocationListener
-
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) - Specified by:
tonnageChanged
in interfaceAdvancedAeroBuildListener
-
lfBatteryChanged
public void lfBatteryChanged(boolean battery) - Specified by:
lfBatteryChanged
in interfaceAdvancedAeroBuildListener
-
militaryChanged
public void militaryChanged(boolean military) - Specified by:
militaryChanged
in interfaceAeroVesselBuildListener
-
modularChanged
public void modularChanged(boolean modular) - Specified by:
modularChanged
in interfaceAdvancedAeroBuildListener
-
sailChanged
public void sailChanged(boolean sail) - Specified by:
sailChanged
in interfaceAdvancedAeroBuildListener
-
baseTypeChanged
public void baseTypeChanged(int type) - Specified by:
baseTypeChanged
in interfaceAdvancedAeroBuildListener
-
rangeChanged
public void rangeChanged(int range) - Specified by:
rangeChanged
in interfaceAdvancedAeroBuildListener
-
siChanged
public void siChanged(int si) - Specified by:
siChanged
in interfaceAdvancedAeroBuildListener
-
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
-
armorPointsChanged
public void armorPointsChanged(int location, int front, int rear) Description copied from interface:ArmorAllocationListener
Notifies of a change to the number of armor points assigned to a particular location- Specified by:
armorPointsChanged
in interfaceArmorAllocationListener
- Parameters:
location
- The location to assign the pointsfront
- The number of points to assign to the front (or total to the location if there is not separate rear armor)rear
- The number of points to assign to the rear armor of the location
-
autoAllocateArmor
public void autoAllocateArmor()Description copied from interface:ArmorAllocationListener
Signals that the armor should be automatically distributed to the various locations.- Specified by:
autoAllocateArmor
in interfaceArmorAllocationListener
-
patchworkChanged
public void patchworkChanged(int location, megamek.common.equipment.ArmorType armor) Description copied from interface:ArmorAllocationListener
Notifies of a change in the type of armor assigned to a specific location of a unit with patchwork armor.- Specified by:
patchworkChanged
in interfaceArmorAllocationListener
- Parameters:
location
- The location constantarmor
- The type of armor used in the location.
-
baseCrewChanged
public void baseCrewChanged(int nCrew) - Specified by:
baseCrewChanged
in interfaceAeroVesselBuildListener
-
officersChanged
public void officersChanged(int nOfficers) - Specified by:
officersChanged
in interfaceAeroVesselBuildListener
-
gunnersChanged
public void gunnersChanged(int nGunners) - Specified by:
gunnersChanged
in interfaceAeroVesselBuildListener
-
passengersChanged
public void passengersChanged(int nPassengers) - Specified by:
passengersChanged
in interfaceAeroVesselBuildListener
-
marinesChanged
public void marinesChanged(int nMarines) - Specified by:
marinesChanged
in interfaceAeroVesselBuildListener
-
baMarinesChanged
public void baMarinesChanged(int nBAMarines) - Specified by:
baMarinesChanged
in interfaceAeroVesselBuildListener
-
quartersChanged
public void quartersChanged(int officer, int standard, int secondClass, int steerage) - Specified by:
quartersChanged
in interfaceAeroVesselBuildListener
-
autoAssignQuarters
public void autoAssignQuarters()- Specified by:
autoAssignQuarters
in interfaceAeroVesselBuildListener
-
escapeChanged
public void escapeChanged(int lifeBoats, int escapePods) - Specified by:
escapeChanged
in interfaceAeroVesselBuildListener
-
gravDecksChanged
- Specified by:
gravDecksChanged
in interfaceAdvancedAeroBuildListener
-
mulIdChanged
public void mulIdChanged(int mulId) - Specified by:
mulIdChanged
in interfaceBuildListener
-
roleChanged
public void roleChanged(megamek.common.UnitRole role) - Specified by:
roleChanged
in interfaceBuildListener
-