Changeset 181

Show
Ignore:
Timestamp:
03/09/08 15:54:12 (9 months ago)
Author:
Stuart Thiel
Message:

-Fixed #152

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • MediAnnotate/trunk/src/org/mediannotate/app/PlayerPanel.java

    r173 r181  
    131131                 
    132132                JPanel jp_outter = new JPanel(); 
    133                 jp_outter.setLayout(new GridLayout(3, 1)); 
     133                jp_outter.setLayout(new GridLayout(2, 1)); 
    134134                jp_outter.add(toolButtonPanel, 0); 
    135135                 
     
    143143                timeLineListener.setTimeLinePanel(timeLinePanel); 
    144144                 
    145                 timeCodePanel = new TimeCodePanel(this); 
    146                 jp_outter.add(timeCodePanel, 2); 
    147                  
    148                  
     145                timeCodePanel = new TimeCodePanel(this, toolButtonPanel); 
    149146                 
    150147                add(jp_outter, BorderLayout.NORTH); 
  • MediAnnotate/trunk/src/org/mediannotate/ui/TimeCodePanel.java

    r173 r181  
    1111import org.mediannotate.app.PlayerPanel; 
    1212 
    13 public class TimeCodePanel extends JPanel implements FocusListener { 
     13public class TimeCodePanel implements FocusListener { 
    1414 
    1515        private static final String TIME_CODE_LABEL_FORMAT = "%02d hrs %02d min %02d sec"; 
     
    3333 
    3434 
    35         public TimeCodePanel(PlayerPanel playerPanel) { 
     35        public TimeCodePanel(PlayerPanel playerPanel, JPanel containingPanel) { 
    3636                super(); 
    3737                timeField = new JTextField(String.format(TIME_CODE_FORMAT, 0, 0, 0, 0), 8); 
    3838                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); 
    4141                this.myPlayerPanel = playerPanel; 
    4242                timeField.addKeyListener(playerPanel); 
     
    6969                                myPlayerPanel.getCurrentMovie().setTime(time); 
    7070                                } 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"); 
    7272                                        timeField.setText(innerTime);    
    7373                                } 
    7474                        } 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"); 
    7676                                timeField.setText(innerTime); 
    7777                        }