comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleRangePanel.java @ 787:4e0b73b7113b

Added new UI providers. flys-client/trunk@2284 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 05 Jul 2011 17:28:04 +0000
parents a39c2f531755
children f98bd9b5cedd
comparison
equal deleted inserted replaced
786:06457f0dbad9 787:4e0b73b7113b
57 String titleFrom, String titleTo, String titleStep, 57 String titleFrom, String titleTo, String titleStep,
58 double from, double to, double step, 58 double from, double to, double step,
59 int width, 59 int width,
60 BlurHandler handler) 60 BlurHandler handler)
61 { 61 {
62 this(
63 titleFrom, titleTo, titleStep,
64 from, to, step,
65 width,
66 handler,
67 "right");
68 }
69
70
71 public DoubleRangePanel(
72 String titleFrom, String titleTo, String titleStep,
73 double from, double to, double step,
74 int width,
75 BlurHandler handler,
76 String labelOrientation)
77 {
62 fromItem = new FloatItem(FIELD_FROM); 78 fromItem = new FloatItem(FIELD_FROM);
63 toItem = new FloatItem(FIELD_TO); 79 toItem = new FloatItem(FIELD_TO);
64 stepItem = new FloatItem(FIELD_WIDTH); 80 stepItem = new FloatItem(FIELD_WIDTH);
65 81
66 fromItem.addBlurHandler(handler); 82 fromItem.addBlurHandler(handler);
94 toItem.setWidth(itemWidth); 110 toItem.setWidth(itemWidth);
95 toText.setWidth(itemWidth); 111 toText.setWidth(itemWidth);
96 stepItem.setWidth(itemWidth); 112 stepItem.setWidth(itemWidth);
97 stepText.setWidth(itemWidth); 113 stepText.setWidth(itemWidth);
98 114
99 setFields(fromItem, fromText, toItem, toText, stepItem, stepText); 115 if (labelOrientation.equals("right")) {
116 setFields(fromItem, fromText, toItem, toText, stepItem, stepText);
117 }
118 else {
119 setFields(fromText, fromItem, toText, toItem, stepText, stepItem);
120 }
121
100 setFixedColWidths(false); 122 setFixedColWidths(false);
101 setNumCols(6); 123 setNumCols(6);
102 setWidth(width); 124 setWidth(width);
103 setAlign(Alignment.CENTER); 125 setAlign(Alignment.CENTER);
104 } 126 }

http://dive4elements.wald.intevation.org