Changeset 88 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui/panels/OverviewWinSpike.java
- Timestamp:
- 08/28/2017 01:17:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/gui/panels/OverviewWinSpike.java
r86 r88 2 2 3 3 import java.awt.BorderLayout; 4 import java.awt.Color; 5 import java.awt.Component; 6 import java.awt.FlowLayout; 7 import java.awt.GridLayout; 4 8 import java.io.File; 9 import javax.swing.BorderFactory; 10 import javax.swing.Box; 5 11 import javax.swing.BoxLayout; 6 12 import javax.swing.JFrame; … … 31 37 32 38 TimelineTickPanel pnl = new TimelineTickPanel(); 33 pnl.setLayout(new BoxLayout(pnl, BoxLayout.PAGE_AXIS)); 39 //pnl.setLayout(new BoxLayout(pnl, BoxLayout.PAGE_AXIS)); 40 //pnl.setLayout(new FlowLayout()); 41 pnl.setLayout(new BorderLayout()); 34 42 // Create a script 35 43 File inFile = new File("test/scriptbuilder/structures/test_input_file.xml"); … … 37 45 script.loadScriptFromFile(inFile); 38 46 ScriptIncident incident = script.incidents.get(2); 47 39 48 IncidentNumberPanel inciNum = new IncidentNumberPanel(); 40 49 inciNum.update(incident); 41 JPanel row1 = new JPanel(); 42 row1.setOpaque(false); // so tick lines will show through 50 // Create yellow border during development for easy visualization 51 inciNum.setBorder(BorderFactory.createLineBorder(Color.yellow)); 52 53 IncidentNumberPanel inciNum2 = new IncidentNumberPanel(); 54 inciNum2.update(script.incidents.get(3)); 55 //inciNum2.setSize(100,200); 56 57 //Box col1 = new Box(BoxLayout.PAGE_AXIS); 58 JPanel col1 = new JPanel(new GridLayout(9,1)); 59 col1.setOpaque(false); // so tick lines will show throughut 60 col1.setAlignmentX(Component.LEFT_ALIGNMENT); 43 61 //row1.setSize(200, 500); 44 row1.add(inciNum); 62 col1.add(inciNum); 63 col1.add(inciNum2); 64 col1.add(Box.createVerticalGlue()); 65 66 Box col2 = new Box(BoxLayout.PAGE_AXIS); 67 col2.setOpaque(false); // so tick lines will show throughut 68 col2.setAlignmentX(Component.LEFT_ALIGNMENT); 69 45 70 RangeSlider slider = new RangeSlider(0,25); 46 71 slider.setValue(5); 47 72 slider.setUpperValue(10); 48 row1.add(slider); 49 pnl.add(row1); 73 slider.setAlignmentX(Component.LEFT_ALIGNMENT); 74 RangeSlider slider2 = new RangeSlider(0,25); 75 slider2.setValue(5); 76 slider2.setUpperValue(10); 77 slider2.setAlignmentX(Component.LEFT_ALIGNMENT); 78 79 col2.add(Box.createVerticalStrut(50)); 80 col2.add(slider); 81 col2.add(Box.createVerticalStrut(50)); 82 col2.add(slider2); 83 84 pnl.add(col1, BorderLayout.LINE_START); 85 pnl.add(col2, BorderLayout.CENTER); 86 50 87 // update this panel with the script 51 88 pnl.update(script);
Note: See TracChangeset
for help on using the changeset viewer.
