use of com.extjs.gxt.ui.client.widget.ContentPanel in project activityinfo by bedatadriven.
the class LayersWidget method createLayersPanel.
private void createLayersPanel() {
layersPanel = new ContentPanel();
layersPanel.setCollapsible(false);
layersPanel.setFrame(true);
layersPanel.setHeadingText(I18N.CONSTANTS.layers());
layersPanel.setBodyBorder(false);
layersPanel.setHeaderVisible(true);
layersPanel.setIcon(AbstractImagePrototype.create(MapResources.INSTANCE.layers()));
AnchorData layoutData = new AnchorData();
layoutData.setAnchorSpec("100% none");
add(layersPanel, layoutData);
}
use of com.extjs.gxt.ui.client.widget.ContentPanel in project activityinfo by bedatadriven.
the class LayerOptionsPanel method initializeComponent.
private void initializeComponent() {
setWidth(WIDTH);
setHeight(HEIGHT);
layout = new AccordionLayout() {
@Override
protected void renderComponent(Component component, int index, El target) {
super.renderComponent(component, index, target);
// keep the default style of rounded corners on the content
// panels
El.fly(((ContentPanel) component).getElement("header")).removeStyleName("x-accordion-hd");
}
@Override
protected void setItemSize(Component item, Size size) {
// don't set the height of the panels
ContentPanel cp = (ContentPanel) item;
cp.setWidth(size.width);
}
};
layout.setHideCollapseTool(true);
setLayout(layout);
// setFieldsetHeadingToLayerName();
stylePanel = new ContentPanel();
stylePanel.setHeadingText(I18N.CONSTANTS.style());
stylePanel.setIcon(AbstractImagePrototype.create(MapResources.INSTANCE.styleIcon()));
stylePanel.setCollapsible(true);
stylePanel.setHideCollapseTool(true);
stylePanel.setAnimCollapse(true);
ToolButton closeBtn = new ToolButton("x-tool-close");
closeBtn.addListener(Events.Select, new Listener<ComponentEvent>() {
@Override
public void handleEvent(ComponentEvent ce) {
fadeOut();
}
});
stylePanel.getHeader().addTool(closeBtn);
add(stylePanel);
clusteringPanel = new ContentPanel();
clusteringPanel.setIcon(AbstractImagePrototype.create(MapResources.INSTANCE.clusterIcon()));
clusteringPanel.setHeadingText(I18N.CONSTANTS.clustering());
clusteringPanel.setCollapsible(true);
clusteringPanel.setHideCollapseTool(true);
clusteringPanel.setAnimCollapse(true);
add(clusteringPanel);
}
use of com.extjs.gxt.ui.client.widget.ContentPanel in project activityinfo by bedatadriven.
the class IconLayerOptions method populateWithIcons.
private void populateWithIcons() {
boolean isFirst = true;
for (Icon mapIcon : Icon.values()) {
ContentPanel iconPanel = new ContentPanel();
iconPanel.setHeaderVisible(false);
iconPanel.setLayout(new RowLayout(Orientation.VERTICAL));
iconPanel.setAutoWidth(true);
Radio radiobuttonIcon = new Radio();
iconPanel.add(radiobuttonIcon);
iconPanel.add(new Image(MapIcon.fromEnum(mapIcon)));
radioIcons.put(radiobuttonIcon, mapIcon);
iconRadios.put(mapIcon, radiobuttonIcon);
radioGroup.add(radiobuttonIcon);
contentPanel.add(iconPanel);
if (isFirst) {
radiobuttonIcon.setValue(true);
isFirst = false;
}
}
}
use of com.extjs.gxt.ui.client.widget.ContentPanel 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.ContentPanel in project activityinfo by bedatadriven.
the class DbTargetGrid method createTargetValueContainer.
@Override
public void createTargetValueContainer(Widget w) {
targetValueContainer = new ContentPanel();
targetValueContainer.setHeaderVisible(false);
targetValueContainer.setBorders(false);
targetValueContainer.setFrame(false);
targetValueContainer.setLayout(new FitLayout());
BorderLayoutData layout = new BorderLayoutData(Style.LayoutRegion.SOUTH);
layout.setSplit(true);
layout.setCollapsible(true);
layout.setSize(250);
layout.setMargins(new Margins(5, 0, 0, 0));
targetValueContainer.add(w);
add(targetValueContainer, layout);
}
Aggregations