本文整理了Java中javafx.scene.control.Button.isDisabled()
方法的一些代码示例,展示了Button.isDisabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.isDisabled()
方法的具体详情如下:
包路径:javafx.scene.control.Button
类名称:Button
方法名:isDisabled
暂无
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
public void handle(KeyEvent event) {
if (event.getCode() == KeyCode.ENTER) {
if (!startButton.isDisabled()) {
startButton.fire();
}
}
}
};
代码示例来源:origin: io.github.factoryfx/javafxDataEditing
addButton.setDisable(value == null);
if (!addButton.isDisabled()){//bug workaround disable state styling doesn't work
addButton.setOpacity(1);
} else {
if (!replaceButton.isDisabled()){//bug workaround disable state styling doesn't work
replaceButton.setOpacity(1);
} else {
代码示例来源:origin: com.aquafx-project/aquafx
private void setDefaultButtonAnimation() {
if (!getSkinnable().isDisabled()) {
if (defaultButtonTransition != null && defaultButtonTransition.getStatus() == Status.RUNNING) {
defaultButtonTransition.stop();
代码示例来源:origin: com.aquafx-project/aquafx
@Override protected void handleControlPropertyChanged(String p) {
super.handleControlPropertyChanged(p);
if (p == "HOVER") {
if (getSkinnable().isDefaultButton() && getSkinnable().isPressed() && getSkinnable().isHover()) {
getSkinnable().setStyle(armedButtonStyle);
} else if (getSkinnable().isDefaultButton() && getSkinnable().isPressed() && !getSkinnable().isHover()) {
getSkinnable().setStyle(usualButtonStyle);
}
}
if (p == "FOCUSED") {
if (getSkinnable().isFocused()) {
setFocusBorder();
} else if (!getSkinnable().isFocused() || getSkinnable().isDisable()) {
setDropShadow();
}
}
if (p == "DEFAULT_BUTTON") {
setDefaultButtonAnimation();
}
if (p == "DISABLED") {
if (getSkinnable().isDefaultButton()) {
if (getSkinnable().isDisabled() && defaultButtonTransition != null && defaultButtonTransition.getStatus() != Status.RUNNING) {
defaultButtonTransition.stop();
} else {
setDefaultButtonAnimation();
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!