- Timestamp:
- 07/14/13 23:20:04 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/main/src/main/java/com/framsticks/gui/controls/SliderControl.java
r100 r101 18 18 import org.apache.logging.log4j.LogManager; 19 19 20 import com.framsticks.gui.Gui; 20 21 import com.framsticks.params.types.DecimalParam; 21 22 import com.framsticks.params.types.FloatParam; … … 98 99 slider.setPaintTicks(true); 99 100 100 this.setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS)); 101 this.setAlignmentX(Box.CENTER_ALIGNMENT); 102 this.setAlignmentY(Box.CENTER_ALIGNMENT); 103 104 JPanel sliderPanel = new JPanel(); 105 // sliderPanel.setLayout(new BoxLayout(sliderPanel, BoxLayout.LINE_AXIS)); 101 106 102 107 103 … … 140 136 })); 141 137 142 JPanel sVPanel = new JPanel(); 143 sVPanel.setLayout(new BoxLayout(sVPanel, BoxLayout.LINE_AXIS)); 144 sVPanel.add(text); 145 Layout.copyComponentDimensions(sVPanel, text); 146 147 JPanel sPanel = new JPanel(); 148 sPanel.setLayout(new BoxLayout(sPanel, BoxLayout.LINE_AXIS)); 149 138 JPanel valuePanel = new JPanel(); 139 valuePanel.setLayout(new BoxLayout(valuePanel, BoxLayout.LINE_AXIS)); 140 valuePanel.add(text); 141 Layout.copyComponentDimensions(valuePanel, text); 142 143 144 JPanel sliderPanel = new JPanel(); 150 145 sliderPanel.setLayout(new BorderLayout()); 151 146 sliderPanel.add(slider, BorderLayout.CENTER); … … 153 148 sliderPanel.setMinimumSize(new Dimension(0, 60)); 154 149 155 sPanel.add(sVPanel); 156 sPanel.add(sliderPanel); 157 158 this.add(sPanel); 150 151 this.setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS)); 152 this.setAlignmentX(Box.CENTER_ALIGNMENT); 153 this.setAlignmentY(Box.CENTER_ALIGNMENT); 154 155 Gui.addLeftToLabel(this, valuePanel, sliderPanel); 159 156 } 160 157
Note: See TracChangeset
for help on using the changeset viewer.