当前位置: 首页>>代码示例>>Java>>正文


Java ActionEvent.consume方法代码示例

本文整理汇总了Java中javafx.event.ActionEvent.consume方法的典型用法代码示例。如果您正苦于以下问题:Java ActionEvent.consume方法的具体用法?Java ActionEvent.consume怎么用?Java ActionEvent.consume使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javafx.event.ActionEvent的用法示例。


在下文中一共展示了ActionEvent.consume方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onSaveAction

import javafx.event.ActionEvent; //导入方法依赖的package包/类
/**
 * When the user saves the bookmark.
 * <p>
 * Hides the owner {@link javafx.stage.Window} afterwards.
 *
 * @param actionEvent the {@link ActionEvent}
 */
@FXML
void onSaveAction(final ActionEvent actionEvent) {
    if (graphVisualizer.getSelectedSegmentProperty().isNull().get()) {
        return;
    }

    final String baseString = baseOffset.getText().replaceAll("[^\\d]", "");
    final String radiusString = radius.getText().replaceAll("[^\\d]", "");

    if (!baseString.isEmpty() && !radiusString.isEmpty()) {
        final GfaNode gfaNode = graphVisualizer.getSelectedSegmentProperty().get();
        final Segment segment = gfaNode.getSegments().get(0);
        final int baseOffsetValue = Integer.parseInt(baseString);
        final int radiusValue = Integer.parseInt(radiusString);

        bookmarkStore.addBookmark(new Bookmark(segment.getId(), baseOffsetValue, radiusValue,
                description.getText()));
        description.clear();

        final Node source = (Node) actionEvent.getSource();
        source.getScene().getWindow().hide();
    }

    actionEvent.consume();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:33,代码来源:BookmarkCreateController.java

示例2: handle

import javafx.event.ActionEvent; //导入方法依赖的package包/类
@Override
public void handle(ActionEvent event)
{
    if(AppTabPane.BLOCK_TAB_CREATION)
        event.consume();
    else
    {
        for(int i = 0; i < tabs.length; i++)
        {
            if(tabs[i].getText().equals(((MenuItem)event.getSource()).getText()))
            {
                if(!tabPaneToAddTo.getTabs().contains(tabs[i]))
                    tabPaneToAddTo.getTabs().add(tabs[i]);
                
                tabPaneToAddTo.getSelectionModel().select(tabs[i]);
            }
        }
    }
}
 
开发者ID:BlueGoliath,项目名称:Goliath-Overclocking-Utility-FX,代码行数:20,代码来源:TabsMenu.java

示例3: okAction

import javafx.event.ActionEvent; //导入方法依赖的package包/类
/**
 * The action to fire when the user clicks the "Ok" button.
 * <p>
 * Sets the mapped genome in {@link GraphAnnotation} to the value in the genome choice textfield.
 *
 * @param actionEvent the {@link ActionEvent}
 */
@FXML
void okAction(final ActionEvent actionEvent) {
    if (genomeChoice.getText().isEmpty()) {
        (new WarningDialogue("Please select a mapping.")).show();
        return;
    }

    try {
        graphAnnotation.setMappedGenome(genomeChoice.getText());
    } catch (final IOException e) {
        LOGGER.error("Unable to build an index for genome " + genomeChoice.getText() + ".", e);
        new ErrorDialogue(e).show();
    }

    final Node source = (Node) actionEvent.getSource();
    source.getScene().getWindow().hide();

    actionEvent.consume();

    LOGGER.info("Genome " + gffGenome.getText() + " from GFF will be mapped onto " + genomeChoice.getText() + ".");
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:29,代码来源:GenomeMappingController.java

示例4: queryAction

import javafx.event.ActionEvent; //导入方法依赖的package包/类
/**
 * When the user wants to perform a query.
 *
 * @param actionEvent the {@link ActionEvent}
 */
@FXML
void queryAction(final ActionEvent actionEvent) {
    query.query(sequenceField.getText());

    actionEvent.consume();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:12,代码来源:QueryController.java

示例5: handleCollapse

import javafx.event.ActionEvent; //导入方法依赖的package包/类
private void handleCollapse(ActionEvent event) {
    if (collapseButton.isSelected()) {
        collapseButton.setText(Utils.ARROW_UP);
        getChildren().add(collapsible);
        //collapsible.setVisible(true);
    } else {
        collapseButton.setText(Utils.ARROW_DOWN);

        getChildren().remove(collapsible);
        //collapsible.setVisible(false);
    }
    event.consume();
}
 
开发者ID:dbisUnibas,项目名称:ReqMan,代码行数:14,代码来源:ProgressView.java

示例6: goRightAction

import javafx.event.ActionEvent; //导入方法依赖的package包/类
/**
 * When the user wants to go right by a single base.
 *
 * @param actionEvent the {@link ActionEvent}
 */
@FXML
void goRightAction(final ActionEvent actionEvent) {
    graphDimensionsCalculator.getViewPointProperty().set(
            graphDimensionsCalculator.getViewPointProperty().get() + GO_AMOUNT);
    actionEvent.consume();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:12,代码来源:GraphNavigationController.java

示例7: okAction

import javafx.event.ActionEvent; //导入方法依赖的package包/类
/**
 * When the user clicks "OK" execute all actions and close the window.
 *
 * @param actionEvent {@link ActionEvent} associated with this action
 */
@FXML
void okAction(final ActionEvent actionEvent) {
    settings.executeAll();

    final Node source = (Node) actionEvent.getSource();
    source.getScene().getWindow().hide();

    actionEvent.consume();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:15,代码来源:SettingsButtonController.java

示例8: cancelAction

import javafx.event.ActionEvent; //导入方法依赖的package包/类
/**
 * When the user clicks "Cancel" clear all commands and close the window.
 *
 * @param actionEvent {@link ActionEvent} associated with this action
 */
@FXML
void cancelAction(final ActionEvent actionEvent) {
    settings.clearAll();

    final Node source = (Node) actionEvent.getSource();
    source.getScene().getWindow().hide();

    actionEvent.consume();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:15,代码来源:SettingsButtonController.java

示例9: goToStartAction

import javafx.event.ActionEvent; //导入方法依赖的package包/类
/**
 * When the user wants to go to the start of the sequence.
 *
 * @param actionEvent the {@link ActionEvent}
 */
@FXML
void goToStartAction(final ActionEvent actionEvent) {
    sequenceVisualizer.setOffset(0);

    actionEvent.consume();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:12,代码来源:SequenceController.java

示例10: goRightLargeAction

import javafx.event.ActionEvent; //导入方法依赖的package包/类
/**
 * When the user wants to go right by amount of onscreen bases.
 *
 * @param actionEvent the {@link ActionEvent}
 */
@FXML
void goRightLargeAction(final ActionEvent actionEvent) {
    graphDimensionsCalculator.getViewPointProperty().set(
            graphDimensionsCalculator.getViewPointProperty().get() + GO_AMOUNT * JUMP_AMOUNT);
    actionEvent.consume();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:12,代码来源:GraphNavigationController.java

示例11: zoomOutAction

import javafx.event.ActionEvent; //导入方法依赖的package包/类
/**
 * When the user wants to zoom out by a single hop.
 *
 * @param actionEvent the {@link ActionEvent}
 */
@FXML
void zoomOutAction(final ActionEvent actionEvent) {
    graphMovementCalculator.onScroll(SCROLL_DELTA);

    actionEvent.consume();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:12,代码来源:GraphNavigationController.java

示例12: openConsoleAction

import javafx.event.ActionEvent; //导入方法依赖的package包/类
/**
 * Opens an independent stage showing the console window.
 *
 * @param actionEvent {@link ActionEvent} associated with the event
 * @throws IOException if unable to located the FXML resource
 */
@FXML
void openConsoleAction(final ActionEvent actionEvent) throws IOException {
    consoleView.bringToFront();

    actionEvent.consume();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:13,代码来源:ViewMenuController.java

示例13: searchAction

import javafx.event.ActionEvent; //导入方法依赖的package包/类
/**
 * When the user wants to search {@link Annotation}s.
 *
 * @param actionEvent the {@link ActionEvent}
 */
@FXML
void searchAction(final ActionEvent actionEvent) {
    annotationSearch.search(queryField.getText());

    actionEvent.consume();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:12,代码来源:AnnotationController.java

示例14: goLeftAction

import javafx.event.ActionEvent; //导入方法依赖的package包/类
/**
 * When the user wants to go left by a single base.
 *
 * @param actionEvent the {@link ActionEvent}
 */
@FXML
void goLeftAction(final ActionEvent actionEvent) {
    graphDimensionsCalculator.getViewPointProperty().set(
            graphDimensionsCalculator.getViewPointProperty().get() - GO_AMOUNT);
    actionEvent.consume();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:12,代码来源:GraphNavigationController.java

示例15: openAnnotationSearchAction

import javafx.event.ActionEvent; //导入方法依赖的package包/类
@FXML
void openAnnotationSearchAction(final ActionEvent actionEvent) throws IOException {
    mainController.expandAnnotationSearchPane();
    actionEvent.consume();
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:6,代码来源:NavigateMenuController.java


注:本文中的javafx.event.ActionEvent.consume方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。