Search in sources :

Example 1 with ButtonsPanel

use of com.haulmont.cuba.gui.components.ButtonsPanel in project cuba by cuba-platform.

the class DataGridLoader method createButtonsPanel.

protected void createButtonsPanel(HasButtonsPanel dataGrid, Element element) {
    panelElement = element.element("buttonsPanel");
    if (panelElement != null) {
        ButtonsPanelLoader loader = (ButtonsPanelLoader) getLoader(panelElement, ButtonsPanel.NAME);
        loader.createComponent();
        ButtonsPanel panel = loader.getResultComponent();
        dataGrid.setButtonsPanel(panel);
        buttonsPanelLoader = loader;
    }
}
Also used : HasButtonsPanel(com.haulmont.cuba.gui.components.Component.HasButtonsPanel) ButtonsPanel(com.haulmont.cuba.gui.components.ButtonsPanel)

Example 2 with ButtonsPanel

use of com.haulmont.cuba.gui.components.ButtonsPanel in project cuba by cuba-platform.

the class TreeLoader method createButtonsPanel.

protected void createButtonsPanel(Tree resultComponent, Element element) {
    buttonsPanelElement = element.element("buttonsPanel");
    if (buttonsPanelElement != null) {
        ButtonsPanelLoader loader = (ButtonsPanelLoader) getLoader(buttonsPanelElement, ButtonsPanel.NAME);
        loader.createComponent();
        ButtonsPanel panel = loader.getResultComponent();
        resultComponent.setButtonsPanel(panel);
        buttonsPanelLoader = loader;
    }
}
Also used : ButtonsPanel(com.haulmont.cuba.gui.components.ButtonsPanel)

Example 3 with ButtonsPanel

use of com.haulmont.cuba.gui.components.ButtonsPanel in project cuba by cuba-platform.

the class TreeLoader method loadButtonsPanel.

protected void loadButtonsPanel(Tree component) {
    if (buttonsPanelLoader != null) {
        // noinspection unchecked
        buttonsPanelLoader.loadComponent();
        ButtonsPanel panel = (ButtonsPanel) buttonsPanelLoader.getResultComponent();
        Window window = ComponentsHelper.getWindowImplementation(component);
        String alwaysVisible = buttonsPanelElement.attributeValue("alwaysVisible");
        panel.setVisible(!(window instanceof Window.Lookup) || "true".equals(alwaysVisible));
    }
}
Also used : Window(com.haulmont.cuba.gui.components.Window) ButtonsPanel(com.haulmont.cuba.gui.components.ButtonsPanel)

Example 4 with ButtonsPanel

use of com.haulmont.cuba.gui.components.ButtonsPanel in project cuba by cuba-platform.

the class WidgetsTreeLoader method loadButtonsPanel.

protected void loadButtonsPanel(Tree component) {
    if (buttonsPanelLoader != null) {
        // noinspection unchecked
        buttonsPanelLoader.loadComponent();
        ButtonsPanel panel = (ButtonsPanel) buttonsPanelLoader.getResultComponent();
        Window window = ComponentsHelper.getWindowImplementation(component);
        String alwaysVisible = buttonsPanelElement.attributeValue("alwaysVisible");
        panel.setVisible(!(window instanceof Window.Lookup) || "true".equals(alwaysVisible));
    }
}
Also used : Window(com.haulmont.cuba.gui.components.Window) ButtonsPanel(com.haulmont.cuba.gui.components.ButtonsPanel)

Example 5 with ButtonsPanel

use of com.haulmont.cuba.gui.components.ButtonsPanel in project cuba by cuba-platform.

the class DataGridLoader method loadButtonsPanel.

protected void loadButtonsPanel(DataGrid component) {
    if (buttonsPanelLoader != null) {
        // noinspection unchecked
        buttonsPanelLoader.loadComponent();
        ButtonsPanel panel = (ButtonsPanel) buttonsPanelLoader.getResultComponent();
        Window window = ComponentsHelper.getWindowImplementation(component);
        String alwaysVisible = panelElement.attributeValue("alwaysVisible");
        panel.setVisible(!(window instanceof Window.Lookup) || "true".equals(alwaysVisible));
    }
}
Also used : Window(com.haulmont.cuba.gui.components.Window) HasButtonsPanel(com.haulmont.cuba.gui.components.Component.HasButtonsPanel) ButtonsPanel(com.haulmont.cuba.gui.components.ButtonsPanel)

Aggregations

ButtonsPanel (com.haulmont.cuba.gui.components.ButtonsPanel)6 Window (com.haulmont.cuba.gui.components.Window)3 HasButtonsPanel (com.haulmont.cuba.gui.components.Component.HasButtonsPanel)2