本文整理了Java中org.eclipse.swt.widgets.Label.getParent()
方法的一些代码示例,展示了Label.getParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.getParent()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Label
类名称:Label
方法名:getParent
暂无
代码示例来源:origin: BiglySoftware/BiglyBT
public void setCurrentInfo(String currentInfo) {
currentInfo = currentInfo.replaceAll( "\n", "\n\t" );
this.currentInfo.setText("\t" + currentInfo);
this.currentInfo.getParent().layout();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.intro
private void updateDescription(String text) {
if (text == null)
text = ""; //$NON-NLS-1$
descriptionLabel.setText(text);
descriptionLabel.getParent().layout();
}
};
代码示例来源:origin: org.eclipse.egit/ui
/**
* Updates the count of bundles that will be imported
*/
private void updateCount() {
counterLabel.setText(NLS.bind(UIText.GitScmUrlImportWizardPage_counter,
Integer.valueOf(descriptions.length)));
counterLabel.getParent().layout();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
@Override
public void modifyText(ModifyEvent e) {
if (okButton.isEnabled()) {
return;
}
errorMessageLabel.setText(IInternalDebugCoreConstants.EMPTY_STRING);
errorMessageLabel.getParent().update();
okButton.setEnabled(true);
}
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
private void updateCount() {
fCounterLabel.setText(NLS.bind(PDEUIMessages.ImportWizard_expressPage_total,
Integer.toString(fImportListViewer.getTable().getItemCount())));
fCounterLabel.getParent().layout();
}
代码示例来源:origin: infinitest/infinitest
@Override
public void addSelectionListener(SelectionListener listener) {
label.addMouseListener(new MouseToSelectionAdapter(listener));
label.getParent().pack();
label.getParent().layout();
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
private void showHideDelayAmountWidgets() {
final boolean visible = (action == GroupElementPostLaunchAction.DELAY || action == GroupElementPostLaunchAction.OUTPUT_REGEXP);
fActionParamLabel.setVisible(visible);
fActionParamWidget.setVisible(visible);
if (action == GroupElementPostLaunchAction.DELAY) {
fActionParamLabel.setText(DebugUIMessages.GroupLaunchConfigurationSelectionDialog_9);
} else if (action == GroupElementPostLaunchAction.OUTPUT_REGEXP) {
fActionParamLabel.setText(DebugUIMessages.GroupLaunchConfigurationSelectionDialog_regexp);
}
fActionParamLabel.getParent().layout();
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
private void updateCount() {
if (fCountTotal <= 0) {
// Since we filter the list of available plug-ins the total may differ from the model count
fCountTotal = fAvailableListViewer.getTable().getItemCount();
}
fCountLabel.setText(NLS.bind(PDEUIMessages.ImportWizard_DetailedPage_count, (new String[] {Integer.toString(fImportListViewer.getTable().getItemCount()), Integer.toString(fCountTotal)})));
fCountLabel.getParent().layout();
}
代码示例来源:origin: org.apache.uima/uimaj-ep-configurator
/**
* Sets the error message.
*
* @param msg the new error message
*/
protected void setErrorMessage(String msg) {
errorMessageUI.setText(msg);
Composite shell = errorMessageUI.getParent();
while (!(shell instanceof Shell))
shell = shell.getParent();
shell.setSize(shell.computeSize(-1, -1));
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
private void updateCount() {
fCountLabel.setText(NLS.bind(PDEUIMessages.ImportWizard_DetailedPage_count,
Integer.toString(fSelectedViewer.getTable().getItemCount()), Integer.toString(
fAvailableViewer.getTable().getItemCount() + fSelectedViewer.getTable().getItemCount())));
fCountLabel.getParent().layout();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.cheatsheets
void setSkipped() {
isSkipped = true;
checkDoneLabel.setImage(getSkipImage());
if(initialized) {
checkDoneLabel.getParent().layout();
}
}
/*package*/
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
private void updateCount() {
fCountLabel.setText(NLS.bind(PDEUIMessages.ImportWizard_DetailedPage_count,
Integer.toString(fSelectedListViewer.getTable().getItemCount()),
Integer.toString(fAvailableListViewer.getTable().getItemCount()
+ fSelectedListViewer.getTable().getItemCount())
));
fCountLabel.getParent().layout();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.cheatsheets
public void setComplete() {
completed = true;
checkDoneLabel.setImage(getCompleteImage());
if(initialized) {
checkDoneLabel.getParent().layout();
}
}
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void handleEvent(Event event) {
if (event.type == SWT.MouseDown) {
down = true;
} else if (event.type == SWT.MouseUp && down) {
Widget widget = (event.widget instanceof Label)
? ((Label) event.widget).getParent() : event.widget;
selectedDeviceTemplate = (DeviceTemplate) widget.getData("obj");
if (selectedDeviceTemplate == null) {
Debug.out("selectedDeviceTemplate is null!");
}
skinnedDialog.close();
down = false;
}
}
};
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
/**
* Sets the tool tip to the given text.
*
* @param text the tool tip
*/
public void setToolTip(String text) {
if (isTextVisible()) {
fElementText.getParent().setToolTipText(text);
fElementText.setToolTipText(text);
fElementImage.setToolTipText(text);
} else {
fElementText.getParent().setToolTipText(null);
fElementText.setToolTipText(null);
fElementImage.setToolTipText(text);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
/**
* Sets the tool tip to the given text.
*
* @param text the tool tip
*/
public void setToolTip(String text) {
if (isTextVisible()) {
fElementText.getParent().setToolTipText(text);
fElementText.setToolTipText(text);
fElementImage.setToolTipText(text);
} else {
fElementText.getParent().setToolTipText(null);
fElementText.setToolTipText(null);
fElementImage.setToolTipText(text);
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
/**
* Sets the tool tip to the given text.
*
* @param text the tool tip
*/
public void setToolTip(String text) {
if (isTextVisible()) {
fElementText.getParent().setToolTipText(text);
fElementText.setToolTipText(text);
fElementImage.setToolTipText(text);
} else {
fElementText.getParent().setToolTipText(null);
fElementText.setToolTipText(null);
fElementImage.setToolTipText(text);
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
private void updatePreview() {
if( lblPreview != null ) {
Display display = getDisplay();
Font font = new Font( display, fontData );
lblPreview.setFont( font );
Color color = new Color( display, rgb );
lblPreview.setForeground( color );
lblColor.setBackground( color );
lblPreview.getParent().layout( true );
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
void renderInitialization( Label label ) throws IOException {
RemoteObject remoteObject = createRemoteObject( label, TYPE );
remoteObject.setHandler( new LabelOperationHandler( label ) );
remoteObject.set( "parent", getId( label.getParent() ) );
remoteObject.set( "style", createJsonArray( getStyles( label, ALLOWED_STYLES ) ) );
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
void renderInitialization( Label label ) throws IOException {
RemoteObject remoteObject = RemoteObjectFactory.createRemoteObject( label, TYPE );
remoteObject.setHandler( new LabelOperationHandler( label ) );
remoteObject.set( "parent", getId( label.getParent() ) );
remoteObject.set( "style", createJsonArray( getStyles( label, ALLOWED_STYLES ) ) );
renderProperty( label, PROP_MARKUP_ENABLED, isMarkupEnabledFor( label ), false );
}
内容来源于网络,如有侵权,请联系作者删除!