Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.CTabFolder


    updateLanguageFromData(widget,null)// OK, so we loose parameters on language change...
    updateToolTipFromData(widget);

    if (widget instanceof CTabFolder) {
      CTabFolder folder = (CTabFolder) widget;
      CTabItem[] items = folder.getItems();
      for (int i = 0; i < items.length; i++) {
        updateLanguageForControl(items[i]);
        updateLanguageForControl(items[i].getControl());
      }
    } else if (widget instanceof TabFolder) {
      TabFolder folder = (TabFolder) widget;
      TabItem[] items = folder.getItems();
      for (int i = 0; i < items.length; i++) {
        updateLanguageForControl(items[i]);
        updateLanguageForControl(items[i].getControl());
      }
    }
View Full Code Here


  private void initialize(Composite composite) {

    this.parent = composite;
    if (folder == null) {
      folder = new CTabFolder(composite, SWT.LEFT);
      folder.setBorderVisible(true);
    } else {
      System.out.println("ManagerView::initialize : folder isn't null !!!");
    }
    if (composite.getLayout() instanceof FormLayout) {
View Full Code Here

        }
      }
    }

   
    tabFolder = new CTabFolder(createOn, style);
   
    triggerListeners(SWTSkinObjectListener.EVENT_CREATED);
    setControl(tabFolder);
  }
View Full Code Here

    layout_data.horizontalAlignment = GridData.CENTER;
    layout_data.grabExcessHorizontalSpace = true;
    advanced_info_search_label.setLayoutData(layout_data);
    advanced_info_search_label.setVisible(false);
   
    search_query_tab_list = new CTabFolder(this, SWT.BORDER);
    search_query_tab_list.setLayoutData(new GridData(GridData.FILL_BOTH));
    search_query_tab_list.setLayout(new FillLayout());
    search_query_tab_list.setSimple(false);
    search_query_tab_list.setUnselectedImageVisible(true);
    search_query_tab_list.setUnselectedCloseVisible(false);
View Full Code Here

       
    shell.setLayout(new FillLayout());
   
    Composite content = new Composite(shell,SWT.BORDER);
    content.setLayout(new GridLayout(1,true));
    CTabFolder tab_folder = new CTabFolder(content,SWT.BORDER);
    tab_folder.setLayoutData(new GridData(GridData.FILL_BOTH));
    tab_folder.setSimple(false);

    DownloadGeneralTab general_tab = new DownloadGeneralTab(tab_folder,download_session);
    tab_folder.setSelection(general_tab);
    tabs.add(general_tab);
   
    DownloadPeerListTab peer_list_tab = new DownloadPeerListTab(tab_folder,download_session);
    tabs.add(peer_list_tab);
   
