litesoft
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
package com.temp.client.foundation.widget;
import com.temp.client.foundation.pavment.Refreshable;
import com.temp.client.foundation.util.UtilsGwt;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
public class PageTitle extends AbstractHorizontalLabeledPageWidget {
private static final String PAGE_TITLE_STYLE_NAME = "title-bar";
private static final String TITLE_STYLE_NAME = "title-bar-text";
private Refreshable refreshable;
private NamedImageButton refresh = new NamedImageButton("littleRefresh", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (refreshable != null) {
refreshable.refresh();
}
}
});
public PageTitle() {
super(PAGE_TITLE_STYLE_NAME, TITLE_STYLE_NAME);
horizontalPanel.add(titleLabel);
horizontalPanel.add(new LeftRightSiblings());
horizontalPanel.add(refresh);
UtilsGwt.hide(refresh);
refresh.setTitle("Refresh");
}
public Refreshable getRefreshable() {
return refreshable;
}
public void setRefreshable(Refreshable refreshable) {
this.refreshable = refreshable;
UtilsGwt.setHidden(refresh, (refreshable == null));
}
@Override
public void setId(String id) {
super.setId(id);
refresh.getElement().setId(id + "Refresh");
}
}
|
Revision |
Author |
Commited |
Message |
626
|
GeorgeS
|
Wed 11 Apr, 2012 19:39:41 +0000 |
|