|
|
|
@ -9,6 +9,7 @@ import com.fr.base.GraphHelper;
|
|
|
|
|
import com.fr.base.ScreenResolution; |
|
|
|
|
import com.fr.base.Style; |
|
|
|
|
import com.fr.base.Utils; |
|
|
|
|
import com.fr.design.file.HistoryTemplateListPane; |
|
|
|
|
|
|
|
|
|
public class VerticalRulerUI extends RulerUI{ |
|
|
|
|
|
|
|
|
@ -22,8 +23,9 @@ public class VerticalRulerUI extends RulerUI{
|
|
|
|
|
for (int i = k; i < (pxToLength(size.height + extra) + 1) * ratio; i++) { |
|
|
|
|
g.setColor(BaseRuler.UNIT_SIGN_COLOR); |
|
|
|
|
if (i % BaseRuler.SCALE_10 == 0) { |
|
|
|
|
double times = (double) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getJTemplateResolution() / ScreenResolution.getScreenResolution(); |
|
|
|
|
String text = Utils.convertNumberStringToString(Math.round(i / times)); |
|
|
|
|
GraphHelper.drawLine(g, size.width, toPX(i) / ratio - extra, 0, toPX(i) / ratio - extra); |
|
|
|
|
String text = Utils.convertNumberStringToString(i / showText); |
|
|
|
|
Graphics2D gg = (Graphics2D) g.create(0, (int) (toPX(i) / ratio - extra + 1), size.width, BaseRuler.NUMBER_99); |
|
|
|
|
BaseUtils.drawStringStyleInRotation(gg, BaseRuler.NUMBER_11, BaseRuler.NUMBER_100, text, Style.getInstance().deriveVerticalAlignment(1).deriveRotation( |
|
|
|
|
BaseRuler.NUMBER_90).deriveFRFont(BaseRuler.TEXT_FONT), ScreenResolution.getScreenResolution()); |
|
|
|
|