private void createStatusLabel(final String statusFieldText, Color foreground, Color background) { fStatusLabel= new Label(fStatusComposite, SWT.RIGHT); fStatusLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); fStatusLabel.setText(statusFieldText); FontData[] fontDatas= JFaceResources.getDialogFont().getFontData(); for (FontData fontData : fontDatas) { fontData.setHeight(fontData.getHeight() * 9 / 10); } fStatusLabelFont= new Font(fStatusLabel.getDisplay(), fontDatas); fStatusLabel.setFont(fStatusLabelFont); setStatusLabelColors(foreground, background); setColor(fStatusComposite, foreground, background); }
private void createStatusLabel(final String statusFieldText, Color foreground, Color background) { fStatusLabel= new Label(fStatusComposite, SWT.RIGHT); fStatusLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); fStatusLabel.setText(statusFieldText); FontData[] fontDatas= JFaceResources.getDialogFont().getFontData(); for (int i= 0; i < fontDatas.length; i++) { fontDatas[i].setHeight(fontDatas[i].getHeight() * 9 / 10); } fStatusLabelFont= new Font(fStatusLabel.getDisplay(), fontDatas); fStatusLabel.setFont(fStatusLabelFont); fStatusLabelForeground= new Color(fStatusLabel.getDisplay(), Colors.blend(background.getRGB(), foreground.getRGB(), 0.56f)); setColor(fStatusLabel, fStatusLabelForeground, background); setColor(fStatusComposite, foreground, background); }
Color foreground= display.getSystemColor(SWT.COLOR_INFO_FOREGROUND); Color background= display.getSystemColor(SWT.COLOR_INFO_BACKGROUND); setColor(fShell, foreground, background); fContentComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); fContentComposite.setLayout(new FillLayout()); setColor(fContentComposite, foreground, background);