Example usage for java.awt SystemColor controlDkShadow

List of usage examples for java.awt SystemColor controlDkShadow

Introduction

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

Prototype

SystemColor controlDkShadow

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

Click Source Link

Document

The color rendered for dark shadow areas on 3D control objects, such as pushbuttons.

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  ww.  j  a v  a  2 s. c o  m*/

    }

}

From source file:TextBox3D.java

public synchronized void paint(Graphics g) {
    FontMetrics fm = g.getFontMetrics();
    Dimension size = getSize();//ww  w  .j a  v  a2 s . c  o m
    int x = (size.width - fm.stringWidth(text)) / 2;
    int y = (size.height - fm.getHeight()) / 2;
    g.setColor(SystemColor.control);
    g.fillRect(0, 0, size.width, size.height);
    g.setColor(SystemColor.controlShadow);
    g.drawLine(0, 0, 0, size.height - 1);
    g.drawLine(0, 0, size.width - 1, 0);
    g.setColor(SystemColor.controlDkShadow);
    g.drawLine(0, size.height - 1, size.width - 1, size.height - 1);
    g.drawLine(size.width - 1, 0, size.width - 1, size.height - 1);
    g.setColor(SystemColor.controlText);
    g.drawString(text, x, y);
}

From source file:wjhk.jupload2.policies.DefaultUploadPolicy.java

/**
 * Default implementation of/*w  ww. j  av a  2s  . c  om*/
 * {@link wjhk.jupload2.policies.UploadPolicy#createTopPanel(JButton, JButton, JButton, JUploadPanel)}
 * . IT creates a JPanel, containing the three given JButton. It creates the
 * same panel as the original JUpload.
 * 
 * @see wjhk.jupload2.policies.UploadPolicy#createTopPanel(JButton, JButton,
 *      JButton, JUploadPanel)
 */
public JPanel createTopPanel(JButton browse, JButton remove, JButton removeAll, JUploadPanel jUploadPanel) {
    JPanel jPanel = new JPanel();

    jPanel.setLayout(new GridLayout(1, 3, 10, 5));
    jPanel.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
    jPanel.add(browse);
    jPanel.add(removeAll);
    jPanel.add(remove);

    jUploadPanel.getJComponent().setBorder(BorderFactory.createLineBorder(SystemColor.controlDkShadow));

    return jPanel;
}