public class ColorHandlingContext extends Object implements IColorGenerationContext
IColorGenerationContext interface. Gives an implementation
based on tag-color pairs provided by the ITagColors.| Modifier and Type | Field and Description |
|---|---|
static IColorGenerationContext |
DEFAULT
The default color handling context.
|
protected IColorGenerationContext |
parent |
protected int |
tag |
protected ITagColors |
tagColors |
| Modifier | Constructor and Description |
|---|---|
|
ColorHandlingContext(ITagColors tagColors)
Creates a context with the given tag-color pairs.
|
protected |
ColorHandlingContext(ITagColors tagColors,
IColorGenerationContext parent,
int tag) |
| Modifier and Type | Method and Description |
|---|---|
IColorGenerationContext |
applyTag(int tag)
Applying the tag and returns with a new object based on that.
|
Color |
getColor()
Returns with the color of the object in the current context.
|
public static final IColorGenerationContext DEFAULT
protected final ITagColors tagColors
protected final IColorGenerationContext parent
protected final int tag
public ColorHandlingContext(ITagColors tagColors)
TagColorsBuilder class.tagColors - the tag-color pairs to be usedprotected ColorHandlingContext(ITagColors tagColors, IColorGenerationContext parent, int tag)
public Color getColor()
IColorGenerationContextgetColor in interface IColorGenerationContextpublic IColorGenerationContext applyTag(int tag)
IColorGenerationContextapplyTag in interface IColorGenerationContexttag - the tag to be appliedCopyright © 2014–2020, Printing in 3D. All rights reserved.