Package com.krischik
Class Resizeable_Nimbus
-
- All Implemented Interfaces:
Serializable
public class Resizeable_Nimbus extends NimbusLookAndFeel
A Look & Feel based on the new Nimbus Look & Feel but with a sightly larger font. Normally one would not need this class but the Nimbus Look & Feel has some bugs in the handling of default values which this class works around.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static String[]
COMPONENT_KEYS
static String
Default_Font_Name
Name of system property to set the default font namestatic String
Default_Font_Size
Name of system property to set the default font sizestatic String
Default_Font_Style
Name of system property to set the default font stylestatic String
Default_LAF
the name of the default LAF.private static Logger
logger
class logger instanceprivate static long
serialVersionUID
version UID for serializable classes
-
Constructor Summary
Constructors Constructor Description Resizeable_Nimbus()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UIDefaults
getDefaults()
Returns the defaults for this SynthLookAndFeel.static void
logAllFonts()
log all fonts for reference.static void
setAllFonts(Font normatFont, Font largeFont, Font smallFont)
static void
setAllFonts(FontUIResource normalFont, FontUIResource largeFont, FontUIResource smallFont)
Set all fonts.-
Methods inherited from class javax.swing.plaf.nimbus.NimbusLookAndFeel
getDerivedColor, getDerivedColor, getDerivedColor, getDescription, getDisabledIcon, getID, getName, getStyle, initialize, register, shouldUpdateStyleOnAncestorChanged, shouldUpdateStyleOnEvent, uninitialize
-
Methods inherited from class javax.swing.plaf.synth.SynthLookAndFeel
createUI, getRegion, getStyleFactory, isNativeLookAndFeel, isSupportedLookAndFeel, load, load, setStyleFactory, updateStyles
-
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
createAudioAction, getAudioActionMap, initClassDefaults, initComponentDefaults, initSystemColorDefaults, loadSystemColors, playSound
-
Methods inherited from class javax.swing.LookAndFeel
getDesktopPropertyValue, getDisabledSelectedIcon, getLayoutStyle, getSupportsWindowDecorations, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, provideErrorFeedback, toString, uninstallBorder
-
-
-
-
Field Detail
-
COMPONENT_KEYS
private static final String[] COMPONENT_KEYS
-
Default_Font_Name
public static final String Default_Font_Name
Name of system property to set the default font name- See Also:
- Constant Field Values
-
Default_Font_Size
public static final String Default_Font_Size
Name of system property to set the default font size- See Also:
- Constant Field Values
-
Default_Font_Style
public static final String Default_Font_Style
Name of system property to set the default font style- See Also:
- Constant Field Values
-
Default_LAF
public static final String Default_LAF
the name of the default LAF.- See Also:
- Constant Field Values
-
logger
private static final Logger logger
class logger instance
-
serialVersionUID
private static final long serialVersionUID
version UID for serializable classes- See Also:
- Constant Field Values
-
-
Method Detail
-
setAllFonts
public static void setAllFonts(FontUIResource normalFont, FontUIResource largeFont, FontUIResource smallFont)
Set all fonts. Default of macOS is:CheckBoxMenuItem.acceleratorFont = [family=Lucida Grande,name=Lucida Grande,style=plain,size=14] Button.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] ToggleButton.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] RadioButton.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] CheckBox.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] ColorChooser.font = [family=Dialog,name=Dialog,style=plain,size=12] ComboBox.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] Label.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] List.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=12] MenuBar.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=14] Menu.acceleratorFont = [family=Lucida Grande,name=Lucida Grande,style=plain,size=14] RadioButtonMenuItem.acceleratorFont = [family=Lucida Grande,name=Lucida Grande,style=plain,size=14] MenuItem.acceleratorFont = [family=Lucida Grande,name=Lucida Grande,style=plain,size=14] MenuItem.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=14] RadioButtonMenuItem.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=14] CheckBoxMenuItem.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=14] OptionPane.buttonFont = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] OptionPane.messageFont = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] Menu.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=14] PopupMenu.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=14] OptionPane.font = [family=Lucida Grande,name=Lucida Grande,style=bold,size=13] Panel.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] ProgressBar.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] ScrollPane.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] Viewport.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] TabbedPane.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] Slider.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=11] Table.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=12] TableHeader.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=11] TextField.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] Spinner.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] PasswordField.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] TextArea.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] TextPane.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] EditorPane.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] TabbedPane.smallFont = [family=Lucida Grande,name=Lucida Grande,style=plain,size=11] TitledBorder.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] ToolBar.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] ToolTip.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=11] Tree.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=12] FormattedTextField.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=13] IconButton.font = [family=Lucida Grande,name=Lucida Grande,style=plain,size=11] InternalFrame.optionDialogTitleFont = [family=Lucida Grande,name=Lucida Grande,style=plain,size=14] InternalFrame.paletteTitleFont = [family=Lucida Grande,name=Lucida Grande,style=plain,size=14] InternalFrame.titleFont = [family=Lucida Grande,name=Lucida Grande,style=plain,size=14]
- Parameters:
normalFont
- normal dialog fontlargeFont
- large dialog font (currently unused)smallFont
- small dialog font.
-
logAllFonts
public static void logAllFonts()
log all fonts for reference.
-
getDefaults
public UIDefaults getDefaults()
Returns the defaults for this SynthLookAndFeel.OK, this is a hack to work around a bug in the Nimbus Look & Feel. Normally one would use the
javax.swing.UIManager.put
method to set the font.However, Nimbus set's sets its own fonts when the getDefaults() method is called for the first time overwriting any fonts and any other parameters set in the UIManager so you can only configure the Nimbus Look & Feel after it was created. Which is to late.
- Overrides:
getDefaults
in classNimbusLookAndFeel
- Returns:
- default value.
-
-