Пример #1
0
  public void update() {
    // find & set index of selected trigger
    Play instruction = (Play) inst;
    int handleVal = Integer.parseInt(instruction.handleVal());
    handleModel.setValue(Integer.valueOf(handleVal));

    // loop flag
    loop.setSelectedItem(instruction.brkVal());

    // wavbreak flags
    int flags = instruction.getWaveBrkFlags();
    wavbrk1.setSelected((flags & 0x01) != 0);
    wavbrk2.setSelected((flags & 0x02) != 0);
  }
Пример #2
0
  /** update instruction if GUI changes */
  void guiChanged() {
    Play instruction = (Play) PlayEditor.this.inst;

    instruction.setHandle(handleModel.getNumber().intValue());

    instruction.setBrk((String) loop.getSelectedItem());

    int flag = 0;
    if (wavbrk1.isSelected()) {
      flag |= 0x01;
    }
    if (wavbrk2.isSelected()) {
      flag |= 0x02;
    }
    instruction.setWaveBrkFlags(flag);

    // tell the world
    updated();
  }