当前位置: 首页>>代码示例>>Java>>正文


Java SWT.SEPARATOR属性代码示例

本文整理汇总了Java中org.eclipse.swt.SWT.SEPARATOR属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.SEPARATOR属性的具体用法?Java SWT.SEPARATOR怎么用?Java SWT.SEPARATOR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.swt.SWT的用法示例。


在下文中一共展示了SWT.SEPARATOR属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildMenu

public void buildMenu(Menu menu) {
	com.biglybt.pif.ui.menus.MenuItem[] menu_items;
	Object[] plugin_context_objs = this.getPluginMenuContextObjects();
	String[] plugin_menu_ids = this.getPluginMenuIdentifiers(plugin_context_objs);
	if (plugin_menu_ids != null) {
		menu_items = MenuItemManager.getInstance().getAllAsArray(plugin_menu_ids);
		if (menu_items.length > 0) {
			MenuBuildUtils.addPluginMenuItems(menu_items, menu, true, true,
					// This will retrieve the plugin download object for associated menus.
					new MenuBuildUtils.MenuItemPluginMenuControllerImpl(plugin_context_objs)
			);
			new MenuItem(menu, SWT.SEPARATOR);
		}
	}

    MenuItem itemClose = new MenuItem(menu,SWT.NULL);
    itemClose.setText(MessageText.getString("wizard.close"));
    itemClose.addListener(SWT.Selection,new Listener() {
    	@Override
	    public void handleEvent(Event e) {
    		close();
    	}
    });
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:24,代码来源:MiniBar.java

示例2: insertHorizontalSeparator

/** Horizontal line separator */
public static Control insertHorizontalSeparator(Composite parent) {
	Label label = new Label(parent, SWT.SEPARATOR | SWT.WRAP | SWT.HORIZONTAL | SWT.SHADOW_NONE);
	GridData separatorLayoutData = new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1);
	separatorLayoutData.heightHint = 25;
	label.setLayoutData(separatorLayoutData);
	return label;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:WizardComponentUtils.java

示例3: addMenuItems

@Override
 protected void
 addMenuItems(
Menu	menu )
 {
  new MenuItem( menu, SWT.SEPARATOR );
  
  MenuItem mi_reset = new MenuItem( menu, SWT.PUSH );

  mi_reset.setText(  MessageText.getString( "label.clear.history" ));

  mi_reset.addListener(SWT.Selection, new Listener() {
	  @Override
	  public void handleEvent(Event e) {
		  try{
		   	this_mon.enter();
		   	
		   	nbValues		= 0;
		   	currentPosition	= 0;
	 		
		   	for ( int i=0;i<all_values.length;i++ ){
		   		all_values[i] = new int[all_values[i].length];
		   	}	
		  }finally{
			  
			this_mon.exit();
		  }
		  
		  refresh( true );
	  }
  });
 }
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:32,代码来源:SpeedGraphic.java

示例4: addSeparator

private void addSeparator(Composite parent) {
	Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
	GridData gridData = new GridData();
	gridData.horizontalAlignment = GridData.FILL;
	gridData.grabExcessHorizontalSpace = true;
	separator.setLayoutData(gridData);
}
 
开发者ID:mnlipp,项目名称:EclipseMinifyBuilder,代码行数:7,代码来源:MinifyPropertyPage.java

示例5: newVSpace

public Label newVSpace(Composite composite, int hspan, int vheight) {
    GridData gd = new GridData();
    Label line = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
    gd.horizontalSpan = hspan;
    line.setLayoutData(gd);
    gd.heightHint = vheight;
    return line;
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:8,代码来源:GridComposite.java

示例6: createAllEntries

private void createAllEntries ()
{
    final Composite extensionSpace = this.extensionSpaceProvider.getExtensionSpace ();
    if ( extensionSpace == null )
    {
        return;
    }

    this.wrapper = new Composite ( extensionSpace, SWT.NONE );
    final RowLayout layout = new RowLayout ( SWT.HORIZONTAL );
    layout.marginTop = layout.marginBottom = 0;
    this.wrapper.setLayout ( layout );

    int i = 0;
    for ( final Profile profile : this.profiles )
    {
        final ProfileEntry entry = createProfileEntry ( profile, i );
        if ( entry != null )
        {
            this.profileEntries.put ( profile.getId (), entry );
        }
        i++;
    }

    final Label sep = new Label ( this.wrapper, SWT.SEPARATOR | SWT.VERTICAL );
    sep.setLayoutData ( new RowData ( SWT.DEFAULT, 20 ) );

    extensionSpace.layout ();
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:29,代码来源:ProfileManager.java

示例7: addThisColumnSubMenu

@Override
public void addThisColumnSubMenu(String columnName, Menu menuThisColumn) {
	
	if ( addPeersMenu( manager, columnName, menuThisColumn )){

		new MenuItem( menuThisColumn, SWT.SEPARATOR );
	}
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:8,代码来源:PeersView.java

示例8: fillMenu

@Override
public void 
fillMenu(
	String sColumnName, Menu menu) 
{
	fillMenu(menu, tv, shell, manager);
	
	new MenuItem (menu, SWT.SEPARATOR);
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:9,代码来源:PeersView.java

示例9: createHorizontalSeparator

/**
 * Create a horizontal separator for the given parent.
 * 
 * @param parent
 *            The parent composite.
 * @return The Control representing the horizontal separator.
 */
private Control createHorizontalSeparator(Composite parent) {
	// RAP [bm]: SWT#LINE_DOT missing
	// Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL
	// | SWT.LINE_DOT);
	Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
	// RAPEND: [bm]

	GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false)
			.applyTo(separator);
	return separator;
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:18,代码来源:PopupDialog.java

示例10: attachWidget

@Override
public void attachWidget(Composite container) {
	// TODO Auto-generated method stub
	label = new Label(container, SWT.SEPARATOR | SWT.HORIZONTAL);
	GridData gd_defaultELTLable = new GridData(SWT.LEFT, SWT.CENTER, grabExcessSpace, false, 1, 1);
	gd_defaultELTLable.widthHint = lableWidth;
	label.setLayoutData(gd_defaultELTLable);	
	label.setVisible(visible);
	
	widget = label;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:11,代码来源:ELTSaparater.java

示例11: addThisColumnSubMenu

@Override
public void 
addThisColumnSubMenu(
	String 	sColumnName, 
	Menu 	menuThisColumn)
{
	if ( addPeersMenu( null, sColumnName, menuThisColumn )){

		new MenuItem( menuThisColumn, SWT.SEPARATOR );
	}
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:11,代码来源:PeersViewBase.java

示例12: createToolItems

private void createToolItems() {
    addDatabaseToolItem = new ToolItem(view.getToolBar(), SWT.PUSH);
    addDatabaseToolItem.setImage(ImageUtils.getImage(Images.ADD_DATABASE));
    addDatabaseToolItem.setToolTipText(Images.ADD_DATABASE.getDescription(resourceBundle));
    addDatabaseToolItem.addListener(SWT.Selection, event -> openAddNewDatabaseDialog());

    deleteDatabaseToolItem = new ToolItem(view.getToolBar(), SWT.PUSH);
    deleteDatabaseToolItem.setImage(ImageUtils.getImage(Images.DELETE_DATABASE));
    deleteDatabaseToolItem.setToolTipText(Images.DELETE_DATABASE.getDescription(resourceBundle));
    deleteDatabaseToolItem.setEnabled(false);
    deleteDatabaseToolItem.addListener(SWT.Selection, event -> deleteSelectedDatabase());

    editDatabaseToolItem = new ToolItem(view.getToolBar(), SWT.PUSH);
    editDatabaseToolItem.setImage(ImageUtils.getImage(Images.EDIT_DATABASE));
    editDatabaseToolItem.setToolTipText(Images.EDIT_DATABASE.getDescription(resourceBundle));
    editDatabaseToolItem.setEnabled(false);
    editDatabaseToolItem.addListener(SWT.Selection, event -> openEditSelectedDatabaseDialog());

    connectDatabaseToolItem = new ToolItem(view.getToolBar(), SWT.PUSH);
    connectDatabaseToolItem.setImage(ImageUtils.getImage(Images.CONNECT_DATABASE));
    connectDatabaseToolItem.setToolTipText(Images.CONNECT_DATABASE.getDescription(resourceBundle));
    connectDatabaseToolItem.setEnabled(false);
    connectDatabaseToolItem.addListener(SWT.Selection, event -> connectToSelectedDatabase());

    disconnectDatabaseToolItem = new ToolItem(view.getToolBar(), SWT.PUSH);
    disconnectDatabaseToolItem.setImage(ImageUtils.getImage(Images.DISCONNECT_DATABASE));
    disconnectDatabaseToolItem.setToolTipText(Images.DISCONNECT_DATABASE.getDescription(resourceBundle));
    disconnectDatabaseToolItem.setEnabled(false);
    disconnectDatabaseToolItem.addListener(SWT.Selection, event -> disconnectSelectedDatabase());

    new ToolItem(view.getToolBar(), SWT.SEPARATOR);

    ToolItem showSettingsDialogToolItem = new ToolItem(view.getToolBar(), SWT.PUSH);
    showSettingsDialogToolItem.setImage(ImageUtils.getImage(Images.SETTINGS));
    showSettingsDialogToolItem.setToolTipText(Images.SETTINGS.getDescription(resourceBundle));
    showSettingsDialogToolItem.addListener(SWT.Selection, event -> showSettingsDialog());

    ToolItem toggleLogsPanelVisibilityToolItem = new ToolItem(view.getToolBar(), SWT.CHECK);
    toggleLogsPanelVisibilityToolItem.setImage(ImageUtils.getImage(Images.SHOW_LOG_PANEL));
    toggleLogsPanelVisibilityToolItem.setToolTipText(Images.SHOW_LOG_PANEL.getDescription(resourceBundle));
    toggleLogsPanelVisibilityToolItem.setSelection(true);
    toggleLogsPanelVisibilityToolItem.addListener(SWT.Selection, event -> toggleLogsPanelVisibility(toggleLogsPanelVisibilityToolItem));

    new ToolItem(view.getToolBar(), SWT.SEPARATOR);

    autoUpdateToolItem = new ToolItem(view.getToolBar(), SWT.CHECK);
    autoUpdateToolItem.setImage(ImageUtils.getImage(Images.AUTOUPDATE));
    autoUpdateToolItem.setToolTipText(Images.AUTOUPDATE.getDescription(resourceBundle));
    autoUpdateToolItem.addListener(SWT.Selection, event -> setAutoUpdate(autoUpdateToolItem.getSelection()));
    autoUpdateToolItem.setSelection(settings.isAutoUpdate());

    showOnlyBlockedProcessesToolItem = new ToolItem(view.getToolBar(), SWT.CHECK);
    showOnlyBlockedProcessesToolItem.setImage(ImageUtils.getImage(Images.VIEW_ONLY_BLOCKED));
    showOnlyBlockedProcessesToolItem.setToolTipText(Images.VIEW_ONLY_BLOCKED.getDescription(resourceBundle));
    showOnlyBlockedProcessesToolItem.addListener(SWT.Selection, event ->
            dbProcessesViewDataSourceFilter.setShowOnlyBlockedProcesses(showOnlyBlockedProcessesToolItem.getSelection()));

    new ToolItem(view.getToolBar(), SWT.SEPARATOR);

    ToolItem openBlocksJournalToolItem = new ToolItem(view.getToolBar(), SWT.PUSH);
    openBlocksJournalToolItem.setImage(ImageUtils.getImage(Images.BLOCKS_JOURNAL_FOLDER));
    openBlocksJournalToolItem.setToolTipText(Images.BLOCKS_JOURNAL_FOLDER.getDescription(resourceBundle));
    openBlocksJournalToolItem.addListener(SWT.Selection, event -> {
        BlocksJournalView blocksJournalView = new BlocksJournalView(settings);
        blocksJournalView.open();
    });

}
 
开发者ID:technology16,项目名称:pgsqlblocks,代码行数:68,代码来源:ProcessesController.java

示例13: addSeparator

protected void addSeparator(Composite compo) {
	Label separator = new Label(compo, SWT.SEPARATOR | SWT.VERTICAL);
	GridData layoutData = new GridData();
	layoutData.heightHint = 20;
	separator.setLayoutData(layoutData);
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:6,代码来源:SchemaRegistryView.java

示例14: fillMenu

@Override
public void
fillMenu(
	String sColumnName, Menu menu)
{
	List<Object>	ds = tv.getSelectedDataSources();

	final List<DownloadStubFile> files = new ArrayList<>();

	for ( Object o: ds ){

		files.add((DownloadStubFile)o);
	}

	boolean	hasSelection = files.size() > 0;

		// Explore (or open containing folder)

	final boolean use_open_containing_folder = COConfigurationManager.getBooleanParameter("MyTorrentsView.menu.show_parent_folder_enabled");

	final MenuItem itemExplore = new MenuItem(menu, SWT.PUSH);

	Messages.setLanguageText(itemExplore, "MyTorrentsView.menu."
			+ (use_open_containing_folder ? "open_parent_folder" : "explore"));

	itemExplore.addListener(SWT.Selection, new Listener() {
		@Override
		public void
		handleEvent(
			Event event)
		{
			for ( DownloadStubFile file: files ){

				ManagerUtils.open( new File( file.getFile().getAbsolutePath()), use_open_containing_folder);
			}
		}
	});

	itemExplore.setEnabled(hasSelection);

	new MenuItem( menu, SWT.SEPARATOR );
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:42,代码来源:ArchivedFilesView.java

示例15: fillMenu

@Override
 public void
 fillMenu(
 	String sColumnName, final Menu menu)
 {
 	Shell shell = menu.getShell();
	/*
   final MenuItem itemStart = new MenuItem(menu, SWT.PUSH);
   Messages.setLanguageText(itemStart, "MySharesView.menu.start"); //$NON-NLS-1$
   itemStart.setImage(ImageRepository.getImage("start"));

   final MenuItem itemStop = new MenuItem(menu, SWT.PUSH);
   Messages.setLanguageText(itemStop, "MySharesView.menu.stop"); //$NON-NLS-1$
   itemStop.setImage(ImageRepository.getImage("stop"));
   */

    menuCategory = new Menu(shell, SWT.DROP_DOWN);
    final MenuItem itemCategory = new MenuItem(menu, SWT.CASCADE);
    Messages.setLanguageText(itemCategory, "MyTorrentsView.menu.setCategory"); //$NON-NLS-1$
    //itemCategory.setImage(ImageRepository.getImage("speed"));
    itemCategory.setMenu(menuCategory);

    addCategorySubMenu();

    new MenuItem(menu, SWT.SEPARATOR);

   final MenuItem itemRemove = new MenuItem(menu, SWT.PUSH);
   Messages.setLanguageText(itemRemove, "MySharesView.menu.remove"); //$NON-NLS-1$
   Utils.setMenuItemImage(itemRemove, "delete");


   Object[] shares = tv.getSelectedDataSources().toArray();

   itemRemove.setEnabled(shares.length > 0);

   itemRemove.addListener(SWT.Selection, new Listener() {
	 @Override
	 public void handleEvent(Event e) {
	   removeSelectedShares();
	 }
   });

   new MenuItem(menu, SWT.SEPARATOR);
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:44,代码来源:MySharesView.java


注:本文中的org.eclipse.swt.SWT.SEPARATOR属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。