![]() |
CanScan
|
Simulates Native Image configuration behavior for UI testing and preview without generating the actual image. More...
Collaboration diagram for fr.softsf.canscan.NativeImageConfigSimulator:Static Public Member Functions | |
| static< T extends Component > T | findComponent (Container container, String name, Class< T > type) |
| Searches for a component of the specified type and name within the given container hierarchy. | |
| static void | main (String[] args) |
| Launches the Native Image configuration UI and runs the simulation in a background thread. | |
Static Private Member Functions | |
| static void | assertEquals (String label, String expected, String actual) throws Exception |
| Compares two strings and prints the test result with a label. | |
| static void | browseFoldersSimulation (JButton browseButton, Robot robot) throws Exception |
Simulates clicking a browse button to open a JFileChooser, performs a right-click inside it, verifies that a popup menu appears, and closes the dialog. | |
| static void | chooseModuleColor (JButton qrColorButton, Robot robot) throws Exception |
Simulates selecting a color via JColorChooser, confirms the dialog with Enter, and verifies the selected value. | |
| static< T extends Component > T | findComponent (Container root, Container current, String name, Class< T > type) |
| Recursively searches for a component of the specified type and name within the container hierarchy. | |
| static JList<?> | findJListInContainer (Container container) |
| Recursively searches for a JList within a given container. | |
| static JOptionPane | findOptionPane (Container container) |
Recursively searches the given container and its descendants for a JOptionPane instance. | |
| static JList<?> | findVisibleJList (Robot robot) |
| Recursively searches for the visible JList across all open windows. | |
| static void | freeDataTooBig (JRadioButton freeRadio, JTextArea freeField, Robot robot) throws Exception |
| Simulates selecting the free data mode and entering an oversized payload into the input field. | |
| static String | interceptAndValideDialog (Robot robot) |
Confirms and closes a visible JOptionPane by pressing Enter, then returns the dialog title. | |
| static void | nameTypingSimulation (JTextField nameField, Robot robot) throws Exception |
Simulates typing "Test" into a JTextField and verifies the input using a Robot. | |
| static void | openLatestReleaseRepoInBrowser () throws Exception |
| Simulates opening the latest release repository URL in the system browser. | |
| static void | pressEnter (Robot robot) |
Simulates pressing the Enter key using the provided Robot, followed by a short delay. | |
| static void | ratioSliderTooltipSimulation (JSlider ratioSlider, Robot robot) throws Exception |
Simulates hovering over a JSlider to verify its tooltip matches the current slider value. | |
| static void | runSimulation (Container rootContainer) |
Runs the full end-to-end UI simulation for Native Image configuration using a Robot. | |
| static void | selectABeginTime (JRadioButton meetRadio, TimePicker meetBeginTimePicker, Robot robot) throws Exception |
| Simulates activating the meeting mode and selecting a start time through the TimePicker. | |
| static void | typeChar (Robot robot, char c) |
| Simulates typing a single character using the Robot class. | |
| static void | typeString (Robot robot, String text) |
| Simulates typing a full string using the Robot class. | |
Simulates Native Image configuration behavior for UI testing and preview without generating the actual image.
|
staticprivate |
Compares two strings and prints the test result with a label.
Throws an exception if the values do not match.
| label | Description of the test being performed (e.g === Test 1: Verification du tooltip ratioSlider === ). |
| expected | Expected string value (e.g. 27%). |
| actual | Actual string value to compare (e.g. 27%). |
| Exception | if expected and actual values differ. |
|
staticprivate |
Simulates clicking a browse button to open a JFileChooser, performs a right-click inside it, verifies that a popup menu appears, and closes the dialog.
| browseButton | the button that triggers the file chooser |
| robot | the Robot used for mouse interaction |
| Exception | if the chooser or popup menu is not detected |
Here is the call graph for this function:
|
staticprivate |
Simulates selecting a color via JColorChooser, confirms the dialog with Enter, and verifies the selected value.
| qrColorButton | the button that opens the color chooser |
| robot | the Robot used for UI interaction |
| Exception | if the dialog is not found or validation fails |
Here is the call graph for this function:
|
static |
Searches for a component of the specified type and name within the given container hierarchy.
Starts the search from the root container.
| container | the root container to search within |
| name | the name of the component to find (must match getName()) |
| type | the expected class type of the component |
| <T> | the type of the component to return |
| IllegalArgumentException | if no matching component is found |
Here is the call graph for this function:
|
staticprivate |
Recursively searches for a component of the specified type and name within the container hierarchy.
| root | the original root container (used for error reporting) |
| current | the current container being searched |
| name | the name of the component to find |
| type | the expected class type of the component |
| <T> | the type of the component to return |
| IllegalArgumentException | if the component is not found in the entire hierarchy |
Here is the call graph for this function:
|
staticprivate |
Recursively searches for a JList within a given container.
Here is the call graph for this function:
|
staticprivate |
Recursively searches the given container and its descendants for a JOptionPane instance.
| container | the root container to search within |
JOptionPane found, or null if none is present
Here is the call graph for this function:
|
staticprivate |
Recursively searches for the visible JList across all open windows.
The JList represents the TimePicker's list of hours.
Here is the call graph for this function:
|
staticprivate |
Simulates selecting the free data mode and entering an oversized payload into the input field.
Confirms the resulting error dialog and verifies its title.
| freeRadio | the radio button to activate free data mode |
| freeField | the text area for free-form input |
| robot | the Robot used for UI interaction |
| Exception | if the dialog is not intercepted or validation fails |
Here is the call graph for this function:
|
staticprivate |
Confirms and closes a visible JOptionPane by pressing Enter, then returns the dialog title.
| robot | the keyboard automation tool |
| RuntimeException | if no dialog is found within the timeout |
Here is the call graph for this function:
|
static |
Launches the Native Image configuration UI and runs the simulation in a background thread.
| args | command-line arguments (unused) |
Here is the call graph for this function:
|
staticprivate |
Simulates typing "Test" into a JTextField and verifies the input using a Robot.
Validation verifies containment due to input synchronization issues and potential character repetition (e.g., "tttest") in the environment.
| nameField | the text field to interact with |
| robot | the Robot used for mouse and keyboard actions |
| Exception | if input or verification fails |
Here is the call graph for this function:
|
staticprivate |
Simulates opening the latest release repository URL in the system browser.
Verifies that the openInBrowser call succeeds and returns true, thereby tracing the successful execution path for Native Image configuration.
| Exception | if the operation fails or does not return true. |
Here is the call graph for this function:
|
staticprivate |
Simulates pressing the Enter key using the provided Robot, followed by a short delay.
| robot | the Robot instance used to perform the key press |
|
staticprivate |
Simulates hovering over a JSlider to verify its tooltip matches the current slider value.
| ratioSlider | the slider to test |
| robot | the Robot used for mouse interaction |
| Exception | if the tooltip does not match the expected value |
Here is the call graph for this function:
|
staticprivate |
Runs the full end-to-end UI simulation for Native Image configuration using a Robot.
Locates required components, simulates user interactions, and logs progress or errors.
| rootContainer | the container holding all named UI components |
Here is the call graph for this function:
|
staticprivate |
Simulates activating the meeting mode and selecting a start time through the TimePicker.
Opens the time menu, chooses the first value using a direct mouse click, and verifies the resulting selected time.
| meetRadio | the radio button used to enable meeting mode |
| meetBeginTimePicker | the TimePicker used to select the start time |
| robot | the Robot used for UI interaction |
| Exception | if UI interaction fails or validation does not match |
Here is the call graph for this function:
|
staticprivate |
Simulates typing a single character using the Robot class.
SHIFT is pressed if the character is uppercase or numeric.
| robot | the Robot instance used to simulate keystrokes |
| c | the character to be typed |
|
staticprivate |
Simulates typing a full string using the Robot class.
Each character is sent individually via typeChar.
| robot | the Robot instance used to simulate keystrokes |
| text | the string to be typed |
Here is the call graph for this function: