Class TimelineGUI

java.lang.Object
org.emrick.project.TimelineGUI

public class TimelineGUI extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • setTimelineListener

      public void setTimelineListener(TimelineListener listener)
      Sets the timeline listener for this timeline
      Parameters:
      listener - The listener to receive timeline events
    • createZoomControls

      private void createZoomControls()
      Creates the zoom control panel with buttons and label
    • addMouseWheelZoomSupport

      private void addMouseWheelZoomSupport()
      Adds support for zooming with Ctrl+Mouse wheel
    • zoomIn

      private void zoomIn()
      Increases the zoom level by one step
    • zoomOut

      private void zoomOut()
      Decreases the zoom level by one step
    • resetZoom

      private void resetZoom()
      Resets the zoom level to the default (1.0)
    • updateZoom

      private void updateZoom()
      Updates the zoom display and timeline layout
    • updateTimelineLayout

      private void updateTimelineLayout()
    • updateComponentPositions

      private void updateComponentPositions()
    • updateData

      public void updateData(ArrayList<Effect> newEffects, HashMap<Integer,RFTrigger> count2RFTrigger, int newMaxCount)
      Update the timeline data in-place without recreating the entire GUI. Keeps the same scrollpane and other components so callers can reuse the TimelineGUI instance.
    • addDragSupportToEffectWidget

      private void addDragSupportToEffectWidget(JToggleButton effectWidget, Effect effect)
    • createTimelinePane

      private void createTimelinePane()
    • calculateXPosition

      private int calculateXPosition(double ms)
    • calculateXPositionFromCount

      private int calculateXPositionFromCount(double count)
      Calculate precise X position from decimal count value
    • convertCountToMS

      private long convertCountToMS(double count)
      Convert decimal count to milliseconds using precise interpolation
    • calculateEffectWidth

      private int calculateEffectWidth(Effect effect)
    • calculateTimelineWidth

      private int calculateTimelineWidth()
    • findAvailableRow

      private int findAvailableRow(List<List<TimelineGUI.TimeRange>> rows, TimelineGUI.TimeRange newRange)
    • isRowAvailable

      private boolean isRowAvailable(List<TimelineGUI.TimeRange> row, TimelineGUI.TimeRange newRange)
    • getTimelineScrollPane

      public JPanel getTimelineScrollPane()
    • scrubToMS

      public void scrubToMS(double ms)
    • scrubToCount

      public void scrubToCount(double count)
      Scrub to a specific count
    • setShowAllEffects

      public void setShowAllEffects(boolean showAll)
    • addScrollClickPanning

      private void addScrollClickPanning()
      Adds support for panning the timeline using the middle mouse button (scroll wheel) This implementation uses a specialized adapter that ensures smooth, precise panning with the content following exactly under the mouse cursor as you drag.
    • main

      public static void main(String[] args)