Class TechLevelDisplayDialog

All Implemented Interfaces:
WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class TechLevelDisplayDialog extends AbstractDialog
A dialog that displays how a unit's composite tech level is put together: the tech level of every component the unit is built from, both with and without the Variable Tech Level rule, and the running composite the components produce as they are folded in.
See Also:
  • Constructor Details

    • TechLevelDisplayDialog

      public TechLevelDisplayDialog(JFrame frame, @Nullable Entity entity)
      Creates a non-modal dialog showing the composite tech level breakdown for the given unit, evaluated in the unit's own introduction year with no faction filtering and the Variable Tech Level rule in use. A null entity can safely be passed.
      Parameters:
      frame - The parent frame of this dialog
      entity - The unit to display the tech level breakdown for
    • TechLevelDisplayDialog

      public TechLevelDisplayDialog(JFrame frame, @Nullable Entity entity, Faction techFaction, int evaluationYear, boolean useVariableTechLevel)
      Creates a non-modal dialog showing the composite tech level breakdown for the given unit. A null entity can safely be passed.
      Parameters:
      frame - The parent frame of this dialog
      entity - The unit to display the tech level breakdown for
      techFaction - The faction to evaluate faction-specific dates for
      evaluationYear - The year to evaluate the variable tech level in
      useVariableTechLevel - true when the Variable Tech Level rule is in use, which is then reported as the unit's effective tech level; false to treat the static tech level as the effective one
  • Method Details

    • finalizeInitialization

      protected void finalizeInitialization() throws Exception
      Description copied from class: AbstractDialog
      This MUST be called at the end of initialization to finalize it. This is the key method for this being the abstract basis for all other dialogs.
      Overrides:
      finalizeInitialization in class AbstractDialog
      Throws:
      Exception - if there's an issue finishing initialization. Normally this means there's an issue setting the preferences, which normally means that a component has had its name value set.
    • createCenterPane

      protected Container createCenterPane()
      Description copied from class: AbstractDialog
      This is used to create the dialog's center pane
      Specified by:
      createCenterPane in class AbstractDialog
      Returns:
      the center pane of the dialog
    • cancelAction

      protected void cancelAction()
      Description copied from class: AbstractDialog
      Action performed when the Cancel button is clicked, the dialog is closed by the X button, or the escape key is pressed
      Overrides:
      cancelAction in class AbstractDialog