You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
784 B
32 lines
784 B
package com.fr.design.mainframe; |
|
|
|
import com.fr.design.fun.impl.AbstractReportLengthUNITProvider; |
|
import com.fr.stable.unit.UNIT; |
|
|
|
/** |
|
* Created by kerry on 2020-04-09 |
|
*/ |
|
public class PXReportLengthUNIT extends AbstractReportLengthUNITProvider { |
|
public static final short UNIT_TYPE = 4; |
|
|
|
@Override |
|
public String unitText() { |
|
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Px"); |
|
} |
|
|
|
@Override |
|
public int unitType() { |
|
return UNIT_TYPE; |
|
} |
|
|
|
@Override |
|
public float unit2Value4Scale(UNIT value) { |
|
int resolution = DesignerUIModeConfig.getInstance().getScreenResolution(); |
|
return value.toPixF(resolution); |
|
} |
|
|
|
@Override |
|
public UNIT float2UNIT(float value) { |
|
return new PX(value); |
|
} |
|
}
|
|
|