uidefaults

Changing Look And Feel by Swapping UIDefaults

拟墨画扇 提交于 2021-02-08 04:47:32
问题 I am writing a GUI Builder and want the user to be able to change the LookAndFeel of the GUI he builds. The LookAndFeel should only be changed for the Components inside the editor area. The rest of the Application should remain with the SystemLookAndFeel. The great problem is, that the LookAndFeel is implemented as a Singleton and changing the LookAndFeel multiple times during the Application causes a lot of bugs. I started experimenting with Buttons: I tried setting the ButtonUI to

Changing Look And Feel by Swapping UIDefaults

半世苍凉 提交于 2021-02-08 04:47:00
问题 I am writing a GUI Builder and want the user to be able to change the LookAndFeel of the GUI he builds. The LookAndFeel should only be changed for the Components inside the editor area. The rest of the Application should remain with the SystemLookAndFeel. The great problem is, that the LookAndFeel is implemented as a Singleton and changing the LookAndFeel multiple times during the Application causes a lot of bugs. I started experimenting with Buttons: I tried setting the ButtonUI to

How do I restore the default VS toolbar configuration?

随声附和 提交于 2021-02-07 11:17:41
问题 How do I restore the default VS toolbar configuration? By that, I mean: the set and location of enabled toolbars the set and order of items on each toolbar I know how to reset the set and order of items on a given toolbar , so if I knew which are the default-enabled toolbars (and their location) then I would be able to enable and reset each of them one by one. I don't want to reset all VS settings. 回答1: Tools > Import and Export Settings... > Import selected environment settings > Choose a

JTree ignoring LaF overrides

醉酒当歌 提交于 2019-12-11 09:09:06
问题 I have recently been attempting to convert a system to a unified look and feel (In this case Nimbus). However certain components require alteration from the defaults and I don't want to just change the defaults because of a single component. I am trying to override the row highlight colour for a JTree component. I have managed to switch it off entirely but this is not what I am after. From reading the various questions on here I have tried using: UIDefaults overrides = new UIDefaults();

JButton margins. Not respected when nimbus plaf

南楼画角 提交于 2019-12-10 19:22:18
问题 The property margin of a JButton isn't respected when the nimbus look and feel is installed. . I need some "little" buttons, but nimbus forces the space around button text to be large, so I only get "very large" buttons. I discovered in nimbus defaults page that there is a property called: Button.contentMargins that is preset with large values. I've tryed to override it with the following code: UIManager.getDefaults().put("Button.contentMargins", new InsetsUIResource(0,0,0,0)); in the main ,

UIManager color at a JFileChooser

扶醉桌前 提交于 2019-11-26 11:34:10
问题 I\'m using Nimbus Look and Feel, with only 3 changes at its colors: UIManager.put(\"nimbusSelection\", new Color(164,164,164)); UIManager.put(\"nimbusSelectionBackground\", new Color(214,217,223)); UIManager.put(\"nimbusSelectedText\", Color.BLACK); My FileChooser looks like this: So selected file\'s name appears in white and looks bad, and it also happens for the file type selected at the combobox. I want to change it to Black, but nimbusSelectedText is already black and is not working. I