/******************************************************************************************************************* * * If the current position is the one where the ControlPanel is rendered, move it to the alternate position. * ******************************************************************************************************************/ private void eventuallyMoveOutControlPanel() { if (currentPosition.equals(DEFAULT_CONTROL_PANEL_POSITION)) { presentation.renderControlPanelAt(ALTERNATE_CONTROL_PANEL_POSITION); } }
/******************************************************************************************************************* * * If the ControlPanel was moved to the alternate position, restore it. * ******************************************************************************************************************/ private void eventuallyMoveBackControlPanel() { if (currentPosition.equals(DEFAULT_CONTROL_PANEL_POSITION)) { presentation.renderControlPanelAt(DEFAULT_CONTROL_PANEL_POSITION); presentation.renderEmptyCellAt(ALTERNATE_CONTROL_PANEL_POSITION); } }
/******************************************************************************************************************* * * ******************************************************************************************************************/ private void initializeMeasurement() { log.info("initializeMeasurement()"); presentation = presentationBuilder.get().getPresentation(); computePositions(); measurementMapByPosition.clear(); presentation.bind(continueAction, cancelAction); presentation.setGridSize(COLUMNS, ROWS); continueAction.setEnabled(false); cancelAction.setEnabled(false); presentation.showUp(display.getDisplay().getGraphicsDevice()); presentation.renderControlPanelAt(DEFAULT_CONTROL_PANEL_POSITION); }
inOrder.verify(action("Cancel")).setEnabled(eq(false)); inOrder.verify(presentation).showUp(any(GraphicsDevice.class)); inOrder.verify(presentation).renderControlPanelAt( eq(xy(0, 0))); inOrder.verify(presentation).renderControlPanelAt( eq(xy(0, 1))); inOrder.verify(action("Continue")).setEnabled(eq(true)); inOrder.verify(action("Cancel")).setEnabled(eq(true)); inOrder.verify(presentation).hideMeasureInProgress(); inOrder.verify(presentation).renderMeasurementCellAt( eq(xy(0, 0)), eq("Luminance: 9 cd/m\u00b2"), eq("White point: 2568 K")); inOrder.verify(presentation).renderControlPanelAt( eq(xy(0, 0))); inOrder.verify(presentation).renderEmptyCellAt( eq(xy(0, 1)));
inOrder.verify(action("Cancel")).setEnabled(eq(false)); inOrder.verify(presentation).showUp(any(GraphicsDevice.class)); // TODO: verify the graphicdevice inOrder.verify(presentation).renderControlPanelAt( eq(xy(0, 0))); inOrder.verify(presentation).renderControlPanelAt( eq(xy(0, 1))); inOrder.verify(action("Continue")).setEnabled(eq(true)); inOrder.verify(action("Cancel")).setEnabled(eq(true)); inOrder.verify(presentation).hideMeasureInProgress(); inOrder.verify(presentation).renderMeasurementCellAt( eq(xy(0, 0)), eq("Luminance: 9 cd/m\u00b2"), eq("White point: 2568 K")); inOrder.verify(presentation).renderControlPanelAt( eq(xy(0, 0))); inOrder.verify(presentation).renderEmptyCellAt( eq(xy(0, 1)));