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

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

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

Label.isDisposed介绍

暂无

代码示例

代码示例来源:origin: caoxinyu/RedisClient

@Override
  public void widgetSelected(SelectionEvent e) {
    if (!currentText) {
      imageType.setEnabled(false);
      textType.setEnabled(true);
      if (label != null && !label.isDisposed()) {
        label.setVisible(false);
        label.dispose();
      }
      text = new Text(grpValue, SWT.BORDER | SWT.V_SCROLL	| SWT.H_SCROLL | SWT.MULTI);
      text.setEditable(false);
      text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
      text.setText(value);
      tranformText(textType, text);
      currentText = true;
    }
  }
});

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

private FieldDecorationData getDecorationData(FieldDecoration dec) {
  for (int i = 0; i < DECORATION_SLOTS; i++) {
    if (decDatas[i] != null && dec == decDatas[i].decoration
        && decDatas[i].label != null
        && !decDatas[i].label.isDisposed()) {
      return decDatas[i];
    }
  }
  return null;
}

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

public boolean
isDisposed()
{
  return( label.isDisposed());
}

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

private FieldDecorationData getDecorationData(FieldDecoration dec) {
  for (int i = 0; i < DECORATION_SLOTS; i++) {
    if (decDatas[i] != null && dec == decDatas[i].decoration
        && decDatas[i].label != null
        && !decDatas[i].label.isDisposed()) {
      return decDatas[i];
    }
  }
  return null;
}

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

@Override
 public void runSupport() {
  if(status != null && !status.isDisposed())
   status.setText(text);
 }
});

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

/**
 * Set the message in the message label.
 */
private void setMessage(String messageString) {
  //must not set null text in a label
  message = messageString == null ? "" : messageString; //$NON-NLS-1$
  if (messageLabel == null || messageLabel.isDisposed())
    return;
  messageLabel.setText(message);
}

代码示例来源:origin: atdl4j/atdl4j

@Override
  public void processReinit( Object aControlInitValue )
  {
    if ( ( label != null ) && ( ! label.isDisposed() ) )
    {
      label.setText( (aControlInitValue != null ) ? (String) aControlInitValue : "" );
    }
  }
}

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

public void setStatusMessage(String message) {
    if (statusLabel != null && !statusLabel.isDisposed()) {
      if (message == null) {
        statusLabel.setText(""); //$NON-NLS-1$
      } else {
        statusLabel.setText(message);
      }
    }
  }
}

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

public void setStatusMessage(String message) {
    if (statusLabel != null && !statusLabel.isDisposed()) {
      if (message == null) {
        statusLabel.setText(""); //$NON-NLS-1$
      } else {
        statusLabel.setText(message);
      }
    }
  }
});

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

private void updateDescription() {
  if((fShowAllDescription != null) && !fShowAllDescription.isDisposed()) {
    if(fShowAllSelected) {
      fShowAllDescription.setText(StringSubstitutionMessages.StringVariableSelectionDialog_11);
    } else {
      fShowAllDescription.setText(StringSubstitutionMessages.StringVariableSelectionDialog_10);
    }
  }
}

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

@Override
  public void setStatusMessage(String message) {
    if (statusLabel != null && !statusLabel.isDisposed()) {
      if (message == null) {
        statusLabel.setText(""); //$NON-NLS-1$
      } else {
        statusLabel.setText(message);
      }
    }
  }
}

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

@Override
  public void setStatusMessage(String message) {
    if (statusLabel != null && !statusLabel.isDisposed()) {
      if (message == null) {
        statusLabel.setText(""); //$NON-NLS-1$
      } else {
        statusLabel.setText(message);
      }
    }
  }
});

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

/**
 * Sets the message for the repetition affordance text at the bottom of the proposal. Only has
 * an effect if {@link ContentAssistant#isRepeatedInvocationMode()} returns <code>true</code>.
 *
 * @param message the new caption
 * @since 3.2
 */
void setMessage(String message) {
  Assert.isNotNull(message);
  if (isActive() && fMessageText != null && !fMessageText.isDisposed())
    fMessageText.setText(message + " "); //$NON-NLS-1$
}

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

private void fillFileInfoSection() {
  if (topLabel == null || topLabel.isDisposed()) {
    return;
  }
  topLabel.setText( "" );
  refreshInfoCanvas();
}

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

/**
 * Update the message label. Required if the monitor is forked.
 */
private void update() {
  if (messageLabel == null || messageLabel.isDisposed()) {
    return;
  }
  messageLabel.update();
}

代码示例来源:origin: org.xworker/xworker_swt

public void setLabel(final String text){
  if(text == null || label == null || label.isDisposed()){
    return;
  }
  
  label.getDisplay().asyncExec(new Runnable(){
    public void run(){
      label.setText(text);
    }
  });        
}

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

/**
 * Updates the label in the bottom right with the current count of implicit plug-ins
 */
private void updateCount() {
  if (fCount != null && !fCount.isDisposed())
    fCount.setText(NLS.bind(PDEUIMessages.TableSection_itemCount, Integer.toString(fViewer.getTable().getItemCount())));
}

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

protected void updateLabel() {
    if (fCount != null && !fCount.isDisposed())
      fCount.setText(NLS.bind(PDEUIMessages.TableSection_itemCount, Integer.toString(getTableViewer().getTable().getItemCount())));
  }
}

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

@Override
  public void run() {
    animatedImage.stop();
    animatedImage.dispose();
    loadingProgress.dispose();
    if ( !loadingText.isDisposed()){
      loadingText.setText(MessageText.getString("subscriptions.listwindow.failed"));
    }
  }
});

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

/**
 * This method is called when the elements of the backing list are changed
 * to refresh the standard dialog widgets.
 *
 * @since 3.8
 */
protected void handleElementsChanged() {
  boolean enabled = !fFilteredList.isEmpty();
  if (fMessage != null && !fMessage.isDisposed())
    fMessage.setEnabled(enabled);
  fFilteredList.setEnabled(enabled);
  updateOkState();
}

相关文章