Blackberry JAVA DEVELOPMENT ENVIRONMENT - - CRYPTOGRAPHIC SMART CARD DRIVER - DEVELOPMENT GUIDE Průvodce řešením problémů Strana 20

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 286
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 19
1 2 ... 15 16 17 18 19 20 21 22 23 24 25 ... 285 286

Komentáře k této Příručce

Žádné komentáře