Examples of FillLayout


Examples of org.eclipse.swt.layout.FillLayout

   
    SashControl.createHorizontalSash(50, 50, this, dir_list, shared_files);
   
    GridLayout layout;
   
    dir_list.setLayout(new FillLayout());
    dir_list_content = new Group(dir_list,SWT.NONE);
    java.util.List<File> dir = null;
    try {
      dir = _core.getConfigurationManager().getSharedFolders();
    } catch (ConfigurationManagerException e) {
      e.printStackTrace();
    }
    if (dir != null)
      dir_list_content.setText(_._("mainwindow.sharedtab.group.shared_dirs")+"("+dir.size()+")");
    else
      dir_list_content.setText(_._("mainwindow.sharedtab.group.shared_dirs")+"(0)");
   
    config_listener = new ConfigurationAdapter() {
      public void sharedDirectoriesChanged(java.util.List<File> sharedDirs) {
        dir_list_content.setText(_._("mainwindow.sharedtab.group.shared_dirs")+"("+sharedDirs.size()+")");
      }
    };
   
    layout = new GridLayout(1,false);
    layout.marginWidth  = 2;
    layout.marginHeight = 2;
    dir_list_content.setLayout(layout);
   
    Composite control_block = new Composite(dir_list_content,SWT.NONE);
    layout = new GridLayout(4,false);
    layout.marginHeight = 0;
    layout.marginWidth  = 0;
    control_block.setLayout(layout);
    GridData data = new GridData();
    data.widthHint = 400;
    control_block.setLayoutData(data);
   
    Button add_button = new Button(control_block,SWT.NONE);
    add_button.setFont(skin.getButtonFont());
    add_button.setImage(SWTImageRepository.getImage("add.png"));
    add_button.setText(_._("mainwindow.sharedtab.button.add"));
    add_button.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    add_button.setAlignment(SWT.LEFT);
    add_button.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        DirectoryDialog dir_dialog = new DirectoryDialog (getShell(),SWT.MULTI | SWT.OPEN);
        String directory = dir_dialog.open();
        if (directory == null) return ;
        java.util.List<File> shared_dirs = null;
        try {
          shared_dirs = config_manager.getSharedFolders();
        } catch (ConfigurationManagerException e) {
          e.printStackTrace();
        }
        java.util.List<File> newDirs = new LinkedList<File>();
        if (shared_dirs == null)
          shared_dirs = new CopyOnWriteArrayList<File>();
        else
          shared_dirs = new CopyOnWriteArrayList<File>(shared_dirs);
       
        java.util.List<File> already_exist_list = org.jmule.core.utils.FileUtils.extractNewFolders(new File[]{new File(directory)},shared_dirs,newDirs);
                  
        if (already_exist_list.size()!=0) {
          AlreadyExistDirsWindow window = new AlreadyExistDirsWindow(already_exist_list);
          window.getCoreComponents();
          window.initUIComponents();
        }
        shared_dirs.addAll(newDirs);
        try {
          config_manager.setSharedFolders(shared_dirs);
        } catch (ConfigurationManagerException e) {
          e.printStackTrace();
        }
    } });
   
   
    remove_button = new Button(control_block,SWT.NONE);
    remove_button.setFont(skin.getButtonFont());
    remove_button.setText(_._("mainwindow.sharedtab.button.remove"));
    remove_button.setImage(SWTImageRepository.getImage("remove.png"));
    remove_button.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    remove_button.setAlignment(SWT.LEFT);
    remove_button.setEnabled(false);
    remove_button.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        removeSelectedDir();
    } });
   
    clear_button = new Button(control_block,SWT.NONE);
    clear_button.setFont(skin.getButtonFont());
    clear_button.setText(_._("mainwindow.sharedtab.button.clear"));
    clear_button.setImage(SWTImageRepository.getImage("remove_all.png"));
    clear_button.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    clear_button.setAlignment(SWT.LEFT);
    clear_button.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        clearDirList();
    } });
   
    Button reload_button = new Button(control_block,SWT.NONE);
    reload_button.setFont(skin.getButtonFont());
    reload_button.setText(_._("mainwindow.sharedtab.button.reload"));
    reload_button.setImage(SWTImageRepository.getImage("refresh.png"));
    reload_button.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        sharing_manager.loadCompletedFiles();
      }
    });
   
    shared_dir_list = new List (dir_list_content, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL);
    shared_dir_list.setLayoutData(new GridData(GridData.FILL_BOTH));
   
    shared_dir_list.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        String selected_dir = shared_dir_list.getSelection()[0];
        if (selected_dir.equals(last_selection)) return ;
        last_selection = selected_dir;
        updateFileList(selected_dir);
       
        int selection_id = shared_dir_list.getSelectionIndex();
        if ((selection_id>=no_remove_id_start)&&(selection_id<=no_remove_id_end)) {
          remove_button.setEnabled(false);
          return;
        }
        remove_button.setEnabled(true);
      }
    });

    shared_files.setLayout(new FillLayout());
    shared_files_group = new Group(shared_files,SWT.NONE);
    shared_files_group.setText(_._("mainwindow.sharedtab.group.shared_files"));
    shared_files_group.setLayout(new FillLayout());
    shared_files_table = new JMTable<SharedFile>(shared_files_group, SWT.NONE){
      protected int compareObjects(SharedFile object1, SharedFile object2,
          int columnID, boolean order) {
        if (columnID == SWTConstants.SHARED_LIST_FILE_NAME_COLUMN_ID) {
          return Misc.compareAllObjects(object1, object2, "getSharingName", order);
View Full Code Here

Examples of org.eclipse.swt.layout.FillLayout

    download_panel = new Composite(this,SWT.NONE);
    upload_panel = new Composite(this,SWT.NONE);
   
    SashControl.createHorizontalSash(50, 50, this, download_panel, upload_panel);
   
    download_panel.setLayout(new FillLayout());
    upload_panel.setLayout(new FillLayout());
   
    SWTSkin skin = null;
    try {
     
        skin = (SWTSkin)JMuleUIManager.getJMuleUI().getSkin();
   
    }catch(Throwable t) {}
   
    downloads = new Group(download_panel,SWT.NONE);
    downloads.setFont(skin.getDefaultFont());
    downloads.setLayout(new FillLayout());
    download_list = new DownloadList(downloads,_core);
   
    uploads = new Group(upload_panel,SWT.NONE);
    uploads.setFont(skin.getDefaultFont());
    uploads.setLayout(new FillLayout());
    upload_list = new UploadList(uploads,_core);
   
    refreshable = new Refreshable() {
      public void refresh() {
        if (isDisposed()) return;
View Full Code Here

Examples of org.eclipse.swt.layout.FillLayout

    });
   
    Composite window_content = new Composite(shell,SWT.NONE);
    window_content.setLayoutData(new GridData(GridData.FILL_BOTH));
   
    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);
View Full Code Here

Examples of org.eclipse.swt.layout.FillLayout

    for(KadContact contact : _core.getJKadManager().getRoutingTable().getContacts())
      contact_list.addRow(contact);
   
    routing_table_container.setText(_._("mainwindow.kadtab.kad_nodes_number",contact_list.getItemCount()+""));
   
    kad_tasks_container.setLayout(new FillLayout());
    kad_task_list = new JMTable<KadTask>(kad_tasks_container,SWT.NONE) {

      protected int compareObjects(KadTask object1, KadTask object2,
          int columnID, boolean order) {
        int result = 0;
View Full Code Here

Examples of org.eclipse.swt.layout.FillLayout

 
  private Menu popup_menu;
  public LogsTab(Composite shell) {
    super(shell);
   
    setLayout(new FillLayout());
   
    log_content = new StyledText(this,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.READ_ONLY);
    log_content.setEditable(false);
    log_content.setBackground(SWTThread.getDisplay().getSystemColor(SWT.COLOR_WHITE));
   
View Full Code Here

Examples of org.eclipse.swt.layout.FillLayout

    final Shell shell1=new Shell(display,SWT.ON_TOP);
    shell=new Shell(shell1,SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.RESIZE);
    shell.setText(Localizer._("uploadinfowindow.title"));
    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);
View Full Code Here

Examples of org.eclipse.swt.layout.FillLayout

              toolbar = new Toolbar(shell,_core,instance);
   
              window_content = new ScrolledComposite(shell,SWT.NONE);
              window_content.setExpandHorizontal(true);
              window_content.setExpandVertical(true);
              window_content.setLayout(new FillLayout());
              GridData gridData = new GridData(GridData.FILL_BOTH);
              window_content.setLayoutData(gridData);
   
              new Label(shell,SWT.SEPARATOR | SWT.HORIZONTAL).setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
             
View Full Code Here

Examples of org.eclipse.swt.layout.FillLayout

   
    child_tabs = new ArrayList<AbstractTab>();
    child_tabs.add(new ProxyTab(parent));
   
   
    content.setLayout(new FillLayout());
    new Label(content,SWT.NONE).setText("Connection");
  }
View Full Code Here

Examples of org.eclipse.swt.layout.FillLayout

*/
public class ProxyTab extends AbstractTab {

  public ProxyTab(Composite parent) {
    super(parent);
    content.setLayout(new FillLayout());
    new Label(content,SWT.NONE).setText("Proxy");
  }
View Full Code Here

Examples of org.eclipse.swt.layout.FillLayout

   
    settings_tab_panel = new ScrolledComposite(window_content,SWT.NONE);
    settings_tab_panel.setLayoutData(new GridData(GridData.FILL_BOTH));
    settings_tab_panel.setExpandHorizontal(true);
    settings_tab_panel.setExpandVertical(true);
    settings_tab_panel.setLayout(new FillLayout());
   
 
    tab_list.add(new GeneralTab(settings_tab_panel));
    //tab_list.add(new ConnectionTab(settings_tab_panel));
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.