View Full Code Here

    FillLayout fill_layout = new FillLayout();
    fill_layout.marginHeight = 0;
    fill_layout.marginWidth = 0;
    window_content.setLayout(fill_layout);
   
    CTabFolder tab_list = new CTabFolder(window_content, SWT.BORDER);
    tab_list.setLayout(new FillLayout());
    tab_list.setSimple(false);
    tab_list.setUnselectedImageVisible(false);
    tab_list.setUnselectedCloseVisible(false);
   
    CTabItem general_tab = new CTabItem(tab_list,SWT.NONE);
    content = new Composite(tab_list,SWT.NONE);
    general_tab.setControl(content);
    general_tab.setText(_._("aboutwindow.tab.general"));
    layout = new GridLayout(1,false);
    layout.marginTop +=10;
    content.setLayout(layout);

    Composite container1 = new Composite(content,SWT.NONE);
    container1.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    layout = new GridLayout(1,false);
    layout.marginWidth = 15;
    container1.setLayout(layout);
   
    Label jmule_version = new Label(container1,SWT.LEFT);
    FontData data = skin.getLabelFont().getFontData()[0];
   
    Font bold_font = new Font(display,data.getName(),data.getHeight(),SWT.BOLD);
    jmule_version.setText(JMConstants.JMULE_FULL_NAME);
    jmule_version.setFont(bold_font);
   
    Label copyright = new Label(container1,SWT.LEFT);
    copyright.setText("Copyright (C) 2007-2010 JMule Team");
    copyright.setFont(bold_font);
   
    new Label(container1,SWT.NONE);
   
    StyledText about_text = new StyledText(container1,SWT.LEFT | SWT.READ_ONLY);
    about_text.setText(_._("aboutwindow.tab.general.label.about"));
    about_text.setWordWrap(true);
    about_text.setBackground(shell.getBackground());
    layout_data = new GridData(GridData.FILL_HORIZONTAL);
    about_text.setLayoutData(layout_data);
   
    Composite links_container = new Composite(content,SWT.NONE);
    links_container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    layout = new GridLayout(2,false);
    layout.marginWidth = 15;
    links_container.setLayout(layout);
   
    FontData link_font_data = skin.getLabelFont().getFontData()[0];
    Font link_font = new Font(SWTThread.getDisplay(),link_font_data.getName(), link_font_data.getHeight(), SWT.UNDERLINE_SINGLE);
   
    CLabel link;
   
    link = new CLabel(links_container,SWT.NONE);
    link.setText(_._("aboutwindow.tab.general.label.home_page") + " : ");
    link = new CLabel(links_container,SWT.NONE);
    link.setFont(link_font);
    link.setText(JMConstants.JMULE_WEB_SITE);
    link.setData(JMConstants.JMULE_WEB_SITE);
    link.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_BLUE));
    link.setCursor(new Cursor(SWTThread.getDisplay(),SWT.CURSOR_HAND));
    link.addMouseListener(link_listener);

    link = new CLabel(links_container,SWT.NONE);
    link.setText(_._("aboutwindow.tab.general.label.forum") + " : ");
   
    link = new CLabel(links_container,SWT.NONE);
    link.setFont(link_font);
    link.setText(JMConstants.JMULE_FORUMS);
    link.setData(JMConstants.JMULE_FORUMS);
    link.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_BLUE));
    link.setCursor(new Cursor(SWTThread.getDisplay(),SWT.CURSOR_HAND));
    link.addMouseListener(link_listener);
   
    if (JMConstants.IS_NIGHTLY_BUILD) {
      CTabItem nightly_build = new CTabItem(tab_list,SWT.NONE);
      content = new Composite(tab_list,SWT.NONE);
      nightly_build.setControl(content);
      nightly_build.setText(_._("aboutwindow.tab.nightly_build"));
      layout = new GridLayout(1,false);
      layout.marginHeight = 10;
      layout.marginWidth  = 10;
      content.setLayout(layout);
     
      final Label image = new Label(content,SWT.NONE);
      image.setImage(SWTImageRepository.getImage("bomb.png"));
      layout_data = new GridData();
      layout_data.grabExcessHorizontalSpace = true;
      layout_data.horizontalAlignment = GridData.CENTER;
      image.setLayoutData(layout_data);
     
      Label nightly_build_label = new Label(content,SWT.NONE);
      nightly_build_label.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_RED));
      layout_data = new GridData(GridData.FILL_HORIZONTAL);
      layout_data.horizontalAlignment = GridData.CENTER;
      nightly_build_label.setLayoutData(layout_data);
      nightly_build_label.setText(_._("aboutwindow.tab.nightly_build.label.nightly_buld_str1"));
     
      Label nightly_build_label2 = new Label(content,SWT.NONE);
      nightly_build_label2.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_RED));
      layout_data = new GridData(GridData.FILL_HORIZONTAL );
      layout_data.horizontalAlignment = GridData.CENTER;
      nightly_build_label2.setLayoutData(layout_data);
      nightly_build_label2.setText(_._("aboutwindow.tab.nightly_build.label.nightly_buld_str2")+" "+_._("aboutwindow.tab.general.label.forum"));
     
      CLabel forum_link = new CLabel(content,SWT.NONE);
      layout_data = new GridData(GridData.FILL_HORIZONTAL );
      layout_data.horizontalAlignment = GridData.CENTER;
      forum_link.setLayoutData(layout_data);
      forum_link.setFont(link_font);
      forum_link.setText(JMConstants.JMULE_FORUMS);
      forum_link.setData(JMConstants.JMULE_FORUMS);
      forum_link.setForeground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_BLUE));
      forum_link.setCursor(new Cursor(SWTThread.getDisplay(),SWT.CURSOR_HAND));
      forum_link.addMouseListener(link_listener);
    }
   
    CTabItem environment_tab = new CTabItem(tab_list,SWT.NONE);
    content = new Composite(tab_list,SWT.NONE);
    environment_tab.setControl(content);
    environment_tab.setText(_._("aboutwindow.tab.environment"));
    content.setLayout(new FillLayout());
   
    JMTable<String> table = new JMTable<String>(content,SWT.NONE) {
      protected int compareObjects(String object1, String object2,
          int columnID, boolean order) {
        return 0;
      }

      protected Menu getPopUpMenu() {
        return null;
      }

      public void updateRow(String object) {
        setRowText(object, 1, object);
        if (object.equals("line.separator"))
          setRowText(object,2,"\\n");
        else {
          String data = System.getProperty(object);
          setRowText(object,2,data);
        }
      }
      protected void saveColumnSettings() {}
    };
    table.setLayout(new FillLayout());
    table.setLinesVisible(true);
    table.setAlternateBackgroundColor(false);
    table.setSorting(false);
    table.addColumn(SWT.LEFT, 1, _._("aboutwindow.tab.environment.table.column.key"), "", 200);
    table.addColumn(SWT.LEFT, 2, _._("aboutwindow.tab.environment.table.column.value"), "", 500);
   
    Set<Object> keys = System.getProperties().keySet();
   
    for(Object key : keys) {
      String value = (String) key;
      table.addRow(value);
    }
    CTabItem license_tab = new CTabItem(tab_list,SWT.NONE);
    content = new Composite(tab_list,SWT.NONE);
    license_tab.setControl(content);
    license_tab.setText(_._("aboutwindow.tab.license"));
   
    content.setLayout(new FillLayout());
   
    Text license_text = new Text(content,SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.READ_ONLY);
    Font font_license = new Font(SWTThread.getDisplay(),"Courier",10,SWT.NONE );
    license_text.setFont(font_license);
      license_text.setText(UIConstants.GNU_LICENSE);
      license_text.setBackground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_WHITE));
     
    tab_list.setSelection(general_tab);
   
    Composite button_bar = new Composite(shell,SWT.NONE);
    button_bar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
   
    layout = new GridLayout(1,false);
