|
@@ -1,44 +1,44 @@ |
1 |
|
- |
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
|
- |
package org.litesoft.GWT.client.widgets; |
3 |
|
- |
|
4 |
|
- |
import org.litesoft.GWT.client.widgets.nonpublic.*; |
5 |
|
- |
import org.litesoft.core.*; |
6 |
|
- |
|
7 |
|
- |
import com.google.gwt.user.client.ui.*; |
8 |
|
- |
|
9 |
|
- |
public class RightHorizontalPanel extends AbstractSizeableComposite { |
10 |
|
- |
private static final String RIGHT_ID_PREFIX = "RHP_RIGHT_"; |
11 |
|
- |
|
12 |
|
- |
private HorizontalPanel mRightContainer = new HorizontalPanel(); |
13 |
|
- |
|
14 |
|
- |
private static final String STYLE_RIGHT = "Right"; |
15 |
|
- |
|
16 |
|
- |
public RightHorizontalPanel() { |
17 |
|
- |
int zUniqueID = StaticSimpleIdSource.getNext(); |
18 |
|
- |
HTMLPanel zPanel = new HTMLPanel( "<table width='100%' cellpadding='0' cellspacing='0'><tr>" + // |
19 |
|
- |
"<td align='right' valign='middle' id='" + RIGHT_ID_PREFIX + zUniqueID + "'></td>" + // |
20 |
|
- |
"</tr></table>" ); |
21 |
|
- |
|
22 |
|
- |
mRightContainer.addStyleName( STYLE_RIGHT ); |
23 |
|
- |
|
24 |
|
- |
zPanel.add( mRightContainer, RIGHT_ID_PREFIX + zUniqueID ); |
25 |
|
- |
|
26 |
|
- |
initWidget( new ConstrainingSizeableOuterLayers( zPanel, "RightHorizontalPanel" ) ); |
27 |
|
- |
|
28 |
|
- |
LLstretchableHorizontally(); |
29 |
|
- |
} |
30 |
|
- |
|
31 |
|
- |
public RightHorizontalPanel style( String pStyleName ) { |
32 |
|
- |
addStyleName( pStyleName ); |
33 |
|
- |
return this; |
34 |
|
- |
} |
35 |
|
- |
|
36 |
|
- |
public HorizontalPanel getRightContainer() { |
37 |
|
- |
return mRightContainer; |
38 |
|
- |
} |
39 |
|
- |
|
40 |
|
- |
public RightHorizontalPanel add( Widget pWidget ) { |
41 |
|
- |
mRightContainer.add( pWidget ); |
42 |
|
- |
return this; |
43 |
|
- |
} |
44 |
|
- |
} |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://unlicense.org |
|
2 |
+ |
package org.litesoft.GWT.client.widgets; |
|
3 |
+ |
|
|
4 |
+ |
import org.litesoft.GWT.client.widgets.nonpublic.*; |
|
5 |
+ |
import org.litesoft.core.*; |
|
6 |
+ |
|
|
7 |
+ |
import com.google.gwt.user.client.ui.*; |
|
8 |
+ |
|
|
9 |
+ |
public class RightHorizontalPanel extends AbstractSizeableComposite { |
|
10 |
+ |
private static final String RIGHT_ID_PREFIX = "RHP_RIGHT_"; |
|
11 |
+ |
|
|
12 |
+ |
private HorizontalPanel mRightContainer = new HorizontalPanel(); |
|
13 |
+ |
|
|
14 |
+ |
private static final String STYLE_RIGHT = "Right"; |
|
15 |
+ |
|
|
16 |
+ |
public RightHorizontalPanel() { |
|
17 |
+ |
int zUniqueID = StaticSimpleIdSource.getNext(); |
|
18 |
+ |
HTMLPanel zPanel = new HTMLPanel( "<table width='100%' cellpadding='0' cellspacing='0'><tr>" + // |
|
19 |
+ |
"<td align='right' valign='middle' id='" + RIGHT_ID_PREFIX + zUniqueID + "'></td>" + // |
|
20 |
+ |
"</tr></table>" ); |
|
21 |
+ |
|
|
22 |
+ |
mRightContainer.addStyleName( STYLE_RIGHT ); |
|
23 |
+ |
|
|
24 |
+ |
zPanel.add( mRightContainer, RIGHT_ID_PREFIX + zUniqueID ); |
|
25 |
+ |
|
|
26 |
+ |
initWidget( new ConstrainingSizeableOuterLayers( zPanel, "RightHorizontalPanel" ) ); |
|
27 |
+ |
|
|
28 |
+ |
LLstretchableHorizontally(); |
|
29 |
+ |
} |
|
30 |
+ |
|
|
31 |
+ |
public RightHorizontalPanel style( String pStyleName ) { |
|
32 |
+ |
addStyleName( pStyleName ); |
|
33 |
+ |
return this; |
|
34 |
+ |
} |
|
35 |
+ |
|
|
36 |
+ |
public HorizontalPanel getRightContainer() { |
|
37 |
+ |
return mRightContainer; |
|
38 |
+ |
} |
|
39 |
+ |
|
|
40 |
+ |
public RightHorizontalPanel add( Widget pWidget ) { |
|
41 |
+ |
mRightContainer.add( pWidget ); |
|
42 |
+ |
return this; |
|
43 |
+ |
} |
|
44 |
+ |
} |