JavaFX-Plus v1.beta
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package cn.edu.scau.biubiusuisui.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* This is use for marking A controller as FX-Plus Controller
|
||||
* @Author jack
|
||||
* @Date:2019/6/25 1:34
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
@Inherited
|
||||
public @interface FXController {
|
||||
String path();
|
||||
double preWidth() default 0.0;
|
||||
double preHeight() default 0.0;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package cn.edu.scau.biubiusuisui.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @Author jack
|
||||
* @Date:2019/6/25 1:35
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface FXEntity {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package cn.edu.scau.biubiusuisui.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @Author jack
|
||||
* @Date:2019/6/27 20:10
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
public @interface FXField {
|
||||
boolean readOnly() default false;
|
||||
String setter() default "";
|
||||
String add() default "";
|
||||
String delete() default "";
|
||||
String edit() default "";
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package cn.edu.scau.biubiusuisui.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @Author jack
|
||||
* @Date:2019/6/25 13:06
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Inherited
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface FXReceiver {
|
||||
String name();
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package cn.edu.scau.biubiusuisui.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @Author jack
|
||||
* @Date:2019/6/25 2:55
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface FXScan {
|
||||
String[] base() default ".";
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package cn.edu.scau.biubiusuisui.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* This cn.edu.scau.biubiusuisui.annotation is used for a method which can send a signal to all consumer
|
||||
* And FXSender has a name which is used for identifying different method
|
||||
* It is legal to use same method which has same name because JavaFX-Plus will identify a method with its full class name
|
||||
* In addition ,name is optional , default name will be the class name and method name
|
||||
* you can use this cn.edu.scau.biubiusuisui.annotation as the following cn.edu.scau.biubiusuisui.example
|
||||
* @FXSernder
|
||||
* public class A{
|
||||
* public void test(){
|
||||
*
|
||||
* }
|
||||
* }
|
||||
* name will be A.name(It will only contain base class name and this name)
|
||||
* or you can use
|
||||
* @FXSernder("testDemo")
|
||||
* public class A{
|
||||
* public void test(){
|
||||
*
|
||||
* }
|
||||
* }
|
||||
* name will be A.testDemo
|
||||
*
|
||||
* @Author jack
|
||||
* @Date:2019/6/25 13:02
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface FXSender {
|
||||
String name()default "";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package cn.edu.scau.biubiusuisui.annotation;
|
||||
|
||||
/**
|
||||
* @Author jack
|
||||
* @Date:2019/6/25 1:36
|
||||
*/
|
||||
public @interface FXView {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package cn.edu.scau.biubiusuisui.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @Author jack
|
||||
* @Date:2019/6/25 1:36
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
@Inherited
|
||||
public @interface FXWindow {
|
||||
double preWidth() default 0.0;
|
||||
double preHeight()default 0.0;
|
||||
String title () ;
|
||||
}
|
||||
Reference in New Issue
Block a user