Changeset 155

Show
Ignore:
Timestamp:
02/13/08 08:56:05 (1 year ago)
Author:
Stuart Thiel
Message:

-Fixed #138
--Also made TimeLinePanel? responsible for its own repaints, which just makes sense.

Files:

Legend:

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

    r150 r155  
    115115                frameslice.setText((int)(t.getMillisecond()/33.3) + ""); 
    116116                timeLinePanel.setLocation(time/(float)durationTime.getAllInMilli()); 
    117                 timeLinePanel.repaint(); 
    118117                //validate(); 
    119118        } 
     
    225224        public void keyReleased(KeyEvent e) { 
    226225                if(e.getKeyCode() == KeyEvent.VK_I && e.getModifiers() == ActionEvent.CTRL_MASK) { 
    227                         getTimeLinePanel().setIn(getTime()/(float)durationTime.getAllInMilli()); 
    228                         getTimeLinePanel().repaint(); 
     226                        setInTime(getTime()); 
    229227                } 
    230228                 
    231229                if(e.getKeyCode() == KeyEvent.VK_O && e.getModifiers() == ActionEvent.CTRL_MASK) { 
    232                         getTimeLinePanel().setOut(getTime()/(float)durationTime.getAllInMilli()); 
    233                         getTimeLinePanel().repaint(); 
     230                        setOutTime(getTime()); 
    234231                } 
    235232 
    236233                if(e.getKeyCode() == KeyEvent.VK_I && e.getModifiers() == ActionEvent.ALT_MASK) { 
    237234                        getTimeLinePanel().toggleIn(); 
    238                         getTimeLinePanel().repaint(); 
    239235                } 
    240236                 
    241237                if(e.getKeyCode() == KeyEvent.VK_O && e.getModifiers() == ActionEvent.ALT_MASK) { 
    242238                        getTimeLinePanel().toggleOut(); 
    243                         getTimeLinePanel().repaint(); 
    244239                } 
    245240                         
  • MediAnnotate/trunk/src/org/mediannotate/ui/TimeLinePanel.java

    r116 r155  
    6363        public void setLocation(float loc_percentage) { 
    6464                currentLocation = loc_percentage; 
     65                repaint(); 
    6566        } 
    6667         
     
    6970                else currentIn = in_percentage; 
    7071                inActive = true; 
     72                repaint(); 
    7173        } 
    7274         
     
    7577                else currentOut = out_percentage; 
    7678                outActive = true; 
     79                repaint(); 
    7780        } 
    7881         
    7982        public void toggleIn() { 
    8083                inActive = !inActive; 
     84                repaint(); 
    8185        } 
    8286         
    8387        public void toggleOut() { 
    8488                outActive = !outActive; 
     89                repaint(); 
    8590        } 
    8691