Search in sources :

Example 1 with SolutionBrowserUndefinedEvent

use of org.pentaho.mantle.client.events.SolutionBrowserUndefinedEvent in project pentaho-platform by pentaho.

the class MantleTabPanel method setContentEditSelected.

public void setContentEditSelected(boolean selected) {
    IFrameTabPanel panel = getCurrentFrame();
    if (panel != null) {
        panel.setEditSelected(selected);
        Widget selectTabContent = null;
        if (getTab(getSelectedTabIndex()) != null) {
            selectTabContent = getTab(getSelectedTabIndex()).getContent();
        }
        List<FileItem> selectedItems = SolutionBrowserPanel.getInstance().getFilesListPanel().getSelectedFileItems();
        EventBusUtil.EVENT_BUS.fireEvent(new SolutionBrowserUndefinedEvent(selectTabContent, selectedItems));
    }
}
Also used : FileItem(org.pentaho.mantle.client.solutionbrowser.filelist.FileItem) Widget(com.google.gwt.user.client.ui.Widget) IFrameTabPanel(org.pentaho.mantle.client.solutionbrowser.tabs.IFrameTabPanel) SolutionBrowserUndefinedEvent(org.pentaho.mantle.client.events.SolutionBrowserUndefinedEvent)

Example 2 with SolutionBrowserUndefinedEvent

use of org.pentaho.mantle.client.events.SolutionBrowserUndefinedEvent in project pentaho-platform by pentaho.

the class MantleTabPanel method enableContentEdit.

public void enableContentEdit(boolean enable) {
    IFrameTabPanel panel = getCurrentFrame();
    if (panel != null) {
        panel.setEditEnabled(enable);
        Widget selectTabContent = null;
        if (getTab(getSelectedTabIndex()) != null) {
            selectTabContent = getTab(getSelectedTabIndex()).getContent();
        }
        List<FileItem> selectedItems = SolutionBrowserPanel.getInstance().getFilesListPanel().getSelectedFileItems();
        EventBusUtil.EVENT_BUS.fireEvent(new SolutionBrowserUndefinedEvent(selectTabContent, selectedItems));
    }
}
Also used : FileItem(org.pentaho.mantle.client.solutionbrowser.filelist.FileItem) Widget(com.google.gwt.user.client.ui.Widget) IFrameTabPanel(org.pentaho.mantle.client.solutionbrowser.tabs.IFrameTabPanel) SolutionBrowserUndefinedEvent(org.pentaho.mantle.client.events.SolutionBrowserUndefinedEvent)

Aggregations

Widget (com.google.gwt.user.client.ui.Widget)2 SolutionBrowserUndefinedEvent (org.pentaho.mantle.client.events.SolutionBrowserUndefinedEvent)2 FileItem (org.pentaho.mantle.client.solutionbrowser.filelist.FileItem)2 IFrameTabPanel (org.pentaho.mantle.client.solutionbrowser.tabs.IFrameTabPanel)2