當前位置: 首頁>>代碼示例>>Java>>正文


Java ScrolledForm.setImage方法代碼示例

本文整理匯總了Java中org.eclipse.ui.forms.widgets.ScrolledForm.setImage方法的典型用法代碼示例。如果您正苦於以下問題:Java ScrolledForm.setImage方法的具體用法?Java ScrolledForm.setImage怎麽用?Java ScrolledForm.setImage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.ui.forms.widgets.ScrolledForm的用法示例。


在下文中一共展示了ScrolledForm.setImage方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createFormContent

import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected void createFormContent(IManagedForm managedForm) {
	final ScrolledForm form = managedForm.getForm();
	FormToolkit toolkit = managedForm.getToolkit();
	toolkit.decorateFormHeading(form.getForm());

	IToolBarManager manager = form.getToolBarManager();
	if (contributeToToolbar(manager)) {
		form.updateToolBar();
	}
	String titleText = getFormTitleText();
	if (titleText != null) {
		form.setText(titleText);
	}
	Image titleImage = getFormTitleImage();
	if (titleImage != null) {
		form.setImage(titleImage);
	}
	toolkit.decorateFormHeading(form.getForm());
	createUI(managedForm);
}
 
開發者ID:angelozerr,項目名稱:typescript.java,代碼行數:22,代碼來源:AbstractFormPage.java

示例2: createFormContent

import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected void createFormContent(IManagedForm mform) {
	String title = M.Diff;
	if (this.title != null)
		title += ": " + this.title;
	ScrolledForm form = UI.formHeader(mform, title);
	if (logo != null)
		form.setImage(logo);
	FormToolkit toolkit = mform.getToolkit();
	Composite body = form.getBody();
	UI.gridLayout(body, 1, 0, 0);
	toolkit.paintBordersFor(body);
	UI.gridData(body, true, true);
	if (editMode)
		editor = DiffEditor.forEditing(body, toolkit);
	else
		editor = DiffEditor.forViewing(body, toolkit);
	editor.initialize(root, labelProvider, dependencyResolver, direction);
	UI.gridData(editor, true, true);
	form.reflow(true);
}
 
開發者ID:GreenDelta,項目名稱:olca-app,代碼行數:22,代碼來源:DiffEditorDialog.java

示例3: createFormContent

import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected void createFormContent(IManagedForm managedForm) {
	ScrolledForm form = managedForm.getForm();
	form.setText(getTitle());
	form.setImage(MuleImages.GLOBALS_TITLE_IMAGE);
	
	
	//configure the layout of the form
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	layout.makeColumnsEqualWidth = true;
	
	GridData configData = new GridData(GridData.FILL_BOTH);
	configData.horizontalSpan = 2;
	
	//to be fixed
	form.getBody().setLayout(layout);
	
	projectsPart = new DomainProjectsSectionPart(form.getBody(), managedForm.getToolkit(), model.getModules(), model.getProject());
	projectsPart.getSection().setLayoutData(new GridData(GridData.FILL_BOTH));
}
 
開發者ID:mulesoft,項目名稱:mule-tooling-incubator,代碼行數:22,代碼來源:GradleDomainSettingsEditor.java

示例4: formHeader

import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
public static ScrolledForm formHeader(IManagedForm managedForm, String title, Image image) {
	ScrolledForm form = managedForm.getForm();
	FormToolkit toolkit = managedForm.getToolkit();
	toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(
			HyperlinkSettings.UNDERLINE_HOVER);
	if (title != null)
		form.setText(title);
	if (image != null)
		form.setImage(image);
	toolkit.decorateFormHeading(form.getForm());
	return form;
}
 
開發者ID:GreenDelta,項目名稱:olca-app,代碼行數:13,代碼來源:UI.java

示例5: createFormContent

import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected void createFormContent(IManagedForm managedForm) {
	FormToolkit toolkit = managedForm.getToolkit();
	ScrolledForm form = managedForm.getForm();
	form.setText(getTitle());
	form.setImage(MuleImages.GLOBALS_TITLE_IMAGE);
	
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	layout.makeColumnsEqualWidth = true;
	
	GridData configData = new GridData(GridData.FILL_BOTH);
	configData.horizontalSpan = 2;
	
	//to be fixed
	form.getBody().setLayout(layout);
	
	//add a tree view.
	treePart = new MuleEnvironmentKeysTreePart(form.getBody(), toolkit, configuration, this);
	configsPart = new MuleEnvironmentConfigsPart(form.getBody(), toolkit, configuration.elementsForKey(""));
	
	treePart.getSection().setLayoutData(new GridData(GridData.FILL_BOTH));
	configsPart.getSection().setLayoutData(configData);
	
	addListener(treePart);
	addListener(configsPart);
}
 
開發者ID:mulesoft,項目名稱:mule-tooling-incubator,代碼行數:28,代碼來源:MuleEnvironmentsEditor.java

示例6: createFormContent

