20 package org.sleuthkit.autopsy.timeline.ui.detailview;
22 import java.util.Arrays;
23 import java.util.Collection;
24 import javafx.event.EventHandler;
25 import javafx.geometry.Pos;
26 import javafx.scene.control.Button;
27 import javafx.scene.control.OverrunStyle;
28 import javafx.scene.image.ImageView;
29 import javafx.scene.input.MouseEvent;
30 import javafx.scene.layout.VBox;
31 import org.apache.commons.lang3.StringUtils;
32 import org.controlsfx.control.action.Action;
33 import org.controlsfx.control.action.ActionUtils;
57 void installActionButtons() {
58 if (hideButton == null) {
59 hideButton = ActionUtils.createButton(
chart.new HideDescriptionAction(getDescription(),
eventBundle.getDescriptionLoD()),
60 ActionUtils.ActionTextBehavior.
HIDE);
61 configureLoDButton(hideButton);
63 infoHBox.getChildren().add(hideButton);
68 super(chart, eventStripe, parentNode);
72 eventTypeImageView.setImage(getEventType().getFXImage());
73 descrLabel.setTextOverrun(OverrunStyle.CENTER_ELLIPSIS);
74 descrLabel.setGraphic(eventTypeImageView);
75 descrLabel.setPrefWidth(USE_COMPUTED_SIZE);
76 setAlignment(subNodePane, Pos.BOTTOM_LEFT);
79 subNodes.add(createChildNode(cluster));
82 getChildren().addAll(
new VBox(infoHBox, subNodePane));
91 void showHoverControls(
final boolean showControls) {
92 super.showHoverControls(showControls);
93 installActionButtons();
94 show(hideButton, showControls);
106 descrLabel.setMaxWidth(w);
117 descrLabel.setStyle(
"-fx-font-weight: bold;");
118 setBackground(highlightedBackground);
120 descrLabel.setStyle(
"-fx-font-weight: normal;");
121 setBackground(defaultBackground);
131 countLabel.setText(
"");
132 descrLabel.setText(
"");
135 descrLabel.setText(
"");
136 countLabel.setText(String.valueOf(size));
142 ?
" ..." + StringUtils.substringAfter(description,
parentNode.getDescription())
144 descrLabel.setText(description);
145 countLabel.setText(((size == 1) ?
"" :
" (" + size +
")"));
151 EventHandler<MouseEvent> getDoubleClickHandler() {
152 return mouseEvent -> {
157 Collection<? extends Action> getActions() {
158 return Arrays.asList(
chart.new HideDescriptionAction(getDescription(),
eventBundle.getDescriptionLoD()));
EventStripeNode(EventDetailsChart chart, EventStripe eventStripe, EventClusterNode parentNode)
final ParentNodeType parentNode
final BundleType getEventBundle()
final ImageView eventTypeImageView
final EventDetailsChart chart
void setMaxDescriptionWidth(double w)
EventStripe getEventStripe()
synchronized void applyHighlightEffect(boolean applied)
static final Logger LOGGER
final BundleType eventBundle
synchronized static Logger getLogger(String name)
ImmutableSortedSet< EventCluster > getClusters()