本文整理汇总了Java中javafx.scene.control.Label.setManaged方法的典型用法代码示例。如果您正苦于以下问题:Java Label.setManaged方法的具体用法?Java Label.setManaged怎么用?Java Label.setManaged使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.control.Label
的用法示例。
在下文中一共展示了Label.setManaged方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AllDayEntryViewSkin
import javafx.scene.control.Label; //导入方法依赖的package包/类
public AllDayEntryViewSkin(AllDayEntryView view) {
super(view);
titleLabel = new Label();
titleLabel.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
titleLabel.setMouseTransparent(true);
titleLabel.setManaged(false);
Entry<?> entry = view.getEntry();
entry.calendarProperty().addListener(weakUpdateViewListener);
entry.fullDayProperty().addListener(weakUpdateViewListener);
entry.titleProperty().addListener(weakUpdateViewListener);
entry.intervalProperty().addListener(weakUpdateViewListener);
updateView();
getChildren().addAll(titleLabel);
}
示例2: MonthDayEntriesPane
import javafx.scene.control.Label; //导入方法依赖的package包/类
MonthDayEntriesPane(LocalDate date, int week, int day) {
getStyleClass().add("entries-pane");
this.date = date;
this.week = week;
this.day = day;
entries.addListener((Observable evt) -> update());
setMinSize(0, 0);
setPrefSize(0, 0);
Rectangle clip = new Rectangle();
clip.widthProperty().bind(widthProperty());
clip.heightProperty().bind(heightProperty());
setClip(clip);
moreLabel = new Label();
moreLabel.getStyleClass().add(MONTH_DAY_MORE_LABEL);
moreLabel.setManaged(false);
moreLabel.setVisible(false);
if (getSkinnable().isEnableHyperlinks()) {
moreLabel.getStyleClass().add("date-hyperlink");
moreLabel.setOnMouseClicked(evt -> fireEvent(new RequestEvent(this, this, date)));
}
getChildren().add(moreLabel);
}
示例3: TimeScaleViewSkin
import javafx.scene.control.Label; //导入方法依赖的package包/类
public TimeScaleViewSkin(T view) {
super(view);
LocalTime time = LocalTime.of(1, 0);
for (int i = 1; i < 24; i++) {
Label label = new Label(time.format(formatter));
label.setManaged(false);
label.setMaxWidth(Double.MAX_VALUE);
label.setAlignment(Pos.CENTER_RIGHT);
label.getStyleClass().add("time-label"); //$NON-NLS-1$
label.setTextOverrun(OverrunStyle.CLIP);
labels.add(label);
getChildren().add(label);
time = time.plusHours(1);
}
currentTimeLabel = new Label();
currentTimeLabel.getStyleClass().add("current-time-label"); //$NON-NLS-1$
currentTimeLabel.setManaged(false);
currentTimeLabel.setMaxWidth(Double.MAX_VALUE);
currentTimeLabel.setAlignment(Pos.CENTER_RIGHT);
currentTimeLabel.setOpacity(0);
currentTimeLabel.setTextOverrun(OverrunStyle.CLIP);
currentTimeLabel.visibleProperty().bind(view.enableCurrentTimeMarkerProperty());
getChildren().add(currentTimeLabel);
updateCurrentTimeMarkerVisibility();
view.showCurrentTimeMarkerProperty().addListener(
it -> updateCurrentTimeMarkerVisibility());
setupCurrentTimeMarkerSupport();
updateShowMarkers();
}
示例4: initVBox
import javafx.scene.control.Label; //导入方法依赖的package包/类
private void initVBox(){
EnumerationNode node = (EnumerationNode) getRefNode();
vbox.setPadding(new Insets(5, 0, 5, 0));
vbox.setSpacing(5);
titlePane = new VBox();
titlePane.setSpacing(5);
firstLine = new Separator();
firstLine.setMaxWidth(node.getWidth());
type = new Label();
type.setFont(Font.font("Helvetica", FontWeight.BOLD, 13));
type.setText("<<" + node.getType().toLowerCase() + ">>");
type.setTextFill(Color.web("#4B6299"));
type.setAlignment(Pos.TOP_CENTER);
title = new Label();
title.setFont(Font.font("Verdana", FontWeight.BOLD, 12));
title.setManaged(false);
if(node.getTitle() != null) {
title.setText(node.getTitle());
title.setVisible(true);
title.setManaged(true);
}
title.setAlignment(Pos.BOTTOM_CENTER);
values = new Label(node.getValues());
values.setFont(Font.font("Verdana", 10));
titlePane.getChildren().add(type);
titlePane.getChildren().add(title);
vbox.getChildren().addAll(titlePane, firstLine, values);
}
示例5: createStateLabels
import javafx.scene.control.Label; //导入方法依赖的package包/类
private void createStateLabels() {
Group overlay = map.getOverlayGroup();
for(String state: Region.ALL_STATES) {
Node stateNode = map.lookup("#"+state);
if (stateNode != null) {
Label label = new Label("+10");
label.getStyleClass().add("heatmap-label");
label.setTextAlignment(TextAlignment.CENTER);
label.setAlignment(Pos.CENTER);
label.setManaged(false);
label.setOpacity(0);
label.setVisible(false);
Bounds stateBounds = stateNode.getBoundsInParent();
if ("DE".equals(state)) {
label.resizeRelocate(stateBounds.getMinX()-25, stateBounds.getMinY(),
stateBounds.getWidth()+50, stateBounds.getHeight());
} else if ("VT".equals(state)) {
label.resizeRelocate(stateBounds.getMinX(), stateBounds.getMinY()-25,
stateBounds.getWidth(), stateBounds.getHeight());
} else if ("NH".equals(state)) {
label.resizeRelocate(stateBounds.getMinX(), stateBounds.getMinY()+30,
stateBounds.getWidth(), stateBounds.getHeight());
} else if ("MA".equals(state)) {
label.resizeRelocate(stateBounds.getMinX()-20, stateBounds.getMinY()-18,
stateBounds.getWidth(), stateBounds.getHeight());
} else if ("RI".equals(state)) {
label.resizeRelocate(stateBounds.getMinX(), stateBounds.getMinY(),
stateBounds.getWidth()+40, stateBounds.getHeight());
} else if ("ID".equals(state)) {
label.resizeRelocate(stateBounds.getMinX(), stateBounds.getMinY()+60,
stateBounds.getWidth(), stateBounds.getHeight());
} else if ("MI".equals(state)) {
label.resizeRelocate(stateBounds.getMinX()+60, stateBounds.getMinY(),
stateBounds.getWidth(), stateBounds.getHeight());
} else if ("FL".equals(state)) {
label.resizeRelocate(stateBounds.getMinX()+95, stateBounds.getMinY(),
stateBounds.getWidth(), stateBounds.getHeight());
} else if ("LA".equals(state)) {
label.resizeRelocate(stateBounds.getMinX()-50, stateBounds.getMinY(),
stateBounds.getWidth(), stateBounds.getHeight());
} else {
label.resizeRelocate(stateBounds.getMinX(), stateBounds.getMinY(),
stateBounds.getWidth(), stateBounds.getHeight());
}
stateLabelMap.put(state, label);
overlay.getChildren().add(label);
}
}
}
示例6: initVBox
import javafx.scene.control.Label; //导入方法依赖的package包/类
private void initVBox(){
ClassNode node = (ClassNode) getRefNode();
vbox.setPadding(new Insets(5, 0, 5, 0));
vbox.setSpacing(5);
titlePane = new VBox();
titlePane.setSpacing(5);
firstLine = new Separator();
firstLine.setMaxWidth(node.getWidth());
secondLine = new Separator();
secondLine.setMaxWidth(node.getWidth());
type = new Label();
type.setFont(Font.font("Helvetica", FontWeight.BOLD, 13));
type.setTextFill(Color.web("#4B6299"));
title = new Label();
title.setFont(Font.font("Verdana", FontWeight.BOLD, 12));
if(node.getType() == null || node.getType().equals("ABSTRACT") || node.getType().equals("CLASS")) {
type.setManaged(false);
} else {
type.setText("<<" + node.getType().toLowerCase() + ">>");
type.setAlignment(Pos.TOP_CENTER);
title.setAlignment(Pos.BOTTOM_CENTER);
type.setVisible(true);
type.setManaged(true);
}
if(node.getTitle() != null) {
title.setText(node.getTitle());
}
title.setAlignment(Pos.CENTER);
attributes = new Label(node.getAttributes());
attributes.setFont(Font.font("Verdana", 10));
operations = new Label(node.getOperations());
operations.setFont(Font.font("Verdana", 10));
if(operations.getText() == null || operations.getText().equals("")){
secondLine.setVisible(false);
}
titlePane.getChildren().add(type);
titlePane.getChildren().add(title);
vbox.getChildren().addAll(titlePane, firstLine, attributes, secondLine, operations);
}