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

x33g5p2x  于2022-01-16 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(129)

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

Button.getShell介绍

暂无

代码示例

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

/**
 * Returns this field editor's shell.
 *
 * @return the shell
 */
protected Shell getShell() {
  if (changeButton == null) {
    return null;
  }
  return changeButton.getShell();
}

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

@Override
  public void handleEvent(Event e) {
    List group = new ArrayList();
    List tracker = new ArrayList();
    group.add(tracker);
    new MultiTrackerEditor(btnNew.getShell(), null,group, templateTEL);
  }
});

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

private Shell getShell() {
  if (fBrowseVariableButton != null) {
    return fBrowseVariableButton.getShell();
  }
  return JavaPlugin.getActiveWorkbenchShell();
}

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

@Override
  public void shellActivated(ShellEvent e) {
    // need to defer setting the default button to here as otherwise it doesn't
    // work (on windows at least...)
    if (def_button != null) {
      def_button.getShell().setDefaultButton(def_button);
    }
  }
});

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07

static boolean isDefaultButton( final Button button ) {
  return button.getShell().getDefaultButton() == button;
 }
}

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

private Shell getShell() {
  if (fBrowseVariableButton != null) {
    return fBrowseVariableButton.getShell();
  }
  return JavaPlugin.getActiveWorkbenchShell();
}

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

@Override
protected void initializeBounds() {
  super.initializeBounds();
  fNextButton.getShell().setDefaultButton(fNextButton);
}

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

@Override
public void buttonSelected(Button button, int index) {
  TableSection.this.buttonSelected(index);
  if (fHandleDefaultButton)
    button.getShell().setDefaultButton(null);
}

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

@Override
public void buttonSelected(Button button, int index) {
  TreeSection.this.buttonSelected(index);
  if (fHandleDefaultButton)
    button.getShell().setDefaultButton(null);
}

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

@Override
  public void handleEvent(Event e) {
    Map multiTrackers = TrackersUtil.getInstance().getMultiTrackers();
    String    selected = currentTemplate[0];
    new MultiTrackerEditor( btnEdit.getShell(),selected,(List)multiTrackers.get(selected), templateTEL );
  }
});

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

private void createPreviewButton(Composite parent) {
  if (! (fCurrentPage instanceof PreviewWizardPage) && fWizard.internalHasPreviewPage(InternalAPI.INSTANCE)) {
    Button preview= createButton(parent, PREVIEW_ID, RefactoringUIMessages.RefactoringWizardDialog2_buttons_preview_label, false);
    if (fMakeNextButtonDefault) {
      preview.getShell().setDefaultButton(preview);
    }
    preview.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        nextOrPreviewPressed();
      }
    });
  }
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

private void createButtonArea( Composite parent ) {
 Composite composite = new Composite( parent, SWT.NONE );
 GridData layoutData = new GridData( SWT.RIGHT, SWT.CENTER, false, false, 2, 1 );
 composite.setLayoutData( layoutData );
 GridLayout layout = new GridLayout( 2, true );
 layout.marginWidth = 0;
 layout.marginHeight = 0;
 composite.setLayout( layout );
 Button okButton = createButton( composite, SWT.getMessage( "SWT_OK" ), SWT.OK );
 okButton.getShell().setDefaultButton( okButton );
 okButton.forceFocus();
 createButton( composite, SWT.getMessage( "SWT_Cancel" ), SWT.CANCEL );
}

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

private void convertLocation() {
  if (MessageDialog.openConfirm(fConvertAbsoluteButton.getShell(),
      IDEWorkbenchMessages.LinkedResourceEditor_convertTitle,
      IDEWorkbenchMessages.LinkedResourceEditor_convertMessage)) {
    ArrayList/* <IResource> */resources = new ArrayList/* <IResource> */();
    IResource[] selectedResources = getSelectedResource();
    resources.addAll(Arrays.asList(selectedResources));
    if (areFixed(selectedResources))
      convertToAbsolute(resources, selectedResources);
    else
      convertToRelative(resources, selectedResources);
  }
}

代码示例来源:origin: com.eclipsesource.tabris/tabris

private void createProposalsMenu() {
 if( proposalsMenu == null ) {
  proposalsMenu = new Menu( getControl().getShell(), SWT.POP_UP );
  proposalsMenu.setData( RWT.CUSTOM_VARIANT, CUSTOM_VARIANT_TABRIS_UI );
 }
}

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

public void widgetSelected(SelectionEvent e) {
  FileDialog fileDialog = new FileDialog(pomFileNameButton.getShell());
  fileDialog.setText(Messages.MavenInstallFileArtifactWizardPage_file_title);
  fileDialog.setFileName(pomFileNameText.getText());
  String res = fileDialog.open();
  if(res != null) {
   updatePOMFileName(res);
  }
 }
});

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

@Override
public void widgetSelected(SelectionEvent event) {
     // force focusout on osx
     apply.setFocus();
     save();
     apply.getShell().dispose();
   }
 });

代码示例来源:origin: org.eclipse/org.eclipse.jst.ws.consumption.ui

public void handleBrowseEvent(Event event)
{
 DialogResourceBrowser dialog = new DialogResourceBrowser(browse_.getShell(), null, new FileExtensionFilter(new String[] {"wsil"}));
 dialog.open();
 IResource res = dialog.getFirstSelection();
 if (res != null)
 {
  if (res instanceof IFile)
   wsil_.setText(res.getFullPath().toString());
  else
   wsil_.setText(res.getFullPath().addTrailingSeparator().append(INSPECTION_WSIL).toString());
 }
}

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

@Override
public int open() {
  create();
  Button b = getButton(defaultButtonIndex);
  b.setFocus();
  b.getShell().setDefaultButton(b);
  return super.open();
}

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

public int open() {
  create();
  Button b = getButton(defaultButtonIndex);
  b.setFocus();
  b.getShell().setDefaultButton(b);
  return super.open();
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.common.frameworks.ui

public int open() {
  create();
  Button b = getButton(defaultButtonIndex);
  b.setFocus();
  b.getShell().setDefaultButton(b);
  return super.open();
}

相关文章

Button类方法