Changes between Version 24 and Version 25 of mvc
- Timestamp:
- 06/14/22 09:19:07 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
mvc
v24 v25 93 93 {{{ 94 94 RestrictedNumberModel model = new RestrictedNumberModel( 95 new BigDecimal("1.2"), 96 new NumberModel(new BigDecimal("1.1"), log), 97 new NumberModel(new BigDecimal("1.3"), log), log); 95 new BigDecimal("1.2"), min, max, log); 98 96 panel.add(new SliderPanel(model), BorderLayout.CENTER); 99 97 panel.add(new NumberPanel(model), BorderLayout.SOUTH); … … 102 100 103 101 We left out the standard boilerplate to create the window. 104 The RestrictedNumberModel is initialized with the number 1.2, and the range is set to [1.1, 1.3].102 The RestrictedNumberModel is initialized with the number 1.2, and with the min (1.1) and max (1.2) set. 105 103 Then we add a SliderPanel and a NumberPanel, both showing the same number. This allows the user to change the number either by dragging the slider or by typing the exact number. 106 104 107 There are many more examples in the105 There are many more examples in [source:/mvc/src/test/java/tudelft/utilities/mvc/panels].