Example usage for java.awt SystemColor controlShadow

List of usage examples for java.awt SystemColor controlShadow

Introduction

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

Prototype

SystemColor controlShadow

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

Click Source Link

Document

The color rendered for shadow areas of 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  w  w . j  a  va 2s  . c  om*/

    }

}

From source file:TextBox3D.java

public synchronized void paint(Graphics g) {
    FontMetrics fm = g.getFontMetrics();
    Dimension size = getSize();/*from   w  ww  . j a va 2 s. c  om*/
    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:org.pentaho.reporting.designer.core.util.table.ElementMetaDataTable.java

public ElementMetaDataTable() {
    putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);

    // This is a hack as Mac chooses white on white for grids.
    this.setShowHorizontalLines(true);
    this.setShowVerticalLines(true);
    this.setGridColor(SystemColor.controlShadow);

    changeHandler = new ActiveContextChangeHandler();
    structureFunctionCellEditor = new StructureFunctionCellEditor();
    reportPreProcessorCellEditor = new ReportPreProcessorCellEditor();
    expressionsCellEditor = new ExpressionCellHandler();
    expressionsCellRenderer = new ExpressionCellHandler();
    reportPreProcessorCellRenderer = new ReportPreProcessorCellRenderer();
    groupingCellRenderer = new GroupingHeaderCellRenderer();
    taggedPropertyEditorCellEditor = new PropertyEditorCellEditor();
    propertyEditorCellEditor = new DesignerPropertyCellEditorWithEllipsis();
    propertyEditorCellRenderer = new PropertyEditorCellRenderer();
    arrayCellRenderer = new ArrayCellRenderer();
    arrayCellEditor = new ArrayCellEditor();
    stringValueCellEditor = new StringValueCellEditor();

    setDefaultEditor(Object.class, null);
    setDefaultEditor(GroupingHeader.class, new GroupingHeaderCellEditor());
    setDefaultEditor(Expression.class, expressionsCellEditor);
    setDefaultEditor(StructureFunction.class, structureFunctionCellEditor);
    setDefaultEditor(ReportPreProcessor.class, reportPreProcessorCellEditor);

    setDefaultEditor(Number.class, new GenericCellEditor(BigDecimal.class));
    setDefaultEditor(Integer.class, new GenericCellEditor(Integer.class));
    setDefaultEditor(Float.class, new GenericCellEditor(Float.class));
    setDefaultEditor(Double.class, new GenericCellEditor(Double.class));
    setDefaultEditor(Short.class, new GenericCellEditor(Short.class));
    setDefaultEditor(Byte.class, new GenericCellEditor(Byte.class));
    setDefaultEditor(Long.class, new GenericCellEditor(Long.class));
    setDefaultEditor(BigInteger.class, new GenericCellEditor(BigInteger.class));
    setDefaultEditor(BigDecimal.class, new GenericCellEditor(BigDecimal.class));
    setDefaultEditor(String.class, stringValueCellEditor);
    setDefaultEditor(Date.class, new DateCellEditor(Date.class));
    setDefaultEditor(java.sql.Date.class, new DateCellEditor(java.sql.Date.class));
    setDefaultEditor(Time.class, new TimeCellEditor(Time.class));
    setDefaultEditor(Timestamp.class, new DateCellEditor(Timestamp.class));

    setDefaultRenderer(GroupingHeader.class, new GroupingHeaderCellRenderer());
    setDefaultRenderer(GroupedName.class, new GroupedNameCellRenderer());
    setDefaultRenderer(StructureFunction.class, expressionsCellRenderer);
    setDefaultRenderer(Expression.class, expressionsCellRenderer);
    setDefaultRenderer(Paint.class, new PaintCellRenderer());
    setDefaultRenderer(Object.class, new GenericCellRenderer());
    setDefaultRenderer(String.class, new GenericCellRenderer());
    setDefaultRenderer(ReportPreProcessor.class, reportPreProcessorCellRenderer);

    final SimpleDateFormat isoDateFormat = new SimpleDateFormat(WorkspaceSettings.DATETIME_FORMAT_DEFAULT,
            Locale.ENGLISH);// ww w. j  av a 2s .c  o  m
    setDefaultRenderer(Date.class, new FormattingTableCellRenderer(isoDateFormat));
    setDefaultRenderer(java.sql.Date.class, new FormattingTableCellRenderer(
            new SimpleDateFormat(WorkspaceSettings.DATE_FORMAT_DEFAULT, Locale.ENGLISH)));
    setDefaultRenderer(Time.class, new FormattingTableCellRenderer(
            new SimpleDateFormat(WorkspaceSettings.TIME_FORMAT_DEFAULT, Locale.ENGLISH)));
    setDefaultRenderer(Timestamp.class, new FormattingTableCellRenderer(isoDateFormat));

    WorkspaceSettings.getInstance().addSettingsListener(new LocaleSettingsListener());
    applyLocaleSettings(WorkspaceSettings.getInstance());
}

