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


Java LongProperty.addListener方法代码示例

本文整理汇总了Java中javafx.beans.property.LongProperty.addListener方法的典型用法代码示例。如果您正苦于以下问题:Java LongProperty.addListener方法的具体用法?Java LongProperty.addListener怎么用?Java LongProperty.addListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.beans.property.LongProperty的用法示例。


在下文中一共展示了LongProperty.addListener方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: registerWatchResult

import javafx.beans.property.LongProperty; //导入方法依赖的package包/类
@Subscribe
public void registerWatchResult(RegWatchResponseEvent e) {
	if (!e.isSuccess())
		throw new IllegalArgumentException("There isn't a register with the name "
				+ e.getRegisterName());
	
	String id = e.getRegisterID();
	String registerName = e.getRegisterName();
	LongProperty register = e.getRegObject();
	register.addListener(new ChangeListener<Number>() {

		@Override
		public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
			watchedRegisters.refresh();
		}
		
	});
	RegisterRow row = new RegisterRow(registerName, id, register);
	registers.add(row);
}
 
开发者ID:dhawal9035,项目名称:WebPLP,代码行数:21,代码来源:WatcherWindow.java

示例2: memoryWatchResult

import javafx.beans.property.LongProperty; //导入方法依赖的package包/类
@Subscribe
public void memoryWatchResult(MemWatchResponseEvent e) {
	if (!e.isSuccess())
		return;
	
	long address = e.getWatchedAddress();
	LongProperty value = e.getMemObject();
	value.addListener(new ChangeListener<Number>() {
		@Override
		public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
			watchedAddresses.refresh();
		}
		
	});
	MemoryRow row = new MemoryRow(address, value);
	memoryAddresses.add(row);
}
 
开发者ID:dhawal9035,项目名称:WebPLP,代码行数:18,代码来源:WatcherWindow.java

示例3: registerWatchResult

import javafx.beans.property.LongProperty; //导入方法依赖的package包/类
@SuppressWarnings("restriction")
@Subscribe
public void registerWatchResult(RegWatchResponseEvent e) {
	if (!e.isSuccess())
		throw new IllegalArgumentException("There isn't a register with the name "
				+ e.getRegisterName());
	
	String id = e.getRegisterID();
	String registerName = e.getRegisterName();
	LongProperty register = e.getRegObject();
	System.out.println("suc" + id + " -- " +  registerName + " -- " + register);
	register.addListener(new ChangeListener<Number>() {

		@Override
		public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
			//watchedRegisters.refresh();
			System.out.println("Success" + id + " -- " +  registerName + " -- " + register);
			session.setAttribute("idd", register.getValue());
			//System.out.println("id is:   " + session.getAttribute("idd"));
		}
		
	});

}
 
开发者ID:dhawal9035,项目名称:WebPLP,代码行数:25,代码来源:PLPWebController.java

示例4: bind

import javafx.beans.property.LongProperty; //导入方法依赖的package包/类
/**
 * @see #bind(ObjectProperty, String)
 * 
 * @param property {@link Property} to bind
 * @param key unique application store key
 */
public void bind(LongProperty property, String key) {
  try {
    property.set(prefs.getLong(validateKey(key), property.get()));
  } catch (NumberFormatException e) {
    prefs.putLong(key, property.getValue());
  }
  property.addListener(o -> prefs.putLong(key, property.getValue()));
}
 
开发者ID:comtel2000,项目名称:opc-ua-client,代码行数:15,代码来源:PersistenceService.java


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