当前位置: 首页>>代码示例>>Java>>正文


Java Form类代码示例

本文整理汇总了Java中org.eclipse.ui.forms.widgets.Form的典型用法代码示例。如果您正苦于以下问题:Java Form类的具体用法?Java Form怎么用?Java Form使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Form类属于org.eclipse.ui.forms.widgets包,在下文中一共展示了Form类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createHeaderContents

import org.eclipse.ui.forms.widgets.Form; //导入依赖的package包/类
@Override
protected void createHeaderContents(IManagedForm headerForm) {
    super.createHeaderContents(headerForm);

    FormToolkit toolkit = headerForm.getToolkit();
    ScrolledForm scrolledForm = headerForm.getForm();
    Form form = scrolledForm.getForm();
    toolkit.decorateFormHeading(form);

    updateTitle();
    makeActions();

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

}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:18,代码来源:DataModelFormEditor.java

示例2: modelDestroyed

import org.eclipse.ui.forms.widgets.Form; //导入依赖的package包/类
protected void modelDestroyed(GenericDataModelEvent event) {
    if (getContainer().isDisposed()) {
        return;
    }

    updateTitle();
    editorDirtyStateChanged();

    String modelDestroyedMessage = getModelDestroyedMessage();
    if (modelDestroyedMessage != null) {
        IManagedForm headerForm = getHeaderForm();
        ScrolledForm scrolledForm = headerForm.getForm();
        Form form = scrolledForm.getForm();
        form.setMessage(modelDestroyedMessage, IMessageProvider.ERROR);
    }

    for (DataModelFormPage<M> page : _Pages) {
        page.modelDestroyed(event);
    }

}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:22,代码来源:DataModelFormEditor.java

示例3: updateTitle

import org.eclipse.ui.forms.widgets.Form; //导入依赖的package包/类
protected void updateTitle() {

        M model = getModel();
        if (model == null) {
            return;
        }

        setPartName(getPartName(model));
        setTitleToolTip(getTitleToolTip(model));
        setTitleImage(getTitleImage(model));

        IManagedForm headerForm = getHeaderForm();

        if (headerForm != null) {
            ScrolledForm scrolledForm = headerForm.getForm();
            Form form = scrolledForm.getForm();
            form.setText(getFormText(model));
            form.setImage(getFormImage(model));
        }
    }
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:21,代码来源:DataModelFormEditor.java

示例4: calculateMarginWidth

