Timeliner is a Java Swing component for visualizing time-series events that execute in parallel threads (or any concurrent timeline data). It provides an interactive Gantt-chart-style view with zoom, pan, and selection capabilities.
- Interactive timeline — zoom with mouse wheel, pan by dragging, rubber-band zoom on the time ruler
- Tree-structured items — items can contain child items with expand/collapse support
- Event markers — individual time-point events rendered as colored segments on each item's timeline bar
- Keyboard navigation — arrow keys, Page Up/Down, Home/End, Enter to expand/collapse
- Time range selection — Shift+drag to select a time interval
- Adaptive time scale — automatic tick interval selection from nanoseconds to seconds
- Customizable palette — 6 color schemes for visual distinction of parallel threads
- Nanosecond precision — displays time with nanosecond accuracy where appropriate
// Create the timeline view
TimelineView view = new TimelineView();
// Build your data model
Items items = new Items();
Item thread = new Item("Thread-1", 0.0, 10.0, "Main thread");
thread.add(new ItemEvent("start", 0.0));
thread.add(new ItemEvent("phase1", 3.0));
thread.add(new ItemEvent("phase2", 7.0));
items.rootItems.add(thread);
items.updateItems();
// Populate the view
view.setData(items);
// Add to your JFrame
frame.add(view);Items— root container holding a list ofItemobjects and a flattened visible arrayItem— a single thread/task with name, time range, child items, and eventsItemEvent— a time-point marker with name, time, and palette color index
Requires Java 11 and Maven:
mvn compile
Run tests:
mvn test
Apache License 2.0
