添加了列表对象的Property

This commit is contained in:
billkiller
2019-06-29 13:03:55 +08:00
parent 8b52a68083
commit e91322268a
22 changed files with 613 additions and 393 deletions

View File

@@ -1,38 +0,0 @@
package cn.edu.scau.biubiusuisui.entity;
import java.lang.reflect.Method;
/**
* @Author jack
* @Date:2019/6/28 10:03
*/
public class FXFieldMethodMapping {
private Method setMethod ;
private Method addMethod ;
private Method delMethod;
public Method getSetMethod() {
return setMethod;
}
public void setSetMethod(Method setMethod) {
this.setMethod = setMethod;
}
public Method getAddMethod() {
return addMethod;
}
public void setAddMethod(Method addMethod) {
this.addMethod = addMethod;
}
public Method getDelMethod() {
return delMethod;
}
public void setDelMethod(Method delMethod) {
this.delMethod = delMethod;
}
}

View File

@@ -0,0 +1,33 @@
package cn.edu.scau.biubiusuisui.entity;
import javafx.beans.property.Property;
import javafx.beans.value.ObservableValue;
import java.lang.reflect.Method;
/**
* @Author jack
* @Date:2019/6/28 10:03
*/
public class FXFieldViewFieldMapping {
private boolean readOnly;
private Class type;
public boolean isReadOnly() {
return readOnly;
}
public void setReadOnly(boolean readOnly) {
this.readOnly = readOnly;
}
public Class getType() {
return type;
}
public void setType(Class type) {
this.type = type;
}
}

View File

@@ -1,6 +1,7 @@
package cn.edu.scau.biubiusuisui.entity;
import cn.edu.scau.biubiusuisui.proxy.classProxy.FXEntityProxy;
import javafx.beans.property.Property;
import java.util.LinkedList;
import java.util.List;
@@ -19,9 +20,19 @@ public class FXPlusContext {
private FXPlusContext(){}
private static Map<String, List<FXBaseController>> controllerContext = new ConcurrentHashMap<>();
private static Map<String, List<FXBaseController>> controllerContext = new ConcurrentHashMap<>(); //FXController控制器注册表
private static Map<Object, FXEntityProxy> beanProxyMap = new ConcurrentHashMap<>();
private static Map<Object, FXEntityProxy> beanProxyMap = new ConcurrentHashMap<>(); // Object注册为FXEntityObject
public static Property getEntityPropertyByName(Object object, String fieldName){
FXEntityProxy fxEntityProxy = FXPlusContext.getProryByBeanObject(object);
if(fxEntityProxy == null){
return null;
}
return fxEntityProxy.getStringPropertyMap().get(fieldName);
}
private static Map<String, Object> session = new ConcurrentHashMap<>();
public static void addController(FXBaseController fxBaseController){
List<FXBaseController> controllers = controllerContext.get(fxBaseController.getName());
@@ -49,4 +60,20 @@ public class FXPlusContext {
public static void setBeanProxyMap(Map<Object, FXEntityProxy> beanProxyMap) {
FXPlusContext.beanProxyMap = beanProxyMap;
}
public static Map<String, List<FXBaseController>> getControllerContext() {
return controllerContext;
}
public static void setControllerContext(Map<String, List<FXBaseController>> controllerContext) {
FXPlusContext.controllerContext = controllerContext;
}
public static Map<String, Object> getSession() {
return session;
}
public static void setSession(Map<String, Object> session) {
FXPlusContext.session = session;
}
}