Class EntityViewPane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTabbedPane
megamek.common.ui.EnhancedTabbedPane
megamek.client.ui.dialogs.unitSelectorDialogs.EntityViewPane
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Accessible,SwingConstants
The EntityViewPane displays the entity summary, TRO and AS card panels within a TabbedPane.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class megamek.common.ui.EnhancedTabbedPane
EnhancedTabbedPane.DetachedWindowFactory, EnhancedTabbedPane.TabDetachmentHandler, EnhancedTabbedPane.TabStateListenerNested classes/interfaces inherited from class javax.swing.JTabbedPane
JTabbedPane.AccessibleJTabbedPane, JTabbedPane.ModelListenerNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
Fields inherited from class javax.swing.JTabbedPane
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUTFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis purposefully does not set preferences, as it may be used on differing panes for differing uses, and thus you don't want to remember the selected tab between the different locations.voidsetAnalysisGunnery(int gunnery) Sets the gunnery skill the Analysis tab displays its expected-damage curves at, so the tab can follow a live control such as the unit selector's BV gunnery field.voidupdateDisplayedEntity(Entity entity) Updates the pane's currently displayed entity in all tabs.voidupdateDisplayedEntity(Entity entity, ASCardDisplayable asUnit) Updates the pane's currently displayed entity / AS unit to the respective given units.voidupdateDisplayedEntity(Entity entity, ASCardDisplayable asUnit, BattlefieldSupportAsset assetEntity) Updates the pane's displayed unit, including a Battlefield Support Asset for the BFS Card tab.Methods inherited from class megamek.common.ui.EnhancedTabbedPane
addActionButton, addCloseableTab, addCloseableTab, addHoverEffect, addNotify, addTabStateListener, containsTab, detachTab, detachTab, dispose, fireTabDetached, fireTabDetaching, fireTabMoved, fireTabReattached, fireTabReattaching, fireTabRemoved, getDetachedWindowFactory, getDockGroupId, getTabOrder, getTitleAt, hasDetachedTabs, insertTab, isTabSelected, paintComponent, reattachAllTabs, remove, removeActionButton, removeActionButtons, removeAll, removeNotify, removeTab, removeTabStateListener, setActionButtons, setActionButtonsAlignAfterTabs, setDetachedTabPrefixTitle, setDetachedTabsPrefixTitle, setDetachedTabTitle, setDetachedWindowFactory, setDockGroupId, setMinimumTabsCount, setTabComponentAt, setTabDetachingEnabled, setTabDetachmentHandler, setTabLayoutPolicy, setTabOrder, setTabReorderingEnabled, setTitleAt, updateUIMethods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabComponentAt, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, indexOfTabComponent, isEnabledAt, paramString, remove, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabPlacement, setToolTipTextAt, setUIMethods inherited from class javax.swing.JComponent
addAncestorListener, 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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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, updateMethods inherited from class java.awt.Container
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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeMethods 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
-
Constructor Details
-
EntityViewPane
-
-
Method Details
-
initialize
protected void initialize()This purposefully does not set preferences, as it may be used on differing panes for differing uses, and thus you don't want to remember the selected tab between the different locations. -
updateDisplayedEntity
Updates the pane's currently displayed entity in all tabs. Performs Alpha Strike conversion if possible.- Parameters:
entity- the entity to update to, or null if the panels are to be emptied.
-
updateDisplayedEntity
Updates the pane's currently displayed entity / AS unit to the respective given units. The method assumes that asUnit corresponds to entity and does no conversion. When the AS Element or MekSummary is available, passing it in as asUnit saves the time for AS conversion.- Parameters:
entity- the entity to update to, or null if the panels are to be emptied.asUnit- the Alpha Strike unit corresponding to entity (maybe a MekSummary)
-
updateDisplayedEntity
public void updateDisplayedEntity(@Nullable Entity entity, @Nullable ASCardDisplayable asUnit, @Nullable BattlefieldSupportAsset assetEntity) Updates the pane's displayed unit, including a Battlefield Support Asset for the BFS Card tab. The BFS Card tab is shown whenever an asset is present. A standalone Asset uses its Entity for Summary and TRO while omitting the standard-unit AS Card, Faction Availability and Damage Analysis tabs.- Parameters:
entity- the entity for the standard Summary/TRO tabs; the Asset itself for a standalone AssetasUnit- the Alpha Strike unit corresponding to entity (maybe a MekSummary), or nullassetEntity- the Battlefield Support Asset to show in the Asset views, or null if the unit has no asset
-
setAnalysisGunnery
public void setAnalysisGunnery(int gunnery) Sets the gunnery skill the Analysis tab displays its expected-damage curves at, so the tab can follow a live control such as the unit selector's BV gunnery field.- Parameters:
gunnery- the gunnery skill for the analysis charts
-