com.taobao.weex.ui.WXRenderManager Java Examples

The following examples show how to use com.taobao.weex.ui.WXRenderManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WXDomStatement.java    From weex with Apache License 2.0 5 votes vote down vote up
/**
 * Create an instance of {@link WXDomStatement},
 * One {@link WXSDKInstance} corresponding to one and only one {@link WXDomStatement}.
 * And all the instance of {@link WXDomManager} share the same {@link WXRenderManager}.
 * @param instanceId the id of the {@link WXSDKInstance}.
 *                   One {@link WXSDKInstance} corresponding to one {@link WXDomStatement},
 *                   and vice versa.
 * @param renderManager This acts as the Receiver of the command pattern
 */
public WXDomStatement(String instanceId, WXRenderManager renderManager) {
  mDestroy = false;
  mInstanceId = instanceId;
  mLayoutContext = new CSSLayoutContext();
  mRegistry = new ConcurrentHashMap<>();
  mNormalTasks = new ArrayList<>();
  mUpdate = new HashSet<>();
  mWXRenderManager = renderManager;
}
 
Example #2
Source File: DOMActionContextImpl.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
/**
 * Create an instance of {@link DOMActionContextImpl},
 * One {@link WXSDKInstance} corresponding to one and only one {@link DOMActionContextImpl}.
 * And all the instance of {@link WXDomManager} share the same {@link WXRenderManager}.
 * @param instanceId the id of the {@link WXSDKInstance}.
 *                   One {@link WXSDKInstance} corresponding to one {@link DOMActionContextImpl},
 *                   and vice versa.
 * @param renderManager This acts as the Receiver of the command pattern
 */
public DOMActionContextImpl(String instanceId, WXRenderManager renderManager) {
  mDestroy = false;
  mInstanceId = instanceId;
  mLayoutContext = new CSSLayoutContext();
  mRegistry = new ConcurrentHashMap<>();
  mNormalTasks = new ArrayList<>();
  animations = new LinkedHashSet<>();
  mWXRenderManager = renderManager;
  mAddDOMConsumer = new AddDOMConsumer(mRegistry);
  mUnregisterDomConsumer = new RemoveElementConsumer(mRegistry);
}
 
Example #3
Source File: WXBridgeManagerTest.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
  WXSDKEngine.initialize(RuntimeEnvironment.application,new InitConfig.Builder().build());
  instance = WXSDKInstanceTest.createInstance();
  WXRenderManager rednerManager = new WXRenderManager();
  rednerManager.registerInstance(instance);//
  WXSDKManagerTest.setRenderManager(rednerManager);
}
 
Example #4
Source File: WXDomStatementTest.java    From weex-uikit with MIT License 5 votes vote down vote up
@Before
public void setUp() throws Exception {
  WXSDKEngine.initialize(RuntimeEnvironment.application,new InitConfig.Builder().build());
  ShadowLooper looper = WXBridgeManagerTest.getLooper();
  looper.idle();
  ShadowLooper.runUiThreadTasksIncludingDelayedTasks();
  instance = WXSDKInstanceTest.createInstance();
  rednerManager = new WXRenderManager();
  rednerManager.registerInstance(instance);//
  stmt = new WXDomStatement(instance.getInstanceId(),rednerManager );
}
 
Example #5
Source File: WXDomManagerTest.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
  WXRenderManager rm = new WXRenderManager();
  instance =   WXSDKInstanceTest.createInstance();
  rm.registerInstance(instance);
  dm = new WXDomManager(rm);
}
 
Example #6
Source File: WXDomStatementTest.java    From ucar-weex-core with Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
  WXSDKEngine.initialize(RuntimeEnvironment.application,new InitConfig.Builder().build());
  ShadowLooper looper = WXBridgeManagerTest.getLooper();
  looper.idle();
  ShadowLooper.runUiThreadTasksIncludingDelayedTasks();
  instance = WXSDKInstanceTest.createInstance();
  rednerManager = new WXRenderManager();
  rednerManager.registerInstance(instance);//
  WXSDKManagerTest.setRenderManager(rednerManager);
  stmt = new DOMActionContextImpl(instance.getInstanceId(),rednerManager );
}
 
Example #7
Source File: WXDomManagerTest.java    From weex-uikit with MIT License 5 votes vote down vote up
@Before
public void setUp() throws Exception {
  WXRenderManager rm = new WXRenderManager();
  instance =   WXSDKInstanceTest.createInstance();
  rm.registerInstance(instance);
  dm = new WXDomManager(rm);
}
 
Example #8
Source File: WXBridgeManagerTest.java    From weex-uikit with MIT License 5 votes vote down vote up
@Before
public void setUp() throws Exception {
  WXSDKEngine.initialize(RuntimeEnvironment.application,new InitConfig.Builder().build());
  instance = WXSDKInstanceTest.createInstance();
  WXRenderManager rednerManager = new WXRenderManager();
  rednerManager.registerInstance(instance);//
  WXSDKManagerTest.setRenderManager(rednerManager);
}
 
