|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.nebula.widgets.nattable.layer.AbstractDpiConverter
public abstract class AbstractDpiConverter
Abstract implementation for IDpiConverter that predefines dpi
conversion factors and methods that convert based on these factors.
| Field Summary | |
|---|---|
protected Integer |
dpi
|
| Constructor Summary | |
|---|---|
AbstractDpiConverter()
|
|
| Method Summary | |
|---|---|
int |
convertDpiToPixel(int dpi)
Converts the given DPI scaled value to a pixel value. |
int |
convertPixelToDpi(int pixel)
Converts the given amount of pixels to a DPI scaled value. |
float |
getCurrentDpiFactor()
|
int |
getDpi()
Returns the dots per inch of the display. |
protected abstract void |
readDpiFromDisplay()
Sets the value for the dpi member variable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Integer dpi
| Constructor Detail |
|---|
public AbstractDpiConverter()
| Method Detail |
|---|
protected abstract void readDpiFromDisplay()
IMPORTANT:
Ensure the load operation is done in the UI thread!
public int getDpi()
IDpiConverter
getDpi in interface IDpiConverterpublic float getCurrentDpiFactor()
getCurrentDpiFactor in interface IDpiConverterpublic int convertPixelToDpi(int pixel)
IDpiConverter
convertPixelToDpi in interface IDpiConverterpixel - the amount of pixels to convert.
public int convertDpiToPixel(int dpi)
IDpiConverter
convertDpiToPixel in interface IDpiConverterdpi - the DPI value to convert.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||