本文整理了Java中org.eclipse.swt.widgets.ToolBar.setVisible()
方法的一些代码示例,展示了ToolBar.setVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ToolBar.setVisible()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.ToolBar
类名称:ToolBar
方法名:setVisible
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
/**
* Set whether the drop down menu is available.
*
* @param enabled true if available
*/
public void setEnabled(boolean enabled) {
fEnabled= enabled;
fToolBar.setVisible(enabled);
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
/**
* Set whether the drop down menu is available.
*
* @param enabled true if available
*/
public void setEnabled(boolean enabled) {
fEnabled= enabled;
fToolBar.setVisible(enabled);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
/**
* Set whether the drop down menu is available.
*
* @param enabled true if available
*/
public void setEnabled(boolean enabled) {
fEnabled= enabled;
fToolBar.setVisible(enabled);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
protected void updateToolbar(boolean visible) {
if (clearButtonControl != null) {
clearButtonControl.setVisible(visible);
}
if (filterToolBar != null) {
filterToolBar.getControl().setVisible(visible);
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* Implements <code>IProgressMonitor.done</code>.
* @see IProgressMonitor#done()
*/
public void done() {
fLabel.setText("");//$NON-NLS-1$
fSubTaskName = ""; //$NON-NLS-1$
fProgressIndicator.sendRemainingWork();
fProgressIndicator.done();
if (fToolBar != null && !fToolBar.isDisposed())
fToolBar.setVisible(false);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
@Override
public void done() {
fLabel.setText("");//$NON-NLS-1$
fSubTaskName = ""; //$NON-NLS-1$
fProgressIndicator.sendRemainingWork();
fProgressIndicator.done();
if (fToolBar != null && !fToolBar.isDisposed())
fToolBar.setVisible(false);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* Makes the Cancel button visible.
*
*/
protected void showButton() {
if (fToolBar != null && !fToolBar.isDisposed()) {
fToolBar.setVisible(true);
fToolBar.setEnabled(true);
fToolBar.setCursor(fStopButtonCursor);
fCancelButtonIsVisible = true;
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* Makes the Cancel button visible.
*
*/
protected void showButton() {
if (fToolBar != null && !fToolBar.isDisposed()) {
fToolBar.setVisible(true);
fToolBar.setEnabled(true);
fToolBar.setCursor(fStopButtonCursor);
fCancelButtonIsVisible = true;
}
}
代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt
@Override
public void disposeWidget(MUIElement element) {
ToolBar tb = (ToolBar) element.getWidget();
tb.setVisible(false);
unbindWidget(element);
tb.setData(AbstractPartRenderer.OWNING_ME, element);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
@Override
public void done() {
if (!fLabel.isDisposed()) {
fLabel.setText("");//$NON-NLS-1$
}
fSubTaskName = ""; //$NON-NLS-1$
if (!fProgressIndicator.isDisposed()) {
fProgressIndicator.sendRemainingWork();
fProgressIndicator.done();
}
if (fToolBar != null && !fToolBar.isDisposed())
fToolBar.setVisible(false);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* Makes the Cancel button visible.
*
*/
protected void showButton() {
if (fToolBar != null && !fToolBar.isDisposed()) {
fToolBar.setVisible(true);
fToolBar.setEnabled(true);
fToolBar.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_ARROW));
fCancelButtonIsVisible = true;
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
@Override
public void beginTask(String name, int totalWork) {
fTaskName = name;
fSubTaskName = ""; //$NON-NLS-1$
updateLabel();
if (totalWork == IProgressMonitor.UNKNOWN || totalWork == 0) {
fProgressIndicator.beginAnimatedTask();
} else {
fProgressIndicator.beginTask(totalWork);
}
if (fToolBar != null && !fToolBar.isDisposed()) {
fToolBar.setVisible(true);
fToolBar.setFocus();
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* Implements <code>IProgressMonitor.beginTask</code>.
* @see IProgressMonitor#beginTask(java.lang.String, int)
*/
public void beginTask(String name, int totalWork) {
fTaskName = name;
fSubTaskName = ""; //$NON-NLS-1$
updateLabel();
if (totalWork == IProgressMonitor.UNKNOWN || totalWork == 0) {
fProgressIndicator.beginAnimatedTask();
} else {
fProgressIndicator.beginTask(totalWork);
}
if (fToolBar != null && !fToolBar.isDisposed()) {
fToolBar.setVisible(true);
fToolBar.setFocus();
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* Hides the Cancel button and ProgressIndicator.
*
*/
protected void hideProgress() {
if (fProgressIsVisible && !isDisposed()) {
fProgressIsVisible = false;
fCancelEnabled = false;
fCancelButtonIsVisible = false;
if (fToolBar != null && !fToolBar.isDisposed()) {
fToolBar.setVisible(false);
}
if (fProgressBarComposite != null
&& !fProgressBarComposite.isDisposed()) {
fProgressBarComposite.setVisible(false);
}
layout();
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* Hides the Cancel button and ProgressIndicator.
*
*/
protected void hideProgress() {
if (fProgressIsVisible && !isDisposed()) {
fProgressIsVisible = false;
fCancelEnabled = false;
fCancelButtonIsVisible = false;
if (fToolBar != null && !fToolBar.isDisposed()) {
fToolBar.setVisible(false);
}
if (fProgressBarComposite != null
&& !fProgressBarComposite.isDisposed()) {
fProgressBarComposite.setVisible(false);
}
layout();
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
@Override
public void beginTask(String name, int totalWork) {
fTaskName = name;
fSubTaskName = ""; //$NON-NLS-1$
queueUpdateLabel();
if (!fProgressIndicator.isDisposed()) {
if (totalWork == IProgressMonitor.UNKNOWN || totalWork == 0) {
fProgressIndicator.beginAnimatedTask();
} else {
fProgressIndicator.beginTask(totalWork);
}
}
if (fToolBar != null && !fToolBar.isDisposed()) {
fToolBar.setVisible(true);
fToolBar.setFocus();
}
}
代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt
@Override
public void postProcess(MUIElement element) {
ToolBar tb = (ToolBar) element.getWidget();
if (((EObject) element).eContainer() instanceof MPart) {
MPart part = (MPart) ((EObject) element).eContainer();
MMenu viewMenu = getViewMenu(part);
// View menu (if any)
if (viewMenu != null) {
addMenuButton(part, tb, viewMenu);
}
}
tb.pack();
tb.setVisible(true);
super.postProcess(element);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
private void initButton(Image im, final String tt) {
toolButton.setImage(im);
toolButton.setToolTipText(tt);
toolbar.setVisible(true);
toolbar.getParent().requestLayout(); // must layout
if (currentAccessibleListener != null)
toolbar.getAccessible().removeAccessibleListener(currentAccessibleListener);
currentAccessibleListener = new AccessibleAdapter() {
@Override
public void getName(AccessibleEvent e) {
e.result = tt;
}
};
toolbar.getAccessible().addAccessibleListener(currentAccessibleListener);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.compare
@Override
public void setInput(Object input) {
super.setInput(input);
if (getViewer() == null || !Utilities.okToUse(getViewer().getControl()))
return;
ViewerDescriptor[] vd = CompareUIPlugin.getDefault()
.findContentViewerDescriptor(getViewer(), getInput(), getCompareConfiguration());
toolBar.setVisible(vd != null && vd.length > 1);
CompareConfiguration cc = getCompareConfiguration();
Boolean isOptimized = (Boolean) cc.getProperty(OPTIMIZED_ALGORITHM_USED);
boolean optimizedVisible = isOptimized != null && isOptimized.booleanValue();
labelOptimized.setVisible(optimizedVisible);
recomputeLink.setVisible(optimizedVisible);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.compare
@Override
public void setInput(Object input) {
super.setInput(input);
if (getViewer() == null || !Utilities.okToUse(getViewer().getControl()))
return;
ViewerDescriptor[] vd = null;
if (getInput() instanceof ICompareInput) {
vd = CompareUIPlugin.getDefault().findStructureViewerDescriptor(
getViewer(), (ICompareInput) getInput(),
getCompareConfiguration());
}
toolBar.setVisible(vd != null && vd.length > 1);
}
内容来源于网络,如有侵权,请联系作者删除!