List of usage examples for javafx.geometry Insets EMPTY
Insets EMPTY
To view the source code for javafx.geometry Insets EMPTY.
Click Source Link
From source file:org.sleuthkit.autopsy.timeline.ui.detailview.AggregateEventNode.java
/** apply the 'effect' to visually indicate highlighted nodes * * @param applied true to apply the highlight 'effect', false to remove it *///from w w w. java 2 s .c o m void applyHighlightEffect(boolean applied) { if (applied) { descrLabel.setStyle("-fx-font-weight: bold;"); // NON-NLS spanFill = new Background(new BackgroundFill(getEvent().getType().getColor().deriveColor(0, 1, 1, .3), CORNER_RADII, Insets.EMPTY)); spanRegion.setBackground(spanFill); setBackground(new Background(new BackgroundFill( getEvent().getType().getColor().deriveColor(0, 1, 1, .2), CORNER_RADII, Insets.EMPTY))); } else { descrLabel.setStyle("-fx-font-weight: normal;"); // NON-NLS spanFill = new Background(new BackgroundFill(getEvent().getType().getColor().deriveColor(0, 1, 1, .1), CORNER_RADII, Insets.EMPTY)); spanRegion.setBackground(spanFill); setBackground(new Background(new BackgroundFill( getEvent().getType().getColor().deriveColor(0, 1, 1, .1), CORNER_RADII, Insets.EMPTY))); } }
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();// w ww. j av a 2 s .co 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()); }
From source file:org.sleuthkit.autopsy.timeline.ui.detailview.EventNodeBase.java
EventNodeBase(Type tlEvent, EventNodeBase<?> parent, DetailsChartLane<?> chartLane) { this.chartLane = chartLane; this.tlEvent = tlEvent; this.parentNode = parent; sleuthkitCase = chartLane.getController().getAutopsyCase().getSleuthkitCase(); eventsModel = chartLane.getController().getEventsModel(); eventTypeImageView.setImage(getEventType().getFXImage()); if (tlEvent.getEventIDsWithHashHits().isEmpty()) { show(hashIV, false);//w w w . j ava 2 s.c o m } if (tlEvent.getEventIDsWithTags().isEmpty()) { show(tagIV, false); } if (chartLane.getController().getEventsModel().getEventTypeZoom() == EventTypeZoomLevel.SUB_TYPE) { evtColor = getEventType().getColor(); } else { evtColor = getEventType().getBaseType().getColor(); } SELECTION_BORDER = new Border(new BorderStroke(evtColor.darker().desaturate(), BorderStrokeStyle.SOLID, CORNER_RADII_3, new BorderWidths(2))); defaultBackground = new Background( new BackgroundFill(evtColor.deriveColor(0, 1, 1, .1), CORNER_RADII_3, Insets.EMPTY)); highlightedBackground = new Background( new BackgroundFill(evtColor.deriveColor(0, 1.1, 1.1, .3), CORNER_RADII_3, Insets.EMPTY)); setBackground(defaultBackground); Tooltip.install(this, this.tooltip); //set up mouse hover effect and tooltip setOnMouseEntered(mouseEntered -> { Tooltip.uninstall(chartLane, AbstractTimelineChart.getDefaultTooltip()); showHoverControls(true); toFront(); }); setOnMouseExited(mouseExited -> { showHoverControls(false); if (parentNode != null) { parentNode.showHoverControls(true); } else { Tooltip.install(chartLane, AbstractTimelineChart.getDefaultTooltip()); } }); setOnMouseClicked(new ClickHandler()); show(controlsHBox, false); }