@Test public void setTarget_targetIsGrid_getterReturnsSetTarget() { GridContextMenu<Object> gridContextMenu = new GridContextMenu<>(); Grid<Object> grid = new Grid<>(); gridContextMenu.setTarget(grid); Assert.assertEquals(grid, gridContextMenu.getTarget()); }
@Override public void setTarget(Component target) { if (target != null && !(target instanceof Grid<?>)) { throw new IllegalArgumentException( "Only an instance of Grid can be used as the target for GridContextMenu. " + "Use ContextMenu for any other component."); } super.setTarget(target); }
GridContextMenu extends
        ContextMenuBase<GridContextMenu<T>, GridMenuItem<T>, GridSubMenu<T>> implements HasGridMenuItems<T> { @Override public void setTarget(Component target) { if (target != null && !(target instanceof Grid<?>)) { throw new IllegalArgumentException( "Only an instance of Grid can be used as the target for GridContextMenu. " + "Use ContextMenu for any other component."); } super.setTarget(target); } }
GridContextMenu extends
        ContextMenuBase<GridContextMenu<T>, GridMenuItem<T>, GridSubMenu<T>> implements HasGridMenuItems<T> { @Override public void setTarget(Component target) { if (target != null && !(target instanceof Grid<?>)) { throw new IllegalArgumentException( "Only an instance of Grid can be used as the target for GridContextMenu. " + "Use ContextMenu for any other component."); } super.setTarget(target); } GridContextMenu();  GridContextMenu(Grid<T> target); }
GridContextMenu extends
        ContextMenuBase<GridContextMenu<T>, GridMenuItem<T>, GridSubMenu<T>> implements HasGridMenuItems<T> { @Override public void setTarget(Component target) { if (target != null && !(target instanceof Grid<?>)) { throw new IllegalArgumentException( "Only an instance of Grid can be used as the target for GridContextMenu. " + "Use ContextMenu for any other component."); } super.setTarget(target); } GridContextMenu();  GridContextMenu(Grid<T> target); @Override void setTarget(Component target); @Override GridMenuItem<T> addItem(String text,
            ComponentEventListener<GridContextMenuItemClickEvent<T>> clickListener); @Override GridMenuItem<T> addItem(Component component,
            ComponentEventListener<GridContextMenuItemClickEvent<T>> clickListener); Registration addGridContextMenuOpenedListener(
            ComponentEventListener<GridContextMenuOpenedEvent<T>> listener); SerializablePredicate<T> getDynamicContentHandler(); void setDynamicContentHandler(
            SerializablePredicate<T> dynamicContentHandler); }
GridContextMenu extends
        ContextMenuBase<GridContextMenu<T>, GridMenuItem<T>, GridSubMenu<T>> implements HasGridMenuItems<T> { @Override public void setTarget(Component target) { if (target != null && !(target instanceof Grid<?>)) { throw new IllegalArgumentException( "Only an instance of Grid can be used as the target for GridContextMenu. " + "Use ContextMenu for any other component."); } super.setTarget(target); } GridContextMenu();  GridContextMenu(Grid<T> target); @Override void setTarget(Component target); @Override GridMenuItem<T> addItem(String text,
            ComponentEventListener<GridContextMenuItemClickEvent<T>> clickListener); @Override GridMenuItem<T> addItem(Component component,
            ComponentEventListener<GridContextMenuItemClickEvent<T>> clickListener); Registration addGridContextMenuOpenedListener(
            ComponentEventListener<GridContextMenuOpenedEvent<T>> listener); SerializablePredicate<T> getDynamicContentHandler(); void setDynamicContentHandler(
            SerializablePredicate<T> dynamicContentHandler);  }