程序包 cc.wanforme.ofx

类 ViewHolder

java.lang.Object
cc.wanforme.ofx.ViewHolder
所有已实现的接口:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Component public class ViewHolder extends Object implements org.springframework.context.ApplicationContextAware
all fxml file associate classes
  • 构造器详细资料

    • ViewHolder

      public ViewHolder()
  • 方法详细资料

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      指定者:
      setApplicationContext 在接口中 org.springframework.context.ApplicationContextAware
      抛出:
      org.springframework.beans.BeansException
    • getContext

      public org.springframework.context.ApplicationContext getContext()
    • getBaseView

      public <T extends BaseView> T getBaseView(Class<T> clazz)
      get by Class
      根据具体的子类获取
      参数:
      clazz -
      返回:
    • getBean

      public <T> T getBean(Class<T> clazz)
    • getBaseView

      public <T extends BaseView> T getBaseView(String name, Class<T> clazz)
      get by name
      直接从 spring 容器中获取
      参数:
      clazz -
      返回:
    • getBaseView

      public <T extends BaseView> T getBaseView(Class<T> clazz, String name)
      get by Class and name when clazz is parent class
      当 clazz 是父类的时候,配合 name 获取
      参数:
      clazz -
      返回:
    • refreshBaseViewCache

      public void refreshBaseViewCache()
      refresh all BaseViews' (fxml bean) cache
      刷新缓存
    • getBaseViewByFxml

      public BaseView getBaseViewByFxml(String fxml, boolean refreshCache)
      get the first associate-class
      获取 fxml 绑定的第一个 class 实例(不定)
       BaseView view = ViewHolder.getBaseViewByFxml("/fxml/hello.fxml", false);
       
      参数:
      fxml -
      refreshCache - refresh all BaseViews' cache
      返回:
    • getBaseViewByFxml

      @Deprecated public BaseView getBaseViewByFxml(String fxml, String name, boolean refreshCache)
      已过时。
      get the associate-class by fxml and bean name
      根据 fxml 和 spring 容器中名字获取
       BaseView view = ViewHolder.getBaseViewByFxml("/fxml/hello.fxml", "Hello", false);
       
      参数:
      fxml -
      name - bean name
      refreshCache - refresh all BaseViews' cache
      返回:
    • get

      public static ViewHolder get()