本文整理了Java中org.eclipse.swt.widgets.Label.isVisible()
方法的一些代码示例,展示了Label.isVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.isVisible()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Label
类名称:Label
方法名:isVisible
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* Set the message in the message label.
*
* @param messageString
* The string for the new message.
* @param force
* If force is true then always set the message text.
*/
private void setMessage(String messageString, boolean force) {
// must not set null text in a label
message = messageString == null ? "" : messageString; //$NON-NLS-1$
if (messageLabel == null || messageLabel.isDisposed()) {
return;
}
if (force || messageLabel.isVisible()) {
messageLabel.setToolTipText(message);
messageLabel.setText(shortenText(message, messageLabel));
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* Set the message in the message label.
*
* @param messageString
* The string for the new message.
* @param force
* If force is true then always set the message text.
*/
private void setMessage(String messageString, boolean force) {
// must not set null text in a label
message = messageString == null ? "" : messageString; //$NON-NLS-1$
if (messageLabel == null || messageLabel.isDisposed()) {
return;
}
if (force || messageLabel.isVisible()) {
messageLabel.setToolTipText(message);
messageLabel.setText(shortenText(message, messageLabel));
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* Set the message in the message label.
*
* @param messageString
* The string for the new message.
* @param force
* If force is true then always set the message text.
*/
private void setMessage(String messageString, boolean force) {
// must not set null text in a label
message = messageString == null ? "" : messageString; //$NON-NLS-1$
if (messageLabel == null || messageLabel.isDisposed()) {
return;
}
if (force || messageLabel.isVisible()) {
messageLabel.setToolTipText(message);
messageLabel.setText(shortenText(message, messageLabel));
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
void handleTreeViewerKeyPressed(KeyEvent event) {
// popup the description for the selected view
if (descriptionHint.isVisible() && event.keyCode == SWT.F2 && event.stateMask == 0) {
ITreeSelection selection = filteredTree.getViewer().getStructuredSelection();
// only show description if one view is selected
if (selection.size() == 1) {
Object o = selection.getFirstElement();
if (o instanceof MPartDescriptor) {
String description = ((MPartDescriptor) o).getTooltip();
description = LocalizationHelper.getLocalized(description, (MPartDescriptor) o,
context);
if (description != null && description.length() == 0)
description = WorkbenchMessages.ShowView_noDesc;
popUp(description);
}
}
}
}
代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt
@Override
protected void layout(Composite composite, boolean flushCache) {
Rectangle bounds = composite.getBounds();
if (composite.getChildren().length == 1) {
composite.getChildren()[0].setBounds(composite
.getBounds());
} else if (composite.getChildren().length == 3) {
Label label = (Label) composite.getChildren()[0];
Label separator = (Label) composite.getChildren()[1];
Control partCtrl = composite.getChildren()[2];
// if the label is not visible, give it a zero size
int labelHeight = label.isVisible() ? label
.computeSize(bounds.width, SWT.DEFAULT).y : 0;
label.setBounds(0, 0, bounds.width, labelHeight);
int separatorHeight = separator.isVisible() ? separator
.computeSize(bounds.width, SWT.DEFAULT).y : 0;
separator.setBounds(0, labelHeight, bounds.width,
separatorHeight);
partCtrl.setBounds(0, labelHeight + separatorHeight,
bounds.width, bounds.height - labelHeight
- separatorHeight);
}
}
});
内容来源于网络,如有侵权,请联系作者删除!