From source file:org.pentaho.reporting.libraries.designtime.swing.table.PropertyTable.java

public PropertyTable() {
    putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
    this.setShowHorizontalLines(true);
    this.setShowVerticalLines(true);
    this.setGridColor(SystemColor.controlShadow);

    taggedPropertyEditorCellEditor = new PropertyEditorCellEditor();
    propertyEditorCellEditor = new PropertyCellEditorWithEllipsis();
    propertyEditorCellRenderer = new PropertyEditorCellRenderer();
    arrayCellRenderer = new ArrayCellRenderer();
    arrayCellEditor = new ArrayCellEditor();

    setDefaultEditor(Object.class, null);

    setDefaultEditor(Number.class, new GenericCellEditor(BigDecimal.class));
    setDefaultEditor(Integer.class, new GenericCellEditor(Integer.class));
    setDefaultEditor(Float.class, new GenericCellEditor(Float.class));
    setDefaultEditor(Double.class, new GenericCellEditor(Double.class));
    setDefaultEditor(Short.class, new GenericCellEditor(Short.class));
    setDefaultEditor(Byte.class, new GenericCellEditor(Byte.class));
    setDefaultEditor(Long.class, new GenericCellEditor(Long.class));
    setDefaultEditor(BigInteger.class, new GenericCellEditor(BigInteger.class));
    setDefaultEditor(BigDecimal.class, new GenericCellEditor(BigDecimal.class));
    setDefaultEditor(String.class, new GenericCellEditor(String.class));
    setDefaultEditor(Date.class, new DateCellEditor(Date.class));
    setDefaultEditor(java.sql.Date.class, new DateCellEditor(Date.class));
    setDefaultEditor(Time.class, new TimeCellEditor(Time.class));
    setDefaultEditor(Timestamp.class, new DateCellEditor(Timestamp.class));

    setDefaultRenderer(Paint.class, new PaintCellRenderer());
    setDefaultRenderer(Object.class, new GenericCellRenderer());
    setDefaultRenderer(String.class, new GenericCellRenderer());

    final SimpleDateFormat isoDateFormat = new SimpleDateFormat(DATETIME_FORMAT_DEFAULT, Locale.ENGLISH);
    setDefaultRenderer(Date.class, new FormattingTableCellRenderer(isoDateFormat));
    setDefaultRenderer(java.sql.Date.class,
            new FormattingTableCellRenderer(new SimpleDateFormat(DATE_FORMAT_DEFAULT, Locale.ENGLISH)));
    setDefaultRenderer(Time.class,
            new FormattingTableCellRenderer(new SimpleDateFormat(TIME_FORMAT_DEFAULT, Locale.ENGLISH)));
    setDefaultRenderer(Timestamp.class, new FormattingTableCellRenderer(isoDateFormat));
}