本文整理了Java中javafx.scene.control.Label.getGraphic()
方法的一些代码示例,展示了Label.getGraphic()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.getGraphic()
方法的具体详情如下:
包路径:javafx.scene.control.Label
类名称:Label
方法名:getGraphic
暂无
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public Node provideIcon(IEmaginController controller, VLViewComponentXML configuration, Object forModel) {
final Label label = IconUtils.getFontIcon("mdi-folder:20");
label.getStyleClass().add("ep-folder-icon");
label.getGraphic().getStyleClass().add("folder-ikonli");
return label;
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public Node present(IEmaginController controller, VLViewComponentXML configuration, Object forModel) {
final Label label = IconUtils.getFontIcon("mdi-folder:20");
label.getStyleClass().add("ep-folder-icon");
label.getGraphic().getStyleClass().add("folder-ikonli");
return label;
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @{inheritedDoc}
*/
@Override
public Node provideIcon(IEmaginController controller, VLViewComponentXML configuration) {
final Label label = IconUtils.getFontIcon("mdi-folder:20");
label.getStyleClass().add("ep-folder-icon");
label.getGraphic().getStyleClass().add("folder-ikonli");
return label;
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* @param label
* @param type
*/
public static void iconify(Label label, NotificationLevel type) {
switch (type) {
case ERROR:
IconUtils.setFontIcon("mdi-error-outline:22", label);
label.getGraphic().getStyleClass().add("grey-ikonli");
break;
case OK:
IconUtils.setFontIcon("fa-check-circle-o:22", label);
label.getGraphic().getStyleClass().add("grey-ikonli");
break;
case INFO:
IconUtils.setFontIcon("mdi-info-outline:22", label);
label.getGraphic().getStyleClass().add("grey-ikonli");
break;
case WARNING:
IconUtils.setFontIcon("mdi-warning:22", label);
label.getGraphic().getStyleClass().add("yellow-ikonli");
break;
default:
break;
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
@Override
public Node provideIcon(IEmaginController controller, VLViewComponentXML configuration, Object forModel) {
OperationData d = (OperationData) forModel;
if(d != null) {
String ikonli = (String) d.getAttributes().get("ikonli");
if(StringUtils.isNotBlank(ikonli)) {
Label icon = new Label();
IconUtils.setFontIcon(ikonli, icon);
icon.getGraphic().getStyleClass().add("grey-clear-ikonli");
graphic.getChildren().clear();
graphic.getChildren().add(icon);
}
}
return graphic;
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
public static Node headerMessage(String message, String icon) {
HBox messagebox = new HBox();
messagebox.setStyle("-fx-spacing: 16;-fx-alignment:CENTER");
Label mss = new Label(message);
mss.getStyleClass().add("ep-header-message");
Label ic = new Label();
if(StringUtils.isNotBlank(icon)) {
IconUtils.setFontIcon(icon, ic);
ic.getGraphic().getStyleClass().add("white-ikonli");
}
messagebox.getChildren().addAll(ic, mss);
return messagebox;
}
代码示例来源:origin: stackoverflow.com
final StackPane pane = (StackPane)lbl.getGraphic();
final Rectangle rect = (Rectangle)pane.getChildren().get(0);
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* Constructor
*/
public AdminStaticIconPresenter() {
graphic.minHeightProperty().bind(graphic.prefHeightProperty());
graphic.minWidthProperty().bind(graphic.prefWidthProperty());
graphic.maxHeightProperty().bind(graphic.prefHeightProperty());
graphic.maxWidthProperty().bind(graphic.prefWidthProperty());
graphic.setPrefWidth(42);
graphic.setPrefHeight(42);
Label icon = new Label();
IconUtils.setFontIcon("fa-gears:30", icon);
icon.getGraphic().getStyleClass().add("grey-clear-ikonli");
graphic.setAlignment(Pos.CENTER);
graphic.getChildren().add(icon);
graphic.setStyle("-fx-background-color:-grey-color-50;-fx-border-radius:10;"
+ "-fx-background-radius:10;");
}
代码示例来源:origin: org.controlsfx/controlsfx
closeIcon.getStyleClass().add("icon"); //$NON-NLS-1$
closeIcon.setAlignment(CENTER_LEFT);
closeIcon.getGraphic().setOnMouseClicked(evt -> popOver.hide());
内容来源于网络,如有侵权,请联系作者删除!