litesoft
Diff Revisions
947
vs
948
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/FloaterTitleBar.java
|
@@ -4,20 +4,17 @@ |
4 |
4 |
|
import com.google.gwt.user.client.*; |
5 |
5 |
|
import com.google.gwt.user.client.ui.*; |
6 |
6 |
|
|
7 |
|
- |
public abstract class FloaterTitleBar extends SizeableVerticalPanel |
8 |
|
- |
{ |
|
7 |
+ |
public abstract class FloaterTitleBar extends SizeableVerticalPanel { |
9 |
8 |
|
private CustomHorizontal mCustomHorizontal = new CustomHorizontal(); |
10 |
9 |
|
|
11 |
|
- |
public FloaterTitleBar() |
12 |
|
- |
{ |
|
10 |
+ |
public FloaterTitleBar() { |
13 |
11 |
|
LLstretchableHorizontally(); |
14 |
12 |
|
super.add( mCustomHorizontal ); |
15 |
13 |
|
super.add( new SizeableSpacer( 3 ).stretchableHorizontally() ); |
16 |
14 |
|
} |
17 |
15 |
|
|
18 |
16 |
|
@Override |
19 |
|
- |
public void add( Widget pWidget ) |
20 |
|
- |
{ |
|
17 |
+ |
public void add( Widget pWidget ) { |
21 |
18 |
|
mCustomHorizontal.add( pWidget ); |
22 |
19 |
|
} |
23 |
20 |
|
|
|
@@ -25,46 +22,36 @@ |
25 |
22 |
|
|
26 |
23 |
|
abstract public void setTitleBarTitle( String pTitle ); |
27 |
24 |
|
|
28 |
|
- |
public void hide() |
29 |
|
- |
{ |
|
25 |
+ |
public void hide() { |
30 |
26 |
|
mCustomHorizontal.setVisible( false ); |
31 |
27 |
|
} |
32 |
28 |
|
|
33 |
|
- |
public void unhide() |
34 |
|
- |
{ |
|
29 |
+ |
public void unhide() { |
35 |
30 |
|
mCustomHorizontal.setVisible( true ); |
36 |
31 |
|
} |
37 |
32 |
|
|
38 |
|
- |
private static class CustomHorizontal extends SizeableHorizontalPanel |
39 |
|
- |
{ |
|
33 |
+ |
private static class CustomHorizontal extends SizeableHorizontalPanel { |
40 |
34 |
|
private boolean mHidden = false; |
41 |
35 |
|
|
42 |
|
- |
public CustomHorizontal() |
43 |
|
- |
{ |
|
36 |
+ |
public CustomHorizontal() { |
44 |
37 |
|
stretchableHorizontally(); |
45 |
38 |
|
setVerticalAlignment( ALIGN_MIDDLE ); |
46 |
39 |
|
add( new Spacer( 1 ) ); |
47 |
40 |
|
} |
48 |
41 |
|
|
49 |
42 |
|
@Override |
50 |
|
- |
public void setWidth( String pWidth ) |
51 |
|
- |
{ |
52 |
|
- |
if ( !mHidden ) |
53 |
|
- |
{ |
|
43 |
+ |
public void setWidth( String pWidth ) { |
|
44 |
+ |
if ( !mHidden ) { |
54 |
45 |
|
super.setWidth( pWidth ); |
55 |
46 |
|
} |
56 |
47 |
|
} |
57 |
48 |
|
|
58 |
49 |
|
@Override |
59 |
|
- |
public void setVisible( boolean pVisible ) |
60 |
|
- |
{ |
61 |
|
- |
if ( !pVisible ) |
62 |
|
- |
{ |
|
50 |
+ |
public void setVisible( boolean pVisible ) { |
|
51 |
+ |
if ( !pVisible ) { |
63 |
52 |
|
super.setWidth( "1" ); |
64 |
53 |
|
mHidden = true; |
65 |
|
- |
} |
66 |
|
- |
else |
67 |
|
- |
{ |
|
54 |
+ |
} else { |
68 |
55 |
|
mHidden = false; |
69 |
56 |
|
Element zParent = DOM.getParent( getElement() ); |
70 |
57 |
|
super.setWidth( "" + zParent.getOffsetWidth() ); |