Class DisposableDisplayContainer
java.lang.Object
megamek.client.ui.dialogs.unitDisplay.DisposableDisplayContainer
- All Implemented Interfaces:
UnitDisplayContainer
A UnitDisplayContainer implementation that creates a one-time use dialog and display. This container creates a new
UnitDisplayDialog and UnitDisplay instance with each instantiation. The dialog will be automatically disposed when
closed by the user.
-
Constructor Summary
ConstructorsConstructorDescriptionDisposableDisplayContainer(JFrame frame) Creates a new disposable container with a fresh dialog and display -
Method Summary
Modifier and TypeMethodDescriptionReturns the shared dialog windowReturns the shared UnitDisplay instance
-
Constructor Details
-
DisposableDisplayContainer
Creates a new disposable container with a fresh dialog and display- Parameters:
frame- the parent frame for the dialog
-
-
Method Details
-
getUnitDisplay
Returns the shared UnitDisplay instance- Specified by:
getUnitDisplayin interfaceUnitDisplayContainer- Returns:
- the UnitDisplay component
-
getDialog
Returns the shared dialog window- Specified by:
getDialogin interfaceUnitDisplayContainer- Returns:
- the JDialog instance
-