List of usage examples for javafx.scene.control Button getText
public final String getText()
From source file:benedict.zhang.addon.soundmanager.controller.SoundManagerConfigureController.java
public void onPlayPauseButtonClick(ActionEvent e) { Button btn = (Button) e.getSource(); if ("Play".equals(btn.getText())) { this.mediaPlayer.play(); } else if ("Pause".equals(btn.getText())) { this.mediaPlayer.pause(); }//from w ww.j a v a 2s . c om }
From source file:benedict.zhang.addon.soundmanager.controller.SoundManagerConfigureController.java
public void onEditUpdateButtonClick(ActionEvent e) { Button btn = (Button) e.getSource(); if ("Edit".equals(btn.getText())) { this.setMode(UIViewMode.EDIT); } else {//update button clicked this.setMode(UIViewMode.READONLY); doUpdate();/*from w w w . j a va2 s.co m*/ } if ("Save".equals(btn.getText())) { doUpdate(); } }