當前位置: 首頁>>代碼示例>>Java>>正文


Java NodeMouseDoubleClickHandler類代碼示例

本文整理匯總了Java中com.ait.lienzo.client.core.event.NodeMouseDoubleClickHandler的典型用法代碼示例。如果您正苦於以下問題:Java NodeMouseDoubleClickHandler類的具體用法?Java NodeMouseDoubleClickHandler怎麽用?Java NodeMouseDoubleClickHandler使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


NodeMouseDoubleClickHandler類屬於com.ait.lienzo.client.core.event包,在下文中一共展示了NodeMouseDoubleClickHandler類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initialiseEventHandler

import com.ait.lienzo.client.core.event.NodeMouseDoubleClickHandler; //導入依賴的package包/類
@Test
@SuppressWarnings("unchecked")
public void initialiseEventHandler() {
    final ArgumentCaptor<NodeDragMoveHandler> nodeDragMoveHandlerArgumentCaptor = ArgumentCaptor.forClass(NodeDragMoveHandler.class);
    final ArgumentCaptor<NodeMouseDoubleClickHandler> nodeMouseDoubleClickHandlerArgumentCaptor = ArgumentCaptor.forClass(NodeMouseDoubleClickHandler.class);

    //dtPresenter.setContent(...) is called by the base tests @Before method
    verify(view,
           times(1)).registerNodeDragMoveHandler(nodeDragMoveHandlerArgumentCaptor.capture());
    verify(view,
           times(1)).registerNodeMouseDoubleClickHandler(nodeMouseDoubleClickHandlerArgumentCaptor.capture());

    final NodeDragMoveHandler nodeDragMoveHandler = nodeDragMoveHandlerArgumentCaptor.getValue();
    final NodeMouseDoubleClickHandler nodeMouseDoubleClickHandler = nodeMouseDoubleClickHandlerArgumentCaptor.getValue();
    assertNotNull(nodeDragMoveHandler);
    assertNotNull(nodeMouseDoubleClickHandler);
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:18,代碼來源:GuidedDecisionTablePresenterTest.java

示例2: checkRegisteredNodeMouseDoubleClickHandlerNotOverHeader

import com.ait.lienzo.client.core.event.NodeMouseDoubleClickHandler; //導入依賴的package包/類
@Test
@SuppressWarnings("unchecked")
public void checkRegisteredNodeMouseDoubleClickHandlerNotOverHeader() {
    final ArgumentCaptor<NodeMouseDoubleClickHandler> nodeMouseDoubleClickHandlerArgumentCaptor = ArgumentCaptor.forClass(NodeMouseDoubleClickHandler.class);

    //dtPresenter.setContent(...) is called by the base tests @Before method
    verify(view,
           times(1)).registerNodeMouseDoubleClickHandler(nodeMouseDoubleClickHandlerArgumentCaptor.capture());

    final NodeMouseDoubleClickHandler nodeMouseDoubleClickHandler = nodeMouseDoubleClickHandlerArgumentCaptor.getValue();
    assertNotNull(nodeMouseDoubleClickHandler);

    //Mouse not over Header
    final NodeMouseDoubleClickEvent event = mock(NodeMouseDoubleClickEvent.class);
    when(view.isNodeMouseEventOverCaption(eq(event))).thenReturn(false);

    nodeMouseDoubleClickHandler.onNodeMouseDoubleClick(event);

    verify(dtPresenter,
           never()).enterPinnedMode(any(GridWidget.class),
                                    any(Command.class));
    verify(dtPresenter,
           never()).enterPinnedMode(any(GridWidget.class),
                                    any(Command.class));
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:26,代碼來源:GuidedDecisionTablePresenterTest.java

示例3: getGridMouseDoubleClickHandler

import com.ait.lienzo.client.core.event.NodeMouseDoubleClickHandler; //導入依賴的package包/類
protected NodeMouseDoubleClickHandler getGridMouseDoubleClickHandler(final GridSelectionManager selectionManager,
                                                                     final GridPinnedModeManager pinnedModeManager) {
    return new BaseGridWidgetMouseDoubleClickHandler(this,
                                                     selectionManager,
                                                     pinnedModeManager,
                                                     renderer);
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:8,代碼來源:BaseGridWidget.java

示例4: checkRegisteredNodeMouseDoubleClickHandlerOverHeader

import com.ait.lienzo.client.core.event.NodeMouseDoubleClickHandler; //導入依賴的package包/類
@Test
@SuppressWarnings("unchecked")
public void checkRegisteredNodeMouseDoubleClickHandlerOverHeader() {
    final ArgumentCaptor<NodeMouseDoubleClickHandler> nodeMouseDoubleClickHandlerArgumentCaptor = ArgumentCaptor.forClass(NodeMouseDoubleClickHandler.class);

    //dtPresenter.setContent(...) is called by the base tests @Before method
    verify(view,
           times(1)).registerNodeMouseDoubleClickHandler(nodeMouseDoubleClickHandlerArgumentCaptor.capture());

    final NodeMouseDoubleClickHandler nodeMouseDoubleClickHandler = nodeMouseDoubleClickHandlerArgumentCaptor.getValue();
    assertNotNull(nodeMouseDoubleClickHandler);

    //Mouse over Header, not pinned
    final NodeMouseDoubleClickEvent event = mock(NodeMouseDoubleClickEvent.class);
    when(view.isNodeMouseEventOverCaption(eq(event))).thenReturn(true);
    when(modellerPresenter.isGridPinned()).thenReturn(false);

    nodeMouseDoubleClickHandler.onNodeMouseDoubleClick(event);

    verify(dtPresenter,
           times(1)).enterPinnedMode(eq(view),
                                     any(Command.class));

    //Mouse over Header, pinned
    when(modellerPresenter.isGridPinned()).thenReturn(true);

    nodeMouseDoubleClickHandler.onNodeMouseDoubleClick(event);

    verify(dtPresenter,
           times(1)).exitPinnedMode(any(Command.class));
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:32,代碼來源:GuidedDecisionTablePresenterTest.java

示例5: getGridMouseDoubleClickHandler

import com.ait.lienzo.client.core.event.NodeMouseDoubleClickHandler; //導入依賴的package包/類
@Override
protected NodeMouseDoubleClickHandler getGridMouseDoubleClickHandler(final GridSelectionManager selectionManager,
                                                                     final GridPinnedModeManager pinnedModeManager) {
    return new EditableHeaderGridWidgetMouseDoubleClickHandler(this,
                                                               selectionManager,
                                                               pinnedModeManager,
                                                               renderer);
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:9,代碼來源:BaseExpressionGrid.java

示例6: registerNodeMouseDoubleClickHandler

import com.ait.lienzo.client.core.event.NodeMouseDoubleClickHandler; //導入依賴的package包/類
@Override
public void registerNodeMouseDoubleClickHandler(final NodeMouseDoubleClickHandler handler) {
    addNodeMouseDoubleClickHandler(handler);
}
 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:5,代碼來源:GuidedDecisionTableViewImpl.java

示例7: testDoubleClickHandler

import com.ait.lienzo.client.core.event.NodeMouseDoubleClickHandler; //導入依賴的package包/類
@Test
@SuppressWarnings("unchecked")
public void testDoubleClickHandler() {
    final ViewHandler<ViewEvent> clickHandler = mock(ViewHandler.class);
    final HandlerRegistration handlerRegistration = mock(HandlerRegistration.class);
    when(node.addNodeMouseDoubleClickHandler(any(NodeMouseDoubleClickHandler.class))).thenReturn(handlerRegistration);
    tested.addHandler(ViewEventType.MOUSE_DBL_CLICK,
                      clickHandler);
    final ArgumentCaptor<NodeMouseDoubleClickHandler> clickHandlerArgumentCaptor =
            ArgumentCaptor.forClass(NodeMouseDoubleClickHandler.class);
    verify(node,
           times(1)).addNodeMouseDoubleClickHandler(clickHandlerArgumentCaptor.capture());
    final NodeMouseDoubleClickHandler nodeCLickHandler = clickHandlerArgumentCaptor.getValue();
    final NodeMouseDoubleClickEvent clickEvent = mock(NodeMouseDoubleClickEvent.class);
    final MouseEvent mouseEvent = mock(MouseEvent.class);
    final int x = 102;
    final int y = 410;
    when(clickEvent.getX()).thenReturn(x);
    when(clickEvent.getY()).thenReturn(y);
    when(clickEvent.isButtonLeft()).thenReturn(true);
    when(clickEvent.isButtonRight()).thenReturn(true);
    when(clickEvent.isButtonMiddle()).thenReturn(true);
    when(clickEvent.isShiftKeyDown()).thenReturn(true);
    when(clickEvent.isAltKeyDown()).thenReturn(true);
    when(clickEvent.isMetaKeyDown()).thenReturn(true);
    when(clickEvent.getMouseEvent()).thenReturn(mouseEvent);
    when(mouseEvent.getClientX()).thenReturn(x);
    when(mouseEvent.getClientY()).thenReturn(y);
    nodeCLickHandler.onNodeMouseDoubleClick(clickEvent);
    final ArgumentCaptor<ViewEvent> eventArgumentCaptor =
            ArgumentCaptor.forClass(ViewEvent.class);
    verify(clickHandler,
           times(1)).handle(eventArgumentCaptor.capture());
    final MouseDoubleClickEvent viewEvent = (MouseDoubleClickEvent) eventArgumentCaptor.getValue();
    assertEquals(x,
                 viewEvent.getX(),
                 0d);
    assertEquals(y,
                 viewEvent.getY(),
                 0d);
    assertEquals(x,
                 viewEvent.getClientX(),
                 0d);
    assertEquals(y,
                 viewEvent.getClientY(),
                 0d);
    assertTrue(viewEvent.isButtonLeft());
    assertTrue(viewEvent.isButtonRight());
    assertTrue(viewEvent.isButtonMiddle());
    assertTrue(viewEvent.isAltKeyDown());
    assertTrue(viewEvent.isMetaKeyDown());
    assertTrue(viewEvent.isShiftKeyDown());
    assertNotNull(tested.getRegistrationMap().get(ViewEventType.MOUSE_DBL_CLICK));
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:55,代碼來源:ViewEventHandlerManagerTest.java

示例8: registerNodeMouseDoubleClickHandler

import com.ait.lienzo.client.core.event.NodeMouseDoubleClickHandler; //導入依賴的package包/類
void registerNodeMouseDoubleClickHandler(final NodeMouseDoubleClickHandler handler); 
開發者ID:kiegroup,項目名稱:drools-wb,代碼行數:2,代碼來源:GuidedDecisionTableView.java


注:本文中的com.ait.lienzo.client.core.event.NodeMouseDoubleClickHandler類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。