本文整理汇总了Java中org.eclipse.core.databinding.observable.map.IObservableMap类的典型用法代码示例。如果您正苦于以下问题:Java IObservableMap类的具体用法?Java IObservableMap怎么用?Java IObservableMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IObservableMap类属于org.eclipse.core.databinding.observable.map包,在下文中一共展示了IObservableMap类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createStandardCombo
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
public void createStandardCombo ( final Composite parent, final String attributeName, final String label, final String[] items, final IObservableMap data, final Object valueType )
{
this.toolkit.createLabel ( parent, label + ":" );
final Combo combo = new Combo ( parent, SWT.DROP_DOWN );
combo.setItems ( items );
this.toolkit.adapt ( combo );
final GridData gd = new GridData ( GridData.FILL, GridData.BEGINNING, true, true );
gd.horizontalSpan = 2;
combo.setLayoutData ( gd );
final IObservableValue value = Observables.observeMapEntry ( data, attributeName, valueType );
this.dbc.bindValue ( WidgetProperties.text ().observe ( combo ), value );
}
开发者ID:eclipse,项目名称:neoscada,代码行数:17,代码来源:ConfigurationFormToolkit.java
示例2: MediaTimeBar
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
/**
* Instantiates a new media time bar.
*
* @param parent
* the parent
* @param style
* the style
* @param mediaMap
* the media map
* @param collectionNode
* the collection node
* @param mediaFolderValue
* the media folder value
*/
public MediaTimeBar(Composite parent, int style, IObservableMap mediaMap, CollectionNode collectionNode, MediaRootNode mediaFolderValue) {
super(parent, style, mediaMap, collectionNode, mediaFolderValue);
this.parent = parent;
this.createControls(parent, (int) this.getDuration());
this.buildIntervals();
this.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
disposeResources();
}
});
}
开发者ID:synergynet,项目名称:synergyview,代码行数:30,代码来源:MediaTimeBar.java
示例3: AnnotationsMediaControl
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
/**
* Instantiates a new annotations media control.
*
* @param parent
* the parent
* @param style
* the style
* @param annotationSetNodeValue
* the annotation set node value
* @param mediaMap
* the media map
* @param mediaFolder
* the media folder
*/
public AnnotationsMediaControl(Composite parent, int style, AnnotationSetNode annotationSetNodeValue, IObservableMap mediaMap, MediaRootNode mediaFolder) {
super(parent, style);
logger = Activator.getDefault().getLog();
this.setLayout(new GridLayout(1, false));
annotationSetNode = annotationSetNodeValue;
projectAttributeRootNode = ((ProjectNode) annotationSetNode.getLastParent()).getProjectAttributeRootNode();
collectionMediaList = ((CollectionNode) annotationSetNode.getParent().getParent()).getResource().getCollectionMediaList();
collectionMediaClip = annotationSetNode.getResource().getCollectionMediaClip();
this._mediaMap = mediaMap;
for (CollectionMedia cMedia : collectionMediaList) {
String mediaName = cMedia.getMediaName();
MediaNode mediaNode = mediaFolder.getMediaNode(mediaName);
_mediaMap.put(cMedia, mediaNode.createMediaInstance());
}
initUI();
initData();
setupDND();
}
开发者ID:synergynet,项目名称:synergyview,代码行数:35,代码来源:AnnotationsMediaControl.java
示例4: initDataBindings
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
protected DataBindingContext initDataBindings() {
DataBindingContext bindingContext = new DataBindingContext();
//
ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
IObservableMap[] observeMaps = EMFEditObservables.observeMaps(editingDomain, listContentProvider.getKnownElements(), new EStructuralFeature[]{Literals.ENTITY__NAME});
tableViewer.setLabelProvider(new ObservableMapLabelProvider(observeMaps));
tableViewer.setContentProvider(listContentProvider);
//
IObservableList architectureCloudProvidersObserveList = EMFEditObservables.observeList(Realm.getDefault(), editingDomain, architecture, ArchitecturePackage.Literals.ARCHITECTURE__CLOUD_ENVIRONMENTS);
tableViewer.setInput(architectureCloudProvidersObserveList);
//
IObservableValue observeSingleSelectionTableViewer = ViewerProperties.singleSelection().observe(tableViewer);
IObservableValue cloudProviderCloudProviderModelObserveValue = BeanProperties.value("cloudProvider").observe(cloudProviderModel);
bindingContext.bindValue(observeSingleSelectionTableViewer, cloudProviderCloudProviderModelObserveValue, null, null);
//
return bindingContext;
}
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:18,代码来源:CloudProviderListComposite.java
示例5: initPaaS
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
private void initPaaS (Specification specification)
{
List<? extends PlatformServiceDescriptor> paaSDescriptors = null;
if (specification instanceof CloudSpecification)
paaSDescriptors = OverviewHelper.getPaaSRuntimeDescriptors((CloudSpecification)specification);
else if (specification instanceof ServiceSpecification)
paaSDescriptors = OverviewHelper.getPlatformDescriptors((ServiceSpecification)specification, false, true);
ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
IObservableMap observeMap = PojoObservables.observeMap(listContentProvider.getKnownElements(), ProvidedPlatformRuntimeServiceDescriptor.class, "name");
cvPaaS.setLabelProvider(new ObservableMapLabelProvider(observeMap));
cvPaaS.setContentProvider(listContentProvider);
IObservableList selfList = Properties.selfList(CloudSpecification.class).observe(paaSDescriptors);
cvPaaS.setInput(selfList);
// set default selection
if (!paaSDescriptors.isEmpty())
{
final ISelection selection = new StructuredSelection(paaSDescriptors.get(0));
cvPaaS.setSelection(selection);
}
}
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:24,代码来源:DeploymentComposite.java
示例6: initDataBindings
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
protected DataBindingContext initDataBindings(){
DataBindingContext bindingContext = new DataBindingContext();
tableViewerContacts.setContentProvider(contentProvider);
IObservableMap[] observeMaps =
BeansObservables.observeMaps(contentProvider.getKnownElements(), IContact.class,
new String[] {
"description1", "description2", "mandator", "patient", "user"
});
ILabelDecorator decorator =
PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator();
tableViewerContacts.setLabelProvider(new TableDecoratingLabelProvider(
new ContactSelectorObservableMapLabelProvider(observeMaps), decorator));
tableViewerContacts.setInput(contactList);
return bindingContext;
}
开发者ID:elexis,项目名称:elexis-3-core,代码行数:17,代码来源:ContactSelectorView.java
示例7: TreeNodeLabelProvider
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
public TreeNodeLabelProvider ( final TreeViewer viewer, final IObservableMap... attributeMaps )
{
super ( attributeMaps );
this.viewer = viewer;
this.defaultFont = viewer.getControl ().getFont ();
final FontData[] fds = this.viewer.getControl ().getFont ().getFontData ();
for ( final FontData fd : fds )
{
fd.setStyle ( SWT.ITALIC );
}
this.font = new Font ( this.viewer.getControl ().getDisplay (), fds );
}
开发者ID:eclipse,项目名称:neoscada,代码行数:15,代码来源:TreeNodeLabelProvider.java
示例8: inputChanged
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
@Override
public void inputChanged ( final Viewer viewer, final Object oldInput, final Object newInput )
{
detach ();
this.viewer = (StructuredViewer)viewer;
if ( newInput instanceof IObservableMap )
{
setInput ( (IObservableMap)newInput );
}
}
开发者ID:eclipse,项目名称:neoscada,代码行数:13,代码来源:ObservableMapContentProvider.java
示例9: setInput
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
private void setInput ( final IObservableMap input )
{
this.input = input;
input.addMapChangeListener ( this.mapListener = new IMapChangeListener () {
@Override
public void handleMapChange ( final MapChangeEvent event )
{
mapChange ( event.diff );
}
} );
}
开发者ID:eclipse,项目名称:neoscada,代码行数:14,代码来源:ObservableMapContentProvider.java
示例10: KeyPrefixMapObservable
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
protected KeyPrefixMapObservable ( final IObservableMap map, final String keyPrefix, final Object valueType, final boolean removePrefix )
{
super ( map.getRealm (), new HashMap<Object, Object> () );
this.map = map;
this.keyPrefix = keyPrefix;
this.valueType = valueType;
this.removePrefix = removePrefix;
map.addMapChangeListener ( this.changeListener );
map.addStaleListener ( this.staleListener );
map.addDisposeListener ( this.disposeListener );
}
开发者ID:eclipse,项目名称:neoscada,代码行数:15,代码来源:KeyPrefixMapObservable.java
示例11: ObservableMapStyledCellLabelProvider
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
/**
* Creates a new label provider that tracks changes to more than one
* attribute. This constructor should be used by subclasses that override
* {@link #update(ViewerCell)} and make use of more than one attribute.
*
* @param attributeMaps
*/
protected ObservableMapStyledCellLabelProvider ( final IObservableMap[] attributeMaps )
{
System.arraycopy ( attributeMaps, 0, this.attributeMaps = new IObservableMap[attributeMaps.length], 0, attributeMaps.length );
for ( int i = 0; i < attributeMaps.length; i++ )
{
attributeMaps[i].addMapChangeListener ( this.mapChangeListener );
}
}
开发者ID:eclipse,项目名称:neoscada,代码行数:16,代码来源:ObservableMapStyledCellLabelProvider.java
示例12: createStandardText
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
public void createStandardText ( final Composite parent, final String attributeName, final int style, final String label, final String textMessage, final IObservableMap data, final Object valueType )
{
final Label labelControl = this.toolkit.createLabel ( parent, label + ":" );
final boolean multi = ( style & SWT.MULTI ) > 0;
if ( multi )
{
labelControl.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, false, false ) );
}
final Text text = this.toolkit.createText ( parent, "", style );
text.setMessage ( textMessage );
final GridData gd = new GridData ( GridData.FILL, multi ? GridData.FILL : GridData.BEGINNING, true, true );
gd.horizontalSpan = 2;
text.setLayoutData ( gd );
text.setToolTipText ( textMessage );
final IObservableValue value = Observables.observeMapEntry ( data, attributeName, String.class );
if ( valueType != null && valueType != String.class )
{
final WritableValue conversionValue = new WritableValue ( null, valueType );
this.dbc.bindValue ( WidgetProperties.text ( SWT.Modify ).observe ( text ), conversionValue );
this.dbc.bindValue ( conversionValue, value );
}
else
{
this.dbc.bindValue ( WidgetProperties.text ( SWT.Modify ).observe ( text ), value );
}
}
开发者ID:eclipse,项目名称:neoscada,代码行数:32,代码来源:ConfigurationFormToolkit.java
示例13: createStandardCheckbox
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
public void createStandardCheckbox ( final Composite parent, final String attributeName, final String label, final IObservableMap data, final Object valueType )
{
final Button button = this.toolkit.createButton ( parent, label, SWT.CHECK );
{
final GridData gd = new GridData ( GridData.FILL_HORIZONTAL );
gd.horizontalSpan = 3;
button.setLayoutData ( gd );
final IObservableValue value = Observables.observeMapEntry ( data, attributeName, valueType );
this.dbc.bindValue ( WidgetProperties.selection ().observe ( button ), value );
}
}
开发者ID:eclipse,项目名称:neoscada,代码行数:12,代码来源:ConfigurationFormToolkit.java
示例14: MonitorsLabelProvider
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
public MonitorsLabelProvider ( final IObservableMap... attributeMaps )
{
super ();
for ( int i = 0; i < attributeMaps.length; i++ )
{
attributeMaps[i].addMapChangeListener ( this.mapChangeListener );
}
this.attributeMaps = attributeMaps;
this.dateFormat = DateFormat.getDateTimeInstance ( DateFormat.LONG, DateFormat.LONG );
}
开发者ID:eclipse,项目名称:neoscada,代码行数:13,代码来源:MonitorsLabelProvider.java
示例15: EventsLabelProvider
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
public EventsLabelProvider ( final IObservableMap... attributeMaps )
{
super ();
for ( int i = 0; i < attributeMaps.length; i++ )
{
attributeMaps[i].addMapChangeListener ( this.mapChangeListener );
}
this.attributeMaps = attributeMaps;
this.dateFormat = new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss.SSS" );
}
开发者ID:eclipse,项目名称:neoscada,代码行数:13,代码来源:EventsLabelProvider.java
示例16: ConfigurationCellLabelProvider
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
public ConfigurationCellLabelProvider ( final IObservableMap... attributeMaps )
{
super ();
for ( int i = 0; i < attributeMaps.length; i++ )
{
attributeMaps[i].addMapChangeListener ( this.mapChangeListener );
}
this.attributeMaps = attributeMaps;
}
开发者ID:eclipse,项目名称:neoscada,代码行数:11,代码来源:ConfigurationCellLabelProvider.java
示例17: ServerLabelProvider
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
public ServerLabelProvider ( final IObservableSet knownElements )
{
super ( new IObservableMap[] { //
BeanProperties.value ( "running" ).observeDetail ( knownElements ), //
BeanProperties.value ( "error" ).observeDetail ( knownElements ) //
} );
this.errorImage = HivesPlugin.getDefault ().getImageRegistry ().get ( ImageConstants.IMG_ERROR );
this.runningImage = HivesPlugin.getDefault ().getImageRegistry ().get ( ImageConstants.IMG_RUNNING );
this.stoppedImage = HivesPlugin.getDefault ().getImageRegistry ().get ( ImageConstants.IMG_STOPPED );
}
开发者ID:eclipse,项目名称:neoscada,代码行数:11,代码来源:ServerLabelProvider.java
示例18: BTSConfigurationTreeLabelProvider
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
public BTSConfigurationTreeLabelProvider(IObservableMap[] attributeMaps)
{
if (attributeMaps != null)
{
for (int i = 0; i < attributeMaps.length; i++)
{
attributeMaps[i].addMapChangeListener(mapChangeListener);
}
}
}
开发者ID:cplutte,项目名称:bts,代码行数:11,代码来源:BTSConfigurationTreeLabelProvider.java
示例19: setObserable
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
/**
* Sets the obserable.
*
* @param attributeMaps
* the new obserable
*/
public void setObserable(IObservableMap[] attributeMaps) {
this.attributeMaps = attributeMaps;
for (int i = 0; i < attributeMaps.length; i++) {
attributeMaps[i].addMapChangeListener(mapChangeListener);
}
}
开发者ID:synergynet,项目名称:synergyview,代码行数:14,代码来源:NavigatorLabelProvider.java
示例20: initDataBindings
import org.eclipse.core.databinding.observable.map.IObservableMap; //导入依赖的package包/类
protected DataBindingContext initDataBindings() {
DataBindingContext bindingContext = new DataBindingContext();
//
ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
IObservableMap[] observeMaps = BeansObservables.observeMaps(listContentProvider.getKnownElements(), Preference.class, new String[]{"name", "value"});
preferencesViewer.setLabelProvider(new ObservableMapLabelProvider(observeMaps));
preferencesViewer.setContentProvider(listContentProvider);
//
IObservableList preferencesGetWidgetObserveList = BeanProperties.list("preferences").observe(getWidget());
preferencesViewer.setInput(preferencesGetWidgetObserveList);
//
ObservableListContentProvider listContentProvider_1 = new ObservableListContentProvider();
IObservableMap[] observeMaps_1 = BeansObservables.observeMaps(listContentProvider_1.getKnownElements(), Access.class, new String[]{"origin", "subdomains", "browserOnly"});
accessViewer.setLabelProvider(new ObservableMapLabelProvider(observeMaps_1));
accessViewer.setContentProvider(listContentProvider_1);
//
IObservableList accessesGetWidgetObserveList = BeanProperties.list("accesses").observe(getWidget());
accessViewer.setInput(accessesGetWidgetObserveList);
//
ObservableListContentProvider listContentProvider_2 = new ObservableListContentProvider();
IObservableMap[] observeMapsPlugin = BeansObservables.observeMaps(listContentProvider_2.getKnownElements(), Plugin.class, new String[]{"name", "spec"});
featuresTableViewer.setLabelProvider(new ObservableMapLabelProvider(observeMapsPlugin));
featuresTableViewer.setContentProvider(listContentProvider_2);
//
IObservableList featuresGetWidgetObserveList = BeanProperties.list("plugins").observe(getWidget());
featuresTableViewer.setInput(featuresGetWidgetObserveList);
//
return bindingContext;
}
开发者ID:eclipse,项目名称:thym,代码行数:30,代码来源:PropertiesPage.java
注:本文中的org.eclipse.core.databinding.observable.map.IObservableMap类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论