org.appcelerator.titanium.proxy
Class TiViewProxy

java.lang.Object
  extended by org.appcelerator.kroll.KrollProxy
      extended by org.appcelerator.titanium.proxy.TiViewProxy
All Implemented Interfaces:
android.os.Handler.Callback, KrollConvertable, OnEventListenerChange
Direct Known Subclasses:
TiWindowProxy

@Kroll.proxy(propertyAccessors={"backgroundImage","backgroundSelectedImage","backgroundFocusedImage","backgroundDisabledImage","backgroundColor","backgroundSelectedColor","backgroundFocusedColor","backgroundDisabledColor","backgroundPadding","borderColor","borderRadius","borderWidth","left","top","right","bottom","layout","zIndex","focusable","touchEnabled","visible","enabled","opacity","softKeyboardOnFocus","transform"})
public abstract class TiViewProxy
extends KrollProxy
implements android.os.Handler.Callback


Nested Class Summary
 
Nested classes/interfaces inherited from class org.appcelerator.kroll.KrollProxy
KrollProxy.ThisMethod
 
Field Summary
protected  java.util.ArrayList<TiViewProxy> children
           
protected static int MSG_LAST_ID
           
protected  java.lang.ref.WeakReference<TiViewProxy> parent
           
protected  TiAnimationBuilder pendingAnimation
           
protected  TiUIView view
           
 
Fields inherited from class org.appcelerator.kroll.KrollProxy
binding, BINDING_SUFFIX, context, createdInModule, creatingContext, creationDict, currentInvocation, eventManager, krollObject, modelListener, MSG_LISTENER_ADDED, MSG_LISTENER_REMOVED, MSG_MODEL_PROPERTIES_CHANGED, MSG_MODEL_PROPERTY_CHANGE, properties, PROXY_ID_PREFIX, proxyBindings, proxyCounter, proxyId, uiHandler, UNDEFINED, waitForHandler
 
Constructor Summary
TiViewProxy(TiContext tiContext)
           
 
Method Summary
 void add(TiViewProxy child)
           
 void addClass(java.lang.Object[] classNames)
           
 void animate(java.lang.Object arg, KrollCallback callback)
           
 void blur()
           
 void clearAnimation()
           
 void clearView()
           
abstract  TiUIView createView(android.app.Activity activity)
           
 void eventListenerAdded(java.lang.String eventName, int count, KrollProxy proxy)
           
 void eventListenerRemoved(java.lang.String eventName, int count, KrollProxy proxy)
           
 boolean fireEvent(java.lang.String eventName, KrollDict data)
           
 void focus()
           
 TiUIView forceCreateView(android.app.Activity activity)
           
protected  java.lang.String getBaseUrlForStylesheet()
           
 KrollDict getCenter()
           
 TiViewProxy[] getChildren()
           
 android.content.Context getContext()
           
 int getHeight()
           
protected  KrollDict getLangConversionTable()
           
 TiViewProxy getParent()
           
 TiAnimationBuilder getPendingAnimation()
           
 KrollDict getSize()
           
 TiUIView getView(android.app.Activity activity)
           
 int getWidth()
           
 void handleAdd(TiViewProxy child)
           
protected  void handleAnimate()
           
protected  void handleBlur()
           
 void handleCreationDict(KrollDict options)
          Handle the creation KrollDict passed into the create method for this proxy.
protected  void handleFocus()
           
protected  TiUIView handleGetView(android.app.Activity activity)
           
protected  void handleHide(KrollDict options)
           
 boolean handleMessage(android.os.Message msg)
           
 void handlePendingAnimation(boolean forceQueue)
           
 void handleRemove(TiViewProxy child)
           
protected  void handleShow(KrollDict options)
           
protected  KrollDict handleStyleOptions(KrollDict options)
           
protected  KrollDict handleToImage()
           
 void hide(KrollDict options)
           
 TiUIView peekView()
           
 void realizeViews(android.app.Activity activity, TiUIView view)
           
 void releaseViews()
           
 void remove(TiViewProxy child)
           
 void setClickable(boolean clickable)
           
 void setHeight(java.lang.Object height)
           
 void setParent(TiViewProxy parent)
           
 void setView(TiUIView view)
           
 void setWidth(java.lang.Object width)
           
 void show(KrollDict options)
           
 TiContext switchContext(TiContext tiContext)
           
 KrollDict toImage()
           
 
Methods inherited from class org.appcelerator.kroll.KrollProxy
addEventListener, bindContextSpecific, call, createErrorResponse, createEventInvocation, extend, firePropertiesChanged, firePropertyChanged, fireSingleEvent, get, getAPIName, getBinding, getBinding, getBinding, getBoundMethod, getBoundMethodForThis, getBoundProperty, getCreatedInModule, getCreationDict, getCurrentInvocation, getDefaultValue, getDynamicProperty, getJavascriptValue, getKrollBridge, getKrollObject, getNativeValue, getProperties, getProperty, getProxyId, getShortAPIName, getTiContext, getUIHandler, handleCreationArgs, has, hasBinding, hasBoundMethod, hasBoundProperty, hasListeners, hasProperty, removeEventListener, set, setDynamicProperty, setModelListener, setProperty, setProperty, shouldFireChange, switchToCreatingContext, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MSG_LAST_ID

