|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.page.Scaler
Implements scaling methods which can be used to scale pixel values the same amount as the current system font differs from the standard font (on Windows: small fonts 96 DPI). If the system font is set to 125% (big fonts 120 DPI), the scaling funtions multiply their input by 1.25. The methods convertXToCurrent() and convertYToCurrent() do the scaling. The methods convertXToStandard() and convertYToStandard() do the inverse operation. Ther are different methods for X and Y directions because there may be different scaling factors in the future.
| Method Summary | |
int |
convertXToCurrent(int x)
scales the given value in X-direction. |
int |
convertXToStandard(int x)
converts back the given scaled value |
int |
convertYToCurrent(int y)
scales the given value in Y-direction. |
int |
convertYToStandard(int y)
converts back the given scaled value |
double |
getFactorX()
Returns the scaling factor in X-direction. |
double |
getFactorY()
Returns the scaling factor in Y-direction. |
static Scaler |
getInstance(org.eclipse.swt.widgets.Composite comp)
Get an instance of the scaler. |
boolean |
isScalingNecessary()
Determine if the scaling-factors are different from 1. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public double getFactorX()
public double getFactorY()
public boolean isScalingNecessary()
public int convertXToCurrent(int x)
public int convertYToCurrent(int y)
public int convertXToStandard(int x)
public int convertYToStandard(int y)
public static Scaler getInstance(org.eclipse.swt.widgets.Composite comp)
comp - one Composite or Shell of the application.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||