本文整理匯總了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);
}
示例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));
}
示例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);
}
示例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));
}
示例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);
}
示例6: registerNodeMouseDoubleClickHandler
import com.ait.lienzo.client.core.event.NodeMouseDoubleClickHandler; //導入依賴的package包/類
@Override
public void registerNodeMouseDoubleClickHandler(final NodeMouseDoubleClickHandler handler) {
addNodeMouseDoubleClickHandler(handler);
}
示例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));
}
示例8: registerNodeMouseDoubleClickHandler
import com.ait.lienzo.client.core.event.NodeMouseDoubleClickHandler; //導入依賴的package包/類
void registerNodeMouseDoubleClickHandler(final NodeMouseDoubleClickHandler handler);