org.eclipse.swt.widgets.Label.setMenu()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中org.eclipse.swt.widgets.Label.setMenu()方法的一些代码示例,展示了Label.setMenu()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setMenu()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Label
类名称:Label
方法名:setMenu

Label.setMenu介绍

暂无

代码示例

代码示例来源:origin: BiglySoftware/BiglyBT

protected final void createGap(int width) {
  width = (int)(width * width_multiplier );
  // We create a label just so we can attach the menu to it.
  assertConstructing();
  Label result = new Label(splash, SWT.NONE);
  result.setBackground(Colors.blues[Colors.BLUES_LIGHTEST]);
  result.setForeground(Colors.blues[Colors.BLUES_DARKEST]);
  result.setText("");
  result.addMouseListener(this.mListener);
  result.addMouseMoveListener(this.mMoveListener);
  result.setLocation(this.xSize, 0);
  result.setSize(width, hSize);
  result.setMenu(this.menu);
  this.xSize += width;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms

public IMenuManager getMenuManager() {
  if (menuManager == null) {
    menuManager = new MenuManager();
    Menu menu = menuManager.createContextMenu(this);
    setMenu(menu);
    titleLabel.setMenu(menu);
    if (busyLabel != null)
      busyLabel.setMenu(menu);
    createMenuHyperlink();
  }
  return menuManager;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms

public IMenuManager getMenuManager() {
  if (menuManager == null) {
    menuManager = new MenuManager();
    Menu menu = menuManager.createContextMenu(this);
    setMenu(menu);
    titleLabel.setMenu(menu);
    if (busyLabel != null)
      busyLabel.setMenu(menu);
    createMenuHyperlink();
  }
  return menuManager;
}

代码示例来源:origin: BiglySoftware/BiglyBT

protected final Label createFixedLabel(int width) {
  assertConstructing();
  Label result = new Label(splash, SWT.NONE);
  result.setBackground(Colors.white);
  result.setSize(width, SWT.DEFAULT );
  result.setLocation(this.xSize, 0);
  result.addMouseListener(this.mListener);
  result.addMouseMoveListener(this.mMoveListener);
  result.setMenu(this.menu);
  if (this.hSize == -1) {
    int hSizeText = result.getSize().y;
    int hSizeImage = this.lDrag.getSize().y;
    this.hSize = hSizeText > hSizeImage ? hSizeText : hSizeImage;
  }
  this.xSize += width;
  return( result );
}

代码示例来源:origin: de.dentrassi.eclipse.neoscada.hmi/org.eclipse.scada.vi.ui.user

public DebugHandler ( final Composite parent, final ViewManager viewManager )
{
  this.viewManager = viewManager;
  this.label = new Label ( parent, SWT.NONE );
  final ResourceManager manager = new LocalResourceManager ( JFaceResources.getResources ( this.label.getDisplay () ), this.label );
  this.label.setImage ( manager.createImageWithDefault ( ImageDescriptor.createFromURL ( FileLocator.find ( Activator.getDefault ().getBundle (), new Path ( "/resources/debugIcon.png" ), Collections.EMPTY_MAP ) ) ) ); //$NON-NLS-1$
  final MenuManager menuManager = new MenuManager ( "#PopupMenu", "org.eclipse.scada.vi.ui.user.debugMenu" ); //$NON-NLS-1$ //$NON-NLS-2$
  menuManager.setRemoveAllWhenShown ( true );
  this.label.setMenu ( menuManager.createContextMenu ( this.label ) );
  createActions ();
  menuManager.addMenuListener ( new IMenuListener () {
    @Override
    public void menuAboutToShow ( final IMenuManager menuManager )
    {
      contextMenuAboutToShow ( menuManager );
    }
  } );
  viewManager.registerMenuManager ( menuManager );
}

代码示例来源:origin: BiglySoftware/BiglyBT

protected final Label createFixedTextLabel(String msg_key, boolean add_colon, boolean bold) {
  assertConstructing();
  Label result = new Label(splash, SWT.NONE);
  result.setBackground(Colors.blues[Colors.BLUES_LIGHTEST]);
  result.setForeground(Colors.blues[Colors.BLUES_DARKEST]);
  result.setText(MessageText.getString(msg_key) + ((add_colon) ? ":" : ""));
  if (bold) {
    if (this.bold_font == null) {
      this.bold_font = createBoldFont(result.getFont());
    }
    result.setFont(this.bold_font);
  }
  result.addMouseListener(this.mListener);
  result.addMouseMoveListener(this.mMoveListener);
  result.pack();
  result.setLocation(this.xSize, 0);
  result.setMenu(this.menu);
  if (this.hSize == -1) {
    int hSizeText = result.getSize().y;
    int hSizeImage = this.lDrag.getSize().y;
    this.hSize = hSizeText > hSizeImage ? hSizeText : hSizeImage;
  }
  this.xSize += result.getSize().x + 3;
  return( result );
}

代码示例来源:origin: BiglySoftware/BiglyBT

mi_cd.addSelectionListener( cd_listener );
mi_cd.setEnabled( persistent );
label.setMenu( cd_menu );

代码示例来源:origin: BiglySoftware/BiglyBT

dlab.setMenu(downloadSpeedMenu);
down_speed.setMenu(downloadSpeedMenu);
ulab.setMenu(uploadSpeedMenu);
up_speed.setMenu(uploadSpeedMenu);

代码示例来源:origin: org.eclipse/org.eclipse.help.ui

private EngineDescriptor loadEngine(final EngineDescriptor edesc, Composite container, FormToolkit toolkit) {
  Label ilabel = toolkit.createLabel(container, null);
  ilabel.setImage(edesc.getIconImage());
  ilabel.setData(edesc);
  final Button master = toolkit.createButton(container, edesc.getLabel(), SWT.CHECK);
  master.setData(edesc);
  master.addSelectionListener(new SelectionAdapter() {
    public void widgetSelected(SelectionEvent e) {
      scopeSetManager.getActiveSet().setEngineEnabled(edesc, master.getSelection());
    }
  });
  String desc = edesc.getDescription();
  if (desc != null) {
    Label spacer = toolkit.createLabel(container, null);
    spacer.setData(edesc);
    Label dlabel = toolkit.createLabel(container, desc, SWT.WRAP);
    dlabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
    dlabel.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
    dlabel.setMenu(container.getMenu());
    dlabel.setData(edesc);
  }
  return edesc;
}

代码示例来源:origin: BiglySoftware/BiglyBT

lHeader.setMenu( headerMenu );
usermodeHint.setMenu( headerMenu );

代码示例来源:origin: org.eclipse.egit/ui

Label messageLabel = new Label(infoArea, SWT.WRAP);
messageLabel.setText(UIText.RepositoriesView_messsageEmpty);
messageLabel.setMenu(menu);
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL)
    .grab(true, false).applyTo(messageLabel);

代码示例来源:origin: BiglySoftware/BiglyBT

label.setMenu(menu);

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

fNoHierarchyShownLabel.setMenu(menu.createContextMenu(fNoHierarchyShownLabel));

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

fNoHierarchyShownLabel.setMenu(menu.createContextMenu(fNoHierarchyShownLabel));

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

fNoHierarchyShownLabel.setMenu(menu.createContextMenu(fNoHierarchyShownLabel));

代码示例来源:origin: BiglySoftware/BiglyBT

menu_drop.setMenu( status_menu );

相关文章