layoutlib-api

16:38:42.275 INFO  jd.cli.Main - Decompiling layoutlib-api.jar
package com.android.ide.common.rendering.api;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class AdapterBinding
  implements Iterable<DataBindingItem>
{
  private final int mRepeatCount;
  private final List<ResourceReference> mHeaders = new ArrayList();
  private final List<DataBindingItem> mItems = new ArrayList();
  private final List<ResourceReference> mFooters = new ArrayList();
  
  public AdapterBinding(int repeatCount)
  {
    mRepeatCount = repeatCount;
  }
  
  public int getRepeatCount()
  {
    return mRepeatCount;
  }
  
  public void addHeader(ResourceReference layoutInfo)
  {
    mHeaders.add(layoutInfo);
  }
  
  public int getHeaderCount()
  {
    return mHeaders.size();
  }
  
  public ResourceReference getHeaderAt(int index)
  {
    return (ResourceReference)mHeaders.get(index);
  }
  
  public void addItem(DataBindingItem item)
  {
    mItems.add(item);
  }
  
  public int getItemCount()
  {
    return mItems.size();
  }
  
  public DataBindingItem getItemAt(int index)
  {
    return (DataBindingItem)mItems.get(index);
  }
  
  public void addFooter(ResourceReference layoutInfo)
  {
    mFooters.add(layoutInfo);
  }
  
  public int getFooterCount()
  {
    return mFooters.size();
  }
  
  public ResourceReference getFooterAt(int index)
  {
    return (ResourceReference)mFooters.get(index);
  }
  
  public Iterator<DataBindingItem> iterator()
  {
    return mItems.iterator();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.AdapterBinding
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import com.android.resources.ResourceType;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class ArrayResourceValue
  extends ResourceValue
  implements Iterable<String>
{
  private final List<String> mItems = new ArrayList();
  
  public ArrayResourceValue(String name, boolean isFramework)
  {
    super(ResourceType.ARRAY, name, isFramework);
  }
  
  public void addElement(String value)
  {
    mItems.add(value);
  }
  
  public int getElementCount()
  {
    return mItems.size();
  }
  
  public String getElement(int index)
  {
    return (String)mItems.get(index);
  }
  
  public Iterator<String> iterator()
  {
    return mItems.iterator();
  }
  
  protected int getDefaultIndex()
  {
    return 0;
  }
  
  public String getValue()
  {
    if ((mValue == null) && 
      (!mItems.isEmpty())) {
      return (String)mItems.get(getDefaultIndex());
    }
    return mValue;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.ArrayResourceValue
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import com.android.resources.ResourceType;
import java.util.HashMap;
import java.util.Map;

public class AttrResourceValue
  extends ResourceValue
{
  private Map<String, Integer> mValueMap;
  
  public AttrResourceValue(ResourceType type, String name, boolean isFramework)
  {
    super(type, name, isFramework);
  }
  
  public Map<String, Integer> getAttributeValues()
  {
    return mValueMap;
  }
  
  public void addValue(String name, Integer value)
  {
    if (mValueMap == null) {
      mValueMap = new HashMap();
    }
    mValueMap.put(name, value);
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.AttrResourceValue
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import java.io.File;
import java.util.EnumSet;
import java.util.Map;

public abstract class Bridge
{
  public static final int API_CURRENT = 10;
  
  public abstract int getApiLevel();
  
  public int getRevision()
  {
    return 0;
  }
  
  public EnumSet<Capability> getCapabilities()
  {
    return EnumSet.noneOf(Capability.class);
  }
  
  public boolean init(Map<String, String> platformProperties, File fontLocation, Map<String, Map<String, Integer>> enumValueMap, LayoutLog log)
  {
    return false;
  }
  
  public boolean dispose()
  {
    return false;
  }
  
  public RenderSession createSession(SessionParams params)
  {
    return null;
  }
  
  public Result renderDrawable(DrawableParams params)
  {
    return Result.Status.NOT_IMPLEMENTED.createResult();
  }
  
  public void clearCaches(Object projectKey) {}
  
  public Result getViewParent(Object viewObject)
  {
    return Result.Status.NOT_IMPLEMENTED.createResult();
  }
  
  public Result getViewIndex(Object viewObject)
  {
    return Result.Status.NOT_IMPLEMENTED.createResult();
  }
  
  public boolean isRtl(String locale)
  {
    return false;
  }
  
  @Deprecated
  public Result getViewBaseline(Object viewObject)
  {
    return Result.Status.NOT_IMPLEMENTED.createResult();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.Bridge
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

public enum Capability
{
  UNBOUND_RENDERING,  CUSTOM_BACKGROUND_COLOR,  RENDER,  LAYOUT_ONLY,  EMBEDDED_LAYOUT,  VIEW_MANIPULATION,  PLAY_ANIMATION,  ANIMATED_VIEW_MANIPULATION,  FULL_ANIMATED_VIEW_MANIPULATION,  ADAPTER_BINDING,  EXTENDED_VIEWINFO,  FIXED_SCALABLE_NINE_PATCH,  RTL;
  
  private Capability() {}
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.Capability
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

public class DataBindingItem
  implements Iterable<DataBindingItem>
{
  private final ResourceReference mReference;
  private final int mCount;
  private List<DataBindingItem> mChildren;
  
  public DataBindingItem(ResourceReference reference, int count)
  {
    mReference = reference;
    mCount = count;
  }
  
  public DataBindingItem(String name, boolean platformLayout, int count)
  {
    this(new ResourceReference(name, platformLayout), count);
  }
  
  public DataBindingItem(String name, boolean platformLayout)
  {
    this(name, platformLayout, 1);
  }
  
  public DataBindingItem(String name, int count)
  {
    this(name, false, count);
  }
  
  public DataBindingItem(String name)
  {
    this(name, false, 1);
  }
  
  public ResourceReference getViewReference()
  {
    return mReference;
  }
  
  public int getCount()
  {
    return mCount;
  }
  
  public void addChild(DataBindingItem child)
  {
    if (mChildren == null) {
      mChildren = new ArrayList();
    }
    mChildren.add(child);
  }
  
  public List<DataBindingItem> getChildren()
  {
    if (mChildren != null) {
      return mChildren;
    }
    return Collections.emptyList();
  }
  
  public Iterator<DataBindingItem> iterator()
  {
    List<DataBindingItem> list = getChildren();
    return list.iterator();
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.DataBindingItem
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import com.android.resources.ResourceType;
import java.util.LinkedHashMap;
import java.util.Map;

@Deprecated
public class DeclareStyleableResourceValue
  extends ResourceValue
{
  private Map<String, AttrResourceValue> mAttrMap;
  
  public DeclareStyleableResourceValue(ResourceType type, String name, boolean isFramework)
  {
    super(type, name, isFramework);
  }
  
  public Map<String, Integer> getAttributeValues(String name)
  {
    if (mAttrMap != null)
    {
      AttrResourceValue attr = (AttrResourceValue)mAttrMap.get(name);
      if (attr != null) {
        return attr.getAttributeValues();
      }
    }
    return null;
  }
  
  public Map<String, AttrResourceValue> getAllAttributes()
  {
    return mAttrMap;
  }
  
  public void addValue(AttrResourceValue attr)
  {
    if (mAttrMap == null) {
      mAttrMap = new LinkedHashMap();
    }
    mAttrMap.put(attr.getName(), attr);
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.DeclareStyleableResourceValue
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import com.android.layoutlib.api.IDensityBasedResourceValue;
import com.android.layoutlib.api.IDensityBasedResourceValue.Density;
import com.android.resources.Density;
import com.android.resources.ResourceType;

public class DensityBasedResourceValue
  extends ResourceValue
  implements IDensityBasedResourceValue
{
  private Density mDensity;
  
  public DensityBasedResourceValue(ResourceType type, String name, String value, Density density, boolean isFramework)
  {
    super(type, name, value, isFramework);
    mDensity = density;
  }
  
  public Density getResourceDensity()
  {
    return mDensity;
  }
  
  @Deprecated
  public IDensityBasedResourceValue.Density getDensity()
  {
    return IDensityBasedResourceValue.Density.getEnum(mDensity.getDpiValue());
  }
  
  public String toString()
  {
    return "DensityBasedResourceValue [" + getResourceType() + "/" + getName() + " = " + getValue() + " (density:" + mDensity + ", framework:" + isFramework() + ")]";
  }
  
  public int hashCode()
  {
    int prime = 31;
    int result = super.hashCode();
    result = 31 * result + (mDensity == null ? 0 : mDensity.hashCode());
    return result;
  }
  
  public boolean equals(Object obj)
  {
    if (this == obj) {
      return true;
    }
    if (!super.equals(obj)) {
      return false;
    }
    if (getClass() != obj.getClass()) {
      return false;
    }
    DensityBasedResourceValue other = (DensityBasedResourceValue)obj;
    if (mDensity == null)
    {
      if (mDensity != null) {
        return false;
      }
    }
    else if (!mDensity.equals(mDensity)) {
      return false;
    }
    return true;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.DensityBasedResourceValue
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

public class DrawableParams
  extends RenderParams
{
  private final ResourceValue mDrawable;
  
  public DrawableParams(ResourceValue drawable, Object projectKey, HardwareConfig hardwareConfig, RenderResources renderResources, IProjectCallback projectCallback, int minSdkVersion, int targetSdkVersion, LayoutLog log)
  {
    super(projectKey, hardwareConfig, renderResources, projectCallback, minSdkVersion, targetSdkVersion, log);
    
    mDrawable = drawable;
  }
  
  public DrawableParams(DrawableParams params)
  {
    super(params);
    mDrawable = mDrawable;
  }
  
  public ResourceValue getDrawable()
  {
    return mDrawable;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.DrawableParams
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import com.android.resources.Density;
import com.android.resources.ScreenOrientation;
import com.android.resources.ScreenSize;

public class HardwareConfig
{
  private final int mScreenWidth;
  private final int mScreenHeight;
  private final Density mDensity;
  private final float mXdpi;
  private final float mYdpi;
  private final ScreenOrientation mOrientation;
  private final ScreenSize mScreenSize;
  private final boolean mSoftwareButtons;
  
  public HardwareConfig(int screenWidth, int screenHeight, Density density, float xdpi, float ydpi, ScreenSize screenSize, ScreenOrientation orientation, boolean softwareButtons)
  {
    mScreenWidth = screenWidth;
    mScreenHeight = screenHeight;
    mDensity = density;
    mXdpi = xdpi;
    mYdpi = ydpi;
    mScreenSize = screenSize;
    mOrientation = orientation;
    mSoftwareButtons = softwareButtons;
  }
  
  public int getScreenWidth()
  {
    return mScreenWidth;
  }
  
  public int getScreenHeight()
  {
    return mScreenHeight;
  }
  
  public Density getDensity()
  {
    return mDensity;
  }
  
  public float getXdpi()
  {
    return mXdpi;
  }
  
  public float getYdpi()
  {
    return mYdpi;
  }
  
  public ScreenSize getScreenSize()
  {
    return mScreenSize;
  }
  
  public ScreenOrientation getOrientation()
  {
    return mOrientation;
  }
  
  public boolean hasSoftwareButtons()
  {
    return mSoftwareButtons;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.HardwareConfig
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

public abstract interface IAnimationListener
{
  public abstract void onNewFrame(RenderSession paramRenderSession);
  
  public abstract void done(Result paramResult);
  
  public abstract boolean isCanceled();
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.IAnimationListener
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import java.awt.image.BufferedImage;

public abstract interface IImageFactory
{
  public abstract BufferedImage getImage(int paramInt1, int paramInt2);
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.IImageFactory
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import org.xmlpull.v1.XmlPullParser;

public abstract interface ILayoutPullParser
  extends XmlPullParser
{
  public abstract Object getViewCookie();
  
  @Deprecated
  public abstract ILayoutPullParser getParser(String paramString);
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.ILayoutPullParser
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import java.net.URL;

public enum IProjectCallback$ViewAttribute
{
  TEXT(String.class),  IS_CHECKED(Boolean.class),  SRC(URL.class),  COLOR(Integer.class);
  
  private final Class<?> mClass;
  
  private IProjectCallback$ViewAttribute(Class<?> theClass)
  {
    mClass = theClass;
  }
  
  public Class<?> getAttributeClass()
  {
    return mClass;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.IProjectCallback.ViewAttribute
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import com.android.resources.ResourceType;
import com.android.util.Pair;
import java.net.URL;

public abstract interface IProjectCallback
{
  public abstract Object loadView(String paramString, Class[] paramArrayOfClass, Object[] paramArrayOfObject)
    throws ClassNotFoundException, Exception;
  
  public abstract String getNamespace();
  
  public abstract Pair<ResourceType, String> resolveResourceId(int paramInt);
  
  public abstract String resolveResourceId(int[] paramArrayOfInt);
  
  public abstract Integer getResourceId(ResourceType paramResourceType, String paramString);
  
  @Deprecated
  public abstract ILayoutPullParser getParser(String paramString);
  
  public abstract ILayoutPullParser getParser(ResourceValue paramResourceValue);
  
  public abstract Object getAdapterItemValue(ResourceReference paramResourceReference1, Object paramObject1, ResourceReference paramResourceReference2, int paramInt1, int paramInt2, int paramInt3, int paramInt4, ResourceReference paramResourceReference3, ViewAttribute paramViewAttribute, Object paramObject2);
  
  public abstract AdapterBinding getAdapterBinding(ResourceReference paramResourceReference, Object paramObject1, Object paramObject2);
  
  public static enum ViewAttribute
  {
    TEXT(String.class),  IS_CHECKED(Boolean.class),  SRC(URL.class),  COLOR(Integer.class);
    
    private final Class<?> mClass;
    
    private ViewAttribute(Class<?> theClass)
    {
      mClass = theClass;
    }
    
    public Class<?> getAttributeClass()
    {
      return mClass;
    }
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.IProjectCallback
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

public class LayoutLog
{
  public static final String TAG_RESOURCES_PREFIX = "resources.";
  public static final String TAG_MATRIX_PREFIX = "matrix.";
  public static final String TAG_UNSUPPORTED = "unsupported";
  public static final String TAG_BROKEN = "broken";
  public static final String TAG_RESOURCES_RESOLVE = "resources.resolve";
  public static final String TAG_RESOURCES_RESOLVE_THEME_ATTR = "resources.resolve.theme";
  public static final String TAG_RESOURCES_READ = "resources.read";
  public static final String TAG_RESOURCES_FORMAT = "resources.format";
  public static final String TAG_MATRIX_AFFINE = "matrix.affine";
  public static final String TAG_MATRIX_INVERSE = "matrix.inverse";
  public static final String TAG_MASKFILTER = "maskfilter";
  public static final String TAG_DRAWFILTER = "drawfilter";
  public static final String TAG_PATHEFFECT = "patheffect";
  public static final String TAG_COLORFILTER = "colorfilter";
  public static final String TAG_RASTERIZER = "rasterizer";
  public static final String TAG_SHADER = "shader";
  public static final String TAG_STRFTIME = "strftime";
  public static final String TAG_XFERMODE = "xfermode";
  
  public void warning(String tag, String message, Object data) {}
  
  public void fidelityWarning(String tag, String message, Throwable throwable, Object data) {}
  
  public void error(String tag, String message, Object data) {}
  
  public void error(String tag, String message, Throwable throwable, Object data) {}
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.LayoutLog
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

public final class MergeCookie
{
  private final Object mCookie;
  
  public MergeCookie(Object cookie)
  {
    mCookie = cookie;
  }
  
  public Object getCookie()
  {
    return mCookie;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.MergeCookie
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import com.android.resources.ResourceType;
import java.util.ArrayList;
import java.util.List;

public class PluralsResourceValue
  extends ResourceValue
{
  private final List<String> mQuantities = new ArrayList();
  private final List<String> mValues = new ArrayList();
  
  public PluralsResourceValue(String name, boolean isFramework)
  {
    super(ResourceType.PLURALS, name, isFramework);
  }
  
  public void addPlural(String quantity, String value)
  {
    mQuantities.add(quantity);
    mValues.add(value);
  }
  
  public int getPluralsCount()
  {
    return mQuantities.size();
  }
  
  public String getQuantity(int index)
  {
    return (String)mQuantities.get(index);
  }
  
  public String getValue(int index)
  {
    return (String)mValues.get(index);
  }
  
  public String getValue(String quantity)
  {
    assert (mQuantities.size() == mValues.size());
    int i = 0;
    for (int n = mQuantities.size(); i < n; i++) {
      if (quantity.equals(mQuantities.get(i))) {
        return (String)mValues.get(i);
      }
    }
    return null;
  }
  
  public String getValue()
  {
    if ((mValue == null) && 
      (!mValues.isEmpty())) {
      return getValue(0);
    }
    return mValue;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.PluralsResourceValue
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import com.android.resources.Density;
import com.android.resources.ScreenSize;

public abstract class RenderParams
{
  public static final long DEFAULT_TIMEOUT = 250L;
  private final Object mProjectKey;
  private final HardwareConfig mHardwareConfig;
  private final RenderResources mRenderResources;
  private final IProjectCallback mProjectCallback;
  private final int mMinSdkVersion;
  private final int mTargetSdkVersion;
  private final LayoutLog mLog;
  private boolean mCustomBackgroundEnabled;
  private int mCustomBackgroundColor;
  private long mTimeout;
  private IImageFactory mImageFactory = null;
  private String mAppIcon = null;
  private String mAppLabel = null;
  private String mLocale = null;
  private boolean mForceNoDecor;
  private boolean mSupportsRtl;
  
  public RenderParams(Object projectKey, HardwareConfig hardwareConfig, RenderResources renderResources, IProjectCallback projectCallback, int minSdkVersion, int targetSdkVersion, LayoutLog log)
  {
    mProjectKey = projectKey;
    mHardwareConfig = hardwareConfig;
    mRenderResources = renderResources;
    mProjectCallback = projectCallback;
    mMinSdkVersion = minSdkVersion;
    mTargetSdkVersion = targetSdkVersion;
    mLog = log;
    mCustomBackgroundEnabled = false;
    mTimeout = 250L;
  }
  
  public RenderParams(RenderParams params)
  {
    mProjectKey = mProjectKey;
    mHardwareConfig = mHardwareConfig;
    mRenderResources = mRenderResources;
    mProjectCallback = mProjectCallback;
    mMinSdkVersion = mMinSdkVersion;
    mTargetSdkVersion = mTargetSdkVersion;
    mLog = mLog;
    mCustomBackgroundEnabled = mCustomBackgroundEnabled;
    mCustomBackgroundColor = mCustomBackgroundColor;
    mTimeout = mTimeout;
    mImageFactory = mImageFactory;
    mAppIcon = mAppIcon;
    mAppLabel = mAppLabel;
    mLocale = mLocale;
    mForceNoDecor = mForceNoDecor;
    mSupportsRtl = mSupportsRtl;
  }
  
  public void setOverrideBgColor(int color)
  {
    mCustomBackgroundEnabled = true;
    mCustomBackgroundColor = color;
  }
  
  public void setTimeout(long timeout)
  {
    mTimeout = timeout;
  }
  
  public void setImageFactory(IImageFactory imageFactory)
  {
    mImageFactory = imageFactory;
  }
  
  public void setAppIcon(String appIcon)
  {
    mAppIcon = appIcon;
  }
  
  public void setAppLabel(String appLabel)
  {
    mAppLabel = appLabel;
  }
  
  public void setLocale(String locale)
  {
    mLocale = locale;
  }
  
  public void setForceNoDecor()
  {
    mForceNoDecor = true;
  }
  
  public void setRtlSupport(boolean supportsRtl)
  {
    mSupportsRtl = supportsRtl;
  }
  
  public Object getProjectKey()
  {
    return mProjectKey;
  }
  
  public HardwareConfig getHardwareConfig()
  {
    return mHardwareConfig;
  }
  
  public int getMinSdkVersion()
  {
    return mMinSdkVersion;
  }
  
  public int getTargetSdkVersion()
  {
    return mTargetSdkVersion;
  }
  
  @Deprecated
  public int getScreenWidth()
  {
    return mHardwareConfig.getScreenWidth();
  }
  
  @Deprecated
  public int getScreenHeight()
  {
    return mHardwareConfig.getScreenHeight();
  }
  
  @Deprecated
  public Density getDensity()
  {
    return mHardwareConfig.getDensity();
  }
  
  @Deprecated
  public float getXdpi()
  {
    return mHardwareConfig.getXdpi();
  }
  
  @Deprecated
  public float getYdpi()
  {
    return mHardwareConfig.getYdpi();
  }
  
  public RenderResources getResources()
  {
    return mRenderResources;
  }
  
  public IProjectCallback getProjectCallback()
  {
    return mProjectCallback;
  }
  
  public LayoutLog getLog()
  {
    return mLog;
  }
  
  public boolean isBgColorOverridden()
  {
    return mCustomBackgroundEnabled;
  }
  
  public int getOverrideBgColor()
  {
    return mCustomBackgroundColor;
  }
  
  public long getTimeout()
  {
    return mTimeout;
  }
  
  public IImageFactory getImageFactory()
  {
    return mImageFactory;
  }
  
  @Deprecated
  public ScreenSize getConfigScreenSize()
  {
    return mHardwareConfig.getScreenSize();
  }
  
  public String getAppIcon()
  {
    return mAppIcon;
  }
  
  public String getAppLabel()
  {
    return mAppLabel;
  }
  
  public String getLocale()
  {
    return mLocale;
  }
  
  public boolean isForceNoDecor()
  {
    return mForceNoDecor;
  }
  
  public boolean isRtlSupported()
  {
    return mSupportsRtl;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.RenderParams
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import com.android.resources.ResourceType;

public class RenderResources$FrameworkResourceIdProvider
{
  public Integer getId(ResourceType resType, String resName)
  {
    return null;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.RenderResources.FrameworkResourceIdProvider
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import com.android.resources.ResourceType;

public class RenderResources
{
  public static final String REFERENCE_NULL = "@null";
  public void setFrameworkResourceIdProvider(FrameworkResourceIdProvider provider) {}
  
  public void setLogger(LayoutLog logger) {}
  
  public static class FrameworkResourceIdProvider
  {
    public Integer getId(ResourceType resType, String resName)
    {
      return null;
    }
  }
  
  public StyleResourceValue getCurrentTheme()
  {
    return null;
  }
  
  public StyleResourceValue getTheme(String name, boolean frameworkTheme)
  {
    return null;
  }
  
  public boolean themeIsParentOf(StyleResourceValue parentTheme, StyleResourceValue childTheme)
  {
    return false;
  }
  
  public ResourceValue getFrameworkResource(ResourceType resourceType, String resourceName)
  {
    return null;
  }
  
  public ResourceValue getProjectResource(ResourceType resourceType, String resourceName)
  {
    return null;
  }
  
  @Deprecated
  public ResourceValue findItemInTheme(String itemName)
  {
    StyleResourceValue currentTheme = getCurrentTheme();
    if (currentTheme != null) {
      return findItemInStyle(currentTheme, itemName);
    }
    return null;
  }
  
  public ResourceValue findItemInTheme(String attrName, boolean isFrameworkAttr)
  {
    StyleResourceValue currentTheme = getCurrentTheme();
    if (currentTheme != null) {
      return findItemInStyle(currentTheme, attrName, isFrameworkAttr);
    }
    return null;
  }
  
  @Deprecated
  public ResourceValue findItemInStyle(StyleResourceValue style, String attrName)
  {
    return null;
  }
  
  public ResourceValue findItemInStyle(StyleResourceValue style, String attrName, boolean isFrameworkAttr)
  {
    return null;
  }
  
  public ResourceValue findResValue(String reference, boolean forceFrameworkOnly)
  {
    return null;
  }
  
  public ResourceValue resolveValue(ResourceType type, String name, String value, boolean isFrameworkValue)
  {
    return null;
  }
  
  public ResourceValue resolveResValue(ResourceValue value)
  {
    return null;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.RenderResources
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import java.awt.image.BufferedImage;
import java.util.List;
import java.util.Map;

public class RenderSession
{
  public Result getResult()
  {
    return Result.Status.NOT_IMPLEMENTED.createResult();
  }
  
  public List<ViewInfo> getRootViews()
  {
    return null;
  }
  
  public BufferedImage getImage()
  {
    return null;
  }
  
  public boolean isAlphaChannelImage()
  {
    return true;
  }
  
  public Map<String, String> getDefaultProperties(Object viewObject)
  {
    return null;
  }
  
  public Result render()
  {
    return render(250L);
  }
  
  public Result render(long timeout)
  {
    return Result.Status.NOT_IMPLEMENTED.createResult();
  }
  
  public Result setProperty(Object objectView, String propertyName, String propertyValue)
  {
    return Result.Status.NOT_IMPLEMENTED.createResult();
  }
  
  public Result getProperty(Object objectView, String propertyName)
  {
    return Result.Status.NOT_IMPLEMENTED.createResult();
  }
  
  public Result insertChild(Object parentView, ILayoutPullParser childXml, int index, IAnimationListener listener)
  {
    return Result.Status.NOT_IMPLEMENTED.createResult();
  }
  
  public Result moveChild(Object parentView, Object childView, int index, Map<String, String> layoutParams, IAnimationListener listener)
  {
    return Result.Status.NOT_IMPLEMENTED.createResult();
  }
  
  public Result removeChild(Object childView, IAnimationListener listener)
  {
    return Result.Status.NOT_IMPLEMENTED.createResult();
  }
  
  public Result animate(Object targetObject, String animationName, boolean isFrameworkAnimation, IAnimationListener listener)
  {
    return Result.Status.NOT_IMPLEMENTED.createResult();
  }
  
  public void dispose() {}
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.RenderSession
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

public class ResourceReference
{
  private final String mName;
  private final boolean mIsFramework;
  
  public ResourceReference(String name, boolean isFramework)
  {
    mName = name;
    mIsFramework = isFramework;
  }
  
  public ResourceReference(String name)
  {
    this(name, false);
  }
  
  public final String getName()
  {
    return mName;
  }
  
  public final boolean isFramework()
  {
    return mIsFramework;
  }
  
  public int hashCode()
  {
    int prime = 31;
    int result = 1;
    result = 31 * result + (mIsFramework ? 1231 : 1237);
    result = 31 * result + (mName == null ? 0 : mName.hashCode());
    return result;
  }
  
  public boolean equals(Object obj)
  {
    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    if (getClass() != obj.getClass()) {
      return false;
    }
    ResourceReference other = (ResourceReference)obj;
    if (mIsFramework != mIsFramework) {
      return false;
    }
    if (mName == null)
    {
      if (mName != null) {
        return false;
      }
    }
    else if (!mName.equals(mName)) {
      return false;
    }
    return true;
  }
  
  public String toString()
  {
    return "ResourceReference [" + mName + " (framework:" + mIsFramework + ")]";
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.ResourceReference
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import com.android.layoutlib.api.IResourceValue;
import com.android.resources.ResourceType;

public class ResourceValue
  extends ResourceReference
  implements IResourceValue
{
  private final ResourceType mType;
  protected String mValue = null;
  
  public ResourceValue(ResourceType type, String name, boolean isFramework)
  {
    super(name, isFramework);
    mType = type;
  }
  
  public ResourceValue(ResourceType type, String name, String value, boolean isFramework)
  {
    super(name, isFramework);
    mType = type;
    mValue = value;
  }
  
  public ResourceType getResourceType()
  {
    return mType;
  }
  
  @Deprecated
  public String getType()
  {
    return mType.getName();
  }
  
  public String getValue()
  {
    return mValue;
  }
  
  public void setValue(String value)
  {
    mValue = value;
  }
  
  public void replaceWith(ResourceValue value)
  {
    mValue = mValue;
  }
  
  public String toString()
  {
    return "ResourceValue [" + mType + "/" + getName() + " = " + mValue + " (framework:" + isFramework() + ")]";
  }
  
  public int hashCode()
  {
    int prime = 31;
    int result = super.hashCode();
    result = 31 * result + (mType == null ? 0 : mType.hashCode());
    result = 31 * result + (mValue == null ? 0 : mValue.hashCode());
    return result;
  }
  
  public boolean equals(Object obj)
  {
    if (this == obj) {
      return true;
    }
    if (!super.equals(obj)) {
      return false;
    }
    if (getClass() != obj.getClass()) {
      return false;
    }
    ResourceValue other = (ResourceValue)obj;
    if (mType == null)
    {
      if (mType != null) {
        return false;
      }
    }
    else if (!mType.equals(mType)) {
      return false;
    }
    if (mValue == null)
    {
      if (mValue != null) {
        return false;
      }
    }
    else if (!mValue.equals(mValue)) {
      return false;
    }
    return true;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.ResourceValue
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

class Result$1 {}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.Result.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

public enum Result$Status
{
  SUCCESS,  NOT_IMPLEMENTED,  ERROR_TIMEOUT,  ERROR_LOCK_INTERRUPTED,  ERROR_INFLATION,  ERROR_VIEWGROUP_NO_CHILDREN,  ERROR_NOT_INFLATED,  ERROR_RENDER,  ERROR_ANIM_NOT_FOUND,  ERROR_NOT_A_DRAWABLE,  ERROR_REFLECTION,  ERROR_UNKNOWN;
  
  private Result mResult;
  
  private Result$Status() {}
  
  public Result createResult()
  {
    assert (this != ERROR_UNKNOWN);
    if (mResult == null) {
      mResult = new Result(this, null);
    }
    return mResult;
  }
  
  public Result createResult(Object data)
  {
    Result res = createResult();
    if (data != null) {
      res = res.getCopyWithData(data);
    }
    return res;
  }
  
  public Result createResult(String errorMessage, Throwable throwable)
  {
    return new Result(this, errorMessage, throwable, null);
  }
  
  public Result createResult(String errorMessage)
  {
    return new Result(this, errorMessage, null, null);
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.Result.Status
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

public class Result
{
  private final Status mStatus;
  private final String mErrorMessage;
  private final Throwable mThrowable;
  private Object mData;
  
  public static enum Status
  {
    SUCCESS,  NOT_IMPLEMENTED,  ERROR_TIMEOUT,  ERROR_LOCK_INTERRUPTED,  ERROR_INFLATION,  ERROR_VIEWGROUP_NO_CHILDREN,  ERROR_NOT_INFLATED,  ERROR_RENDER,  ERROR_ANIM_NOT_FOUND,  ERROR_NOT_A_DRAWABLE,  ERROR_REFLECTION,  ERROR_UNKNOWN;
    
    private Result mResult;
    
    private Status() {}
    
    public Result createResult()
    {
      assert (this != ERROR_UNKNOWN);
      if (mResult == null) {
        mResult = new Result(this, null);
      }
      return mResult;
    }
    
    public Result createResult(Object data)
    {
      Result res = createResult();
      if (data != null) {
        res = res.getCopyWithData(data);
      }
      return res;
    }
    
    public Result createResult(String errorMessage, Throwable throwable)
    {
      return new Result(this, errorMessage, throwable, null);
    }
    
    public Result createResult(String errorMessage)
    {
      return new Result(this, errorMessage, null, null);
    }
  }
  
  private Result(Status status)
  {
    this(status, null, null);
  }
  
  private Result(Status status, String errorMessage, Throwable t)
  {
    assert (status != null);
    mStatus = status;
    mErrorMessage = errorMessage;
    mThrowable = t;
  }
  
  private Result(Result result)
  {
    mStatus = mStatus;
    mErrorMessage = mErrorMessage;
    mThrowable = mThrowable;
  }
  
  public Result getCopyWithData(Object data)
  {
    Result r = new Result(this);
    mData = data;
    return r;
  }
  
  public boolean isSuccess()
  {
    return mStatus == Status.SUCCESS;
  }
  
  public Status getStatus()
  {
    return mStatus;
  }
  
  public String getErrorMessage()
  {
    return mErrorMessage;
  }
  
  public Throwable getException()
  {
    return mThrowable;
  }
  
  public Object getData()
  {
    return mData;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.Result
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

public enum SessionParams$RenderingMode
{
  NORMAL(false, false),  V_SCROLL(false, true),  H_SCROLL(true, false),  FULL_EXPAND(true, true);
  
  private final boolean mHorizExpand;
  private final boolean mVertExpand;
  
  private SessionParams$RenderingMode(boolean horizExpand, boolean vertExpand)
  {
    mHorizExpand = horizExpand;
    mVertExpand = vertExpand;
  }
  
  public boolean isHorizExpand()
  {
    return mHorizExpand;
  }
  
  public boolean isVertExpand()
  {
    return mVertExpand;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.SessionParams.RenderingMode
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class SessionParams
  extends RenderParams
{
  private final ILayoutPullParser mLayoutDescription;
  private final RenderingMode mRenderingMode;
  
  public static enum RenderingMode
  {
    NORMAL(false, false),  V_SCROLL(false, true),  H_SCROLL(true, false),  FULL_EXPAND(true, true);
    
    private final boolean mHorizExpand;
    private final boolean mVertExpand;
    
    private RenderingMode(boolean horizExpand, boolean vertExpand)
    {
      mHorizExpand = horizExpand;
      mVertExpand = vertExpand;
    }
    
    public boolean isHorizExpand()
    {
      return mHorizExpand;
    }
    
    public boolean isVertExpand()
    {
      return mVertExpand;
    }
  }
  
  private boolean mLayoutOnly = false;
  private Map<ResourceReference, AdapterBinding> mAdapterBindingMap;
  private boolean mExtendedViewInfoMode = false;
  
  public SessionParams(ILayoutPullParser layoutDescription, RenderingMode renderingMode, Object projectKey, HardwareConfig hardwareConfig, RenderResources renderResources, IProjectCallback projectCallback, int minSdkVersion, int targetSdkVersion, LayoutLog log)
  {
    super(projectKey, hardwareConfig, renderResources, projectCallback, minSdkVersion, targetSdkVersion, log);
    
    mLayoutDescription = layoutDescription;
    mRenderingMode = renderingMode;
  }
  
  public SessionParams(SessionParams params)
  {
    super(params);
    mLayoutDescription = mLayoutDescription;
    mRenderingMode = mRenderingMode;
    if (mAdapterBindingMap != null) {
      mAdapterBindingMap = new HashMap(mAdapterBindingMap);
    }
    mExtendedViewInfoMode = mExtendedViewInfoMode;
  }
  
  public ILayoutPullParser getLayoutDescription()
  {
    return mLayoutDescription;
  }
  
  public RenderingMode getRenderingMode()
  {
    return mRenderingMode;
  }
  
  public void setLayoutOnly()
  {
    mLayoutOnly = true;
  }
  
  public boolean isLayoutOnly()
  {
    return mLayoutOnly;
  }
  
  public void addAdapterBinding(ResourceReference reference, AdapterBinding data)
  {
    if (mAdapterBindingMap == null) {
      mAdapterBindingMap = new HashMap();
    }
    mAdapterBindingMap.put(reference, data);
  }
  
  public Map<ResourceReference, AdapterBinding> getAdapterBindings()
  {
    if (mAdapterBindingMap == null) {
      return Collections.emptyMap();
    }
    return Collections.unmodifiableMap(mAdapterBindingMap);
  }
  
  public void setExtendedViewInfoMode(boolean mode)
  {
    mExtendedViewInfoMode = mode;
  }
  
  public boolean getExtendedViewInfoMode()
  {
    return mExtendedViewInfoMode;
  }
}

/* Location:
 * Qualified Name:     com.android.ide.common.rendering.api.SessionParams
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.android.ide.common.rendering.api;

import com.android.layoutlib.api.IResourceValue;
import com.android.layoutlib.api.IStyleResourceValue;
import com.android.resources.ResourceType;
import com.android.util.Pair;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public final class StyleResourceValue
  extends ResourceValue
  implements IStyleResourceValue
{
  private String mParentStyle = null;
  private Map<Pair<String, Boolean>, ResourceValue> mItems = new HashMap();
  
  publ
1 2 3

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd