Package net.mcreator.ui.laf.themes
Class Theme
java.lang.Object
net.mcreator.ui.laf.themes.Theme
A Theme can change images MCreator will use and redefine the colors and the style
of BlocklyPanel
and RSyntaxTextAreaStyler
by creating a new ColorScheme
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyFlatLafOverrides
(Map<String, String> overrides) void
static Theme
current()
getFont()
getIcon()
This icon is only withThemesPanel
.getID()
The ID is the theme's registry name.getName()
protected Theme
init()
void
To be detected, the name of the image file needs to be "icon.png" located into the main folder.toString()
-
Field Details
-
id
-
-
Constructor Details
-
Theme
public Theme()
-
-
Method Details
-
current
-
init
-
getFlatLafTheme
-
applyFlatLafOverrides
-
applyUIDefaultsOverrides
-
getID
The ID is the theme's registry name. It is used to differentiate each theme in the code. This ID is also the main folder's name of the theme.- Returns:
The theme's ID
-
getName
- Returns:
Its displayed name
-
getDescription
- Returns:
A description displayed in the
ThemesPanel
if provided.
-
getCredits
- Returns:
A String with optional credits to give to someone.
-
getVersion
- Returns:
The theme's version if provided
-
getFont
-
getConsoleFont
-
getIcon
This icon is only withThemesPanel
.- Returns:
An
ImageIcon
representing the plugin.
-
setIcon
To be detected, the name of the image file needs to be "icon.png" located into the main folder.
- Parameters:
icon
-An
ImageIcon
to display inThemesPanel
-
toString
-
getBackgroundColor
- Returns:
- Background of UI panels
-
getAltBackgroundColor
- Returns:
- Background of components (e.g. text fields, checkboxes and sound selectors)
-
getSecondAltBackgroundColor
- Returns:
- Second background color used (e.g. workspace background)
-
getForegroundColor
- Returns:
Color used for most of texts
-
getAltForegroundColor
- Returns:
Secondary text color
-
getInterfaceAccentColor
- Returns:
Returns the interfaceAccentColor if defined by theme, otherwise the one defined by the user in
PreferencesData
-