Blackberry JAVA DEVELOPMENT ENVIRONMENT - - CRYPTOGRAPHIC SMART CARD DRIVER - DEVELOPMENT GUIDE Troubleshooting Guide Page 20

  • Download
  • Add to my manuals
  • Print
  • Page
    / 286
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 19
20
BlackBerry Java Development Environment Development Guide
Define the preferred
height of a custom
component.
> Implement getPreferredHeight(), using the relative dimensions of the field label to determine the
preferred height.
public int getPreferredHeight() {
switch(_shape) {
case TRIANGLE:
if (_labelWidth < _labelHeight) {
return _labelHeight << 1;
} else {
return _labelWidth;
}
case RECTANGLE:
return _labelHeight + 4;
case OCTAGON:
return getPreferredWidth();
}
return 0;
}
Task Steps
Page view 19
1 2 ... 15 16 17 18 19 20 21 22 23 24 25 ... 285 286

Comments to this Manuals

No comments