Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Group


    network_stats.setText(_._("mainwindow.statisticstab.tab.general"));
    content = new Composite(stats_tabs,SWT.NONE);
    network_stats.setControl(content);
    content.setLayout(new GridLayout(2,true));
   
    Group sessions_stats = new Group(content,SWT.NONE);
    sessions_stats.setText(_._("mainwindow.statisticstab.tab.general.group.sessions"));
    layout_data = new GridData(GridData.FILL_HORIZONTAL);
    sessions_stats.setLayoutData(layout_data);
    layout = new GridLayout(2,false);
    sessions_stats.setLayout(layout);
   
    label = new Label(sessions_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.session_downloaded") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label download_session_bytes = new Label(sessions_stats,SWT.NONE);
    download_session_bytes.setFont(skin.getLabelFont());
    download_session_bytes.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
    stats_fields.put(JMuleCoreStats.ST_NET_SESSION_DOWNLOAD_BYTES, download_session_bytes);
   
    label = new Label(sessions_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.session_uploaded") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label upload_session_bytes = new Label(sessions_stats,SWT.NONE);
    upload_session_bytes.setFont(skin.getLabelFont());
    upload_session_bytes.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
    stats_fields.put(JMuleCoreStats.ST_NET_SESSION_UPLOAD_BYTES, upload_session_bytes);
   
    label = new Label(sessions_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.session_download_count") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label download_session_count = new Label(sessions_stats,SWT.NONE);
    download_session_count.setFont(skin.getLabelFont());
    download_session_count.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    stats_fields.put(JMuleCoreStats.ST_NET_SESSION_DOWNLOAD_COUNT, download_session_count);
   
    label = new Label(sessions_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.session_upload_count") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label upload_session_count = new Label(sessions_stats,SWT.NONE);
    upload_session_count.setFont(skin.getLabelFont());
    upload_session_count.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    stats_fields.put(JMuleCoreStats.ST_NET_SESSION_UPLOAD_COUNT, upload_session_count);
   
    Group peers_stats = new Group(content,SWT.NONE);
    peers_stats.setText(_._("mainwindow.statisticstab.tab.general.group.peers"));
    layout_data = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING );
    peers_stats.setLayoutData(layout_data);
    layout = new GridLayout(2,false);
    peers_stats.setLayout(layout);
   
    label = new Label(peers_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.peer_count") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label peer_count = new Label(peers_stats,SWT.NONE);
    peer_count.setFont(skin.getLabelFont());
    peer_count.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
    stats_fields.put(JMuleCoreStats.ST_NET_PEERS_COUNT, peer_count);
   
    label = new Label(peers_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.download_peers") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label download_peers = new Label(peers_stats,SWT.NONE);
    download_peers.setFont(skin.getLabelFont());
    download_peers.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
    stats_fields.put(JMuleCoreStats.ST_NET_PEERS_DOWNLOAD_COUNT, download_peers);
   
    label = new Label(peers_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.upload_peers") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label upload_peers = new Label(peers_stats,SWT.NONE);
    upload_peers.setFont(skin.getLabelFont());
    upload_peers.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
    stats_fields.put(JMuleCoreStats.ST_NET_PEERS_UPLOAD_COUNT, upload_peers);
   
    new Label(peers_stats,SWT.NONE);
   
    Group sesvers_stats = new Group(content,SWT.NONE);
    sesvers_stats.setText(_._("mainwindow.statisticstab.tab.general.group.servers"));
    layout_data = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING );
    sesvers_stats.setLayoutData(layout_data);
    layout = new GridLayout(2,false);
    sesvers_stats.setLayout(layout);
   
    label = new Label(sesvers_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.server_count") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label server_count = new Label(sesvers_stats,SWT.NONE);
    server_count.setFont(skin.getLabelFont());
    server_count.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
    stats_fields.put(JMuleCoreStats.ST_NET_SERVERS_COUNT, server_count);
   
    label = new Label(sesvers_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.server_alive_count") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label server_alive_count = new Label(sesvers_stats,SWT.NONE);
    server_alive_count.setFont(skin.getLabelFont());
    server_alive_count.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
    stats_fields.put(JMuleCoreStats.ST_NET_SERVERS_ALIVE_COUNT, server_alive_count);
   
    label = new Label(sesvers_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.server_dead_count") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label server_dead_count = new Label(sesvers_stats,SWT.NONE);
    server_dead_count.setFont(skin.getLabelFont());
    server_dead_count.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
    stats_fields.put(JMuleCoreStats.ST_NET_SERVERS_DEAD_COUNT, server_dead_count);

    label = new Label(sesvers_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.search_query_count") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label search_query_count = new Label(sesvers_stats,SWT.NONE);
    search_query_count.setFont(skin.getLabelFont());
    search_query_count.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
    stats_fields.put(JMuleCoreStats.SEARCHES_COUNT, search_query_count);
   
    layout_data = new GridData();
    layout_data.horizontalSpan = 2;
    new Label(sesvers_stats,SWT.NONE).setLayoutData(layout_data);
   
    layout_data = new GridData();
    layout_data.horizontalSpan = 2;
    new Label(sesvers_stats,SWT.NONE).setLayoutData(layout_data);
   
    Group sharing_stats = new Group(content,SWT.NONE);
    sharing_stats.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    sharing_stats.setLayout(new GridLayout(2,false));
    sharing_stats.setText(_._("mainwindow.statisticstab.tab.general.group.shared"));
    label = new Label(sharing_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.shared_files_count") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label shared_files_count = new Label(sharing_stats,SWT.NONE);
    shared_files_count.setFont(skin.getLabelFont());
    shared_files_count.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
    stats_fields.put(JMuleCoreStats.ST_DISK_SHARED_FILES_COUNT, shared_files_count);
   
    label = new Label(sharing_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.shared_partial_files") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label shared_partial_files = new Label(sharing_stats,SWT.NONE);
    shared_partial_files.setFont(skin.getLabelFont());
    shared_partial_files.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    stats_fields.put(JMuleCoreStats.ST_DISK_SHARED_FILES_PARTIAL_COUNT, shared_partial_files);

    label = new Label(sharing_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.shared_completed_files") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label shared_completed_files = new Label(sharing_stats,SWT.NONE);
    shared_completed_files.setFont(skin.getLabelFont());
    shared_completed_files.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    stats_fields.put(JMuleCoreStats.ST_DISK_SHARED_FILES_COMPLETE_COUNT, shared_completed_files);

    label = new Label(sharing_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.shared_files_bytes") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label shared_files_bytes = new Label(sharing_stats,SWT.NONE);
    shared_files_bytes.setFont(skin.getLabelFont());
    shared_files_bytes.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    stats_fields.put(JMuleCoreStats.ST_DISK_SHARED_FILES_BYTES, shared_files_bytes);

    label = new Label(sharing_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.completed_files_bytes") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label completed_files_bytes = new Label(sharing_stats,SWT.NONE);
    completed_files_bytes.setFont(skin.getLabelFont());
    completed_files_bytes.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    stats_fields.put(JMuleCoreStats.ST_DISK_SHARED_FILES_COMPLETE_BYTES, completed_files_bytes);

    label = new Label(sharing_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.general.label.partial_files_bytes") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    Label partial_files_bytes = new Label(sharing_stats,SWT.NONE);
    partial_files_bytes.setFont(skin.getLabelFont());
    partial_files_bytes.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    stats_fields.put(JMuleCoreStats.ST_DISK_SHARED_FILES_PARTIAL_BYTES, partial_files_bytes);

    CTabItem jvm_stats = new CTabItem(stats_tabs,SWT.NONE);
    jvm_stats.setText(_._("mainwindow.statisticstab.tab.jvm"));
    content = new Composite(stats_tabs,SWT.NONE);
    jvm_stats.setControl(content);
    content.setLayout(new GridLayout(2,true));
   
    Group jvm_general_stats = new Group(content,SWT.NONE);
    jvm_general_stats.setText(_._("mainwindow.statisticstab.tab.jvm.group.general"));
    layout_data = new GridData(GridData.FILL_HORIZONTAL);
    jvm_general_stats.setLayoutData(layout_data);
    layout = new GridLayout(2,false);
    jvm_general_stats.setLayout(layout);
   
    label = new Label(jvm_general_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.jvm_name") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    label = new Label(jvm_general_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(runtime_bean.getVmName());
   
    label = new Label(jvm_general_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.jvm_vendor") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    label = new Label(jvm_general_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(runtime_bean.getVmVendor());
   
    label = new Label(jvm_general_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.jvm_version") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    label = new Label(jvm_general_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(runtime_bean.getVmVersion());
   
   
    label = new Label(jvm_general_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.jvm_uptime") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    jvm_uptime = new Label(jvm_general_stats,SWT.NONE);
    jvm_uptime.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    jvm_uptime.setText(TimeFormatter.formatColon(runtime_bean.getUptime()/1000)+"");   

    Group heapmemory_stats = new Group(content,SWT.NONE);
    heapmemory_stats.setText(_._("mainwindow.statisticstab.tab.jvm.group.heap_memory"));
    layout_data = new GridData(GridData.FILL_HORIZONTAL);
    heapmemory_stats.setLayoutData(layout_data);
    layout = new GridLayout(2,false);
    heapmemory_stats.setLayout(layout);
   
    label = new Label(heapmemory_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.heapmemory_init") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    heapmemory_init = new Label(heapmemory_stats,SWT.NONE);
    heapmemory_init.setFont(skin.getLabelFont());
    heapmemory_init.setText(FileFormatter.formatFileSize(heap_memory.getInit()));
   
    label = new Label(heapmemory_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.heapmemory_used") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    heapmemory_used = new Label(heapmemory_stats,SWT.NONE);
    heapmemory_used.setFont(skin.getLabelFont());
    heapmemory_used.setText(FileFormatter.formatFileSize(heap_memory.getUsed()));
   
    label = new Label(heapmemory_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.heapmemory_max") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    heapmemory_max = new Label(heapmemory_stats,SWT.NONE);
    heapmemory_max.setFont(skin.getLabelFont());
    heapmemory_max.setText(FileFormatter.formatFileSize(heap_memory.getMax()));
   
    new Label(heapmemory_stats,SWT.NONE);
   
    Group nonheapmemory_stats = new Group(content,SWT.NONE);
    nonheapmemory_stats.setText(_._("mainwindow.statisticstab.tab.jvm.group.nonheap_memory"));
    layout_data = new GridData(GridData.FILL_HORIZONTAL);
    nonheapmemory_stats.setLayoutData(layout_data);
    layout = new GridLayout(2,false);
    nonheapmemory_stats.setLayout(layout);

    label = new Label(nonheapmemory_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.nonheapmemory_init") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    nonheapmemory_init = new Label(nonheapmemory_stats,SWT.NONE);
    nonheapmemory_init.setFont(skin.getLabelFont());
    nonheapmemory_init.setText(FileFormatter.formatFileSize(nonheap_memory.getInit()));
   
    label = new Label(nonheapmemory_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.nonheapmemory_used") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    nonheapmemory_used = new Label(nonheapmemory_stats,SWT.NONE);
    nonheapmemory_used.setFont(skin.getLabelFont());
    nonheapmemory_used.setText(FileFormatter.formatFileSize(nonheap_memory.getUsed()));
   
    label = new Label(nonheapmemory_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.nonheapmemory_max") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    nonheapmemory_max = new Label(nonheapmemory_stats,SWT.NONE);
    nonheapmemory_max.setFont(skin.getLabelFont());
    nonheapmemory_max.setText(FileFormatter.formatFileSize(nonheap_memory.getMax()));
   
    label = new Label(nonheapmemory_stats,SWT.NONE);
   
    Group thread_stats = new Group(content,SWT.NONE);
    thread_stats.setText(_._("mainwindow.statisticstab.tab.jvm.group.threads"));
    layout_data = new GridData(GridData.FILL_HORIZONTAL);
    thread_stats.setLayoutData(layout_data);
    layout = new GridLayout(2,false);
    thread_stats.setLayout(layout);
   
    label = new Label(thread_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.thread_count") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
View Full Code Here


    peer_info.setLayout(new FillLayout());
   
    SashControl.createVerticalSash(20, 70, server_info_panel, server_messages, peer_info);

    // Server List
    server_list_group = new Group(server_table_panel,SWT.NONE);
    server_list_group.setLayout(new FillLayout());
   
    setServerCount(core.getServerManager().getServersCount());
   
    server_list = new ServerList(server_list_group,core.getServerManager());
View Full Code Here

      }
    });
   
    download_link.setVisible(false);
   
    Group changelog_group = new Group(shell,SWT.NONE);
    changelog_group.setLayout(new FillLayout());
    changelog_group.setLayoutData(new GridData(GridData.FILL_BOTH));
    changelog_group.setText(_._("updaterwindow.group.changelog"));
   
    changelog_text = new StyledText(changelog_group,SWT.H_SCROLL | SWT.V_SCROLL);
    changelog_text.setEditable(false);
    Font font_changelog = new Font(SWTThread.getDisplay(),"Courier",10,SWT.NONE );
    changelog_text.setFont(font_changelog);
View Full Code Here

    return container;
  }

  private void createGeneralGroup(Composite parent) {
    Group group = new Group(parent, SWT.NONE);
    group.setText("General");
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(1));

    /* Auto-Reload */
    Composite autoReloadContainer = new Composite(group, SWT.NONE);
    autoReloadContainer.setLayout(LayoutUtils.createGridLayout(3, 0, 0));
    autoReloadContainer.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, true));
View Full Code Here

    fOpenOnStartupCheck.setText("Display the feeds on start-up");
    fOpenOnStartupCheck.setSelection(fGlobalScope.getBoolean(DefaultPreferences.BM_OPEN_ON_STARTUP));
  }

  private void createReadingGroup(Composite parent) {
    Group group = new Group(parent, SWT.NONE);
    group.setText("Reading");
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(1));

    /* Mark read after millis */
    Composite markReadAfterContainer = new Composite(group, SWT.None);
    markReadAfterContainer.setLayout(LayoutUtils.createGridLayout(3, 0, 0));

View Full Code Here

    fMarkReadOnChange.setText("Mark displayed news as read when feed changes");
    fMarkReadOnChange.setSelection(fGlobalScope.getBoolean(DefaultPreferences.MARK_FEED_READ_ON_CHANGE));
  }

  private void createDisplayGroup(Composite parent) {
    Group group = new Group(parent, SWT.NONE);
    group.setText("Display");
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(2));

    /* Filter Settings */
    Label filterLabel = new Label(group, SWT.None);
    filterLabel.setText("Filter News: ");

View Full Code Here

    fOpenSiteForEmptyNewsCheck.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false, 2, 1));
    fOpenSiteForEmptyNewsCheck.setSelection(fGlobalScope.getBoolean(DefaultPreferences.BM_OPEN_SITE_FOR_EMPTY_NEWS));
  }

  private void createCleanUpGroup(Composite parent) {
    Group group = new Group(parent, SWT.NONE);
    group.setText("Clean-Up");
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(2));

    /* Explanation Label */
    Label explanationLabel = new Label(group, SWT.WRAP);
    explanationLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
    explanationLabel.setText("To recover disk space, old news can be permanently deleted.");
View Full Code Here

    // createCleanUpGroup(container);
    return container;
  }

  private void createGeneralGroup(Composite parent) {
    Group group = new Group(parent, SWT.NONE);
    FormData formData = new FormData();
    formData.top = new FormAttachment(0, 5);
    formData.left = new FormAttachment(0, 5);
    formData.right = new FormAttachment(100, -5);
    group.setLayoutData(formData);

    group.setText("General");
    group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    group.setLayout(LayoutUtils.createGridLayout(1));

    /* Auto-Reload */
    Composite autoReloadContainer = new Composite(group, SWT.NONE);

    autoReloadContainer.setLayout(LayoutUtils.createGridLayout(3, 0, 0));
View Full Code Here

  @Override
  protected Control createContents(Composite parent) {
    Composite container = createComposite(parent);

    /* Browser Group */
    Group browserGroup = new Group(container, SWT.None);
    browserGroup.setText("Browser");
    browserGroup.setLayout(LayoutUtils.createGridLayout(2));
    browserGroup.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));

    /* Use internal Browser */
    fUseInternalBrowser = new Button(browserGroup, SWT.RADIO);
    fUseInternalBrowser.setText("Use internal Browser");
    fUseInternalBrowser.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false, 2, 1));

    /* Use default external Browser */
    fUseDefaultExternalBrowser = new Button(browserGroup, SWT.RADIO);
    fUseDefaultExternalBrowser.setText("Use default external Browser");
    fUseDefaultExternalBrowser.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false, 2, 1));
    fUseDefaultExternalBrowser.setSelection(fGlobalScope.getBoolean(DefaultPreferences.USE_DEFAULT_EXTERNAL_BROWSER));

    /* Use custom external Browser */
    fUseCustomExternalBrowser = new Button(browserGroup, SWT.RADIO);
    fUseCustomExternalBrowser.setText("Use the following external Browser:");
    fUseCustomExternalBrowser.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false, 2, 1));
    fUseCustomExternalBrowser.setSelection(fGlobalScope.getBoolean(DefaultPreferences.USE_CUSTOM_EXTERNAL_BROWSER));
    fUseCustomExternalBrowser.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        fCustomBrowserInput.setEnabled(fUseCustomExternalBrowser.getSelection());
        fCustomBrowserSearchButton.setEnabled(fUseCustomExternalBrowser.getSelection());
      }
    });

    fUseInternalBrowser.setSelection(!fUseDefaultExternalBrowser.getSelection() && !fUseCustomExternalBrowser.getSelection());

    fCustomBrowserInput = new Text(browserGroup, SWT.BORDER);
    fCustomBrowserInput.setEnabled(fUseCustomExternalBrowser.getSelection());
    fCustomBrowserInput.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));

    String customBrowserValue = fGlobalScope.getString(DefaultPreferences.CUSTOM_BROWSER_PATH);
    if (customBrowserValue != null)
      fCustomBrowserInput.setText(customBrowserValue);

    fCustomBrowserSearchButton = new Button(browserGroup, SWT.PUSH);
    fCustomBrowserSearchButton.setText("Search...");
    fCustomBrowserSearchButton.setEnabled(fUseCustomExternalBrowser.getSelection());
    fCustomBrowserSearchButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        FileDialog dialog = new FileDialog(getShell(), SWT.OPEN);
        dialog.setFileName(fCustomBrowserInput.getText());
        String path = dialog.open();
        if (path != null)
          fCustomBrowserInput.setText(path);
      }
    });

    /* Separator */
    new Label(container, SWT.NONE);

    /* System Tray Group */
    Group trayGroup = new Group(container, SWT.None);
    trayGroup.setText("System Tray");
    trayGroup.setLayout(LayoutUtils.createGridLayout(1));
    trayGroup.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));

    Label trayLabel = new Label(trayGroup, SWT.NONE);
    trayLabel.setText("Move to the System Tray");

    Composite trayOptionsContainer = new Composite(trayGroup, SWT.NONE);
    trayOptionsContainer.setLayout(LayoutUtils.createGridLayout(1, 10, 0));
    trayOptionsContainer.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));

    /* Enable / Disable Tray */
    fMinimizeToTray = new Button(trayOptionsContainer, SWT.CHECK);
    fMinimizeToTray.setText("when minimizing RSSOwl");
    fMinimizeToTray.setSelection(fGlobalScope.getBoolean(DefaultPreferences.TRAY_ON_MINIMIZE));

    /* Move to Tray on Close */
    fMoveToTrayOnExit = new Button(trayOptionsContainer, SWT.CHECK);
    fMoveToTrayOnExit.setText("when closing RSSOwl");
    fMoveToTrayOnExit.setSelection(fGlobalScope.getBoolean(DefaultPreferences.TRAY_ON_CLOSE));

    /* Separator */
    new Label(container, SWT.NONE);

    /* Notification Group */
    Group notificationGroup = new Group(container, SWT.None);
    notificationGroup.setText("Notification Popup");
    notificationGroup.setLayout(LayoutUtils.createGridLayout(1));
    notificationGroup.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));

    /* Show Notification Popup */
    fShowNotificationPopup = new Button(notificationGroup, SWT.CHECK);
    fShowNotificationPopup.setText("Show notification on incoming news");
    fShowNotificationPopup.setSelection(fGlobalScope.getBoolean(DefaultPreferences.SHOW_NOTIFICATION_POPUP));
View Full Code Here

    setControl(container);
  }

  private void createFeedOptions(Composite parent) {
    Group container = new Group(parent, SWT.None);
    container.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
    container.setLayout(LayoutUtils.createGridLayout(3));
    container.setText("Clean Up Bookmarks");

    /* 1.) Delete Feeds that have Last Visit > X Days ago */
    {
      fDeleteFeedByLastVisitCheck = new Button(container, SWT.CHECK);
      fDeleteFeedByLastVisitCheck.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.Group

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.