Blackberry JAVA DEVELOPMENT ENVIRONMENT - - CRYPTOGRAPHIC SMART CARD DRIVER - DEVELOPMENT GUIDE Instrukcja Naprawy Strona 21

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 286
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 20
21
1: Creating UIs
Define the appearance
of the custom field.
1. Perform complex calculations in layout()instead of in paint().
2. Implement paint().
protected void paint(Graphics graphics) {
int textX, textY, textWidth;
int w = getWidth();
switch(_shape) {
case TRIANGLE:
int h = (w>>1);
int m = (w>>1)-1;
graphics.drawLine(0, h-1, m, 0);
graphics.drawLine(m, 0, w-1, h-1);
graphics.drawLine(0, h-1, w-1, h-1);
textWidth = Math.min(_labelWidth,h);
textX = (w - textWidth) >> 1;
textY = h >> 1;
break;
case OCTAGON:
int x = 5*w/17;
int x2 = w-x-1;
int x3 = w-1;
graphics.drawLine(0, x, 0, x2);
graphics.drawLine(x3, x, x3, x2);
graphics.drawLine(x, 0, x2, 0);
graphics.drawLine(x, x3, x2, x3);
graphics.drawLine(0, x, x, 0);
graphics.drawLine(0, x2, x, x3);
graphics.drawLine(x2, 0, x3, x);
graphics.drawLine(x2, x3, x3, x2);
textWidth = Math.min(_labelWidth, w - 6);
textX = (w-textWidth) >> 1;
textY = (w-_labelHeight) >> 1;
break;
case RECTANGLE: default:
graphics.drawRect(0, 0, w, getHeight());
textX = 4;
textY = 2;
textWidth = w - 6;
break;
}
graphics.drawText(_label, textX, textY, (int)( getStyle() & DrawStyle.ELLIPSIS |
DrawStyle.HALIGN_MASK ), textWidth );
}
The fields manager invokes paint() to redraw the field whenever an area of the field is marked as invalid.
Paint a field only within
the visible region.
>Invoke Graphics.getClippingRect().
Manage focus events. >Use the Field.FOCUSABLE style and implement Field.moveFocus().
Change the appearance
of the default focus
indicator.
> Override drawFocus().
Task Steps
Przeglądanie stron 20
1 2 ... 16 17 18 19 20 21 22 23 24 25 26 ... 285 286

Komentarze do niniejszej Instrukcji

Brak uwag

Sennheiser K 30 AV manuals

Owner’s manuals and user’s guides for Unknown Sennheiser K 30 AV.
We providing 1 pdf manuals Sennheiser K 30 AV for download free by document types: User Manual


Sennheiser K 30 AV User Manual (8 pages)


Brand: Sennheiser | Category: No info | Size: 0.81 MB |

 

Table of contents





More products and manuals for Unknown Sennheiser

Models Document Type
Black Fire BF 511 User Manual   Sennheiser Black Fire BF 511 User's Manual, 5 pages
MD 43 User Manual   Sennheiser MD 43 User's Manual, 8 pages
Studio-Taschensender SK 1007 User Manual    Sennheiser Studio-Taschensender SK 1007 User's Manual, 17 pages
EK 2000 User Manual   Sennheiser EK 2000 User's Manual, 43 pages
COM142 User Manual   Sennheiser COM142 User's Manual, 3 pages
Black Fire BF 515 User Manual   Sennheiser Black Fire BF 515 User's Manual, 5 pages
Tourguide System 2020 SKM 2020 D User Manual      Sennheiser Tourguide System 2020 SKM 2020 D User's Manual, 2 pages
G2 User Manual      Sennheiser G2 User's Manual [de] [en] [es] [fr] , 180 pages
E840s User Manual   Sennheiser e840S User's Manual, 10 pages
SKM 3072-U-x User Manual   Sennheiser SKM 3072-U-x User's Manual, 11 pages
P48 User Manual   Sennheiser P48 User's Manual, 38 pages
MZH 141 U User Manual     Sennheiser MZH 141 U User's Manual, 2 pages
Electric Heater SZI 1029-10 User Manual       Sennheiser Electric Heater SZI 1029-10 User's Manual, 59 pages
BF 616 User Manual   Sennheiser BF 616 User's Manual, 5 pages
HDI 1019-6 User Manual   Sennheiser HDI 1019-6 User's Manual, 8 pages
L 2015 User Manual   Sennheiser L 2015 User's Manual, 1 pages
SKM 1032 User Manual        Sennheiser SKM 1032 User's Manual, 68 pages
L1035 User Manual   Sennheiser L1035 User's Manual, 2 pages
MD 441 User Manual   Sennheiser MD 441 User's Manual, 9 pages
1029-PLL User Manual    Sennheiser 1029-PLL User's Manual, 2 pages