當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。