Package megamek.client.ui.widget
Class SkinXMLHandler
java.lang.Object
megamek.client.ui.widget.SkinXMLHandler
This class reads in an XML file that specifies different aspects of the
visual skin for MegaMek.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static String
The file name for the default Skin XML file, found in the config dir.static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static String
static String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addNewComp
(String component) Adds a new component to the SkinSpecs map.static SkinSpecification
static SkinSpecification
static SkinSpecification
Get aSkinSpecification
for a given component.Returns the list of components that have SkinSpecifications.static UnitDisplaySkinSpecification
static boolean
Initializes using the default skin file.static boolean
initSkinXMLHandler
(String filename) Initializes using the supplied skin file.static void
removeComp
(String component) Remove the specified component from the SkinSpecs map.static boolean
validSkinSpecFile
(String fileName) Checks whether the given path points to a file that is a valid skin specification.static void
writeSkinToFile
(String filename) Writes the current skin to the specified XML file.
-
Field Details
-
SKIN_FOOTER
-
SKIN_HEADER
-
defaultSkinXML
The file name for the default Skin XML file, found in the config dir. -
UI_ELEMENT
-
NAME
-
FONT_COLOR
- See Also:
-
BORDER
- See Also:
-
PLAIN
- See Also:
-
NO_BORDER
- See Also:
-
TILE_BACKGROUND
- See Also:
-
TR_CORNER
- See Also:
-
TL_CORNER
- See Also:
-
BR_CORNER
- See Also:
-
BL_CORNER
- See Also:
-
EDGE
- See Also:
-
EDGE_NAME
- See Also:
-
EDGE_ICON
- See Also:
-
ICON
- See Also:
-
TILED
- See Also:
-
TOP_LINE
- See Also:
-
BOTTOM_LINE
- See Also:
-
RIGHT_LINE
- See Also:
-
LEFT_LINE
- See Also:
-
BACKGROUND_IMAGE
- See Also:
-
SHOW_SCROLL_BARS
- See Also:
-
SHOULD_BOLD
- See Also:
-
FONT_NAME
- See Also:
-
FONT_SIZE
- See Also:
-
GeneralTabIdle
- See Also:
-
PilotTabIdle
- See Also:
-
ArmorTabIdle
- See Also:
-
SystemsTabIdle
- See Also:
-
WeaponsTabIdle
- See Also:
-
ExtrasTabIdle
- See Also:
-
GeneralTabActive
- See Also:
-
PilotTabActive
- See Also:
-
ArmorTabActive
- See Also:
-
SystemsTabActive
- See Also:
-
WeaponsTabActive
- See Also:
-
ExtraTabActive
- See Also:
-
CornerIdle
- See Also:
-
CornerActive
- See Also:
-
BackgroundTile
- See Also:
-
TopLine
- See Also:
-
BottomLine
- See Also:
-
LeftLine
- See Also:
-
RightLine
- See Also:
-
TopLeftCorner
- See Also:
-
BottomLeftCorner
- See Also:
-
TopRightCorner
- See Also:
-
BottomRightCorner
- See Also:
-
MekOutline
- See Also:
-
-
Constructor Details
-
SkinXMLHandler
public SkinXMLHandler()
-
-
Method Details
-
validSkinSpecFile
Checks whether the given path points to a file that is a valid skin specification.- Parameters:
fileName
-- Returns:
-
initSkinXMLHandler
public static boolean initSkinXMLHandler()Initializes using the default skin file. -
initSkinXMLHandler
Initializes using the supplied skin file. -
writeSkinToFile
Writes the current skin to the specified XML file.- Parameters:
filename
-
-
getSkin
-
getSkin
-
getSkinnedComponents
Returns the list of components that have SkinSpecifications.- Returns:
-
getSkin
Get aSkinSpecification
for a given component.- Parameters:
component
- The name of the component to get skin info for.defaultToPlain
- Determines if a default component should be used if no match, or a plain component- Returns:
-
getUnitDisplaySkin
-
addNewComp
Adds a new component to the SkinSpecs map.- Parameters:
component
-
-
removeComp
Remove the specified component from the SkinSpecs map.- Parameters:
component
-
-