import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected void createFormContent(IManagedForm managedForm) {
	FormToolkit toolkit = managedForm.getToolkit();
	ScrolledForm form = managedForm.getForm();
	form.setText(getTitle());
	form.setImage(MuleImages.GLOBALS_TITLE_IMAGE);
	
	//set the layout.
	TableWrapLayout layout = new TableWrapLayout();
	layout.numColumns = 1;
	layout.makeColumnsEqualWidth = true;
	form.getBody().setLayout(layout);
	
	//configure the toolbar buttons
	configureFormToolbarButtons(toolkit, form);
	
	//add the two sections.
	SectionPart toolBar = addButtons(toolkit, form);
	managedForm.addPart(toolBar);
	
	TableWrapData toolbarData = new TableWrapData(TableWrapData.FILL_GRAB);
	toolbarData.rowspan = 1;
	toolbarData.valign = TableWrapData.FILL;
	toolBar.getSection().setLayoutData(toolbarData);
	
	
	GradleDependenciesTablePart depsTable = addDependenciesTable(toolkit, form);
	managedForm.addPart(depsTable);
	TableWrapData depsTableData = new TableWrapData(TableWrapData.FILL_GRAB);
	depsTableData.rowspan = 2;
	depsTableData.valign = TableWrapData.FILL;
	depsTable.getSection().setLayoutData(depsTableData);
	
	this.table = depsTable;
	table.refreshData();
}
 
開發者ID:mulesoft,項目名稱:mule-tooling-incubator,代碼行數:37,代碼來源:MuleGradleDependenciesEditor.java

示例7: createFormContent

import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected final void createFormContent(IManagedForm managedForm) {

    makeActions();

    ScrolledForm form = managedForm.getForm();

    form.setText(getTitle());
    form.setImage(getImage());
    FormLayout bodyLayout = new FormLayout();
    bodyLayout.marginWidth = 0;
    bodyLayout.marginHeight = 0;

    Composite body = form.getBody();
    body.setLayout(bodyLayout);
    Dialog.applyDialogFont(body);

    _InfoBar = createInfoBar(body);

    setInfoText(getInfoText());

    _Client = createClient(managedForm, body);

    FormData clientFormData = new FormData();

    if (_InfoBar != null) {
        clientFormData.top = new FormAttachment(_InfoBar, 0, SWT.BOTTOM);
    }
    else {
        clientFormData.top = new FormAttachment(0, 0);
    }
    clientFormData.left = new FormAttachment(0, 0);
    clientFormData.right = new FormAttachment(100, 0);
    clientFormData.bottom = new FormAttachment(100, 0);
    _Client.setLayoutData(clientFormData);

    IToolBarManager toolBarManager = form.getToolBarManager();
    contributeToToolBar(toolBarManager);
    toolBarManager.update(true);

    if (!getModel().isDestroyed()) {
        createModelFormContent(managedForm, _Client);
        initFromModel();
    }

}
 
開發者ID:baloise,項目名稱:eZooKeeper,代碼行數:47,代碼來源:DataModelFormPage.java

示例8: createFormContent

import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
/**
 * Called during FormPage life cycle and delegates the form creation
 * to three methods {@link BasicFormPage#createBodyContent(IManagedForm)}, 
 * {@link BasicFormPage#loadData()}, {@link BasicFormPage#pageInitializationComplete()}
 */
protected void createFormContent(IManagedForm managedForm)
{
    ScrolledForm formWidget = managedForm.getForm();
    formWidget.setText(getTitle());
    if (imagePath != null)
    {
        formWidget.setImage(createRegisteredImage(imagePath));
    }

    Composite body = formWidget.getBody();

    FormToolkit toolkit = managedForm.getToolkit();
    toolkit.decorateFormHeading(formWidget.getForm());

    // head construction ---------------------
    IToolBarManager toolbarManager = formWidget.getForm().getToolBarManager();

    // run button
    toolbarManager.add(new DynamicContributionItem(new RunAction()));
    toolbarManager.add(new DynamicContributionItem(new GenerateAction()));
    // stop button
    toolbarManager.add(new DynamicContributionItem(new StopAction()));

    // refresh the tool-bar
    toolbarManager.update(true);

    /*
     * The head client is the second row of the header section,
     * below the title. There should be the same buttons as in the
     * toolbar on the first row, right corner of the header section
     * because sometimes those buttons are not visible unless
     * the user scrolls over to them.
     */
    ToolBar headClientTB = new ToolBar(formWidget.getForm().getHead(), SWT.HORIZONTAL);
    headClientTBM = new ToolBarManager(headClientTB);
    // run button
    headClientTBM.add(new DynamicContributionItem(new RunAction()));
    // validate button
    headClientTBM.add(new DynamicContributionItem(new GenerateAction()));
    // stop button
    headClientTBM.add(new DynamicContributionItem(new StopAction()));

    // refresh the head client toolbar
    headClientTBM.update(true);

    formWidget.getForm().setHeadClient(headClientTB);

    // setup body layout
    body.setLayout(getBodyLayout());

    // create the body of the page
    createBodyContent(managedForm);

    super.createFormContent(managedForm);
    try
    {
        // load data from the model
    	//TODO decouple from UI thread (causes I/O)
        loadData();
    } catch (CoreException e)
    {
        TLCUIActivator.getDefault().logError("Error loading data from the model into the form fields", e);
    }

    // check the model is-running state
    refresh();

    // finalizes the page construction
    // activates the change listeners
    pageInitializationComplete();
    TLCUIHelper.setHelp(getPartControl(), helpId);

    getManagedForm().getForm().getForm().addMessageHyperlinkListener(errorMessageHyperLinkListener);
}
 
開發者ID:tlaplus,項目名稱:tlaplus,代碼行數:80,代碼來源:BasicFormPage.java


注:本文中的org.eclipse.ui.forms.widgets.ScrolledForm.setImage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。