Esempio n. 1
0
 @Override
 public int getRowCount() {
   if (data.getCurProject().getAnimation(data.getCurrentAnimationIndex()) == null) {
     return 0;
   }
   return data.getCurProject().getAnimation(data.getCurrentAnimationIndex()).getFrames().size();
 }
Esempio n. 2
0
 public Object getValueAt(int rowIndex, int columnIndex) {
   Frame frame =
       data.getCurProject().getAnimation(data.getCurrentAnimationIndex()).getFrame(rowIndex);
   if (frame != null) {
     switch (columnIndex) {
       case 0:
         return rowIndex;
       case 1:
         return frame.getName();
       case 2:
         return frame.getDelay();
     }
   }
   return null;
 }
Esempio n. 3
0
  @Override
  public void setValueAt(Object v, int r, int c) {
    Frame frame = data.getCurProject().getAnimation(data.getCurrentAnimationIndex()).getFrame(r);

    if (frame != null) {
      switch (c) {
        case 1:
          frame.setName(v.toString());
          break;
        case 2:
          frame.setDelay(Integer.parseInt(v.toString()));
          break;
      }
    }
    this.fireTableCellUpdated(r, c);
  }