public class CompareColorImpl extends Object implements com.google.common.cache.RemovalListener<RGB,Color>, ICompareColor
ICompareColor.Provider| Modifier and Type | Field and Description |
|---|---|
static String |
CONFLICTING_CHANGE_COLOR_THEME_KEY
Conflicting color key in theme
|
static String |
INCOMING_CHANGE_COLOR_THEME_KEY
Incoming color key in theme
|
static String |
OUTGOING_CHANGE_COLOR_THEME_KEY
Outgoing color key in theme
|
static String |
REQUIRED_DIFF_COLOR_THEME_KEY
Required difference color key in theme
|
static String |
UNMERGEABLE_DIFF_COLOR_THEME_KEY
Unmergeable difference color key in theme
|
| Constructor and Description |
|---|
CompareColorImpl(Display fDisplay,
boolean leftIsLocal,
ColorRegistry colorRegistry)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Dispose all
Color resources. |
Color |
getFillColor(Diff diff,
boolean isThreeWay,
boolean isIgnoreAncestor,
boolean selected)
Return the color of the background of the decorator of the given
diff. |
Color |
getRequiredFillColor()
Get the color for Required change.
|
Color |
getRequiredStrokeColor()
Get the color for Required change border items.
|
Color |
getStrokeColor(Diff diff,
boolean isThreeWay,
boolean isIgnoreAncestor,
boolean selected)
Return the color of the stroke of the decorator of the given
diff. |
Color |
getUnmergeableFillColor()
Get the color for Unmergeable difference.
|
Color |
getUnmergeableStrokeColor()
Get the color for Unmergeable difference border items.
|
void |
onRemoval(com.google.common.cache.RemovalNotification<RGB,Color> notification) |
protected void |
updateColors() |
public static final String INCOMING_CHANGE_COLOR_THEME_KEY
public static final String CONFLICTING_CHANGE_COLOR_THEME_KEY
public static final String OUTGOING_CHANGE_COLOR_THEME_KEY
public static final String REQUIRED_DIFF_COLOR_THEME_KEY
public static final String UNMERGEABLE_DIFF_COLOR_THEME_KEY
public CompareColorImpl(Display fDisplay, boolean leftIsLocal, ColorRegistry colorRegistry)
control - Use for get Display. The colors will be disposed with the control.leftIsLocal - colorRegistry - ColorRegistry where to find all needed color. Those color will be available through the
constants: (UNMERGEABLE_DIFF_COLOR_THEME_KEY, REQUIRED_DIFF_COLOR_THEME_KEY,
RESOLVED_CHANGE_COLOR_THEME_KEY, OUTGOING_CHANGE_COLOR_THEME_KEY,
CONFLICTING_CHANGE_COLOR_THEME_KEY, INCOMING_CHANGE_COLOR_THEME_KEY)public final void onRemoval(com.google.common.cache.RemovalNotification<RGB,Color> notification)
public Color getFillColor(Diff diff, boolean isThreeWay, boolean isIgnoreAncestor, boolean selected)
diff.getFillColor in interface ICompareColordiff - the diff to be decorated.isThreeWay - are we comparing three models.isIgnoreAncestor - if the ancestor has to be ignored (i.e. ignore the isThreeWay parameter).selected - if the given diff is selected in the viewer.org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.util.ICompareColor#getFillColor(org.eclipse.emf.compare.Diff,
boolean, boolean, boolean)public Color getStrokeColor(Diff diff, boolean isThreeWay, boolean isIgnoreAncestor, boolean selected)
diff.getStrokeColor in interface ICompareColordiff - the diff to be decorated.isThreeWay - are we comparing three models.isIgnoreAncestor - if the ancestor has to be ignored (i.e. ignore the isThreeWay parameter).selected - if the given diff is selected in the viewer.org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.util.ICompareColor#getStrokeColor(org.eclipse.emf.compare.Diff,
boolean, boolean, boolean)protected final void updateColors()
public void dispose()
Color resources.dispose in interface ICompareColororg.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.util.ICompareColor#dispose()public Color getRequiredFillColor()
getRequiredFillColor in interface ICompareColorpublic Color getUnmergeableFillColor()
getUnmergeableFillColor in interface ICompareColorpublic Color getRequiredStrokeColor()
ICompareColor.getRequiredFillColor()getRequiredStrokeColor in interface ICompareColorpublic Color getUnmergeableStrokeColor()
ICompareColor.getUnmergeableFillColor()getUnmergeableStrokeColor in interface ICompareColor
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.