本文整理匯總了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;
}