當前位置: 首頁>>代碼示例>>Java>>正文


Java SWT.SHADOW_IN屬性代碼示例

本文整理匯總了Java中org.eclipse.swt.SWT.SHADOW_IN屬性的典型用法代碼示例。如果您正苦於以下問題:Java SWT.SHADOW_IN屬性的具體用法?Java SWT.SHADOW_IN怎麽用?Java SWT.SHADOW_IN使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.eclipse.swt.SWT的用法示例。


在下文中一共展示了SWT.SHADOW_IN屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: populateNotificationGroup

private void populateNotificationGroup(Composite container) {
    Group notificationGroup = new Group(container, SWT.SHADOW_IN);
    notificationGroup.setText(resourceBundle.getString("notifications"));
    notificationGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
    notificationGroup.setLayout(new GridLayout(2, false));

    Label idleShowToolTip = new Label(notificationGroup, SWT.HORIZONTAL);
    idleShowToolTip.setText(resourceBundle.getString("show_tray_notifications"));
    idleShowToolTip.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    showToolTip = new Button(notificationGroup, SWT.CHECK);
    showToolTip.setSelection(settings.getShowToolTip());

    Label confirmRequiredLabel = new Label(notificationGroup, SWT.HORIZONTAL);
    confirmRequiredLabel.setText(resourceBundle.getString("prompt_confirmation_on_process_kill"));
    confirmRequiredLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    confirmRequiredButton = new Button(notificationGroup, SWT.CHECK);
    confirmRequiredButton.setSelection(settings.isConfirmRequired());

    Label confirmExitLabel = new Label(notificationGroup, SWT.HORIZONTAL);
    confirmExitLabel.setText(resourceBundle.getString("prompt_confirmation_on_program_close"));
    confirmExitLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    confirmExitButton = new Button(notificationGroup, SWT.CHECK);
    confirmExitButton.setSelection(settings.isConfirmExit());
}
 
開發者ID:technology16,項目名稱:pgsqlblocks,代碼行數:24,代碼來源:SettingsDialog.java

示例2: populateGeneralGroup

private void populateGeneralGroup(Composite container) {
    Group generalGroup = new Group(container, SWT.SHADOW_IN);
    generalGroup.setText(resourceBundle.getString("general"));
    generalGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
    generalGroup.setLayout(new GridLayout(2, false));

    Label selectLocale = new Label(generalGroup, SWT.HORIZONTAL);
    selectLocale.setText(resourceBundle.getString("select_ui_language"));
    selectLocale.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    languageCombo = new Combo (generalGroup, SWT.READ_ONLY);
    languageCombo.setItems(Settings.SUPPORTED_LANGUAGES);
    languageCombo.select(languageCombo.indexOf(settings.getLocale().getLanguage()));
}
 
開發者ID:technology16,項目名稱:pgsqlblocks,代碼行數:14,代碼來源:SettingsDialog.java

示例3: populateProcessGroup

private void populateProcessGroup(Composite container) {
    Group processGroup = new Group(container, SWT.SHADOW_IN);
    processGroup.setText(resourceBundle.getString("processes"));
    processGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
    processGroup.setLayout(new GridLayout(3, false));

    Label updatePeriodLabel = new Label(processGroup, SWT.HORIZONTAL);
    updatePeriodLabel.setText(resourceBundle.getString("auto_update_interval"));

    GridData textGd = new GridData(GridData.FILL_HORIZONTAL);
    textGd.horizontalSpan = 2;
    textGd.horizontalIndent = 50;
    updatePeriod = new Spinner(processGroup, SWT.BORDER);
    updatePeriod.setLayoutData(textGd);
    updatePeriod.setMinimum(1);
    updatePeriod.setMaximum(100);
    updatePeriod.setSelection(settings.getUpdatePeriod());

    Label idleShowLabel = new Label(processGroup, SWT.HORIZONTAL);
    idleShowLabel.setText(resourceBundle.getString("show_idle_process"));
    GridData labelGd = new GridData(GridData.FILL_HORIZONTAL);
    labelGd.horizontalSpan = 2;
    idleShowLabel.setLayoutData(labelGd);

    showIdleButton = new Button(processGroup, SWT.CHECK);
    showIdleButton.setSelection(settings.getShowIdle());
}
 
開發者ID:technology16,項目名稱:pgsqlblocks,代碼行數:27,代碼來源:SettingsDialog.java

示例4: TextComposite

public TextComposite ( final Composite parent, final int style, final DataItemDescriptor descriptor, final String format, final String decimal, final boolean isText, final String attribute, int width, int height, final boolean date, final int textHeight, final String textMap, final String hdConnectionId, final String hdItemId, final String queryString )
{
    super ( parent, style, format, decimal, isText, attribute );

    this.date = date;

    this.map = stringToMap ( textMap );

    if ( width == 0 )
    {
        width = 60;
    }
    if ( height == 0 )
    {
        height = SWT.DEFAULT;
    }

    final GridLayout layout = new GridLayout ( 3, false );

    setLayout ( layout );

    this.controlImage = new ControlImage ( this, this.registrationManager );
    Helper.createTrendButton ( this.controlImage, hdConnectionId, hdItemId, queryString );

    this.blockImage = new BlockControlImage ( this.controlImage, SWT.NONE, this.registrationManager );

    this.dataText = new CLabel ( this, SWT.MULTI | SWT.WRAP | SWT.RIGHT | SWT.SHADOW_IN );
    if ( textHeight != 0 )
    {
        // FIXME: use parent font
        this.font = new Font ( getDisplay (), new FontData ( "Arial", textHeight, 0 ) ); //$NON-NLS-1$
        this.dataText.setFont ( this.font );
    }
    final GridData data = new GridData ( SWT.FILL, SWT.CENTER, false, false );
    data.widthHint = data.minimumWidth = width;
    data.heightHint = data.minimumHeight = height;

    this.dataText.setLayoutData ( data );
    this.dataText.setEnabled ( true );
    this.dataText.setEllipsis ( "…" );
    this.dataText.setEllipsisAlignment ( SWT.END );

    this.dataText.setText ( "" ); //$NON-NLS-1$
    final DescriptorLabel label = new DescriptorLabel ( this, SWT.NONE, format, descriptor );
    final GridData labelData = new GridData ( SWT.FILL, SWT.CENTER, true, false );
    labelData.minimumWidth = 100;
    label.setLayoutData ( labelData );

    if ( descriptor != null )
    {
        this.controlImage.setDetailItem ( descriptor.asItem () );
        this.blockImage.setBlockItem ( descriptor.asItem () );
        this.registrationManager.registerItem ( "value", descriptor.getItemId (), descriptor.getConnectionInformation (), false, false ); //$NON-NLS-1$
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:55,代碼來源:TextComposite.java


注:本文中的org.eclipse.swt.SWT.SHADOW_IN屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。