protected static final int MSG_LAST_ID
See Also:
Constant Field Values

children

protected java.util.ArrayList<TiViewProxy> children

parent

protected java.lang.ref.WeakReference<TiViewProxy> parent

view

protected TiUIView view

pendingAnimation

protected TiAnimationBuilder pendingAnimation
Constructor Detail

TiViewProxy

public TiViewProxy(TiContext tiContext)
Method Detail

handleCreationDict

public void handleCreationDict(KrollDict options)
Description copied from class: KrollProxy
Handle the creation KrollDict passed into the create method for this proxy. This is usually the first (and sometimes only) argument to the proxy's create method.

Overrides:
handleCreationDict in class KrollProxy

getBaseUrlForStylesheet

protected java.lang.String getBaseUrlForStylesheet()

handleStyleOptions

protected KrollDict handleStyleOptions(KrollDict options)

getLangConversionTable

protected KrollDict getLangConversionTable()

getPendingAnimation

public TiAnimationBuilder getPendingAnimation()

clearAnimation

public void clearAnimation()

handleMessage

public boolean handleMessage(android.os.Message msg)
Specified by:
handleMessage in interface android.os.Handler.Callback
Overrides:
handleMessage in class KrollProxy

getContext

public android.content.Context getContext()

getSize

@Kroll.getProperty
@Kroll.method
public KrollDict getSize()

getWidth

@Kroll.getProperty
@Kroll.method
public int getWidth()

setWidth

@Kroll.setProperty(retain=false)
@Kroll.method
public void setWidth(java.lang.Object width)

getHeight

@Kroll.getProperty
@Kroll.method
public int getHeight()

setHeight

@Kroll.setProperty(retain=false)
@Kroll.method
public void setHeight(java.lang.Object height)

getCenter

@Kroll.getProperty
@Kroll.method
public KrollDict getCenter()

clearView

public void clearView()

peekView

public TiUIView peekView()

setView

public void setView(TiUIView view)

forceCreateView

public TiUIView forceCreateView(android.app.Activity activity)

getView

public TiUIView getView(android.app.Activity activity)

handleGetView

protected TiUIView handleGetView(android.app.Activity activity)

realizeViews

public void realizeViews(android.app.Activity activity,
                         TiUIView view)

releaseViews

public void releaseViews()

createView

public abstract TiUIView createView(android.app.Activity activity)

add

@Kroll.method
public void add(TiViewProxy child)

handleAdd

public void handleAdd(TiViewProxy child)

remove

@Kroll.method
public void remove(TiViewProxy child)

handleRemove

public void handleRemove(TiViewProxy child)

show

@Kroll.method
public void show(@Kroll.argument(optional=true)
                              KrollDict options)

handleShow

protected void handleShow(KrollDict options)

hide

@Kroll.method
public void hide(@Kroll.argument(optional=true)
                              KrollDict options)

handleHide

protected void handleHide(KrollDict options)

animate

@Kroll.method
public void animate(java.lang.Object arg,
                                 @Kroll.argument(optional=true)
                                 KrollCallback callback)

handlePendingAnimation

public void handlePendingAnimation(boolean forceQueue)

handleAnimate

protected void handleAnimate()

blur

@Kroll.method
public void blur()

handleBlur

protected void handleBlur()

focus

@Kroll.method
public void focus()

handleFocus

protected void handleFocus()

toImage

@Kroll.method
public KrollDict toImage()

handleToImage

protected KrollDict handleToImage()

fireEvent

public boolean fireEvent(java.lang.String eventName,
                         KrollDict data)
Overrides:
fireEvent in class KrollProxy

getParent

@Kroll.getProperty
@Kroll.method
public TiViewProxy getParent()

setParent

public void setParent(TiViewProxy parent)

switchContext

public TiContext switchContext(TiContext tiContext)
Overrides:
switchContext in class KrollProxy

getChildren

@Kroll.getProperty
@Kroll.method
public TiViewProxy[] getChildren()

eventListenerAdded

public void eventListenerAdded(java.lang.String eventName,
                               int count,
                               KrollProxy proxy)
Specified by:
eventListenerAdded in interface OnEventListenerChange
Overrides:
eventListenerAdded in class KrollProxy

eventListenerRemoved

public void eventListenerRemoved(java.lang.String eventName,
                                 int count,
                                 KrollProxy proxy)
Specified by:
eventListenerRemoved in interface OnEventListenerChange
Overrides:
eventListenerRemoved in class KrollProxy

setClickable

public void setClickable(boolean clickable)

addClass

@Kroll.method
public void addClass(java.lang.Object[] classNames)


Copyright © 2010 Appcelerator, Inc. Licensed under the Apache License 2.0