com.android.ide.common.rendering.api
Class ViewInfo

java.lang.Object
  extended by com.android.ide.common.rendering.api.ViewInfo

public class ViewInfo
extends java.lang.Object

Layout information for a specific view object


Constructor Summary
ViewInfo(java.lang.String name, java.lang.Object cookie, int left, int top, int right, int bottom)
           
ViewInfo(java.lang.String name, java.lang.Object cookie, int left, int top, int right, int bottom, java.lang.Object viewObject, java.lang.Object layoutParamsObject)
           
 
Method Summary
 int getBaseLine()
          Returns the baseline value.
 int getBottom()
          Returns the bottom of the view bounds, relative to the view parent bounds.
 int getBottomMargin()
          Returns the bottom margin value.
 java.util.List<ViewInfo> getChildren()
          Returns the list of children views.
 java.lang.String getClassName()
          Returns the class name of the view object.
 java.lang.Object getCookie()
          Returns the cookie associated with the XML node.
 java.lang.Object getLayoutParamsObject()
          Returns the actual android.view.ViewGroup$LayoutParams (or child class) object.
 int getLeft()
          Returns the left of the view bounds, relative to the view parent bounds.
 int getLeftMargin()
          Returns the left margin value.
 int getRight()
          Returns the right of the view bounds, relative to the view parent bounds.
 int getRightMargin()
          Returns the right margin value.
 int getTop()
          Returns the top of the view bounds, relative to the view parent bounds.
 int getTopMargin()
          Returns the top margin value.
 java.lang.Object getViewObject()
          Returns the actual android.view.View (or child class) object.
 boolean isSystemView()
          Returns if the ViewInfo represents part of the SystemUI, for example, the ActionBar.
 void setChildren(java.util.List<ViewInfo> children)
          Sets the list of children ViewInfo.
 void setExtendedInfo(int baseLine, int leftMargin, int topMargin, int rightMargin, int bottomMargin)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewInfo

public ViewInfo(java.lang.String name,
                java.lang.Object cookie,
                int left,
                int top,
                int right,
                int bottom)

ViewInfo

public ViewInfo(java.lang.String name,
                java.lang.Object cookie,
                int left,
                int top,
                int right,
                int bottom,
                java.lang.Object viewObject,
                java.lang.Object layoutParamsObject)
Method Detail

setChildren

public void setChildren(java.util.List<ViewInfo> children)
Sets the list of children ViewInfo.


setExtendedInfo

public void setExtendedInfo(int baseLine,
                            int leftMargin,
                            int topMargin,
                            int rightMargin,
                            int bottomMargin)

getChildren

public java.util.List<ViewInfo> getChildren()
Returns the list of children views. This is never null, but can be empty.


getCookie

public java.lang.Object getCookie()
Returns the cookie associated with the XML node. Can be null.

See Also:
ILayoutPullParser.getViewCookie()

getClassName

public java.lang.String getClassName()
Returns the class name of the view object. Can be null.


getLeft

public int getLeft()
Returns the left of the view bounds, relative to the view parent bounds.


getTop

public int getTop()
Returns the top of the view bounds, relative to the view parent bounds.


getRight

public int getRight()
Returns the right of the view bounds, relative to the view parent bounds.


getBottom

public int getBottom()
Returns the bottom of the view bounds, relative to the view parent bounds.


getViewObject

public java.lang.Object getViewObject()
Returns the actual android.view.View (or child class) object. This can be used to query the object properties that are not in the XML and not available through RenderSession.getProperty(Object, String).


getLayoutParamsObject

public java.lang.Object getLayoutParamsObject()
Returns the actual android.view.ViewGroup$LayoutParams (or child class) object. This can be used to query the object properties that are not in the XML and not available through RenderSession.getProperty(Object, String).


getBaseLine

public int getBaseLine()
Returns the baseline value. If the value is unknown, returns Integer.MIN_VALUE.


getLeftMargin

public int getLeftMargin()
Returns the left margin value. If the value is unknown, returns Integer.MIN_VALUE.


getTopMargin

public int getTopMargin()
Returns the top margin value. If the value is unknown, returns Integer.MIN_VALUE.


getRightMargin

public int getRightMargin()
Returns the right margin value. If the value is unknown, returns Integer.MIN_VALUE.


getBottomMargin

public int getBottomMargin()
Returns the bottom margin value. If the value is unknown, returns Integer.MIN_VALUE.


isSystemView

public boolean isSystemView()
Returns if the ViewInfo represents part of the SystemUI, for example, the ActionBar.