import org.eclipse.ui.forms.widgets.Form; //导入依赖的package包/类
private static int calculateMarginWidth(final Control control) {
    Control c = control;
    int margin = 0;

    while (c != null && !c.isDisposed() && !(c instanceof Form)) {
        final int leftMargin = c.getBounds().x;

        margin += leftMargin;

        // assume there is an equal amount of right margin if not in a
        // section.
        if (!(c.getParent() instanceof Section)) {
            margin += leftMargin;
        }
        c = c.getParent();
    }

    return margin;
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:20,代码来源:TeamExplorerResizeListener.java

示例5: createFormContent

import org.eclipse.ui.forms.widgets.Form; //导入依赖的package包/类
/**
 * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
 */
@Override
protected void createFormContent(final IManagedForm managedForm) {
	final FormToolkit toolkit = managedForm.getToolkit();

	final ScrolledForm scrolledForm = managedForm.getForm();
	scrolledForm.setText(Messages.GeneratorEntryFormPage_formPageHeaderPrefix + getStatechartName());

	final Form form = scrolledForm.getForm();
	toolkit.decorateFormHeading(form);

	final IToolBarManager toolBarManager = form.getToolBarManager();
	toolBarManager.add(createGenerateAction());
	form.updateToolBar();

	final Composite body = scrolledForm.getBody();
	body.setLayout(new TableWrapLayout());

	createSections(toolkit, body);

	startListeningToModelChanges();
}
 
开发者ID:wendehals,项目名称:arduino_sct_tools,代码行数:25,代码来源:GeneratorEntryFormPage.java

示例6: createToolTipContentArea

import org.eclipse.ui.forms.widgets.Form; //导入依赖的package包/类
@Override
protected Composite createToolTipContentArea(Event event, Composite parent){
	FormToolkit toolkit = new FormToolkit(parent.getDisplay());
	FormColors colors = toolkit.getColors();
	
	Form form = toolkit.createForm(parent);
	GridLayout layout = new GridLayout();
	layout.numColumns = 1;
	form.getBody().setLayout(layout);
	
	FormText text = toolkit.createFormText(form.getBody(), true);
	GridData td = new GridData();
	td.heightHint = 200;
	td.widthHint = 300;
	text.setLayoutData(td);
	
	try {
		text.setText("<form>"+m_htmlString+"</form>", true, true);
	} catch (IllegalArgumentException e) {
		text.setText("<form><p>Fehlerhafter ToolTip Eingabestring</p><br /></form>", true, true);
	}
	
	return parent;
}
 
开发者ID:MEDEVIT,项目名称:ecard,代码行数:25,代码来源:HTMLToolTip.java

示例7: saveOrgUnitAttributes

import org.eclipse.ui.forms.widgets.Form; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void saveOrgUnitAttributes() {
	if (getTxtName() == null || getTxtDescription() == null) {
		return;
	}
	if (group == null) {
		return;
	}
	if (!(group.getName().equals(getTxtName().getText()) && group.getDescription().equals(
		getTxtDescription().getText()))) {
		try {
			getAdminBroker().changeOrgUnit(group.getId(), getTxtName().getText(), getTxtDescription().getText());
			((Form) getParent().getParent()).setText("Group: " + getTxtName().getText());
			orgUnitMgmtGUI.getActiveTabContent().getTableViewer().refresh();
		} catch (final ESException e) {
			EMFStoreMessageDialog.showExceptionDialog(e);
		}
	}

}
 
开发者ID:edgarmueller,项目名称:emfstore-rest,代码行数:24,代码来源:GroupComposite.java

示例8: configureFormText

import org.eclipse.ui.forms.widgets.Form; //导入依赖的package包/类
private void configureFormText(final Form form, FormText text) {
    text.addHyperlinkListener(new HyperlinkAdapter() {
        @SuppressWarnings("unchecked")
        public void linkActivated(HyperlinkEvent e) {
            String is = (String) e.getHref();
            try {
                ((FormText) e.widget).getShell().dispose();
                int index = Integer.parseInt(is);
                IMessage[] messages = form.getChildrenMessages();
                IMessage message = messages[index];
                Set<IvyNodeElement> conflicts = (Set<IvyNodeElement>) message.getData();
                if (conflicts != null) {
                    viewer.setSelection(new StructuredSelection(new ArrayList<>(conflicts)));
                }
            } catch (NumberFormatException ex) {
            }
        }
    });
    text.setImage("error", getImage(IMessageProvider.ERROR));
    text.setImage("warning", getImage(IMessageProvider.WARNING));
    text.setImage("info", getImage(IMessageProvider.INFORMATION));
}
 
开发者ID:apache,项目名称:ant-ivyde,代码行数:23,代码来源:ResolveVisualizerForm.java

示例9: createFigure

import org.eclipse.ui.forms.widgets.Form; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
 *  createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
 * 
 */
public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
	ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
	Form form = scrolledForm.getForm();
	view = form.getBody();
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	view.setLayout(layout);
	createControls(widgetFactory, view);
	return scrolledForm;
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:18,代码来源:PoissonPropertiesEditionPartForm.java

示例10: createFigure

import org.eclipse.ui.forms.widgets.Form; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
 *      createFigure(org.eclipse.swt.widgets.Composite,
 *      org.eclipse.ui.forms.widgets.FormToolkit)
 * 
 */
public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
	ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
	Form form = scrolledForm.getForm();
	view = form.getBody();
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	view.setLayout(layout);
	createControls(widgetFactory, view);
	return scrolledForm;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:19,代码来源:GeneralPropertiesEditionPartForm.java


注:本文中的org.eclipse.ui.forms.widgets.Form类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。