本文整理汇总了Java中org.openhab.ui.chart.ChartProvider类的典型用法代码示例。如果您正苦于以下问题:Java ChartProvider类的具体用法?Java ChartProvider怎么用?Java ChartProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ChartProvider类属于org.openhab.ui.chart包,在下文中一共展示了ChartProvider类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deactivate
import org.openhab.ui.chart.ChartProvider; //导入依赖的package包/类
public void deactivate() {
for(ServiceRegistration<org.eclipse.smarthome.ui.chart.ChartProvider> serviceReg : delegates.values()) {
serviceReg.unregister();
}
delegates.clear();
this.context = null;
}
示例2: addChartProvider
import org.openhab.ui.chart.ChartProvider; //导入依赖的package包/类
public void addChartProvider(ChartProvider provider) {
if(context!=null) {
registerDelegateProvider(provider);
} else {
chartProviders.add(provider);
}
}
示例3: registerDelegateProvider
import org.openhab.ui.chart.ChartProvider; //导入依赖的package包/类
private void registerDelegateProvider(ChartProvider chartProvider) {
if(!delegates.containsKey(chartProvider.getName())) {
ChartProviderDelegate service = new ChartProviderDelegate(chartProvider);
Dictionary<String, Object> props = new Hashtable<String, Object>();
ServiceRegistration<org.eclipse.smarthome.ui.chart.ChartProvider> serviceReg =
context.registerService(org.eclipse.smarthome.ui.chart.ChartProvider.class, service, props);
delegates.put(chartProvider.getName(), serviceReg);
}
}
示例4: unregisterDelegateProvider
import org.openhab.ui.chart.ChartProvider; //导入依赖的package包/类
private void unregisterDelegateProvider(ChartProvider chartProvider) {
if(delegates.containsKey(chartProvider.getName())) {
ServiceRegistration<org.eclipse.smarthome.ui.chart.ChartProvider> serviceReg =
delegates.get(chartProvider.getName());
delegates.remove(chartProvider.getName());
serviceReg.unregister();
}
}
示例5: ChartProviderDelegate
import org.openhab.ui.chart.ChartProvider; //导入依赖的package包/类
public ChartProviderDelegate(ChartProvider chartProvider) {
this.provider = chartProvider;
}
示例6: activate
import org.openhab.ui.chart.ChartProvider; //导入依赖的package包/类
public void activate(BundleContext context) {
this.context = context;
for(ChartProvider provider : chartProviders) {
registerDelegateProvider(provider);
}
}
示例7: removeChartProvider
import org.openhab.ui.chart.ChartProvider; //导入依赖的package包/类
public void removeChartProvider(ChartProvider provider) {
if(context!=null) {
unregisterDelegateProvider(provider);
}
}
示例8: addChartProvider
import org.openhab.ui.chart.ChartProvider; //导入依赖的package包/类
public void addChartProvider(ChartProvider provider) {
chartProviders.put(provider.getName(), provider);
}
示例9: removeChartProvider
import org.openhab.ui.chart.ChartProvider; //导入依赖的package包/类
public void removeChartProvider(ChartProvider provider) {
chartProviders.remove(provider.getName());
}
示例10: getChartProviders
import org.openhab.ui.chart.ChartProvider; //导入依赖的package包/类
static public Map<String, ChartProvider> getChartProviders() {
return chartProviders;
}