當前位置: 首頁>>代碼示例>>Java>>正文


Java ObservableList.removeAll方法代碼示例

本文整理匯總了Java中javafx.collections.ObservableList.removeAll方法的典型用法代碼示例。如果您正苦於以下問題:Java ObservableList.removeAll方法的具體用法?Java ObservableList.removeAll怎麽用?Java ObservableList.removeAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.collections.ObservableList的用法示例。


在下文中一共展示了ObservableList.removeAll方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addDependency

import javafx.collections.ObservableList; //導入方法依賴的package包/類
/**
 * Handle the 'Add dependency' button action
 */
public void addDependency()
{
    // Table items:
    ObservableList<Task> list = FXCollections.observableArrayList(MainController.getSPC().getCurrentTasks());
    list.removeAll(this.dependencies.getItems());
    if (this.task != null)
    {
        list.remove(this.task);
        list.removeAll(this.task.getDependencies());
    }
    // =================

    // Parse selected Tasks:
    this.dependencies.getItems().addAll(TaskController.taskSelectionWindow(list));
    // =================
}
 
開發者ID:Alienturnedhuman,項目名稱:PearPlanner,代碼行數:20,代碼來源:TaskController.java

示例2: processChangeType

import javafx.collections.ObservableList; //導入方法依賴的package包/類
/**
 * Handle changing type of heightmap.
 */
@FXThread
private void processChangeType(@NotNull final HeightMapType newValue) {

    final VBox root = getSettingsRoot();
    final ObservableList<Node> children = root.getChildren();
    children.removeAll(flatSettings, heightMapSettings, hillSettings);

    switch (newValue) {
        case FLAT: {
            children.add(flatSettings);
            break;
        }
        case HILL: {
            children.add(hillSettings);
            break;
        }
        case IMAGE_BASED: {
            children.add(heightMapSettings);
            break;
        }
    }

    validate();
    getDialog().sizeToScene();
}
 
開發者ID:JavaSaBr,項目名稱:jmonkeybuilder,代碼行數:29,代碼來源:CreateTerrainDialog.java

示例3: processChange

import javafx.collections.ObservableList; //導入方法依賴的package包/類
/**
 * Handle changing sky type.
 */
@FXThread
private void processChange(@NotNull final SkyType newValue) {

    final VBox settingsRoot = getSettingsRoot();
    final GridPane singleTextureSettings = getSingleTextureSettings();
    final GridPane multiplyTextureSettings = getMultipleTextureSettings();

    final ObservableList<javafx.scene.Node> children = settingsRoot.getChildren();
    children.removeAll(singleTextureSettings, getMultipleTextureSettings());

    switch (newValue) {
        case SINGLE_TEXTURE: {
            children.add(singleTextureSettings);
            break;
        }
        case MULTIPLE_TEXTURE: {
            children.add(multiplyTextureSettings);
        }
    }

    validate();
    getDialog().sizeToScene();
}
 
開發者ID:JavaSaBr,項目名稱:jmonkeybuilder,代碼行數:27,代碼來源:CreateSkyDialog.java

示例4: addTask

import javafx.collections.ObservableList; //導入方法依賴的package包/類
/**
 * Handle the 'Add Task' button action
 */
public void addTask()
{
    // Table items:
    ObservableList<Task> list = FXCollections.observableArrayList(MainController.getSPC().getCurrentTasks());
    list.removeAll(this.tasks.getItems());
    if (this.milestone != null)
        list.removeAll(this.milestone.getTasks());
    // =================

    // Parse selected Tasks:
    this.tasks.getItems().addAll(TaskController.taskSelectionWindow(list));
    // =================
}
 
開發者ID:Alienturnedhuman,項目名稱:PearPlanner,代碼行數:17,代碼來源:MilestoneController.java

示例5: addTask

import javafx.collections.ObservableList; //導入方法依賴的package包/類
/**
 * Handle the 'Add Task' button action
 */
public void addTask()
{
    // Table items:
    ObservableList<Task> list = FXCollections.observableArrayList(MainController.getSPC().getCurrentTasks());
    list.removeAll(this.tasks.getItems());
    if (this.activity != null)
        list.remove(this.activity.getTasks());
    list.removeIf(e -> !e.dependenciesComplete());
    // =================

    // Parse selected Tasks:
    this.tasks.getItems().addAll(TaskController.taskSelectionWindow(list));
    // =================
}
 
開發者ID:Alienturnedhuman,項目名稱:PearPlanner,代碼行數:18,代碼來源:ActivityController.java


注:本文中的javafx.collections.ObservableList.removeAll方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。