Insubstantial / insubstantial

Swing look-and-feel library and assorted widgets
193 stars 58 forks source link

Add Rounded Corners for Windows #59

Closed shemnon closed 12 years ago

shemnon commented 12 years ago

Add support for rounded corners. This is not mandatory but it will the default. To turn it off the user can do any of the following:

To turn it off globally w/o changing code, pass in the system property -Dsubstancelaf.windowRoundedCorners=False. This will cause all windows to be squared and will cause all other configurations to be ignored. This may be needed to prevent artifacts on older hardware and stuff like Windows 7 Basic mode. The default is true if not specified.

To change the default for subsequent windows, add to the UIManager a value for windowRoundedCorners.

UIManager.put(SubstanceLookAndFeel.WINDOW_ROUNDED_CORNERS,
    Boolean.FALSE);

To change the value per window, add a client property before first showing the window

someFrameOrDialog.putClientProperty(SubstanceLookAndFeel.WINDOW_ROUNDED_CORNERS,
    Boolean.FALSE);

This applies to JFrame, JDialog, and JInternalFrame (and subclasses)