public class Track
extends javax.swing.JPanel
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
Track(int type,
java.lang.String nameTrack,
TimelineController controller) |
Modifier and Type | Method and Description |
---|---|
ProbeInfo |
addProbeFromRoot(Probe probe) |
void |
addShowHideButton(boolean show)
Add a button to show or hide the group of contiguous tracks.
|
void |
appendProbes(java.util.LinkedList<Probe> list) |
void |
attachProbeInfo(ProbeInfo pInfo)
Attach probe info to this track
|
int |
calcInsertionPoint(double[] range,
ProbeInfo pinfo)
[0] - start time [1] - stop time [2] - insertion index
|
int |
computeTrackYCoor()
compute the track coordinates
|
boolean |
deleteProbe(Probe probe) |
void |
deleteProbe(ProbeInfo pinfo,
boolean confirm)
delete a probe from the track, need to give the index of the probe
|
void |
deleteThisTrack(boolean isParentModelDeleted)
delete the track
|
void |
deselect()
Deselect a track.
|
void |
detachProbeInfo(ProbeInfo pInfo)
Detach probe info from this track
|
void |
dispose() |
Track |
getGroupParent() |
int |
getProbeIndex(Probe probe) |
java.util.ArrayList<ProbeInfo> |
getProbeInfos() |
java.lang.Integer |
getTrackNumber()
get the track number of the current track
|
boolean |
hasSpaceForProbe(Probe newProbe)
find is there is enough space for the probe on this track
|
boolean |
isDragValid(ProbeInfo pInfo,
boolean isMove)
is this a valid drag? this function determines if we have performed a
valid drag
|
boolean |
isEnabled()
Check if a track is enabled or not.
|
boolean |
isExpanded() |
boolean |
isInputTrack() |
boolean |
isSelected() |
boolean |
isVisible() |
void |
muteTrack(boolean mute) |
int |
numProbeInfos() |
void |
paint(java.awt.Graphics g) |
void |
refreshTrackChanges() |
void |
removeShowHideButton() |
void |
select()
Select a track for moving it around or grouping it with others.
|
void |
setDecorated(boolean decorated) |
void |
setEnabled(boolean enabled)
Set whether a track is enabled or not.
|
void |
setExpanded(boolean expanded) |
void |
setGrouped(Track value)
Set whether or not a track is part of a group.
|
void |
setMutable(boolean enable) |
void |
setVisible(boolean value)
Set if this track is visible or not.
|
void |
updateProbeData() |
void |
updateProbeSizesAndLocations() |
void |
updateToggleStatus(int mode)
update the toggle status
|
void |
updateTrackSize(int trackLength,
int workspaceWidth)
update the track size
|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public Track(int type, java.lang.String nameTrack, TimelineController controller)
public void addShowHideButton(boolean show)
show
- If true then display the 'show' button, if false display the 'hide' buttonpublic void removeShowHideButton()
public void setEnabled(boolean enabled)
Enabling a track allows it to be expanded, muted and edited. Disabling a track means these actions can no longer be performed on the track. This is done to the track that is the parent of a group when the group is shown and hidden.
setEnabled
in class javax.swing.JComponent
enabled
- if true
, enables this trackpublic int getProbeIndex(Probe probe)
public boolean isEnabled()
isEnabled
in class java.awt.Component
public java.lang.Integer getTrackNumber()
public void updateProbeSizesAndLocations()
public int calcInsertionPoint(double[] range, ProbeInfo pinfo)
public boolean hasSpaceForProbe(Probe newProbe)
newProbe
- The probe to be inserted if there is space in the trackpublic java.util.ArrayList<ProbeInfo> getProbeInfos()
public int numProbeInfos()
public void deleteProbe(ProbeInfo pinfo, boolean confirm)
pinfo
- probe information objectconfirm
- confirm the deletion in the GUIpublic boolean deleteProbe(Probe probe)
public void attachProbeInfo(ProbeInfo pInfo)
pInfo
- probe infopublic void detachProbeInfo(ProbeInfo pInfo)
pInfo
- probe infopublic void muteTrack(boolean mute)
public void updateToggleStatus(int mode)
mode
- described which buttons to updatepublic void deleteThisTrack(boolean isParentModelDeleted)
isParentModelDeleted
- Andrei's code simplificationpublic void updateTrackSize(int trackLength, int workspaceWidth)
public boolean isDragValid(ProbeInfo pInfo, boolean isMove)
pInfo
- probe infopublic int computeTrackYCoor()
public void setExpanded(boolean expanded)
public boolean isExpanded()
public boolean isInputTrack()
public void refreshTrackChanges()
public void setMutable(boolean enable)
public void setVisible(boolean value)
setVisible
in class javax.swing.JComponent
value
- The visible value.public boolean isVisible()
isVisible
in class java.awt.Component
public void setGrouped(Track value)
value
- The first track in the group if the track is being grouped, null if the
track is removed from the group.public Track getGroupParent()
public void select()
public void deselect()
public boolean isSelected()
public void appendProbes(java.util.LinkedList<Probe> list)
public void updateProbeData()
public void dispose()
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JComponent
public void setDecorated(boolean decorated)