当前位置: 首页>>代码示例>>Java>>正文


Java WXComponentProp类代码示例

本文整理汇总了Java中com.taobao.weex.ui.component.WXComponentProp的典型用法代码示例。如果您正苦于以下问题:Java WXComponentProp类的具体用法?Java WXComponentProp怎么用?Java WXComponentProp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


WXComponentProp类属于com.taobao.weex.ui.component包,在下文中一共展示了WXComponentProp类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setStrokeLinecap

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = "strokeLinecap")
public void setStrokeLinecap(int strokeLinecap) {
  switch (strokeLinecap) {
    case CAP_BUTT:
      mStrokeLinecap = Paint.Cap.BUTT;
      break;
    case CAP_SQUARE:
      mStrokeLinecap = Paint.Cap.SQUARE;
      break;
    case CAP_ROUND:
      mStrokeLinecap = Paint.Cap.ROUND;
      break;
    default:
      Log.v(TAG, "strokeLinecap " + mStrokeLinecap + " unrecognized");
  }

}
 
开发者ID:weex-plugins,项目名称:weex-svg,代码行数:18,代码来源:WXSvgPath.java

示例2: setStrokeLinejoin

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = "strokelinejoin")
public void setStrokeLinejoin(int strokeLinejoin) {
  switch (strokeLinejoin) {
    case JOIN_MITER:
      mStrokeLinejoin = Paint.Join.MITER;
      break;
    case JOIN_BEVEL:
      mStrokeLinejoin = Paint.Join.BEVEL;
      break;
    case JOIN_ROUND:
      mStrokeLinejoin = Paint.Join.ROUND;
      break;
    default:
      Log.v(TAG, "strokeLinejoin " + mStrokeLinejoin + " unrecognized");
  }

}
 
开发者ID:weex-plugins,项目名称:weex-svg,代码行数:18,代码来源:WXSvgPath.java

示例3: setViewBox

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = "viewBox")
public void setViewBox(String viewBox) {
  String box = viewBox;
  Log.v("WXSvgContainer", "box is " + box);
  if (!TextUtils.isEmpty(box)) {
    String[] p = box.split(" ");
    if (p != null && p.length == 4) {
      mViewBoxX = Integer.valueOf(p[0]);
      mViewBoxY = Integer.valueOf(p[1]);
      mviewBoxWidth = Integer.valueOf(p[2]);
      mviewBoxHeight = Integer.valueOf(p[3]);
    }
  }
}
 
开发者ID:weex-plugins,项目名称:weex-svg,代码行数:15,代码来源:WXSvgContainer.java

示例4: setClipRule

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = "clipRule")
public void setClipRule(int clipRule) {
  mClipRule = clipRule;
  mClipRuleSet = true;
  setupClip();

}
 
开发者ID:weex-plugins,项目名称:weex-svg,代码行数:8,代码来源:WXSvgAbsComponent.java

示例5: setFillRule

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = "fillRule")
public void setFillRule(int fillRule) {
  switch (fillRule) {
    case FILL_RULE_EVENODD:
      mFillRule = Path.FillType.EVEN_ODD;
      break;
    case FILL_RULE_NONZERO:
      break;
    default:
      Log.v(TAG, "fillRule " + mFillRule + " unrecognized");
  }

  mFillRuleSet = true;
  setupPath();
}
 
开发者ID:weex-plugins,项目名称:weex-svg,代码行数:16,代码来源:WXSvgPath.java

