Example usage for org.eclipse.swt.widgets Composite getForeground

List of usage examples for org.eclipse.swt.widgets Composite getForeground

Introduction

In this page you can find the example usage for org.eclipse.swt.widgets Composite getForeground.

Prototype

public Color getForeground() 

Source Link

Document

Returns the foreground color that the receiver will use to draw.

Usage

From source file:WidgetTest2.java

public static Composite createComposite(Composite parent) {
    /** * Composite ** */
    //       Create new Composite instance
    final Composite composite = new Composite(parent, 0);
    //       Get properties from the containing composite
    composite.setBackground(parent.getBackground());
    composite.setForeground(parent.getForeground());
    composite.setFont(parent.getFont());
    //       Set position and size
    composite.setBounds(X, Y, WIDTH, HEIGHT);
    return composite;
}