|
@@ -1,80 +1,80 @@ |
1 |
|
- |
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
|
- |
package org.litesoft.GWT.client.widgets.nonpublic; |
3 |
|
- |
|
4 |
|
- |
import org.litesoft.GWT.client.widgets.*; |
5 |
|
- |
import org.litesoft.GWT.client.widgets.nonpublic.external.*; |
6 |
|
- |
|
7 |
|
- |
import com.google.gwt.user.client.*; |
8 |
|
- |
import com.google.gwt.user.client.ui.*; |
9 |
|
- |
|
10 |
|
- |
import java.util.*; |
11 |
|
- |
|
12 |
|
- |
public class TitleBarPanel extends SizeableSimplePanel implements ControllerSupport { |
13 |
|
- |
private final ControllerSupportDelegate mControllerSupport = new ControllerSupportDelegate( this ); |
14 |
|
- |
|
15 |
|
- |
public TitleBarPanel( String pStyle ) { |
16 |
|
- |
super( true, pStyle ); |
17 |
|
- |
stretchableHorizontally(); |
18 |
|
- |
addController( PreventSelectionController.getInstance() ); |
19 |
|
- |
} |
20 |
|
- |
|
21 |
|
- |
@Override |
22 |
|
- |
public Widget addController( Controller controller ) { |
23 |
|
- |
return mControllerSupport.addController( controller ); |
24 |
|
- |
} |
25 |
|
- |
|
26 |
|
- |
@Override |
27 |
|
- |
public Controller getController( Class id ) { |
28 |
|
- |
return mControllerSupport.getController( id ); |
29 |
|
- |
} |
30 |
|
- |
|
31 |
|
- |
@Override |
32 |
|
- |
public void onAttach() { |
33 |
|
- |
if ( isAttached() ) { |
34 |
|
- |
return; |
35 |
|
- |
} |
36 |
|
- |
|
37 |
|
- |
mControllerSupport.onAttach(); |
38 |
|
- |
super.onAttach(); |
39 |
|
- |
} |
40 |
|
- |
|
41 |
|
- |
@Override |
42 |
|
- |
public void onBrowserEvent( Event event ) { |
43 |
|
- |
mControllerSupport.onBrowserEvent( event ); |
44 |
|
- |
} |
45 |
|
- |
|
46 |
|
- |
@Override |
47 |
|
- |
public void onDetach() { |
48 |
|
- |
if ( !isAttached() ) { |
49 |
|
- |
return; |
50 |
|
- |
} |
51 |
|
- |
|
52 |
|
- |
super.onDetach(); |
53 |
|
- |
mControllerSupport.onDetach(); |
54 |
|
- |
} |
55 |
|
- |
|
56 |
|
- |
@Override |
57 |
|
- |
public Widget removeController( Controller controller ) { |
58 |
|
- |
return mControllerSupport.removeController( controller ); |
59 |
|
- |
} |
60 |
|
- |
|
61 |
|
- |
@Override |
62 |
|
- |
public void setControllers( List controllers ) { |
63 |
|
- |
mControllerSupport.setControllers( controllers ); |
64 |
|
- |
} |
65 |
|
- |
|
66 |
|
- |
@Override |
67 |
|
- |
public void sinkEvents( int eventBits ) { |
68 |
|
- |
mControllerSupport.sinkEvents( eventBits ); |
69 |
|
- |
} |
70 |
|
- |
|
71 |
|
- |
@Override |
72 |
|
- |
public void unsinkEvents( int eventBits ) { |
73 |
|
- |
mControllerSupport.unsinkEvents( eventBits ); |
74 |
|
- |
} |
75 |
|
- |
|
76 |
|
- |
@Override |
77 |
|
- |
public void setWidth( String width ) { |
78 |
|
- |
super.setWidth( width ); // for Debugging |
79 |
|
- |
} |
80 |
|
- |
} |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://unlicense.org |
|
2 |
+ |
package org.litesoft.GWT.client.widgets.nonpublic; |
|
3 |
+ |
|
|
4 |
+ |
import org.litesoft.GWT.client.widgets.*; |
|
5 |
+ |
import org.litesoft.GWT.client.widgets.nonpublic.external.*; |
|
6 |
+ |
|
|
7 |
+ |
import com.google.gwt.user.client.*; |
|
8 |
+ |
import com.google.gwt.user.client.ui.*; |
|
9 |
+ |
|
|
10 |
+ |
import java.util.*; |
|
11 |
+ |
|
|
12 |
+ |
public class TitleBarPanel extends SizeableSimplePanel implements ControllerSupport { |
|
13 |
+ |
private final ControllerSupportDelegate mControllerSupport = new ControllerSupportDelegate( this ); |
|
14 |
+ |
|
|
15 |
+ |
public TitleBarPanel( String pStyle ) { |
|
16 |
+ |
super( true, pStyle ); |
|
17 |
+ |
stretchableHorizontally(); |
|
18 |
+ |
addController( PreventSelectionController.getInstance() ); |
|
19 |
+ |
} |
|
20 |
+ |
|
|
21 |
+ |
@Override |
|
22 |
+ |
public Widget addController( Controller controller ) { |
|
23 |
+ |
return mControllerSupport.addController( controller ); |
|
24 |
+ |
} |
|
25 |
+ |
|
|
26 |
+ |
@Override |
|
27 |
+ |
public Controller getController( Class id ) { |
|
28 |
+ |
return mControllerSupport.getController( id ); |
|
29 |
+ |
} |
|
30 |
+ |
|
|
31 |
+ |
@Override |
|
32 |
+ |
public void onAttach() { |
|
33 |
+ |
if ( isAttached() ) { |
|
34 |
+ |
return; |
|
35 |
+ |
} |
|
36 |
+ |
|
|
37 |
+ |
mControllerSupport.onAttach(); |
|
38 |
+ |
super.onAttach(); |
|
39 |
+ |
} |
|
40 |
+ |
|
|
41 |
+ |
@Override |
|
42 |
+ |
public void onBrowserEvent( Event event ) { |
|
43 |
+ |
mControllerSupport.onBrowserEvent( event ); |
|
44 |
+ |
} |
|
45 |
+ |
|
|
46 |
+ |
@Override |
|
47 |
+ |
public void onDetach() { |
|
48 |
+ |
if ( !isAttached() ) { |
|
49 |
+ |
return; |
|
50 |
+ |
} |
|
51 |
+ |
|
|
52 |
+ |
super.onDetach(); |
|
53 |
+ |
mControllerSupport.onDetach(); |
|
54 |
+ |
} |
|
55 |
+ |
|
|
56 |
+ |
@Override |
|
57 |
+ |
public Widget removeController( Controller controller ) { |
|
58 |
+ |
return mControllerSupport.removeController( controller ); |
|
59 |
+ |
} |
|
60 |
+ |
|
|
61 |
+ |
@Override |
|
62 |
+ |
public void setControllers( List controllers ) { |
|
63 |
+ |
mControllerSupport.setControllers( controllers ); |
|
64 |
+ |
} |
|
65 |
+ |
|
|
66 |
+ |
@Override |
|
67 |
+ |
public void sinkEvents( int eventBits ) { |
|
68 |
+ |
mControllerSupport.sinkEvents( eventBits ); |
|
69 |
+ |
} |
|
70 |
+ |
|
|
71 |
+ |
@Override |
|
72 |
+ |
public void unsinkEvents( int eventBits ) { |
|
73 |
+ |
mControllerSupport.unsinkEvents( eventBits ); |
|
74 |
+ |
} |
|
75 |
+ |
|
|
76 |
+ |
@Override |
|
77 |
+ |
public void setWidth( String width ) { |
|
78 |
+ |
super.setWidth( width ); // for Debugging |
|
79 |
+ |
} |
|
80 |
+ |
} |