use of com.extjs.gxt.ui.client.widget.Component 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.Component in project activityinfo by bedatadriven.
the class CompositeEditorLayout method onLayout.
@Override
protected void onLayout(Container<?> container, El target) {
super.onLayout(container, target);
Size size = target.getStyleSize();
Component page = container.getItem(0);
int hMargin = (size.width - 650) / 2;
Margins margins = new Margins(25, hMargin, 25, hMargin);
applyMargins(page.el(), margins);
}
use of com.extjs.gxt.ui.client.widget.Component in project activityinfo by bedatadriven.
the class CompositeEditor2 method bind.
@Override
public void bind(Report model) {
this.model = model;
for (Component child : page.getItems()) {
if (child != addPanel) {
page.remove(child);
}
}
for (ReportElement element : model.getElements()) {
addElementWidget(element);
}
page.layout();
}
Aggregations