本文整理汇总了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");
}
}
示例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");
}
}
示例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]);
}
}
}
示例4: setClipRule
import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = "clipRule")
public void setClipRule(int clipRule) {
mClipRule = clipRule;
mClipRuleSet = true;
setupClip();
}
示例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();
}
示例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());
}
}
示例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());
}
}
示例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());
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
;
}
示例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();
}
}
示例13: setOffset
import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = "offset")
public void setOffset(String offset) {
mOffset = offset;
}
示例14: setStopColor
import com.taobao.weex.ui.component.WXComponentProp; //导入依赖的package包/类
@WXComponentProp(name = "stopColor")
public void setStopColor(String stopColor) {
mStopColor = stopColor;
}
示例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);
}