Example usage for javafx.scene.chart Axis setVisible

List of usage examples for javafx.scene.chart Axis setVisible

Introduction

In this page you can find the example usage for javafx.scene.chart Axis setVisible.

Prototype

public final void setVisible(boolean value) 

Source Link

Usage

From source file:org.sleuthkit.autopsy.timeline.ui.detailview.EventDetailsChart.java

EventDetailsChart(TimeLineController controller, DateAxis dateAxis, final Axis<EventCluster> verticalAxis,
        ObservableList<EventBundleNodeBase<?, ?, ?>> selectedNodes) {
    super(dateAxis, verticalAxis);
    this.controller = controller;
    this.filteredEvents = this.controller.getEventsModel();

    filteredEvents.zoomParametersProperty().addListener(o -> {
        clearGuideLine();//from  w  w  w  .  j  av  a 2 s.  c  o m
        clearIntervalSelector();
        selectedNodes.clear();
        projectionMap.clear();
        controller.selectEventIDs(Collections.emptyList());
    });
    Tooltip.install(this, AbstractVisualizationPane.getDragTooltip());

    dateAxis.setAutoRanging(false);

    verticalAxis.setVisible(false);//TODO: why doesn't this hide the vertical axis, instead we have to turn off all parts individually? -jm
    verticalAxis.setTickLabelsVisible(false);
    verticalAxis.setTickMarkVisible(false);
    setLegendVisible(false);

    setPadding(Insets.EMPTY);
    setAlternativeColumnFillVisible(true);

    //all nodes are added to nodeGroup to facilitate scrolling rather than to getPlotChildren() directly
    getPlotChildren().add(nodeGroup);

    //add listener for events that should trigger layout
    bandByType.addListener(layoutInvalidationListener);
    oneEventPerRow.addListener(layoutInvalidationListener);
    truncateAll.addListener(layoutInvalidationListener);
    truncateWidth.addListener(layoutInvalidationListener);
    descrVisibility.addListener(layoutInvalidationListener);
    getController().getQuickHideFilters().addListener(layoutInvalidationListener);

    //this is needed to allow non circular binding of the guideline and timerangeRect heights to the height of the chart
    //TODO: seems like a hack, can we remove? -jm
    boundsInLocalProperty().addListener((Observable observable) -> {
        setPrefHeight(boundsInLocalProperty().get().getHeight());
    });

    ChartDragHandler<DateTime, EventDetailsChart> chartDragHandler = new ChartDragHandler<>(this);
    setOnMousePressed(chartDragHandler);
    setOnMouseReleased(chartDragHandler);
    setOnMouseDragged(chartDragHandler);

    setOnMouseClicked(new MouseClickedHandler<>(this));

    this.selectedNodes = selectedNodes;
    this.selectedNodes.addListener(new SelectionChangeHandler());
}