本文整理汇总了Java中org.eclipse.ui.forms.IFormPart类的典型用法代码示例。如果您正苦于以下问题:Java IFormPart类的具体用法?Java IFormPart怎么用?Java IFormPart使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IFormPart类属于org.eclipse.ui.forms包,在下文中一共展示了IFormPart类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: selectionChanged
import org.eclipse.ui.forms.IFormPart; //导入依赖的package包/类
/**
* @see org.eclipse.ui.forms.IPartSelectionListener#selectionChanged(org.eclipse.ui.forms.IFormPart, org.eclipse.jface.viewers.ISelection)
*/
public void selectionChanged(IFormPart part, ISelection newSelection) {
// Pre-condition
assert (newSelection instanceof NavigableSelection);
// Retreieves the node that is provided by the selection.
/*if( part != this )*/ {
selection = (NavigableSelection) newSelection;
Object object = selection.getFirstElement();
Setting setting = (object instanceof Setting) ? (Setting) object : null;
String text = setting.getProperty(Setting.TEXT);
// Checks that the setting has a text property.
if (text == null) {
Plugin.log(setting.getIdentifier() + ": missing TEXT property.");
text = new String(setting.getIdentifier());
}
// Updates the form controls.
this.selectNote(setting);
this.selectEditor(setting);
this.section.setText(text);
this.section.layout(true, true);
}
}
开发者ID:anb0s,项目名称:eclox,代码行数:28,代码来源:DetailsPage.java
示例2: setInput
import org.eclipse.ui.forms.IFormPart; //导入依赖的package包/类
@Override
public boolean setInput(Object input) {
ColumnLayout layout = new ColumnLayout();
layout.topMargin = 0;
layout.bottomMargin = 0;
layout.verticalSpacing = 0;
layout.maxNumColumns = 4;
body.setLayout(layout);
if (!(input instanceof EObject)) {
return false;
}
FormToolkit toolkit = getToolkit();
EObject object = (EObject) input;
List<IFormPart> formParts = EMFDetailFormPart.getFormParts(toolkit, object, true, selectionProvider);
for (IFormPart formPart : formParts) {
addPart(formPart);
}
boolean result = super.setInput(input);
ScrolledForm form = getForm();
form.reflow(true);
form.setOrigin(0, 0);
checkParts(layout, formParts, input);
return result;
}
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:25,代码来源:EMFDetailSheet.java
示例3: checkParts
import org.eclipse.ui.forms.IFormPart; //导入依赖的package包/类
private void checkParts(ColumnLayout layout, List<IFormPart> formParts, Object input) {
for (IFormPart part : formParts) {
Composite composite = null;
if (part instanceof EMFDetailFormPart) {
EMFDetailFormPart emfDetailFormPart = (EMFDetailFormPart) part;
composite = emfDetailFormPart.getComposite();
}
if (part instanceof EMFTitleFormPart) {
EMFTitleFormPart emfTitleFormPart = (EMFTitleFormPart) part;
composite = emfTitleFormPart.getComposite();
}
if (composite != null) {
checkControl(part, layout, composite, input);
}
}
}
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:17,代码来源:EMFDetailSheet.java
示例4: selectionChanged
import org.eclipse.ui.forms.IFormPart; //导入依赖的package包/类
public void selectionChanged(IFormPart part, ISelection selection) {
IStructuredSelection sel = (IStructuredSelection) selection;
module = (IModule) sel.getFirstElement();
refreshUI();
editorPage.refresh(RefreshArea.DETAIL);
}
开发者ID:eclipse,项目名称:cft,代码行数:8,代码来源:ApplicationDetailsPart.java
示例5: getSections
import org.eclipse.ui.forms.IFormPart; //导入依赖的package包/类
/**
* Page에 추가된 섹션들 반환
*
* @return IFormPart[]
*/
public IFormPart[] getSections() {
if (managedForm != null) {
return managedForm.getParts();
}
return null;
}
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:13,代码来源:OverviewPage.java
示例6: selectionChanged
import org.eclipse.ui.forms.IFormPart; //导入依赖的package包/类
@Override
public void selectionChanged(IFormPart part, ISelection selection) {
IStructuredSelection ssel = (IStructuredSelection) selection;
if (ssel.size() == 1) {
input = (ThemeColor) ssel.getFirstElement();
} else
input = null;
update();
}
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:10,代码来源:ThemeColorDetailsPage.java
示例7: doubleClick
import org.eclipse.ui.forms.IFormPart; //导入依赖的package包/类
/**
* @see org.eclipse.jface.viewers.IDoubleClickListener#doubleClick(org.eclipse.jface.viewers.DoubleClickEvent)
*/
public void doubleClick(DoubleClickEvent event) {
IManagedForm managedForm = getManagedForm();
// Searchs for the details part in the managed form and set the focus on it.
IFormPart parts[] = managedForm.getParts();
for (int i = 0; i < parts.length; ++i) {
IFormPart currentPart = parts[i];
if (currentPart instanceof DetailsPart) {
currentPart.setFocus();
break;
}
}
}
开发者ID:anb0s,项目名称:eclox,代码行数:17,代码来源:MasterPart.java
示例8: selectionChanged
import org.eclipse.ui.forms.IFormPart; //导入依赖的package包/类
/**
* @see org.eclipse.ui.forms.IPartSelectionListener#selectionChanged(org.eclipse.ui.forms.IFormPart, org.eclipse.jface.viewers.ISelection)
*/
public void selectionChanged(IFormPart part, ISelection selection) {
assert selection instanceof NavigableSelection;
currentSelection = (NavigableSelection) selection;
// Activates the default filter.
activateFilter(defaultFilter);
revealObject(currentSelection.getFirstElement());
// Updates the navigation actions.
goBack.selectionChanged(selection);
goForward.selectionChanged(selection);
}
开发者ID:anb0s,项目名称:eclox,代码行数:17,代码来源:MasterPart.java
示例9: selectionChanged
import org.eclipse.ui.forms.IFormPart; //导入依赖的package包/类
@Override
public void selectionChanged(IFormPart part, ISelection selection) {
automationBlock.setShowingPage(this);
IStructuredSelection ss = (IStructuredSelection) selection;
if(!ss.isEmpty()) {
TreeNode node = (TreeNode) ss.getFirstElement();
setTreeModelFromSelection(node);
setWidgetValues();
addRemoveValidatorMessages();
}
}
开发者ID:AlexWengh,项目名称:HMM,代码行数:12,代码来源:AbstractPage.java
示例10: getFormParts
import org.eclipse.ui.forms.IFormPart; //导入依赖的package包/类
public static List<IFormPart> getFormParts(FormToolkit toolkit, EObject object, boolean showTitle, ISelectionProvider selectionProvider) {
IItemPropertySource source = null;
if (object instanceof MultiEObject) {
source = ((MultiEObject)object).getSource();
} else {
source = EMFUtils.adapt(object, IItemPropertySource.class);
}
List<IFormPart> formParts = new ArrayList<IFormPart>();
if (source != null) {
List<IItemPropertyDescriptor> pds = new ArrayList<IItemPropertyDescriptor>();
for (PropertyDescriptorContributor c : PROPERTY_DESCRIPTOR_CONTRIBUTOR) {
pds.addAll(c.getPropertyDescriptors(object));
}
pds.addAll(source.getPropertyDescriptors(object));
Map<String, List<IItemPropertyDescriptor>> map = EMFDetailUtils.groupByCategory(object, pds);
PropertyDescriptorSorter sorter = getPropertyDescriptorSorter(toolkit, object);
if (sorter != null) {
sorter.sort(object, (LinkedHashMap<String, List<IItemPropertyDescriptor>>) map);
}
for (List<IItemPropertyDescriptor> descriptors : map.values()) {
if (!EMFDetailUtils.isCategoryEmpty(object, descriptors))
formParts.add(new EMFDetailFormPart(toolkit, descriptors, showTitle, selectionProvider));
showTitle = false;
}
if (showTitle) {
formParts.add(new EMFTitleFormPart());
}
}
return formParts;
}
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:32,代码来源:EMFDetailFormPart.java
示例11: checkControl
import org.eclipse.ui.forms.IFormPart; //导入依赖的package包/类
private void checkControl(IFormPart emfDetailFormPart, Layout layout, Control control, Object input) {
Object layoutData = control.getLayoutData();
if (layoutData != null) {
String mismatch = null;
if ((layout instanceof ColumnLayout) && !(layoutData instanceof ColumnLayoutData)) {
mismatch = "ColumnLayout is incompatible with " + layoutData;
}
if ((layout instanceof GridLayout) && !(layoutData instanceof GridData)) {
mismatch = "GridLayout is incompatible with " + layoutData;
}
if ((layout instanceof TableWrapLayout) && !(layoutData instanceof TableWrapData)) {
mismatch = "TableWrapLayout is incompatible with " + layoutData;
}
if (mismatch != null) {
StringBuilder message = new StringBuilder(mismatch);
message.append('\n');
message.append("clearing invalid layout data on control " + control + " in form part: " + emfDetailFormPart);
message.append('\n');
message.append("the input was: " + input);
LogUtil.error(message);
control.setLayoutData(null);
}
}
if (control instanceof Composite) {
Composite composite = (Composite) control;
Control[] children = composite.getChildren();
for (Control child : children) {
checkControl(emfDetailFormPart, composite.getLayout(), child, input);
}
}
}
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:32,代码来源:EMFDetailSheet.java
示例12: selectionChanged
import org.eclipse.ui.forms.IFormPart; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void selectionChanged(IFormPart part, ISelection selection) {
IStructuredSelection ssel = (IStructuredSelection) selection;
if (ssel.size() == 1) {
input = (T) ssel.getFirstElement();
section.setText(input.getClass().getSimpleName() + " Page");
} else
input = null;
update();
}
开发者ID:mulesoft,项目名称:mule-tooling-incubator,代码行数:11,代码来源:GenericDetailsPage.java
示例13: selectionChanged
import org.eclipse.ui.forms.IFormPart; //导入依赖的package包/类
@Override
public void selectionChanged(IFormPart part, ISelection selection) {
refresh();
}
开发者ID:mulesoft,项目名称:mule-tooling-incubator,代码行数:5,代码来源:AbstractBaseEditorDetailsPage.java
注:本文中的org.eclipse.ui.forms.IFormPart类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论