public class TimelineController extends Timeline implements SchedulerListener, SelectionListener
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
TimelineController(java.lang.String title,
Main main)
Creates the timeline
|
Modifier and Type | Method and Description |
---|---|
void |
addContiguousTrack(Track src) |
void |
addProbe(Probe probe)
Adds a probe to the timeline.
|
void |
addProbeEditor(NumericProbeEditor editor) |
void |
addWayPoint(double wayTime,
boolean isBreakPoint)
Adds a waypoint to the timelime.
|
void |
addWayPointFromUser(boolean isBreakPoint)
Gets waypoint information from the current position of the timescale
and adds the waypoint to the waypoint probe.
|
void |
applyInputProbes()
Responsible for applying input probes model after the mouse has been
used to drag the time with the SHIFT modifier.
|
void |
automaticProbesZoom()
Automatically decide which zoom level is better for the probes and set
this level based on the maximum probe time data.
|
void |
clearWayPoints() |
void |
closeProbeEditors() |
void |
deleteWayPoint(int idx,
boolean isTimelineReset)
Called when clearTimeline is requested on the timeline, or an action
is performed requesting "Delete waypoint".
|
void |
deleteWayPoints() |
void |
disableAllBreakPoints() |
void |
dispose() |
boolean |
executeDrop(int yCoor,
ProbeInfo pInfo,
Track origTrack) |
void |
expandTracks(boolean expanded,
java.util.ArrayList<Track> list) |
void |
extendTimeline() |
java.awt.Cursor |
getCurrentCursor() |
Track |
getCurrentlyEnteredTrack() |
double |
getCurrentTime() |
double |
getLargestProbeTime() |
double |
getLargestWayPointTime() |
int |
getMultipleSelectionMask() |
int |
getNumberOfWayPoints() |
artisynth.core.gui.timeline.TimelineController.ProbeTrack |
getProbeTrack() |
Track |
getProbeTrack(Probe probe) |
int |
getProbeTrackHeight() |
java.util.ArrayList<ProbeInfo> |
getSelectedProbes() |
Timescale |
getTimescale() |
Track |
getTrack(int trackIdx,
boolean isInput) |
Track |
getTrackAtYCoor(int yCoor,
boolean isInputTrack) |
java.util.ArrayList<Track> |
getTrackGroup(Track firstTrack)
Get the group of tracks that has the specified track as the first one in
the group.
|
int[] |
getVisibleBound()
Returns the bounds for which the timeline is visible.
|
double |
getVisibleRange(double sec) |
WayPoint |
getWayPoint(double time) |
void |
getWayPointFromUser()
Gets waypoint information from the user and adds the waypoint to
the waypoint probe.
|
int |
getYCoorUpToTrack(Track curTrack)
compute Y coordinate to track
|
int |
getZoomLevel() |
boolean |
groupTracks() |
void |
hideContiguousTracks(Track src)
Hide the contiguous tracks that are grouped with the src track.
|
boolean |
isActiveProbeExist() |
boolean |
isActiveWayPointExist() |
boolean |
isContiguousTrack(Track src)
Determine if a track is part of the list of contiguous tracks or not.
|
boolean |
isNextValidWayAvailable(RootModel root)
Checks to see if there are any valid waypoints after the current time.
|
void |
loadWayPoints() |
void |
loadWayPointsFrom() |
boolean |
loadWayPointsFromAttachedFile(javax.swing.JFrame frame) |
boolean |
mouseReleased()
When the left mouse button is released on a track this function is called
to move the tracks around accordingly.
|
void |
muteTracks(boolean muted,
java.util.ArrayList<Track> list) |
void |
rebuildWayPointTrack() |
void |
refreshProbeTrackDisplay() |
boolean |
refreshWayPoints(RootModel root) |
void |
removeAllContiguousTracks() |
void |
removeContiguousTrack(Track src) |
void |
removeProbe(Probe probe) |
void |
removeWayPointFromRoot(WayPoint way)
Removes a wayPoint at the request of the system.
|
void |
repaintVisibleWindow()
Get the current dimensions of the timeline window and repaint the timeline
accordingly, and make a call to repaint the workspace.
|
void |
requestResetAll() |
void |
requestUpdateDisplay() |
void |
requestUpdateWidgets() |
void |
resetAll()
Resets the timeline.
|
boolean |
rootModelExists() |
void |
saveWayPoints() |
void |
saveWayPointsAs() |
void |
schedulerActionPerformed(Scheduler.Action action) |
void |
selectionChanged(SelectionEvent e) |
void |
setActiveProbeExist(boolean exist) |
void |
setActiveWayPointExist(boolean exist) |
void |
setAllInputProbes() |
void |
setAllMutable(boolean muted) |
void |
setAllTracksExpanded(boolean expanded) |
void |
setAllTracksMuted(boolean muted) |
void |
setCurrentCursor(java.awt.Cursor cur) |
NumericProbeDisplayLarge |
setLargeDisplayVisible(Probe probe,
boolean visible) |
Track |
setLastEntered(Track src,
boolean group)
Set the value of the track that was last entered by the mouse.
|
void |
setMultipleSelectionMask(int mask) |
void |
setRestartTime(int dragMode)
Responsible for setting up the model after the mouse has been
used to drag the time to Tn.
|
void |
setTrackExpanded(boolean expanded,
boolean isInput,
int modelIdx,
int trackIdx) |
void |
setTrackMuted(boolean muted,
boolean isInput,
int modelIdx,
int trackIdx) |
void |
setVisible(boolean visible) |
void |
setVisibleRange(double sec)
Set the timeline zoom level so that 'sec' is visible.
|
boolean |
setWayPointsFileFromUser(javax.swing.JFrame frame,
java.lang.String text) |
void |
setZoom(int zoom) |
void |
setZoomLevel(int zoom) |
void |
showContiguousTracks(Track src) |
void |
ungroupTracks(Track src) |
void |
updateAllProbeDisplays() |
void |
updateComponentLocations()
Computes the location where each component on the timeline should be as a
function of the time with which the component spans over, and updates the
location and size of these components accordingly.
|
void |
updateComponentSizes()
Computes the length that each component on the timeline should represent
as a function of the time which the component spans over, and then updates
the size of these components accordingly.
|
void |
updateCurrentWayPointShadow(int x) |
void |
updateProbes(RootModel root)
Updates probes when probes are added or removed from the RootModel.
|
boolean |
updateProbesAndWayPoints(RootModel rootModel)
Checks to see if the currently loaded probes and waypoints are consistent
with the root model, and updates them if necessary.
|
void |
updateTimeDisplay(double t)
Sets the current running time of the model
|
void |
updateTimelineScroll() |
void |
updateWayPointListOrder(int modifiedWayPointIndex) |
void |
zoom(int mode) |
isMultipleProbeSelecting, setMultipleProbeSelecting
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, show, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public TimelineController(java.lang.String title, Main main)
public void updateComponentSizes()
updateComponentSizes
in class Timeline
public int getProbeTrackHeight()
public void requestUpdateDisplay()
requestUpdateDisplay
in class Timeline
public void requestUpdateWidgets()
requestUpdateWidgets
in class Timeline
public void requestResetAll()
requestResetAll
in class Timeline
public void repaintVisibleWindow()
repaintVisibleWindow
in class Timeline
public void setRestartTime(int dragMode)
public void applyInputProbes()
public void setAllMutable(boolean muted)
public void setAllTracksMuted(boolean muted)
public void muteTracks(boolean muted, java.util.ArrayList<Track> list)
public void expandTracks(boolean expanded, java.util.ArrayList<Track> list)
public void updateAllProbeDisplays()
public void updateComponentLocations()
updateComponentLocations
in class Timeline
public void resetAll()
public void deleteWayPoint(int idx, boolean isTimelineReset)
public void closeProbeEditors()
public void removeWayPointFromRoot(WayPoint way)
removeWayPointFromRoot
in class Timeline
public void setZoomLevel(int zoom)
setZoomLevel
in class Timeline
public void automaticProbesZoom()
automaticProbesZoom
in class Timeline
public void updateTimeDisplay(double t)
updateTimeDisplay
in class Timeline
t
- time is secondspublic boolean updateProbesAndWayPoints(RootModel rootModel)
public void updateProbes(RootModel root)
updateProbes
in class Timeline
public void addProbe(Probe probe)
public void removeProbe(Probe probe)
public void addProbeEditor(NumericProbeEditor editor)
addProbeEditor
in class Timeline
public void setActiveWayPointExist(boolean exist)
public void setActiveProbeExist(boolean exist)
public void updateWayPointListOrder(int modifiedWayPointIndex)
public void setCurrentCursor(java.awt.Cursor cur)
public void addWayPointFromUser(boolean isBreakPoint)
public void addWayPoint(double wayTime, boolean isBreakPoint)
public boolean refreshWayPoints(RootModel root)
refreshWayPoints
in class Timeline
public void deleteWayPoints()
public void clearWayPoints()
clearWayPoints
in class Timeline
public void saveWayPoints()
public void saveWayPointsAs()
public void loadWayPoints()
public void loadWayPointsFrom()
public boolean loadWayPointsFromAttachedFile(javax.swing.JFrame frame)
loadWayPointsFromAttachedFile
in class Timeline
public boolean setWayPointsFileFromUser(javax.swing.JFrame frame, java.lang.String text)
setWayPointsFileFromUser
in class Timeline
public void getWayPointFromUser()
public void disableAllBreakPoints()
public void setAllTracksExpanded(boolean expanded)
setAllTracksExpanded
in class Timeline
public java.awt.Cursor getCurrentCursor()
public int getZoomLevel()
public WayPoint getWayPoint(double time)
public double getCurrentTime()
public Timescale getTimescale()
public int[] getVisibleBound()
public boolean isNextValidWayAvailable(RootModel root)
root
- TODOpublic boolean rootModelExists()
public boolean isActiveWayPointExist()
public boolean isActiveProbeExist()
public void setTrackExpanded(boolean expanded, boolean isInput, int modelIdx, int trackIdx)
setTrackExpanded
in class Timeline
public void setTrackMuted(boolean muted, boolean isInput, int modelIdx, int trackIdx)
setTrackMuted
in class Timeline
public void updateTimelineScroll()
public void rebuildWayPointTrack()
public void refreshProbeTrackDisplay()
public Track getTrackAtYCoor(int yCoor, boolean isInputTrack)
public int getYCoorUpToTrack(Track curTrack)
curTrack
- current trackpublic Track getTrack(int trackIdx, boolean isInput)
public artisynth.core.gui.timeline.TimelineController.ProbeTrack getProbeTrack()
public void addContiguousTrack(Track src)
public void removeContiguousTrack(Track src)
public boolean isContiguousTrack(Track src)
src
- The track to test if it is part of the contiguous list.public void removeAllContiguousTracks()
public Track setLastEntered(Track src, boolean group)
src
- The track that was entered.group
- If true then treat groups of tracks as one single track, if false then
treate all tracks as single.public java.util.ArrayList<Track> getTrackGroup(Track firstTrack)
firstTrack
- This must be the first track in the group of tracks that is being searched
for.public Track getCurrentlyEnteredTrack()
public boolean groupTracks()
public void ungroupTracks(Track src)
public void showContiguousTracks(Track src)
public void hideContiguousTracks(Track src)
src
- The first track in the block of contiguous tracks to be hidden.public boolean mouseReleased()
public void updateCurrentWayPointShadow(int x)
public void schedulerActionPerformed(Scheduler.Action action)
schedulerActionPerformed
in interface SchedulerListener
public double getLargestProbeTime()
public int getNumberOfWayPoints()
public double getLargestWayPointTime()
public void extendTimeline()
public void setAllInputProbes()
public void setZoom(int zoom)
public void zoom(int mode)
public double getVisibleRange(double sec)
getVisibleRange
in class Timeline
public void setVisibleRange(double sec)
<=
0
, we compute a default value from the maximum probe or waypoint times.setVisibleRange
in class Timeline
public void setVisible(boolean visible)
setVisible
in class java.awt.Window
public void selectionChanged(SelectionEvent e)
selectionChanged
in interface SelectionListener
public java.util.ArrayList<ProbeInfo> getSelectedProbes()
public int getMultipleSelectionMask()
public void setMultipleSelectionMask(int mask)
public NumericProbeDisplayLarge setLargeDisplayVisible(Probe probe, boolean visible)
setLargeDisplayVisible
in class Timeline
public void dispose()
dispose
in class java.awt.Window