@Test public void testSetProperties() throws Exception { component.setProperty(WXSliderNeighbor.NEIGHBOR_ALPHA,0.4f); component.setProperty(WXSliderNeighbor.NEIGHBOR_SCALE,0.9f); }
@Override protected boolean setProperty(String key, Object param) { String input; switch (key) { case NEIGHBOR_SCALE: input = WXUtils.getString(param, null); if (input != null) { setNeighborScale(input); } return true; case NEIGHBOR_ALPHA: input = WXUtils.getString(param, null); if (input != null) { setNeighborAlpha(input); } return true; case NEIGHBOR_SPACE: input = WXUtils.getString(param, null); if (input != null) { setNeighborSpace(input); } return true; } return super.setProperty(key, param); }
WXSliderNeighbor extends WXSlider { @Override protected boolean setProperty(String key, Object param) { String input; switch (key) { case NEIGHBOR_SCALE: input = WXUtils.getString(param, null); if (input != null) { setNeighborScale(input); } return true; case NEIGHBOR_ALPHA: input = WXUtils.getString(param, null); if (input != null) { setNeighborAlpha(input); } return true; case NEIGHBOR_SPACE: input = WXUtils.getString(param, null); if (input != null) { setNeighborSpace(input); } return true; } return super.setProperty(key, param); } }
WXSliderNeighbor extends WXSlider { @Override protected boolean setProperty(String key, Object param) { String input; switch (key) { case NEIGHBOR_SCALE: input = WXUtils.getString(param, null); if (input != null) { setNeighborScale(input); } return true; case NEIGHBOR_ALPHA: input = WXUtils.getString(param, null); if (input != null) { setNeighborAlpha(input); } return true; case NEIGHBOR_SPACE: input = WXUtils.getString(param, null); if (input != null) { setNeighborSpace(input); } return true; } return super.setProperty(key, param); } WXSliderNeighbor(WXSDKInstance instance, WXDomObject node, WXVContainer parent); }
WXSliderNeighbor extends WXSlider { @Override protected boolean setProperty(String key, Object param) { String input; switch (key) { case NEIGHBOR_SCALE: input = WXUtils.getString(param, null); if (input != null) { setNeighborScale(input); } return true; case NEIGHBOR_ALPHA: input = WXUtils.getString(param, null); if (input != null) { setNeighborAlpha(input); } return true; case NEIGHBOR_SPACE: input = WXUtils.getString(param, null); if (input != null) { setNeighborSpace(input); } return true; } return super.setProperty(key, param); } WXSliderNeighbor(WXSDKInstance instance, WXDomObject node, WXVContainer parent); @Override void bindData(WXComponent component); @WXComponentProp(name = NEIGHBOR_SCALE) void setNeighborScale(String input); @WXComponentProp(name = NEIGHBOR_ALPHA) void setNeighborAlpha(String input); @WXComponentProp(name = NEIGHBOR_SPACE) @SuppressWarnings("unused") void setNeighborSpace(String input); }
WXSliderNeighbor extends WXSlider { @Override protected boolean setProperty(String key, Object param) { String input; switch (key) { case NEIGHBOR_SCALE: input = WXUtils.getString(param, null); if (input != null) { setNeighborScale(input); } return true; case NEIGHBOR_ALPHA: input = WXUtils.getString(param, null); if (input != null) { setNeighborAlpha(input); } return true; case NEIGHBOR_SPACE: input = WXUtils.getString(param, null); if (input != null) { setNeighborSpace(input); } return true; } return super.setProperty(key, param); } WXSliderNeighbor(WXSDKInstance instance, WXDomObject node, WXVContainer parent); @Override void bindData(WXComponent component); @WXComponentProp(name = NEIGHBOR_SCALE) void setNeighborScale(String input); @WXComponentProp(name = NEIGHBOR_ALPHA) void setNeighborAlpha(String input); @WXComponentProp(name = NEIGHBOR_SPACE) @SuppressWarnings("unused") void setNeighborSpace(String input); static final String NEIGHBOR_SCALE; static final String NEIGHBOR_ALPHA; static final String NEIGHBOR_SPACE; }