@Test public void testRectangularTabList() { RectangularTabOverlay tabOverlay = tabOverlayHandler.enterContentOperationMode(ContentOperationMode.RECTANGULAR); for (val dimension : tabOverlay.getSupportedSizes()) { tabOverlay.setSize(dimension); assertEquals("Size check failed for size " + dimension, dimension.getSize(), clientTabList.getSize()); } }
@Override public <R> R enterContentOperationMode(ContentOperationMode<R> operationMode) { AbstractContentOperationModeHandler<?> handler; if (operationMode == ContentOperationMode.PASS_TROUGH) { handler = new PassThroughContentHandler(); } else if (operationMode == ContentOperationMode.SIMPLE) { handler = new SimpleOperationModeHandler(); } else if (operationMode == ContentOperationMode.RECTANGULAR) { handler = new RectangularSizeHandler(); } else { throw new UnsupportedOperationException(); } nextActiveContentHandlerQueue.add(handler); scheduleUpdate(); return (R) handler.getTabOverlay(); }
AbstractTabOverlayHandler implements PacketHandler, TabOverlayHandler { @Override public <R> R enterContentOperationMode(ContentOperationMode<R> operationMode) { AbstractContentOperationModeHandler<?> handler; if (operationMode == ContentOperationMode.PASS_TROUGH) { handler = new PassThroughContentHandler(); } else if (operationMode == ContentOperationMode.SIMPLE) { handler = new SimpleOperationModeHandler(); } else if (operationMode == ContentOperationMode.RECTANGULAR) { handler = new RectangularSizeHandler(); } else { throw new UnsupportedOperationException(); } nextActiveContentHandlerQueue.add(handler); scheduleUpdate(); return (R) handler.getTabOverlay(); } }
AbstractTabOverlayHandler implements PacketHandler, TabOverlayHandler { @Override public <R> R enterContentOperationMode(ContentOperationMode<R> operationMode) { AbstractContentOperationModeHandler<?> handler; if (operationMode == ContentOperationMode.PASS_TROUGH) { handler = new PassThroughContentHandler(); } else if (operationMode == ContentOperationMode.SIMPLE) { handler = new SimpleOperationModeHandler(); } else if (operationMode == ContentOperationMode.RECTANGULAR) { handler = new RectangularSizeHandler(); } else { throw new UnsupportedOperationException(); } nextActiveContentHandlerQueue.add(handler); scheduleUpdate(); return (R) handler.getTabOverlay(); } AbstractTabOverlayHandler(Logger logger, Executor eventLoopExecutor, UUID viewerUuid, boolean is18, boolean is13OrLater); }
AbstractTabOverlayHandler implements PacketHandler, TabOverlayHandler { @Override public <R> R enterContentOperationMode(ContentOperationMode<R> operationMode) { AbstractContentOperationModeHandler<?> handler; if (operationMode == ContentOperationMode.PASS_TROUGH) { handler = new PassThroughContentHandler(); } else if (operationMode == ContentOperationMode.SIMPLE) { handler = new SimpleOperationModeHandler(); } else if (operationMode == ContentOperationMode.RECTANGULAR) { handler = new RectangularSizeHandler(); } else { throw new UnsupportedOperationException(); } nextActiveContentHandlerQueue.add(handler); scheduleUpdate(); return (R) handler.getTabOverlay(); } AbstractTabOverlayHandler(Logger logger, Executor eventLoopExecutor, UUID viewerUuid, boolean is18, boolean is13OrLater); @Override PacketListenerResult onPlayerListPacket(PlayerListItem packet); @Override PacketListenerResult onTeamPacket(Team packet); @Override PacketListenerResult onPlayerListHeaderFooterPacket(PlayerListHeaderFooter packet); @Override void onServerSwitch(boolean is13OrLater); @Override R enterContentOperationMode(ContentOperationMode<R> operationMode); @Override R enterHeaderAndFooterOperationMode(HeaderAndFooterOperationMode<R> operationMode); }
AbstractTabOverlayHandler implements PacketHandler, TabOverlayHandler { @Override public <R> R enterContentOperationMode(ContentOperationMode<R> operationMode) { AbstractContentOperationModeHandler<?> handler; if (operationMode == ContentOperationMode.PASS_TROUGH) { handler = new PassThroughContentHandler(); } else if (operationMode == ContentOperationMode.SIMPLE) { handler = new SimpleOperationModeHandler(); } else if (operationMode == ContentOperationMode.RECTANGULAR) { handler = new RectangularSizeHandler(); } else { throw new UnsupportedOperationException(); } nextActiveContentHandlerQueue.add(handler); scheduleUpdate(); return (R) handler.getTabOverlay(); } AbstractTabOverlayHandler(Logger logger, Executor eventLoopExecutor, UUID viewerUuid, boolean is18, boolean is13OrLater); @Override PacketListenerResult onPlayerListPacket(PlayerListItem packet); @Override PacketListenerResult onTeamPacket(Team packet); @Override PacketListenerResult onPlayerListHeaderFooterPacket(PlayerListHeaderFooter packet); @Override void onServerSwitch(boolean is13OrLater); @Override R enterContentOperationMode(ContentOperationMode<R> operationMode); @Override R enterHeaderAndFooterOperationMode(HeaderAndFooterOperationMode<R> operationMode);  }