MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / getBaseline

Method getBaseline

CodenameOne/src/com/codename1/ui/Label.java:513–520  ·  view source on GitHub ↗
(int width, int height)

Source from the content-addressed store, hash-verified

511 }
512
513 @Override
514 public int getBaseline(int width, int height) {
515 Style s = getStyle();
516 Font f = s.getFont();
517
518 int innerHeight = height - s.getVerticalPadding();
519 return s.getPaddingTop() + (innerHeight - f.getHeight()) / 2 + f.getAscent();
520 }
521
522 /// {@inheritDoc}
523 @Override

Callers 2

testGetBaselineMethod · 0.95

Calls 6

getFontMethod · 0.95
getVerticalPaddingMethod · 0.95
getPaddingTopMethod · 0.95
getHeightMethod · 0.95
getAscentMethod · 0.95
getStyleMethod · 0.65

Tested by 2

testGetBaselineMethod · 0.76