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

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

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

Label.addDisposeListener介绍

暂无

代码示例

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

/**
 * @param label
 * @param key
 *
 * @since 4.0.0.5
 */
public void setLabelImage(Label label, final String key) {
  Image bg = getImage(key);
  label.setImage(bg);
  label.addDisposeListener(new DisposeListener() {
    @Override
    public void widgetDisposed(DisposeEvent e) {
      releaseImage(key);
    }
  });
}

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

/**
 * Returns the value control for this field editor. The value control
 * displays the currently selected font name.
 * @param parent The Composite to create the viewer in if required
 * @return the value control
 */
protected Label getValueControl(Composite parent) {
  if (valueControl == null) {
    valueControl = new Label(parent, SWT.LEFT);
    valueControl.setFont(parent.getFont());
    valueControl.addDisposeListener(event -> valueControl = null);
  } else {
    checkParent(valueControl, parent);
  }
  return valueControl;
}

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

/**
 * Returns the value control for this field editor. The value control
 * displays the currently selected font name.
 * @param parent The Composite to create the viewer in if required
 * @return the value control
 */
protected Label getValueControl(Composite parent) {
  if (valueControl == null) {
    valueControl = new Label(parent, SWT.LEFT);
    valueControl.setFont(parent.getFont());
    valueControl.addDisposeListener(event -> valueControl = null);
  } else {
    checkParent(valueControl, parent);
  }
  return valueControl;
}

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

/**
 * Returns the value control for this field editor. The value control
 * displays the currently selected font name.
 * @param parent The Composite to create the viewer in if required
 * @return the value control
 */
protected Label getValueControl(Composite parent) {
  if (valueControl == null) {
    valueControl = new Label(parent, SWT.LEFT);
    valueControl.setFont(parent.getFont());
    valueControl.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent event) {
        valueControl = null;
      }
    });
  } else {
    checkParent(valueControl, parent);
  }
  return valueControl;
}

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

/**
 * Returns this field editor's label component.
 * <p>
 * The label is created if it does not already exist
 * </p>
 *
 * @param parent the parent
 * @return the label control
 */
public Label getLabelControl(Composite parent) {
  if (label == null) {
    label = new Label(parent, SWT.LEFT);
    label.setFont(parent.getFont());
    String text = getLabelText();
    if (text != null) {
      label.setText(text);
    }
    label.addDisposeListener(event -> label = null);
  } else {
    checkParent(label, parent);
  }
  return label;
}

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

/**
 * Returns this field editor's label component.
 * <p>
 * The label is created if it does not already exist
 * </p>
 *
 * @param parent the parent
 * @return the label control
 */
public Label getLabelControl(Composite parent) {
  if (label == null) {
    label = new Label(parent, SWT.LEFT);
    label.setFont(parent.getFont());
    String text = getLabelText();
    if (text != null) {
      label.setText(text);
    }
    label.addDisposeListener(event -> label = null);
  } else {
    checkParent(label, parent);
  }
  return label;
}

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

/**
 * Returns this field editor's label component.
 * <p>
 * The label is created if it does not already exist
 * </p>
 *
 * @param parent the parent
 * @return the label control
 */
public Label getLabelControl(Composite parent) {
  if (label == null) {
    label = new Label(parent, SWT.LEFT);
    label.setFont(parent.getFont());
    String text = getLabelText();
    if (text != null) {
      label.setText(text);
    }
    label.addDisposeListener(new DisposeListener() {
      public void widgetDisposed(DisposeEvent event) {
        label = null;
      }
    });
  } else {
    checkParent(label, parent);
  }
  return label;
}

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

img_label.addDisposeListener(
  new DisposeListener()

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

i2p_options_info.setFont( bold_font);
i2p_options_info.addDisposeListener(
  new DisposeListener() {
    @Override

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

lName.addDisposeListener(
  new DisposeListener(){

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

label.addDisposeListener(new DisposeListener() {
  @Override
  public void widgetDisposed(DisposeEvent e) {

代码示例来源:origin: org.eclipse.mylyn.commons/workbench

labelButton.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
labelButton.setToolTipText(toolTipText);
labelButton.addDisposeListener(new DisposeListener() {
  public void widgetDisposed(DisposeEvent e) {
    if (nativeImage == null && activeImage != null && !activeImage.isDisposed()) {

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

clearButton.addDisposeListener(new DisposeListener() {
  @Override
  public void widgetDisposed(DisposeEvent e) {

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

clearButton.addDisposeListener(new DisposeListener() {
  @Override
  public void widgetDisposed(DisposeEvent e) {

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

clearButton.addDisposeListener(e -> {
  inactiveImage.dispose();
  activeImage.dispose();

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

lDrag.addDisposeListener(new DisposeListener() {
     @Override
     public void widgetDisposed(DisposeEvent e) {

相关文章