Changeset 181
- Timestamp:
- 03/09/08 15:54:12 (9 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
MediAnnotate/trunk/src/org/mediannotate/app/PlayerPanel.java
r173 r181 131 131 132 132 JPanel jp_outter = new JPanel(); 133 jp_outter.setLayout(new GridLayout( 3, 1));133 jp_outter.setLayout(new GridLayout(2, 1)); 134 134 jp_outter.add(toolButtonPanel, 0); 135 135 … … 143 143 timeLineListener.setTimeLinePanel(timeLinePanel); 144 144 145 timeCodePanel = new TimeCodePanel(this); 146 jp_outter.add(timeCodePanel, 2); 147 148 145 timeCodePanel = new TimeCodePanel(this, toolButtonPanel); 149 146 150 147 add(jp_outter, BorderLayout.NORTH); MediAnnotate/trunk/src/org/mediannotate/ui/TimeCodePanel.java
r173 r181 11 11 import org.mediannotate.app.PlayerPanel; 12 12 13 public class TimeCodePanel extends JPanelimplements FocusListener {13 public class TimeCodePanel implements FocusListener { 14 14 15 15 private static final String TIME_CODE_LABEL_FORMAT = "%02d hrs %02d min %02d sec"; … … 33 33 34 34 35 public TimeCodePanel(PlayerPanel playerPanel ) {35 public TimeCodePanel(PlayerPanel playerPanel, JPanel containingPanel) { 36 36 super(); 37 37 timeField = new JTextField(String.format(TIME_CODE_FORMAT, 0, 0, 0, 0), 8); 38 38 durationLabel = new JLabel(String.format(TIME_CODE_LABEL_FORMAT, 0, 0, 0)); 39 this.add(timeField);40 this.add(durationLabel);39 containingPanel.add(timeField); 40 containingPanel.add(durationLabel); 41 41 this.myPlayerPanel = playerPanel; 42 42 timeField.addKeyListener(playerPanel); … … 69 69 myPlayerPanel.getCurrentMovie().setTime(time); 70 70 } catch (NumberFormatException e1) { 71 JOptionPane.showMessageDialog( this, "There was a problem processing your timecode");71 JOptionPane.showMessageDialog(myPlayerPanel, "There was a problem processing your timecode"); 72 72 timeField.setText(innerTime); 73 73 } 74 74 } else { 75 JOptionPane.showMessageDialog( this, "Timecodes must match the format hh:mm:ss.ff");75 JOptionPane.showMessageDialog(myPlayerPanel, "Timecodes must match the format hh:mm:ss.ff"); 76 76 timeField.setText(innerTime); 77 77 }
