Example usage for java.awt SystemColor activeCaptionBorder

List of usage examples for java.awt SystemColor activeCaptionBorder

Introduction

In this page you can find the example usage for java.awt SystemColor activeCaptionBorder.

Prototype

SystemColor activeCaptionBorder

To view the source code for java.awt SystemColor activeCaptionBorder.

Click Source Link

Document

The color rendered for the border around the currently active window.

Usage

From source file:Main.java

public static void main(String[] a) {
    Color[] sysColor = new Color[] { SystemColor.activeCaption, SystemColor.activeCaptionBorder,
            SystemColor.activeCaptionText, SystemColor.control, SystemColor.controlDkShadow,
            SystemColor.controlHighlight, SystemColor.controlLtHighlight, SystemColor.controlShadow,
            SystemColor.controlText, SystemColor.desktop, SystemColor.inactiveCaption,
            SystemColor.inactiveCaptionBorder, SystemColor.inactiveCaptionText, SystemColor.info,
            SystemColor.infoText, SystemColor.menu, SystemColor.menuText, SystemColor.scrollbar,
            SystemColor.text, SystemColor.textHighlight, SystemColor.textHighlightText,
            SystemColor.textInactiveText, SystemColor.textText, SystemColor.window, SystemColor.windowBorder,
            SystemColor.windowText };

    for (Color c : sysColor) {
        System.out.println(c);/*from   w w w  .j a v  a  2 s . c  om*/

    }

}

From source file:edu.ku.brc.ui.CustomDialog.java

/**
 * @param title the title of the virtual titlebar
 *//* w w w  .  j  av a  2 s . c  o m*/
public void setCustomTitleBar(final String title) {
    setUndecorated(true);

    titleBarLabel = new GradiantLabel(title, SwingConstants.CENTER);

    borderColor = SystemColor.windowBorder;
    Color textColor = SystemColor.activeCaptionText;

    if (UIHelper.isLinux()) {
        borderColor = SystemColor.activeCaptionBorder;
        textColor = SystemColor.activeCaptionText;
        if (borderColor.getRed() == borderColor.getGreen() && borderColor.getGreen() == borderColor.getBlue()) {
            borderColor = new Color(132, 170, 216);
            textColor = Color.WHITE;
        }

    } else if (UIHelper.isWindows()) {
        borderColor = (Color) Toolkit.getDefaultToolkit().getDesktopProperty("win.frame.activeCaptionColor");
        textColor = (Color) Toolkit.getDefaultToolkit().getDesktopProperty("win.frame.captionTextColor");
    }

    titleBarLabel.setTextColor(textColor);
    titleBarLabel.setBGBaseColor(borderColor);
    titleBarLabel.setGradiants(UIHelper.makeLighter(borderColor, 0.2), UIHelper.makeDarker(borderColor, 0.2));
}