org.eclipse.ui.forms.widgets.Hyperlink.setEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(124)

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

Hyperlink.setEnabled介绍

暂无

代码示例

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

@Override
  public void setEnabled(boolean enabled) {
    if (!enabled)
      createDisabledImage();
    super.setEnabled(enabled);
    if (enabled && disabledImage != null) {
      disabledImage.dispose();
      disabledImage = null;
    }
  }
}

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

@Override
protected Control createContent(Composite parent, FormToolkit toolkit) {
  Composite composite = toolkit.createComposite(parent);
  composite.setLayout(new GridLayout(2, false));
  hyperlink = toolkit.createHyperlink(composite, "Show Output in Console", SWT.NONE);
  hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
    @Override
    public void linkActivated(HyperlinkEvent event) {
      buildOutputAction.run();
    }
  });
  hyperlink.setEnabled(buildOutputAction.isEnabled());
  return composite;
}

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

@Override
  public void setEnabled(boolean enabled) {
    if (!enabled && (disabledImage == null || disabledImage.isDisposed()) && image != null && !image.isDisposed()) {
      disabledImage = new Image(image.getDevice(), image, SWT.IMAGE_DISABLE);
    }
    super.setEnabled(enabled);
    if (enabled && disabledImage != null) {
      disabledImage.dispose();
      disabledImage = null;
    }
  }
}

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

@Override
public void updateFields(ISchemaObject object) {
  if (!(object instanceof SchemaElementReference))
    return;
  fElement = (SchemaElementReference) object;
  setDecription(NLS.bind(PDEUIMessages.SchemaElementReferenceDetails_description, fElement.getName()));
  fReferenceLink.setText(fElement.getName());
  updateMinOccur(fElement.getMinOccurs());
  updateMaxOccur(fElement.getMaxOccurs());
  boolean editable = isEditableElement();
  fRefLabel.setEnabled(editable);
  fReferenceLink.setEnabled(editable);
  enableMinMax(editable);
}

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

prev.setBackground(getBackground());
if (page == 0)
  prev.setEnabled(false);
next.setBackground(getBackground());
if (lastPage)
  next.setEnabled(false);

相关文章