本文整理了Java中javafx.collections.ObservableList.clear()
方法的一些代码示例,展示了ObservableList.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObservableList.clear()
方法的具体详情如下:
包路径:javafx.collections.ObservableList
类名称:ObservableList
方法名:clear
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
public void clear() {
getChildren().clear();
rippler.overlayRect = null;
generating.set(false);
}
}
代码示例来源:origin: speedment/speedment
private void setValue(String value) {
if (value == null) {
strings.clear();
} else {
strings.setAll(value.split(","));
}
}
代码示例来源:origin: speedment/speedment
void remove() {
items.forEach(PropertyEditor.Item::onRemove);
getChildren().clear();
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
public void reGroup() {
if (!groupOrder.isEmpty()) {
ArrayList<TreeTableColumn<S, ?>> tempGroups = new ArrayList<>(groupOrder);
groupOrder.clear();
group(tempGroups.toArray(new TreeTableColumn[0]));
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
private void removeListeners() {
listener.dispose();
inner.getChildren().clear();
getChildren().clear();
}
代码示例来源:origin: jfoenixadmin/JFoenix
private void clearAnimation() {
indeterminateTransition.stop();
((Timeline) indeterminateTransition).getKeyFrames().clear();
indeterminateTransition = null;
}
代码示例来源:origin: jfoenixadmin/JFoenix
private void clearAnimation() {
if (timeline != null) {
timeline.stop();
timeline.getKeyFrames().clear();
timeline = null;
}
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
private void clearAnimation() {
if (timeline != null) {
timeline.stop();
timeline.getKeyFrames().clear();
timeline = null;
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
@Override
public void dispose() {
this.control = null;
if (showTransition != null) {
showTransition.stop();
showTransition.getKeyFrames().clear();
showTransition = null;
}
}
}
代码示例来源:origin: speedment/speedment
@Override
public void populate(Menu menu) {
final ObservableList<MenuItem> items = menu.getItems();
items.clear();
for (final MenuItemFactory factory : factories) {
items.add(factory.createMenuItem());
}
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
private void hideError() {
// clear error label text
errorLabel.setText(null);
// clear error icon
errorIcon.getChildren().clear();
// reset the height of the text field
// hide error container
setVisible(false);
}
代码示例来源:origin: pmd/pmd
public void invalidateResults(boolean error) {
xpathResultListView.getItems().clear();
parent.resetXPathResults();
violationsTitledPane.setTitle("Matched nodes" + (error ? "\t(error)" : ""));
}
代码示例来源:origin: speedment/speedment
@Override
public void populate(MenuBar menuBar) {
final ObservableList<Menu> menus = menuBar.getMenus();
menus.clear();
for (final MenuBarTab tab : handlers.keySet()) {
final Menu menu = new Menu(tab.getText());
handlers.get(tab).populate(menu);
if (!menu.getItems().isEmpty()) {
menus.add(menu);
}
}
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
private void updateContent() {
Node newContent = tab.getContent();
if (newContent == null) {
getChildren().clear();
} else {
getChildren().setAll(newContent);
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
/**
* Animates the list to show/hide the nodes.
*/
public void animateList() {
expanded = !expanded;
if (animateTimeline.getStatus() == Status.RUNNING) {
animateTimeline.stop();
}
animateTimeline.getKeyFrames().clear();
createAnimation(expanded, animateTimeline);
animateTimeline.play();
}
代码示例来源:origin: jfoenixadmin/JFoenix
private void showError(ValidatorBase validator) {
// set text in error label
errorLabel.setText(validator.getMessage());
// show error icon
Node icon = validator.getIcon();
errorIcon.getChildren().clear();
if (icon != null) {
errorIcon.getChildren().setAll(icon);
StackPane.setAlignment(icon, Pos.CENTER_RIGHT);
}
setVisible(true);
}
代码示例来源:origin: jfoenixadmin/JFoenix
public void refreshBadge() {
badge.getChildren().clear();
if (enabled) {
Label labelControl = new Label(text.getValue());
StackPane badgePane = new StackPane();
badgePane.getStyleClass().add("badge-pane");
badgePane.getChildren().add(labelControl);
//Adding a clip would avoid overlap but this does not work as intended
//badgePane.setClip(clip);
badge.getChildren().add(badgePane);
StackPane.setAlignment(badge, getPosition());
FadeTransition ft = new FadeTransition(Duration.millis(666), badge);
ft.setFromValue(0);
ft.setToValue(1.0);
ft.setCycleCount(1);
ft.setAutoReverse(true);
ft.play();
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
private void showError(ValidatorBase validator) {
// set text in error label
errorLabel.setText(validator.getMessage());
// show error icon
Node awsomeIcon = validator.getIcon();
errorIcon.getChildren().clear();
if (awsomeIcon != null) {
errorIcon.getChildren().add(awsomeIcon);
StackPane.setAlignment(awsomeIcon, Pos.TOP_RIGHT);
}
// init only once, to fix the text pane from resizing
if (initYlayout == -1) {
initYlayout = getBoundsInParent().getMinY();
initHeight = getHeight();
currentFieldHeight = initHeight;
}
errorContainer.setVisible(true);
errorShown = true;
}
代码示例来源:origin: jfoenixadmin/JFoenix
public void setControl(Control control) {
maxWidthProperty().bind(control.maxWidthProperty());
prefWidthProperty().bind(control.prefWidthProperty());
prefHeightProperty().bind(control.prefHeightProperty());
errorContainer.setMaxWidth(control.getMaxWidth() > -1 ? control.getMaxWidth() : control.getPrefWidth());
errorContainer.prefWidthProperty().bind(control.widthProperty());
errorContainer.prefHeightProperty().bind(control.heightProperty());
getChildren().clear();
getChildren().add(control);
getChildren().add(errorContainer);
this.controlProperty.set(control);
}
代码示例来源:origin: jfoenixadmin/JFoenix
private void hideError() {
if (heightChanged) {
new Timeline(new KeyFrame(Duration.millis(160),
new KeyValue(translateYProperty(), 0, Interpolator.EASE_BOTH))).play();
// reset the height of text field
new Timeline(new KeyFrame(Duration.millis(160),
new KeyValue(minHeightProperty(), initHeight, Interpolator.EASE_BOTH))).play();
heightChanged = false;
}
// clear error label text
errorLabel.setText(null);
oldErrorLabelHeight = errorLabelInitHeight;
// clear error icon
errorIcon.getChildren().clear();
// reset the height of the text field
currentFieldHeight = initHeight;
// hide error container
errorContainer.setVisible(false);
errorShown = false;
}
内容来源于网络,如有侵权,请联系作者删除!