Search in sources :

Example 1 with LayoutEditorFocusEvent

use of org.kie.workbench.common.workbench.client.events.LayoutEditorFocusEvent in project kie-wb-common by kiegroup.

the class FormEditorPresenter method setActiveInstance.

private void setActiveInstance() {
    formEditorContext.setActiveEditorHelper(editorHelper);
    initLayoutDragComponentPalette();
    layoutFocusEvent.fire(new LayoutEditorFocusEvent());
}
Also used : LayoutEditorFocusEvent(org.kie.workbench.common.workbench.client.events.LayoutEditorFocusEvent)

Example 2 with LayoutEditorFocusEvent

use of org.kie.workbench.common.workbench.client.events.LayoutEditorFocusEvent in project kie-wb-common by kiegroup.

the class AuthoringWorkbenchDocksTest method testCloseComponentPalette.

@Test
public void testCloseComponentPalette() {
    authoringWorkbenchDocks.onLayoutEditorFocus(new LayoutEditorFocusEvent());
    reset(uberfireDocks);
    authoringWorkbenchDocks.onLayoutEditorClose(new PlaceHiddenEvent(new DefaultPlaceRequest("FormEditor")));
    verify(uberfireDocks).remove(authoringWorkbenchDocks.componentPaletteDock);
    assertFalse(authoringWorkbenchDocks.componentPaletteEnabled);
    verify(uberfireDocks, never()).open(any());
}
Also used : PlaceHiddenEvent(org.uberfire.client.workbench.events.PlaceHiddenEvent) DefaultPlaceRequest(org.uberfire.mvp.impl.DefaultPlaceRequest) LayoutEditorFocusEvent(org.kie.workbench.common.workbench.client.events.LayoutEditorFocusEvent) Test(org.junit.Test)

Example 3 with LayoutEditorFocusEvent

use of org.kie.workbench.common.workbench.client.events.LayoutEditorFocusEvent in project kie-wb-common by kiegroup.

the class AuthoringWorkbenchDocksTest method testShowComponentPalette.

@Test
public void testShowComponentPalette() {
    authoringWorkbenchDocks.onLayoutEditorFocus(new LayoutEditorFocusEvent());
    verify(uberfireDocks).add(authoringWorkbenchDocks.componentPaletteDock);
    verify(uberfireDocks).open(authoringWorkbenchDocks.componentPaletteDock);
    assertTrue(authoringWorkbenchDocks.componentPaletteEnabled);
}
Also used : LayoutEditorFocusEvent(org.kie.workbench.common.workbench.client.events.LayoutEditorFocusEvent) Test(org.junit.Test)

Aggregations

LayoutEditorFocusEvent (org.kie.workbench.common.workbench.client.events.LayoutEditorFocusEvent)3 Test (org.junit.Test)2 PlaceHiddenEvent (org.uberfire.client.workbench.events.PlaceHiddenEvent)1 DefaultPlaceRequest (org.uberfire.mvp.impl.DefaultPlaceRequest)1