Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/nonpublic/CloseableFloaterPanelTitleBar.java

Diff revisions: vs.
  @@ -1,41 +1,41 @@
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 -
6 - import com.google.gwt.user.client.*;
7 -
8 - public class CloseableFloaterPanelTitleBar extends FloaterTitleBar {
9 - protected SimpleLabel mTitle = new SimpleLabel();
10 -
11 - public CloseableFloaterPanelTitleBar( String pForm, Command pCloseCommand ) {
12 - mTitle.setStyleName( "litesoft-" + pForm + "BarCaption" );
13 - buildTitleBar( pCloseCommand );
14 - }
15 -
16 - public CloseableFloaterPanelTitleBar( String pForm, String pTitle, Command pCloseCommand ) {
17 - this( pForm, pCloseCommand );
18 - setTitleBarTitle( pTitle );
19 - }
20 -
21 - protected void buildTitleBar( Command pCloseCommand ) {
22 - add( new Spacer().width( 5 ) );
23 - add( mTitle );
24 - add( new Spacer().width( 5 ) );
25 - add( new SizeableSpacer().stretchableHorizontally() );
26 - if ( pCloseCommand != null ) {
27 - add( new WindowCloseButton( pCloseCommand ) );
28 - }
29 - }
30 -
31 - @Override
32 - public String getTitleBarTitle() {
33 - return mTitle.getText();
34 - }
35 -
36 - @Override
37 - public void setTitleBarTitle( String pTitle ) {
38 - mTitle.setText( pTitle );
39 - relayoutFromHereDown();
40 - }
41 - }
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 +
6 + import com.google.gwt.user.client.*;
7 +
8 + public class CloseableFloaterPanelTitleBar extends FloaterTitleBar {
9 + protected SimpleLabel mTitle = new SimpleLabel();
10 +
11 + public CloseableFloaterPanelTitleBar( String pForm, Command pCloseCommand ) {
12 + mTitle.setStyleName( "litesoft-" + pForm + "BarCaption" );
13 + buildTitleBar( pCloseCommand );
14 + }
15 +
16 + public CloseableFloaterPanelTitleBar( String pForm, String pTitle, Command pCloseCommand ) {
17 + this( pForm, pCloseCommand );
18 + setTitleBarTitle( pTitle );
19 + }
20 +
21 + protected void buildTitleBar( Command pCloseCommand ) {
22 + add( new Spacer().width( 5 ) );
23 + add( mTitle );
24 + add( new Spacer().width( 5 ) );
25 + add( new SizeableSpacer().stretchableHorizontally() );
26 + if ( pCloseCommand != null ) {
27 + add( new WindowCloseButton( pCloseCommand ) );
28 + }
29 + }
30 +
31 + @Override
32 + public String getTitleBarTitle() {
33 + return mTitle.getText();
34 + }
35 +
36 + @Override
37 + public void setTitleBarTitle( String pTitle ) {
38 + mTitle.setText( pTitle );
39 + relayoutFromHereDown();
40 + }
41 + }