本文整理了Java中org.eclipse.swt.widgets.Label.dispose()
方法的一些代码示例,展示了Label.dispose()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.dispose()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Label
类名称:Label
方法名:dispose
暂无
代码示例来源: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: net.sf.okapi.steps/okapi-step-tokenization-ui
public TokenSelectorNoDescrPage(Composite parent, int style) {
super(parent, style);
listDescr.dispose();
}
代码示例来源:origin: org.codehaus.openxma/xmartserver
private void scalebyLabel(Composite comp) {
Label label = new Label(comp,SWT.NONE);
label.setText(scaleText);
Point p = label.computeSize(SWT.DEFAULT,SWT.DEFAULT);
double fx = (p.x-1)/44.55;
double fy = p.y-1;
//rem: divide first to overcome rounding errors in case of fx==SmallBaseX and fy==SmallBaseY
factorX = (fx/smallBaseX); //+0.08;
factorY = (fy/smallBaseY); //+0.08;
label.dispose();
}
代码示例来源:origin: org.eclipse.xtext/ui
public void release() {
if (label != null)
label.dispose();
if (image != null)
image.dispose();
}
代码示例来源:origin: org.codehaus.openxma/xmartclient
private void scalebyLabel(Composite comp) {
Label label = new Label(comp,SWT.NONE);
label.setText(scaleText);
Point p = label.computeSize(SWT.DEFAULT,SWT.DEFAULT);
double fx = (p.x-1)/44.55;
double fy = p.y-1;
//rem: divide first to overcome rounding errors in case of fx==SmallBaseX and fy==SmallBaseY
factorX = (fx/smallBaseX); //+0.08;
factorY = (fy/smallBaseY); //+0.08;
label.dispose();
}
代码示例来源:origin: org.apache.uima/uimaj-ep-cas-editor
/**
* Disable size enter.
*/
private void disableSizeEnter() {
if (isArraySizeDisplayed) {
sizeLabel.dispose();
sizeText.dispose();
isArraySizeDisplayed = false;
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.cheatsheets
public void showError(String message) {
internalDispose();
if(howToBegin != null) {
howToBegin.dispose();
howToBegin = null;
}
createErrorPage(message);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
@Override
public void dispose() {
intervalField.setPropertyChangeListener(null);
noteMessage.dispose();
noteLabel.dispose();
resetMessage.dispose();
intervalField.dispose();
intervalComposite.dispose();
autoSaveGroup.dispose();
autoSaveButton.dispose();
super.dispose();
}
代码示例来源:origin: tvrenamer/tvrenamer
/**
* Dispose of the label. We need to do this whether the label was used or not.
*/
@Override
public void finishProgress(final FileEpisode episode) {
if (!display.isDisposed()) {
display.asyncExec(() -> {
if ((label != null) && (!label.isDisposed())) {
label.dispose();
}
ui.finishMove(item, episode);
});
}
}
}
代码示例来源:origin: BiglySoftware/BiglyBT
private void initialize(final Composite composite) {
// need to initalize composite now, since getComposite can
// be called at any time
cConfig = new Composite(composite, SWT.NONE);
GridLayout configLayout = new GridLayout();
configLayout.marginHeight = 0;
configLayout.marginWidth = 0;
cConfig.setLayout(configLayout);
GridData gridData = new GridData(GridData.FILL_BOTH);
cConfig.setLayoutData(gridData);
final Label label = new Label(cConfig, SWT.CENTER);
Messages.setLanguageText(label, "view.waiting.core");
gridData = new GridData(GridData.FILL_BOTH);
label.setLayoutData(gridData);
// Need to delay initialation until core is done so we can guarantee
// all config sections are loaded (ie. plugin ones).
// TODO: Maybe add them on the fly?
CoreFactory.addCoreRunningListener(core -> Utils.execSWTThread(() -> {
_initialize(composite);
label.dispose();
composite.layout(true, true);
}));
}
代码示例来源:origin: org.apache.directory.studio/ldapbrowser.common
/**
* Deletes the language line at the given index.
*
* @param langComposite the language composite
* @param index the index
*/
private void deleteLangLine( Composite langComposite, int index )
{
LangLine langLine = langLineList.remove( index );
if ( langLine != null )
{
langLine.langLabel.dispose();
langLine.languageCombo.dispose();
langLine.minusLabel.dispose();
langLine.countryCombo.dispose();
langLine.addButton.dispose();
langLine.deleteButton.dispose();
if ( !langComposite.isDisposed() )
{
shell.layout( true, true );
}
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text
/**
* Enables or disables showing of the caption line. See also {@link #setMessage(String)}.
*
* @param show <code>true</code> if the status line is visible
* @since 3.2
*/
public void setStatusLineVisible(boolean show) {
if (!isActive() || show == (fMessageText != null))
return; // nothing to do
if (show) {
createMessageText();
} else {
fMessageText.dispose();
fMessageText= null;
}
fProposalShell.layout();
}
代码示例来源:origin: org.xworker/xworker_swt
public static void inputInit(ActionContext actionContext){
Shell shell = actionContext.getObject("shell");
Label messageLabel = actionContext.getObject("messageLabel");
Text text = actionContext.getObject("text");
String title = actionContext.getString("title");
String message = actionContext.getString("message");
if(title != null){
shell.setText(title);
}
if(message != null){
messageLabel.setText(message);
}else{
messageLabel.dispose();
}
String value = actionContext.getString("value");
if(value != null){
text.setText(value);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text
/**
* Enables or disables showing of the caption line. See also {@link #setMessage(String)}.
*
* @param show <code>true</code> if the status line is visible
* @since 3.2
*/
public void setStatusLineVisible(boolean show) {
if (!isActive() || show == (fMessageText != null && !fMessageText.isDisposed()))
return; // nothing to do
if (show) {
createMessageText();
} else {
fMessageText.dispose();
fMessageText= null;
}
fProposalShell.layout();
}
代码示例来源:origin: org.apache.directory.studio/ldapbrowser.common
/**
* Delete the Rdn line on the given index.
*
* @param rdnComposite the Rdn composite
* @param index the index
*/
private void deleteRdnLine( Composite rdnComposite, int index )
{
RdnLine rdnLine = rdnLineList.remove( index );
if ( rdnLine != null )
{
rdnLine.rdnTypeCombo.dispose();
rdnLine.rdnEqualsLabel.dispose();
rdnLine.rdnValueText.dispose();
rdnLine.rdnAddButton.dispose();
rdnLine.rdnDeleteButton.dispose();
if ( !rdnComposite.isDisposed() )
{
shell.layout( true, true );
}
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
trayControl = null;
tray = null;
leftSeparator.dispose();
leftSeparator = null;
rightSeparator.dispose();
rightSeparator = null;
sash.dispose();
代码示例来源:origin: org.eclipse/org.eclipse.jdt.debug.ui
/**
* Disposes the source viewer and all associated widgetry.
*/
protected void disposeSourceViewer() {
if(fActivation != null) {
fService.deactivateHandler(fActivation);
}
if (fSourceViewer != null) {
fSourceViewer.getDocument().removeDocumentListener(fDocumentListener);
fSourceViewer.getTextWidget().dispose();
fSourceViewer.dispose();
fSourceViewer= null;
}
if (fEvaluateLabel != null) {
fEvaluateLabel.dispose();
fEvaluateLabel= null;
}
fDocumentListener= null;
fCompletionProcessor= null;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.cheatsheets
public void dispose() {
if (checkDoneLabel != null)
checkDoneLabel.dispose();
if (bodyText != null)
bodyText.dispose();
if (buttonComposite != null)
buttonComposite.dispose();
if (completionComposite != null)
completionComposite.dispose();
if (bodyComp != null)
bodyComp.dispose();
if (bodyWrapperComposite != null)
bodyWrapperComposite.dispose();
if (mainItemComposite != null)
mainItemComposite.dispose();
if (titleComposite != null)
titleComposite.dispose();
if (regularFont != null)
regularFont.dispose();
ArrayList<AbstractItemExtensionElement[]> itemExts = item.getItemExtensions();
if (itemExts != null) {
for (int g = 0; g < itemExts.size(); g++) {
AbstractItemExtensionElement[] eea = itemExts.get(g);
for (int x = 0; x < eea.length; x++) {
eea[x].dispose();
}
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
trayControl = null;
tray = null;
leftSeparator.dispose();
leftSeparator = null;
rightSeparator.dispose();
rightSeparator = null;
sash.dispose();
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
trayControl = null;
tray = null;
leftSeparator.dispose();
leftSeparator = null;
rightSeparator.dispose();
rightSeparator = null;
sash.dispose();
内容来源于网络,如有侵权,请联系作者删除!