示例6: setColumnWidth

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = Constants.Name.COLUMN_WIDTH)
public void setColumnWidth(int columnCount)  {
  if(mDomObject.getColumnWidth() != mColumnWidth){
    markComponentUsable();
    updateRecyclerAttr();
    WXRecyclerView wxRecyclerView = getHostView().getInnerView();
    wxRecyclerView.initView(getContext(), mLayoutType,mColumnCount,mColumnGap,getOrientation());
  }
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:10,代码来源:WXListComponent.java

示例7: setColumnCount

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = Constants.Name.COLUMN_COUNT)
public void setColumnCount(int columnCount){
  if(mDomObject.getColumnCount() != mColumnCount){
    markComponentUsable();
    updateRecyclerAttr();
    WXRecyclerView wxRecyclerView = getHostView().getInnerView();
    wxRecyclerView.initView(getContext(), mLayoutType,mColumnCount,mColumnGap,getOrientation());
  }
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:10,代码来源:WXListComponent.java

示例8: setColumnGap

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = Constants.Name.COLUMN_GAP)
public void setColumnGap(float columnGap) throws InterruptedException {
  if(mDomObject.getColumnGap() != mColumnGap) {
    markComponentUsable();
    updateRecyclerAttr();
    WXRecyclerView wxRecyclerView = getHostView().getInnerView();
    wxRecyclerView.initView(getContext(), mLayoutType, mColumnCount, mColumnGap, getOrientation());
  }
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:10,代码来源:WXListComponent.java

示例9: setScrollable

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = Constants.Name.SCROLLABLE)
public void setScrollable(boolean scrollable) {
  this.isScrollable = scrollable;
  WXRecyclerView inner = getHostView().getInnerView();
  if(inner != null) {
    inner.setScrollable(scrollable);
  }
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:9,代码来源:BasicListComponent.java

示例10: setDraggable

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = Constants.Name.DRAGGABLE)
public void setDraggable(boolean isDraggable) {
  if (mDragHelper != null) {
    mDragHelper.setDraggable(isDraggable);
  }
  if (WXEnvironment.isApkDebugable()) {
    WXLogUtils.d("set draggable : " + isDraggable);
  }
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:10,代码来源:BasicListComponent.java

示例11: setScrollable

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = Constants.Name.SCROLLABLE)
public void setScrollable(boolean scrollable) {
  View inner = getHostView().getInnerView();
  if (inner instanceof WXRecyclerView) {
    ((WXRecyclerView) inner).setScrollable(scrollable);
  }
  ;
}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:9,代码来源:BasicListComponent.java

示例12: generate

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
private synchronized void generate(){
  WXLogUtils.d(TAG,"Generate Component:"+mClz.getSimpleName());
  HashMap<String, Invoker> methods = new HashMap<>();

  Annotation[] annotations;
  Annotation anno;
  for (Method method : mClz.getMethods()) {
    annotations = method.getDeclaredAnnotations();
    for (int i = 0,annotationsCount = annotations.length;
         i < annotationsCount; ++i) {
      anno = annotations[i];
      if (anno != null && anno instanceof WXComponentProp) {
        String name = ((WXComponentProp) anno).name();
        methods.put(name, new MethodInvoker(method));
        break;
      }
    }
  }

  mMethods = methods;
  try {
    mConstructor = mClz.getConstructor(WXSDKInstance.class, WXDomObject.class, WXVContainer.class, boolean.class);
  } catch (NoSuchMethodException e) {
    try {
      //compatible deprecated constructor
      mConstructor = mClz.getConstructor(WXSDKInstance.class, WXDomObject.class, WXVContainer.class,String.class, boolean.class);
    } catch (NoSuchMethodException e1) {
      e1.printStackTrace();
      throw new WXRuntimeException("Can't find constructor of component.");
    }
    e.printStackTrace();
  }
}
 
开发者ID:Laisly,项目名称:weex,代码行数:34,代码来源:ComponentHolder.java

示例13: setOffset

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = "offset")
public void setOffset(String offset) {
  mOffset = offset;
}
 
开发者ID:weex-plugins,项目名称:weex-svg,代码行数:5,代码来源:WXSvgStop.java

示例14: setStopColor

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = "stopColor")
public void setStopColor(String stopColor) {
  mStopColor = stopColor;
}
 
开发者ID:weex-plugins,项目名称:weex-svg,代码行数:5,代码来源:WXSvgStop.java

示例15: setWidth

import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = Constants.Name.WIDTH)
public void setWidth(int width) {
  mWidth = width;
  getHostView().getLayoutParams().width = (int) WXViewUtils.getRealPxByWidth(width, 750);
}
 
开发者ID:weex-plugins,项目名称:weex-svg,代码行数:6,代码来源:WXSvgContainer.java


注:本文中的com.taobao.weex.ui.component.WXComponentProp类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。