import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
import org.eclipse.linuxtools.tmf.ui.views.uml2sd.drawings.IGC;
import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.ISDPreferences;
+import org.eclipse.linuxtools.tmf.ui.views.uml2sd.preferences.SDViewPref;
import org.eclipse.linuxtools.tmf.ui.views.uml2sd.util.SortSyncMessageComparator;
/**
/**
* The associated message return
*/
- protected SyncMessageReturn messageReturn;
+ protected SyncMessageReturn fMessageReturn;
/**
* The time when the message occurs
*/
- protected ITmfTimestamp eventTime = new TmfTimestamp();
+ protected ITmfTimestamp fEventTime = new TmfTimestamp();
/**
* Flag whether the message has time information available or not
*/
- protected boolean hasTime = false;
+ protected boolean fHasTimeInfo = false;
// ------------------------------------------------------------------------
// Constructors
* Default constructor
*/
public SyncMessage() {
- prefId = ISDPreferences.PREF_SYNC_MESS;
+ fPrefId = ISDPreferences.PREF_SYNC_MESS;
}
// ------------------------------------------------------------------------
*/
@Override
protected void setEventOccurrence(int occurrence) {
- startEventOccurrence = occurrence;
- endEventOccurrence = occurrence;
+ fStartEventOccurrence = occurrence;
+ fEndEventOccurrence = occurrence;
}
/**
* @param message the message return to associate
*/
protected void setMessageReturn(SyncMessageReturn message) {
- messageReturn = message;
+ fMessageReturn = message;
}
/**
* @return the message return
*/
public SyncMessageReturn getMessageReturn() {
- return messageReturn;
+ return fMessageReturn;
}
/**
* @param time the time when the message occurs
*/
public void setTime(ITmfTimestamp time) {
- eventTime = time.clone();
- hasTime = true;
+ fEventTime = time.clone();
+ fHasTimeInfo = true;
if (getStartLifeline() != null && getStartLifeline().getFrame() != null) {
getStartLifeline().getFrame().setHasTimeInfo(true);
} else if (getEndLifeline() != null && getEndLifeline().getFrame() != null) {
*/
@Override
public ITmfTimestamp getEndTime() {
- return eventTime;
+ return fEventTime;
}
/*
*/
@Override
public ITmfTimestamp getStartTime() {
- return eventTime;
+ return fEventTime;
}
/*
*/
@Override
public boolean hasTimeInfo() {
- return hasTime;
+ return fHasTimeInfo;
}
/*
*/
@Override
public void draw(IGC context) {
- if (!isVisible())
+ if (!isVisible()) {
return;
+ }
+
+ ISDPreferences pref = SDViewPref.getInstance();
+
// Draw it selected?
if (!isSelected()) {
- context.setBackground(Frame.getUserPref().getBackGroundColor(prefId));
- context.setForeground(Frame.getUserPref().getForeGroundColor(prefId));
+ context.setBackground(pref.getBackGroundColor(fPrefId));
+ context.setForeground(pref.getForeGroundColor(fPrefId));
}
super.draw(context);
}
// UML2 lost/found message visibility special case
// Others visibility cases are perform in the ***common*** case
- if ((endLifeline == null && startLifeline != null) || (endLifeline != null && startLifeline == null)) {
+ if ((fEndLifeline == null && fStartLifeline != null) || (fEndLifeline != null && fStartLifeline == null)) {
if (x + width > getX() + getWidth() && x < getX() + getWidth()) {
return true;
}