本文整理了Java中javafx.scene.control.Label.pseudoClassStateChanged()
方法的一些代码示例,展示了Label.pseudoClassStateChanged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.pseudoClassStateChanged()
方法的具体详情如下:
包路径:javafx.scene.control.Label
类名称:Label
方法名:pseudoClassStateChanged
暂无
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @param b
* @return
*/
public void clearSelection() {
pseudoClassStateChanged(selected, false);
label.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), false);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public void setError() {
circle.setFill(Color.RED);
titleLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("error"), true);
titleLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("valid"), false);
bridge.pseudoClassStateChanged(PseudoClass.getPseudoClass("error"), true);
error = true;
valid = null;
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public void setValid() {
circle.setFill(Color.GREEN);
titleLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("valid"), true);
titleLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("error"), false);
bridge.pseudoClassStateChanged(PseudoClass.getPseudoClass("valid"), true);
indexLabel.setText("");
error = null;
valid = true;
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public void setValid() {
circle.setFill(Color.GREEN);
titleLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("valid"), true);
titleLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("error"), false);
bridge.pseudoClassStateChanged(PseudoClass.getPseudoClass("valid"), true);
indexLabel.setText(String.valueOf(step.getIndex()));
error = null;
valid = true;
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public void setError() {
circle.setFill(Color.RED);
titleLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("error"), true);
titleLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("valid"), false);
bridge.pseudoClassStateChanged(PseudoClass.getPseudoClass("error"), true);
indexLabel.setText("");
error = true;
valid = null;
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public void select(boolean value) {
pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), value);
if (value) {
titleLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), value);
indexLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), value);
if (value) {
circle.setFill(Color.rgb(33, 150, 243));
}
}
// have been validated and is error
// and selected!! should not be happen
// only move to next step if valid
if (error == null) {
}
// back or next to a valid step
// do not change the valid state on the circle icon
if (valid != null) {
titleLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), value);
}
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
private static void updatePseudoState(Label statusIcon, Status status) {
statusIcon.pseudoClassStateChanged(error, status.getState() == State.ERROR);
statusIcon.pseudoClassStateChanged(warning, status.getState() == State.WARNING);
statusIcon.pseudoClassStateChanged(ok, status.getState() == State.OK);
statusIcon.pseudoClassStateChanged(cancel, status.getState() == State.CANCEL);
statusIcon.autosize();
if( statusIcon.getTooltip() == null ) {
if( status.getState() != State.OK ) {
statusIcon.setTooltip(new Tooltip(status.getMessage()));
}
} else {
statusIcon.getTooltip().setText(status.getMessage());
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-demoapp-components
@Override
public Node present(IEmaginController controller, VLViewComponentXML configuration, Object forModel) {
Label label = (Label) super.present(controller, configuration, forModel);
String text = label.getText();
Platform.runLater(() -> {
label.setText(text.toUpperCase());
String pc = StringUtils.replace(text, " ", "_");
PseudoClass cc = PseudoClass.getPseudoClass(pc.toLowerCase());
label.pseudoClassStateChanged(cc, true);
});
return label;
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public void select(boolean value) {
pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), value);
if (value) {
titleLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), value);
indexLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), value);
if (value) {
circle.setFill(Color.rgb(33, 150, 243));
}
}
// have been validated and is error
// and selected!! should not be happen
// only move to next step if valid
if (error == null) {
}
// back or next to a valid step
// do not change the valid state on the circle icon
if (valid != null) {
titleLabel.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), value);
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-demoapp-components
@Override
public Node present(IEmaginController controller, VLViewComponentXML configuration) {
Label label = (Label) super.present(controller, configuration);
String text = label.getText();
Platform.runLater(() -> {
label.setText(text.toUpperCase());
String pc = StringUtils.replace(text, " ", "_");
PseudoClass cc = PseudoClass.getPseudoClass(pc.toLowerCase());
label.pseudoClassStateChanged(cc, true);
});
return label;
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @param selected
*/
public void select() {
menuRow.clearSelection();
pseudoClassStateChanged(selected, true);
label.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), true);
menuRow.select(componentId);
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Remove all selection marker
*/
public void clearSelection() {
pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), false);
row.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), false);
label.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), false);
for(FieldsetSubmenuRow e: submenus) {
e.clearSelection();
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Select the current row
*
* @param selected
*/
public void select() {
pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), true);
row.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), true);
label.pseudoClassStateChanged(PseudoClass.getPseudoClass("selected"), true);
selectableCompsLayout.setSpacing(8);
if (parentLayout.getChildren().size() > 1) {
parentLayout.getChildren().remove(1);
}
parentLayout.getChildren().add(selectableCompsLayout);
NodeHelper.setHVGrow(selectableCompsLayout);
for(Node e: selectableCompsLayout.getChildren()) {
e.setVisible(true);
}
}
内容来源于网络,如有侵权,请联系作者删除!