use of com.extjs.gxt.ui.client.widget.Text in project activityinfo by bedatadriven.
the class AdminLevelPanel method showLoadingFailed.
private void showLoadingFailed() {
removeAll();
add(new Text(I18N.CONSTANTS.connectionProblem()));
layout();
}
use of com.extjs.gxt.ui.client.widget.Text in project activityinfo by bedatadriven.
the class ReportViewRetrier method createRetryPanel.
private static ContentPanel createRetryPanel(final Throwable caught, final ClickHandler retryCallback) {
Button retryButton = new Button(I18N.CONSTANTS.retry());
retryButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
if (retryCallback != null) {
retryCallback.onClick(null);
}
}
});
Text label = new Text(ExceptionOracle.getExplanation(caught));
label.setWidth("50%");
VBoxLayout layout = new VBoxLayout(VBoxLayout.VBoxLayoutAlign.CENTER);
ContentPanel panel = new ContentPanel();
panel.setHeaderVisible(false);
panel.setLayout(layout);
panel.add(label, new RowData(1, -1, new Margins(4)));
panel.add(retryButton, new RowData(-1, -1, new Margins(4)));
return panel;
}
use of com.extjs.gxt.ui.client.widget.Text in project activityinfo by bedatadriven.
the class IndicatorSection method createLabel.
private Text createLabel(IndicatorDTO indicator) {
String name = indicator.getName();
if (indicator.isMandatory()) {
name += " *";
}
Text indicatorLabel = new Text(name);
indicatorLabel.setStyleAttribute("fontSize", "9pt");
return indicatorLabel;
}
use of com.extjs.gxt.ui.client.widget.Text in project activityinfo by bedatadriven.
the class IndicatorSection method addGroupHeader.
private void addGroupHeader(String name) {
Text header = new Text(name);
header.setStyleAttribute("fontSize", "9pt");
header.setStyleAttribute("fontWeight", "bold");
header.setStyleAttribute("marginTop", "6pt");
add(header);
}
use of com.extjs.gxt.ui.client.widget.Text in project activityinfo by bedatadriven.
the class IndicatorSection method addMixedGroup.
private void addMixedGroup(IndicatorGroup group) {
for (IndicatorDTO indicator : group.getIndicators()) {
if (!indicator.isCalculated() && indicator.isVisible()) {
Text fieldLabel = createLabel(indicator);
fieldLabel.setStyleAttribute("marginTop", "8px");
fieldLabel.setStyleAttribute("marginBottom", "3px");
add(fieldLabel);
TextField field = createField(indicator);
if (indicator.getType() == FieldTypeClass.QUANTITY) {
HBoxLayout rowLayout = new HBoxLayout();
rowLayout.setHBoxLayoutAlign(HBoxLayout.HBoxLayoutAlign.MIDDLE);
Text unitsLabel = new Text(indicator.getUnits());
unitsLabel.setStyleAttribute("paddingLeft", "5px");
LayoutContainer row = new LayoutContainer();
row.setLayout(rowLayout);
row.add(field);
row.add(unitsLabel);
add(row);
} else {
field.setWidth(TEXT_FIELD_WIDTH);
add(field);
}
}
}
}
Aggregations