Java Code Examples for org.eclipse.swt.widgets.ToolBar#setVisible()

The following examples show how to use org.eclipse.swt.widgets.ToolBar#setVisible() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BonitaPreferenceDialog.java    From bonita-studio with GNU General Public License v2.0 4 votes vote down vote up
protected void createDeploymentCategoryLine(final Composite menuComposite) {
    final Composite deploymentRow = createRow(menuComposite, null, Messages.BonitaPreferenceDialog_Deployment, 3);

    final ToolItem tltmUserxpSettings = createTool(deploymentRow, null,
            Pics.getImage(PicsConstants.preferenceLogin), Pics.getImage(PicsConstants.preferenceLogindisabled),
            SERVER_SETTINGS_PAGE_ID);
    final ToolItem tltmDBConnectors = createTool(deploymentRow, null,
            Pics.getImage(PicsConstants.preferenceAdvanced),
            Pics.getImage(PicsConstants.preferenceAdvanceddisabled), DB_CONNECTORS_PAGE_ID);

    if (PreferenceUtil.findNodeMatching(REMOTE_ENGINE_PAGE_ID) != null) {
        final ToolItem tltmRemoteEngine = createTool(deploymentRow, null,
                Pics.getImage(PicsConstants.preferenceRemote),
                Pics.getImage(PicsConstants.preferenceRemotedisabled), REMOTE_ENGINE_PAGE_ID);
        itemPerPreferenceNode.put(REMOTE_ENGINE_PAGE_ID, tltmRemoteEngine);
    } else {
        final ToolBar emptyToolbar = new ToolBar(deploymentRow, SWT.FLAT | SWT.TRANSPARENT);
        final GridData gd_toolBar_8 = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);
        gd_toolBar_8.verticalIndent = 5;
        emptyToolbar.setLayoutData(gd_toolBar_8);
        emptyToolbar.setVisible(false);
    }

    final Label lblUserxpSettings = createItemLabel(deploymentRow, null,
            Messages.BonitaPreferenceDialog_UserXP_Settings);

    itemPerPreferenceNode.put(SERVER_SETTINGS_PAGE_ID, tltmUserxpSettings);
    labelPerPreferenceNode.put(SERVER_SETTINGS_PAGE_ID, lblUserxpSettings);

    final Label lblDbConnectors = createItemLabel(deploymentRow, null,
            Messages.BonitaPreferenceDialog_DBConnectors);
    itemPerPreferenceNode.put(DB_CONNECTORS_PAGE_ID, tltmDBConnectors);
    labelPerPreferenceNode.put(DB_CONNECTORS_PAGE_ID, lblDbConnectors);

    if (PreferenceUtil.findNodeMatching(REMOTE_ENGINE_PAGE_ID) != null) {
        final Label lblRemoteEngine = createItemLabel(deploymentRow, null,
                Messages.BonitaPreferenceDialog_Remote_Engine);
        labelPerPreferenceNode.put(REMOTE_ENGINE_PAGE_ID, lblRemoteEngine);
    } else {
        new Label(deploymentRow, SWT.WRAP | SWT.CENTER);
    }
}
 
Example 2
Source File: ArticleDefaultSignatureComposite.java    From elexis-3-core with Eclipse Public License 1.0 4 votes vote down vote up
public void setToolbarVisible(boolean value){
	ToolBar toolbar = toolbarManager.getControl();
	if (toolbar != null && !toolbar.isDisposed()) {
		toolbar.setVisible(value);
	}
}