Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSHeader.java @ 66:a361ce81abcf
Customized style for header and mainmenu.
flys-client/trunk@1557 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 24 Mar 2011 15:48:13 +0000 |
parents | e4155a6833a9 |
children | b92281182c6b |
comparison
equal
deleted
inserted
replaced
65:8f719fa1a691 | 66:a361ce81abcf |
---|---|
49 calcWidth(flysRes,IMG_HEIGHT), | 49 calcWidth(flysRes,IMG_HEIGHT), |
50 IMG_HEIGHT); | 50 IMG_HEIGHT); |
51 | 51 |
52 Img bfg = new Img( | 52 Img bfg = new Img( |
53 bfgRes.getURL(), | 53 bfgRes.getURL(), |
54 calcWidth(bfgRes, IMG_HEIGHT), | 54 calcWidth(bfgRes, HEIGHT), |
55 IMG_HEIGHT); | 55 HEIGHT); |
56 | 56 |
57 Label fullname = new Label(MESSAGES.fullname()); | 57 Label fullname = new Label(MESSAGES.fullname()); |
58 fullname.setHeight(HEIGHT - IMG_HEIGHT); | 58 fullname.setHeight(HEIGHT - IMG_HEIGHT); |
59 fullname.setStyleName ("fontNormalMid"); | |
59 | 60 |
60 VLayout left = new VLayout(); | 61 VLayout left = new VLayout(); |
61 left.addMember(flys); | 62 left.addMember(flys); |
62 left.addMember(fullname); | 63 left.addMember(fullname); |
63 | 64 |
81 */ | 82 */ |
82 protected int calcWidth(ImageResource res, int height) { | 83 protected int calcWidth(ImageResource res, int height) { |
83 int widthOrig = res.getWidth(); | 84 int widthOrig = res.getWidth(); |
84 int heightOrig = res.getHeight(); | 85 int heightOrig = res.getHeight(); |
85 | 86 |
86 double factor = heightOrig / height; | 87 double factor = (double)heightOrig / height; |
87 double width = widthOrig / factor; | 88 double width = (double)widthOrig / factor; |
88 | 89 |
89 return (int) width * 10 / 10; | 90 return (int) width * 10 / 10; |
90 } | 91 } |
91 } | 92 } |
92 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 93 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |