Java Swing UIManager getUnfocusedSelectionForeground()

Here you can find the source of getUnfocusedSelectionForeground()

Description

Get the system-wide unfocused selection foreground color

License

Open Source License

Declaration

public static Color getUnfocusedSelectionForeground() 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.Color;

import javax.swing.UIManager;

public class Main {
    private static Color unfocusedSelFg;

    /**//from www.jav  a2 s  .co  m
     * Get the system-wide unfocused selection foreground color
     */
    public static Color getUnfocusedSelectionForeground() {
        if (unfocusedSelFg == null) {
            //allow theme/ui custom definition
            unfocusedSelFg = UIManager.getColor("nb.explorer.unfocusedSelFg"); //NOI18N

            if (unfocusedSelFg == null) {
                //try to get standard shadow color
                unfocusedSelFg = UIManager.getColor("textText"); //NOI18N

                if (unfocusedSelFg == null) {
                    //Okay, the look and feel doesn't suport it, punt
                    unfocusedSelFg = Color.BLACK;
                }
            }
        }

        return unfocusedSelFg;
    }
}

Related

  1. getUIDefaultsOfClass(String className)
  2. getUIName(Component comp)
  3. getUIPanelBackground()
  4. getUnfocusedSelectionBackground()
  5. getUnfocusedSelectionForeground()
  6. getUnfocusedSelectionForeground()
  7. getWindowsVisualStyle()
  8. GUI_unit(double p_GUI_unit, java.awt.Component c)
  9. init()