Package org.djutils.swing.multislider
Class MultiSliderTest
java.lang.Object
org.djutils.swing.multislider.MultiSliderTest
@ExtendWith(com.github.caciocavallosilano.cacio.ctc.junit.CacioExtension.class)
public class MultiSliderTest
extends Object
MultiSliderTest tests the functions of the MultiSlider.
Copyright (c) 2024-2025 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html.
- Author:
- Alexander Verbraeck
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTest change listeners.voidTest errors in creating and using sliders.voidTest final value change listeners.voidCreate a MultiSlider with three underlying sliders and test the basic getters and setters.voidTest label panel of a multislider with a horizontal orientation.voidTest making labels.voidTest mouse clicks for a multislider with a horizontal and vertical orientation and an inverted and non-inverted direction.voidtestMouseClicks(int orientation, boolean inverted) Test mouse clicks for a multislider with the given orientation.voidTest overlap restrictions.voidTest overlap restrictions, based on changing the min/max values.voidTest overlap restrictions.voidTest passing restrictions.voidTest passing restrictions, based on changing the min/max values.voidTest passing restrictions, based on changing the underlying slider values.voidtestUI()Test font and UI.
-
Constructor Details
-
MultiSliderTest
public MultiSliderTest()
-
-
Method Details
-
testGetSet
Create a MultiSlider with three underlying sliders and test the basic getters and setters. -
testMouseClicks
@Test public void testMouseClicks() throws AWTException, InterruptedException, InvocationTargetExceptionTest mouse clicks for a multislider with a horizontal and vertical orientation and an inverted and non-inverted direction.- Throws:
AWTException- on AWT or Swing errorInterruptedException- when sleep is interruptedInvocationTargetException- on error in invokeAndWait
-
testMouseClicks
public void testMouseClicks(int orientation, boolean inverted) throws AWTException, InterruptedException, InvocationTargetException Test mouse clicks for a multislider with the given orientation.- Parameters:
orientation- the orientationinverted- whether the scale is inverted or not- Throws:
AWTException- on AWT or Swing errorInterruptedException- when sleep is interruptedInvocationTargetException- on error in invokeAndWait
-
testLabelPanelHorizontal
Test label panel of a multislider with a horizontal orientation.- Throws:
AWTException- on AWT or Swing errorInterruptedException- when sleep is interrupted
-
testUI
@Test public void testUI() throws InterruptedException, ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelExceptionTest font and UI.- Throws:
InterruptedException- when sleep is interruptedUnsupportedLookAndFeelException- when MetalLookAndFeel unavailableIllegalAccessException- when MetalLookAndFeel unavailableInstantiationException- when MetalLookAndFeel unavailableClassNotFoundException- when MetalLookAndFeel unavailable
-
testErrors
Test errors in creating and using sliders. -
testLabelTable
Test making labels. -
testChangeListeners
Test change listeners. -
testFinalValueChangeListeners
Test final value change listeners. -
testPassingRestrictions
Test passing restrictions. -
testOverlapRestrictions
Test overlap restrictions. -
testPassingRestrictionsSlider
Test passing restrictions, based on changing the underlying slider values. -
testOverlapRestrictionsSlider
Test overlap restrictions. -
testPassingRestrictionsMinMax
Test passing restrictions, based on changing the min/max values. -
testOverlapRestrictionsMinMax
Test overlap restrictions, based on changing the min/max values.
-