Example #9
Source File: WXDomStatement.java    From weex-uikit with MIT License 5 votes vote down vote up
/**
 * Create an instance of {@link WXDomStatement},
 * One {@link WXSDKInstance} corresponding to one and only one {@link WXDomStatement}.
 * And all the instance of {@link WXDomManager} share the same {@link WXRenderManager}.
 * @param instanceId the id of the {@link WXSDKInstance}.
 *                   One {@link WXSDKInstance} corresponding to one {@link WXDomStatement},
 *                   and vice versa.
 * @param renderManager This acts as the Receiver of the command pattern
 */
public WXDomStatement(String instanceId, WXRenderManager renderManager) {
  mDestroy = false;
  mInstanceId = instanceId;
  mLayoutContext = new CSSLayoutContext();
  mRegistry = new ConcurrentHashMap<>();
  mNormalTasks = new ArrayList<>();
  animations = new LinkedHashSet<>();
  mWXRenderManager = renderManager;
  mAddDOMConsumer = new AddDOMConsumer(mRegistry);
}
 
Example #10
Source File: WXSDKManager.java    From weex-uikit with MIT License 4 votes vote down vote up
public WXRenderManager getWXRenderManager() {
  return mWXRenderManager;
}
 
Example #11
Source File: WXDomManager.java    From weex with Apache License 2.0 4 votes vote down vote up
public WXDomManager(WXRenderManager renderManager) {
  mWXRenderManager = renderManager;
  mDomRegistries = new ConcurrentHashMap<>();
  mDomThread = new WXThread("WeeXDomThread", new WXDomHandler(this));
  mDomHandler = mDomThread.getHandler();
}
 
Example #12
Source File: WXSDKManager.java    From weex with Apache License 2.0 4 votes vote down vote up
public WXRenderManager getWXRenderManager() {
  return mWXRenderManager;
}
 
Example #13
Source File: WXSDKManager.java    From weex with Apache License 2.0 4 votes vote down vote up
private WXSDKManager() {
  mWXRenderManager = new WXRenderManager();
  mWXDomManager = new WXDomManager(mWXRenderManager);
  mBridgeManager = WXBridgeManager.getInstance();
}
 
Example #14
Source File: WXSDKManagerTest.java    From weex-uikit with MIT License 4 votes vote down vote up
public static void setRenderManager(WXRenderManager rm){
  WXSDKManager.getInstance().mWXRenderManager = rm;
}
 
Example #15
Source File: WXDomManager.java    From weex-uikit with MIT License 4 votes vote down vote up
public WXDomManager(WXRenderManager renderManager) {
  mWXRenderManager = renderManager;
  mDomRegistries = new ConcurrentHashMap<>();
  mDomThread = new WXThread("WeeXDomThread", new WXDomHandler(this));
  mDomHandler = mDomThread.getHandler();
}
 
Example #16
Source File: WXSDKManager.java    From ucar-weex-core with Apache License 2.0 4 votes vote down vote up
private WXSDKManager() {
  this(new WXRenderManager());
}
 
Example #17
Source File: WXSDKManager.java    From weex-uikit with MIT License 4 votes vote down vote up
private WXSDKManager() {
  mWXRenderManager = new WXRenderManager();
  mWXDomManager = new WXDomManager(mWXRenderManager);
  mBridgeManager = WXBridgeManager.getInstance();
}
 
Example #18
Source File: WXSDKManagerTest.java    From ucar-weex-core with Apache License 2.0 4 votes vote down vote up
public static void setRenderManager(WXRenderManager rm){
  WXSDKManager.initInstance(rm);
}
 
Example #19
Source File: WXDomManager.java    From ucar-weex-core with Apache License 2.0 4 votes vote down vote up
public WXDomManager(WXRenderManager renderManager) {
  mWXRenderManager = renderManager;
  mDomRegistries = new ConcurrentHashMap<>();
  mDomThread = new WXThread("WeeXDomThread", new WXDomHandler(this));
  mDomHandler = mDomThread.getHandler();
}
 
Example #20
Source File: WXSDKManager.java    From ucar-weex-core with Apache License 2.0 4 votes vote down vote up
public WXRenderManager getWXRenderManager() {
  return mWXRenderManager;
}
 
Example #21
Source File: WXSDKManager.java    From ucar-weex-core with Apache License 2.0 4 votes vote down vote up
/**
 * Used in junit test
 */
static void initInstance(WXRenderManager renderManager){
  sManager = new WXSDKManager(renderManager);
}
 
Example #22
Source File: WXSDKManager.java    From ucar-weex-core with Apache License 2.0 4 votes vote down vote up
private WXSDKManager(WXRenderManager renderManager) {
  mWXRenderManager = renderManager;
  mWXDomManager = new WXDomManager(mWXRenderManager);
  mBridgeManager = WXBridgeManager.getInstance();
  mWXWorkThreadManager = new WXWorkThreadManager();
}