22package org .csstudio .display .extra .widgets .linearmeter ;
33
44import static org .csstudio .javafx .rtplot .Activator .logger ;
5+ import static org .csstudio .javafx .rtplot .internal .util .Log10 .log10 ;
56
67import java .awt .BasicStroke ;
78import java .awt .Canvas ;
@@ -759,15 +760,15 @@ private Optional<Integer> computeIndicatorPosition(double value) {
759760 return withReadLock (() -> {
760761 if (linearMeterScale .isHorizontal ()) {
761762 if (linearMeterScale .isLogarithmic ()) {
762- return Optional .of ((int ) Math .round (marginLeft + pixelsPerScaleUnit * (Math . log10 (value ) - Math . log10 (linearMeterScale .getValueRange ().getLow ()))));
763+ return Optional .of ((int ) Math .round (marginLeft + pixelsPerScaleUnit * (log10 (value ) - log10 (linearMeterScale .getValueRange ().getLow ()))));
763764 }
764765 else {
765766 return Optional .of ((int ) Math .round (marginLeft + pixelsPerScaleUnit * (value - linearMeterScale .getValueRange ().getLow ())));
766767 }
767768 }
768769 else {
769770 if (linearMeterScale .isLogarithmic ()) {
770- return Optional .of ((int ) Math .round (linearMeterScale .getBounds ().height - marginBelow - pixelsPerScaleUnit * (Math . log10 (value ) - Math . log10 (linearMeterScale .getValueRange ().getLow ()))));
771+ return Optional .of ((int ) Math .round (linearMeterScale .getBounds ().height - marginBelow - pixelsPerScaleUnit * (log10 (value ) - log10 (linearMeterScale .getValueRange ().getLow ()))));
771772 }
772773 else {
773774 return Optional .of ((int ) Math .round (linearMeterScale .getBounds ().height - marginBelow - pixelsPerScaleUnit * (value - linearMeterScale .getValueRange ().getLow ())));
@@ -1343,7 +1344,7 @@ private void layout() {
13431344 }
13441345
13451346 if (linearMeterScale .isLogarithmic ()) {
1346- pixelsPerScaleUnit = (linearMeterScale .getBounds ().width - marginLeft - marginRight - 1 ) / (Math . log10 (linearMeterScale .getValueRange ().getHigh ()) - Math . log10 (linearMeterScale .getValueRange ().getLow ()));
1347+ pixelsPerScaleUnit = (linearMeterScale .getBounds ().width - marginLeft - marginRight - 1 ) / (log10 (linearMeterScale .getValueRange ().getHigh ()) - log10 (linearMeterScale .getValueRange ().getLow ()));
13471348 }
13481349 else {
13491350 pixelsPerScaleUnit = (linearMeterScale .getBounds ().width - marginLeft - marginRight - 1 ) / (linearMeterScale .getValueRange ().getHigh () - linearMeterScale .getValueRange ().getLow ());
@@ -1357,10 +1358,10 @@ private void layout() {
13571358 double x_hiHiRectangle ;
13581359 if (linearMeterScale .isLogarithmic ()) {
13591360 x_loLoRectangle = marginLeft ;
1360- x_lowRectangle = marginLeft + pixelsPerScaleUnit * (Math . log10 (displayedLoLo ) - Math . log10 (linearMeterScale .getValueRange ().getLow ()));
1361- x_normalRectangle = marginLeft + pixelsPerScaleUnit * (Math . log10 (displayedLow ) - Math . log10 (linearMeterScale .getValueRange ().getLow ()));
1362- x_highRectangle = marginLeft + pixelsPerScaleUnit * (Math . log10 (displayedHigh ) - Math . log10 (linearMeterScale .getValueRange ().getLow ()));
1363- x_hiHiRectangle = marginLeft + pixelsPerScaleUnit * (Math . log10 (displayedHiHi ) - Math . log10 (linearMeterScale .getValueRange ().getLow ()));
1361+ x_lowRectangle = marginLeft + pixelsPerScaleUnit * (log10 (displayedLoLo ) - log10 (linearMeterScale .getValueRange ().getLow ()));
1362+ x_normalRectangle = marginLeft + pixelsPerScaleUnit * (log10 (displayedLow ) - log10 (linearMeterScale .getValueRange ().getLow ()));
1363+ x_highRectangle = marginLeft + pixelsPerScaleUnit * (log10 (displayedHigh ) - log10 (linearMeterScale .getValueRange ().getLow ()));
1364+ x_hiHiRectangle = marginLeft + pixelsPerScaleUnit * (log10 (displayedHiHi ) - log10 (linearMeterScale .getValueRange ().getLow ()));
13641365 }
13651366 else {
13661367 x_loLoRectangle = marginLeft ;
@@ -1393,7 +1394,7 @@ private void layout() {
13931394
13941395 int hihiWidth ;
13951396 if (linearMeterScale .isLogarithmic ()) {
1396- hihiWidth = (int ) (Math .round (pixelsPerScaleUnit * (Math . log10 (linearMeterScale .getValueRange ().getHigh ()) - Math . log10 (displayedHiHi ))));
1397+ hihiWidth = (int ) (Math .round (pixelsPerScaleUnit * (log10 (linearMeterScale .getValueRange ().getHigh ()) - log10 (displayedHiHi ))));
13971398 }
13981399 else {
13991400 hihiWidth = (int ) (Math .round (pixelsPerScaleUnit * (linearMeterScale .getValueRange ().getHigh () - displayedHiHi )));
@@ -1428,7 +1429,7 @@ private void layout() {
14281429 }
14291430
14301431 if (linearMeterScale .isLogarithmic ()) {
1431- pixelsPerScaleUnit = (linearMeterScale .getBounds ().height - marginAbove - marginBelow - 1 ) / (Math . log10 (linearMeterScale .getValueRange ().getHigh ()) - Math . log10 (linearMeterScale .getValueRange ().getLow ()));
1432+ pixelsPerScaleUnit = (linearMeterScale .getBounds ().height - marginAbove - marginBelow - 1 ) / (log10 (linearMeterScale .getValueRange ().getHigh ()) - log10 (linearMeterScale .getValueRange ().getLow ()));
14321433 }
14331434 else {
14341435 pixelsPerScaleUnit = (linearMeterScale .getBounds ().height - marginAbove - marginBelow - 1 ) / (linearMeterScale .getValueRange ().getHigh () - linearMeterScale .getValueRange ().getLow ());
@@ -1440,10 +1441,10 @@ private void layout() {
14401441 double y_normalRectangle ;
14411442 double y_highRectangle ;
14421443 if (linearMeterScale .isLogarithmic ()) {
1443- y_loLoRectangle = marginAbove + pixelsPerScaleUnit * (Math . log10 (linearMeterScale .getValueRange ().getHigh ()) - Math . log10 (displayedLoLo ));
1444- y_lowRectangle = marginAbove + pixelsPerScaleUnit * (Math . log10 (linearMeterScale .getValueRange ().getHigh ()) - Math . log10 (displayedLow ));
1445- y_normalRectangle = marginAbove + pixelsPerScaleUnit * (Math . log10 (linearMeterScale .getValueRange ().getHigh ()) - Math . log10 (displayedHigh ));
1446- y_highRectangle = marginAbove + pixelsPerScaleUnit * (Math . log10 (linearMeterScale .getValueRange ().getHigh ()) - Math . log10 (displayedHiHi ));
1444+ y_loLoRectangle = marginAbove + pixelsPerScaleUnit * (log10 (linearMeterScale .getValueRange ().getHigh ()) - log10 (displayedLoLo ));
1445+ y_lowRectangle = marginAbove + pixelsPerScaleUnit * (log10 (linearMeterScale .getValueRange ().getHigh ()) - log10 (displayedLow ));
1446+ y_normalRectangle = marginAbove + pixelsPerScaleUnit * (log10 (linearMeterScale .getValueRange ().getHigh ()) - log10 (displayedHigh ));
1447+ y_highRectangle = marginAbove + pixelsPerScaleUnit * (log10 (linearMeterScale .getValueRange ().getHigh ()) - log10 (displayedHiHi ));
14471448 }
14481449 else {
14491450 y_loLoRectangle = marginAbove + pixelsPerScaleUnit * (linearMeterScale .getValueRange ().getHigh () - displayedLoLo );
0 commit comments