/**********************************************************************
* Copyright (c) 2005, 2008 IBM Corporation and others.
* Copyright (c) 2011, 2012 Ericsson.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
+ *
+ * Contributors:
* IBM - Initial API and implementation
* Bernd Hufmann - Updated for TMF
- *
+ *
**********************************************************************/
package org.eclipse.linuxtools.tmf.ui.views.uml2sd;
* <p>
* The time compression bar implementation.
* </p>
- *
+ *
* @version 1.0
* @author sveyrier
- *
*/
public class TimeCompressionBar extends ScrollView implements DisposeListener {
*/
protected DrawableToolTip fTooltip = null;
/**
- * Array of colors for displaying wight of time deltas.
+ * Array of colors for displaying wight of time deltas.
*/
protected ColorImpl[] fColors;
/**
*/
protected int fFocusedWidget = -1;
/**
- * The sequence diagram view reference.
+ * The sequence diagram view reference.
*/
protected SDView view = null;
/**
*/
protected int fLifelineNumEvents = 0;
/**
- * The Current color of range to display.
+ * The Current color of range to display.
*/
protected IColor fLifelineColor = null;
/**
- * The next graph node y coordinate.
+ * The next graph node y coordinate.
*/
protected int fNextNodeY = 0;
/**
- * The previous graph node y coordinate.
+ * The previous graph node y coordinate.
*/
protected int fPrevNodeY = 0;
// ------------------------------------------------------------------------
/**
* Standard constructor
- *
+ *
* @param parent The parent composite
* @param s The style bits
*/
/**
* Sets the focus widget
- *
+ *
* @param newFocusShape widget reference to set
*/
void setFocus(int newFocusShape) {
/**
* Sets the current frame.
- *
+ *
* @param theFrame The frame to set
*/
public void setFrame(Frame theFrame) {
ITmfTimestamp delta = m2.getTime().getDelta(m1.getTime()).getDelta(fMinTime);
long absDelta = Math.abs(delta.getValue());
-
+
ColorImpl color;
if (gr != 0) {
int colIndex = Math.round((float) (absDelta / gr));
/**
* Checks for focus of children.
- *
+ *
* @param children Control to check
* @return true if child is on focus else false
*/
*/
@Override
protected void contentsMouseExit(MouseEvent e) {
- if (fTooltip != null)
+ if (fTooltip != null) {
fTooltip.hideToolTip();
+ }
}
/*
/**
* Force the time compression bar to highlight the event occurrences between the two given messages. The event
* occurrences are highlighted on the first message's end lifeline
- *
+ *
* @param mes1 the first message
* @param localMes2 the second message
*/
public void highlightRegion(BaseMessage mes1, BaseMessage mes2) {
- BaseMessage localMes1 = mes1;
+ BaseMessage localMes1 = mes1;
BaseMessage localMes2 = mes2;
-
+
if (fFrame == null) {
return;
}
/**
* Force the time compression bar to highlight the event occurrences between the two given messages. The event
* occurrences are highlighted on the first message's end lifeline
- *
+ *
* @param mes1 the first message
* @param mes2 the second message
*/
/**
* Sets the zoom value.
- *
+ *
* @param value The zoom value to set.
*/
public void setZoom(float value) {
/**
* Adds a listener to the time compression listener list to be notified about selected deltas.
- *
+ *
* @param listener The listener to add
*/
public void addTimeCompressionListener(ITimeCompressionListener listener) {
/**
* Removes a time compression listener.
- *
+ *
* @param listener The listener to remove.
*/
public void removeSelectionChangedListener(ITimeCompressionListener listener) {
/**
* Selects the time delta for given delta y coordinate and direction.
- *
- * @param dy The delta in y coordinate.
+ *
+ * @param dy The delta in y coordinate.
* @param direction 0 no direction, 1 = down, 2 = up
*/
protected void selectTimeDelta(int dy, int direction) {
}
/**
- * Creates a fake tool tip.
+ * Creates a fake tool tip.
*/
protected void createFakeTooltip() {
if (fTooltip == null) {
}
}
}
-
+
/**
* Traverse Listener implementation.
*/