|
@@ -1,36 +1,35 @@ |
1 |
1 |
|
package org.litesoft.GWT.client.widgets.sliderbar.client.solution.ybar; |
2 |
2 |
|
|
3 |
|
- |
import com.google.gwt.core.client.GWT; |
4 |
|
- |
import com.google.gwt.resources.client.ClientBundle; |
5 |
|
- |
import com.google.gwt.resources.client.DataResource; |
6 |
|
- |
import com.google.gwt.resources.client.ImageResource; |
7 |
|
- |
import com.google.gwt.user.client.ui.Image; |
8 |
|
- |
import org.litesoft.GWT.client.widgets.sliderbar.client.presenter.Presenter; |
9 |
|
- |
import org.litesoft.GWT.client.widgets.sliderbar.client.view.SliderBarVertical; |
|
3 |
+ |
import org.litesoft.GWT.client.widgets.sliderbar.client.presenter.*; |
|
4 |
+ |
import org.litesoft.GWT.client.widgets.sliderbar.client.view.*; |
|
5 |
+ |
|
|
6 |
+ |
import com.google.gwt.core.client.*; |
|
7 |
+ |
import com.google.gwt.resources.client.*; |
|
8 |
+ |
import com.google.gwt.user.client.ui.*; |
10 |
9 |
|
|
11 |
10 |
|
public class YBar extends SliderBarVertical { |
12 |
11 |
|
|
13 |
|
- |
ImagesYBar images = GWT.create(ImagesYBar.class); |
|
12 |
+ |
ImagesYBar images = GWT.create( ImagesYBar.class ); |
14 |
13 |
|
|
15 |
|
- |
public YBar(int maxValue, String height, boolean selectInFocus, Presenter presenter) { |
16 |
|
- |
super(presenter); |
17 |
|
- |
setLessWidget(new Image(images.less())); |
18 |
|
- |
Image scale = new Image(images.scale().getUrl()); |
19 |
|
- |
scale.addStyleName("ybarscale"); |
20 |
|
- |
setScaleWidget(scale, 25); |
21 |
|
- |
setMoreWidget(new Image(images.more())); |
22 |
|
- |
setDragWidget(new Image(images.drag())); |
23 |
|
- |
this.setHeight(height); |
24 |
|
- |
this.setMaxValue(maxValue); |
25 |
|
- |
if (!selectInFocus) { |
|
14 |
+ |
public YBar( int maxValue, String height, boolean selectInFocus, Presenter presenter ) { |
|
15 |
+ |
super( presenter ); |
|
16 |
+ |
setLessWidget( new Image( images.less() ) ); |
|
17 |
+ |
Image scale = new Image( images.scale().getUrl() ); |
|
18 |
+ |
scale.addStyleName( "ybarscale" ); |
|
19 |
+ |
setScaleWidget( scale, 25 ); |
|
20 |
+ |
setMoreWidget( new Image( images.more() ) ); |
|
21 |
+ |
setDragWidget( new Image( images.drag() ) ); |
|
22 |
+ |
this.setHeight( height ); |
|
23 |
+ |
this.setMaxValue( maxValue ); |
|
24 |
+ |
if ( !selectInFocus ) { |
26 |
25 |
|
this.setNotSelectedInFocus(); |
27 |
26 |
|
} |
28 |
|
- |
this.setMinMarkStep(0); |
29 |
|
- |
this.drawMarks("white", 17); |
|
27 |
+ |
this.setMinMarkStep( 0 ); |
|
28 |
+ |
this.drawMarks( "white", 17 ); |
30 |
29 |
|
} |
31 |
30 |
|
|
32 |
|
- |
public YBar(int maxValue, String height, boolean selectInFocus){ |
33 |
|
- |
this(maxValue, height, selectInFocus, null); |
|
31 |
+ |
public YBar( int maxValue, String height, boolean selectInFocus ) { |
|
32 |
+ |
this( maxValue, height, selectInFocus, null ); |
34 |
33 |
|
} |
35 |
34 |
|
|
36 |
35 |
|
interface ImagesYBar extends ClientBundle { |
|
@@ -47,5 +46,4 @@ |
47 |
46 |
|
@Source("scale.png") |
48 |
47 |
|
DataResource scale(); |
49 |
48 |
|
} |
50 |
|
- |
|
51 |
49 |
|
} |