63 lines
2.1 KiB
Java
63 lines
2.1 KiB
Java
package com.ubt.jimu.controller.data.widget;
|
|
|
|
import android.content.Context;
|
|
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
|
import com.thoughtworks.xstream.annotations.XStreamOmitField;
|
|
import com.ubt.jimu.R;
|
|
import com.ubt.jimu.controller.data.config.HSliderConfig;
|
|
|
|
@XStreamConverter(priority = 9999, value = HSliderDataConverter.class)
|
|
/* loaded from: classes.dex */
|
|
public class HSliderWidgetData extends MoveBaseData<HSliderConfig> {
|
|
|
|
@XStreamOmitField
|
|
private HSliderConfig config;
|
|
|
|
public HSliderWidgetData() {
|
|
}
|
|
|
|
@Override // com.ubt.jimu.controller.data.widget.MoveBaseData
|
|
public String getShowName(Context context) {
|
|
return String.format(context.getResources().getString(R.string.servo_mode_servo_index), Integer.valueOf(getConfig().getServoID()));
|
|
}
|
|
|
|
@Override // com.ubt.jimu.controller.data.widget.ItemBaseData
|
|
public String getWidgetInfo(Context context) {
|
|
HSliderConfig config = getConfig();
|
|
if (config == null) {
|
|
return "";
|
|
}
|
|
return String.format(context.getResources().getString(R.string.servo_mode_servo_index), Integer.valueOf(config.getServoID())) + "(" + config.getMinAngle() + "°~" + config.getMaxAngle() + "°)";
|
|
}
|
|
|
|
@Override // com.ubt.jimu.controller.data.widget.ItemBaseData
|
|
public String toString() {
|
|
return super.toString() + " " + getConfig().toString();
|
|
}
|
|
|
|
public HSliderWidgetData(String str) {
|
|
super(str);
|
|
}
|
|
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // com.ubt.jimu.controller.data.widget.MoveBaseData
|
|
public HSliderConfig getConfig() {
|
|
return this.config;
|
|
}
|
|
|
|
@Override // com.ubt.jimu.controller.data.widget.MoveBaseData
|
|
public void setConfig(HSliderConfig hSliderConfig) {
|
|
super.setConfig((HSliderWidgetData) hSliderConfig);
|
|
this.config = hSliderConfig;
|
|
}
|
|
|
|
public HSliderWidgetData(String str, float f, float f2) {
|
|
super(str, f, f2);
|
|
}
|
|
|
|
@Deprecated
|
|
public HSliderWidgetData(String str, byte b, int i, int i2, float f, float f2) {
|
|
super(str, f, f2);
|
|
}
|
|
}
|