--- old/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java 2012-05-31 15:04:59.782164678 +0400 +++ new/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java 2012-05-31 15:04:55.474141266 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -644,6 +644,9 @@ "released SPACE", "released" }), + "Caret.width", + new DesktopProperty("win.caret.width", null), + "CheckBox.font", ControlFont, "CheckBox.interiorBackground", WindowBackgroundColor, "CheckBox.background", ControlBackgroundColor, --- old/src/share/classes/javax/swing/text/DefaultCaret.java 2012-05-31 15:05:14.926590163 +0400 +++ new/src/share/classes/javax/swing/text/DefaultCaret.java 2012-05-31 15:05:10.492212085 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1499,9 +1499,14 @@ if (caretWidth > -1) { return caretWidth; + } else { + Object property = UIManager.get("Caret.width"); + if (property instanceof Integer) { + return ((Integer) property).intValue(); + } else { + return 1; + } } - - return 1; } // --- serialization --------------------------------------------- --- old/src/windows/native/sun/windows/awt_DesktopProperties.cpp 2012-05-31 15:05:26.291805070 +0400 +++ new/src/windows/native/sun/windows/awt_DesktopProperties.cpp 2012-05-31 15:05:22.309649240 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -70,6 +70,7 @@ GetNonClientParameters(); GetIconParameters(); GetColorParameters(); + GetCaretParameters(); GetOtherParameters(); GetSoundEvents(); GetSystemProperties(); @@ -636,6 +637,10 @@ SetSoundProperty(TEXT("win.sound.start"), TEXT("SystemStart")); } +void AwtDesktopProperties::GetCaretParameters() { + SetIntegerProperty(TEXT("win.caret.width"), GetIntegerParameter(SPI_GETCARETWIDTH)); +} + BOOL AwtDesktopProperties::GetBooleanParameter(UINT spi) { BOOL flag; SystemParametersInfo(spi, 0, &flag, 0); --- old/src/windows/native/sun/windows/awt_DesktopProperties.h 2012-05-31 15:05:37.478224976 +0400 +++ new/src/windows/native/sun/windows/awt_DesktopProperties.h 2012-05-31 15:05:33.585067229 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -64,6 +64,7 @@ void GetColorParameters(); void GetOtherParameters(); void GetSoundEvents(); + void GetCaretParameters(); static BOOL GetBooleanParameter(UINT spi); static UINT GetIntegerParameter(UINT spi);