org.cruxframework.crux.core.rebind.screen
Class ViewFactory

java.lang.Object
  extended by org.cruxframework.crux.core.rebind.screen.ViewFactory

public class ViewFactory
extends Object

Creates a representation for Crux views

Author:
Thiago Bustamante

Method Summary
 void clearViewCache()
          Clear the screen cache
static ViewFactory getInstance()
          Singleton method
 View getView(String id, String device)
          Factory method for views.
 View getView(String id, String device, Document view, boolean rootView)
          Factory method for views.
 boolean isValidWidget(JSONObject cruxObject)
          Test if a target json object represents a widget definition for Crux.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ViewFactory getInstance()
Singleton method

Returns:

clearViewCache

public void clearViewCache()
Clear the screen cache


getView

public View getView(String id,
                    String device)
             throws ScreenConfigException
Factory method for views.

Parameters:
id - viewId
device - device property for this permutation being compiled
Returns:
Throws:
ScreenConfigException

getView

public View getView(String id,
                    String device,
                    Document view,
                    boolean rootView)
             throws ScreenConfigException
Factory method for views.

Parameters:
id -
view -
rootView -
Returns:
Throws:
ScreenConfigException

isValidWidget

public boolean isValidWidget(JSONObject cruxObject)
                      throws JSONException
Test if a target json object represents a widget definition for Crux.

Parameters:
cruxObject -
Returns:
Throws:
JSONException


Copyright © 2014. All rights reserved.