View Full Code Here

    shell.setImage(SWTImageRepository.getImage("info.png"));
       
    shell.setLayout(new FillLayout());
    Composite content = new Composite(shell,SWT.BORDER);
    content.setLayout(new GridLayout(1,true));
    CTabFolder tab_folder = new CTabFolder(content,SWT.BORDER);
    tab_folder.setLayoutData(new GridData(GridData.FILL_BOTH));
    tab_folder.setSimple(false);

    UploadGeneralTab general_tab = new UploadGeneralTab(tab_folder,upload_session);
    tabs.add(general_tab);
    tab_folder.setSelection(general_tab);
   
    UploadPeerListTab upload_tab = new UploadPeerListTab(tab_folder,upload_session);
    tabs.add(upload_tab);
   
    for(Refreshable refreshable : tabs)
View Full Code Here

    GridLayout layout;
    Label label;
   
    setLayout(new FillLayout());

    CTabFolder stats_tabs = new CTabFolder(this,SWT.BORDER);
    stats_tabs.setLayout(new FillLayout());
    stats_tabs.setSimple(false);
   
    CTabItem network_stats = new CTabItem(stats_tabs,SWT.NONE);
    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));
   
    thread_count = new Label(thread_stats,SWT.NONE);
    thread_count.setFont(skin.getLabelFont());
    thread_count.setText(thread_bean.getThreadCount()+"");
   
    label = new Label(thread_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.daemon_thread_count") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    daemon_thread_count = new Label(thread_stats,SWT.NONE);
    daemon_thread_count.setFont(skin.getLabelFont());
    daemon_thread_count.setText(thread_bean.getDaemonThreadCount()+"");
   
    label = new Label(thread_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.peak_thread_count") + " : ");
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    peak_thread_count = new Label(thread_stats,SWT.NONE);
    peak_thread_count.setFont(skin.getLabelFont());
    peak_thread_count.setText(thread_bean.getPeakThreadCount()+"");

    label = new Label(thread_stats,SWT.NONE);
    label.setFont(skin.getLabelFont());
    label.setText(_._("mainwindow.statisticstab.tab.jvm.label.total_thread_count") + " : ");
    label.setToolTipText(_._("mainwindow.statisticstab.tab.jvm.label.total_thread_count.tooltip"));
    label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
   
    total_thread_count = new Label(thread_stats,SWT.NONE);
    total_thread_count.setFont(skin.getLabelFont());
    total_thread_count.setText(thread_bean.getTotalStartedThreadCount()+"");
    total_thread_count.setToolTipText(_._("mainwindow.statisticstab.tab.jvm.label.total_thread_count.tooltip"));
   
    stats_tabs.setSelection(network_stats);
  }
View Full Code Here

    //initTabFolder();
    //tabFolder = new CTabFolder(gJobParameter, SWT.CLOSE | SWT.BORDER);
    //tabFolder = new CTabFolder(gJobParameter, SWT.CLOSE);
    //tabFolder = new CTabFolder(gJobParameter, SWT.CLOSE);
    tabFolder = new CTabFolder(gJobParameter, SWT.BORDER);

    final GridData gridData_2 = new GridData(GridData.FILL, GridData.FILL, true, true);
    gridData_2.heightHint = 203;
    gridData_2.widthHint = 760;
    tabFolder.setLayoutData(gridData_2);
View Full Code Here


  //public TabbedContainer(MainWindow window, Composite parent) {
  public TabbedContainer(Composite parent) {
    //this.window = window;   
    folder = new CTabFolder(parent, SWT.TOP | SWT.CLOSE );
   
    folder.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    initialize();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.custom.CTabFolder

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.