org.eclipse.emf.emfstore.internal.client.ui.views.historybrowserview.graph
Interface IPlotCommit

All Known Implementing Classes:
PlotCommit

public interface IPlotCommit

This interface represents a commit within a commit graph. It is used for drawing in the SWTPlotRenderer.

Author:
Aumann, Faltermeier

Method Summary
 void addChild(IPlotCommit child)
          Adds a child to this commit.
 void addPassingLane(PlotLane lane)
          Adds a passing lane to this commit.
 void dispose()
          Disposes this commit and all aquired resources.
 String getBranch()
           
 IPlotCommit getChild(int childId)
           
 int getChildCount()
           
 org.eclipse.swt.graphics.Color getColor()
           
 int getId()
           
 PlotLane getLane()
           
 org.eclipse.swt.graphics.Color getLightColor()
           
 IPlotCommit getParent(int parentId)
           
 int getParentCount()
           
 PlotLane[] getPassingLanes()
           
 boolean isChild(IPlotCommit commit)
          Tests whether a given commit is child of this commit.
 boolean isLocalHistoryOnly()
          Checks whether this commit is a real (i.e.
 boolean isRealCommit()
           
 void setColor(org.eclipse.swt.graphics.Color color)
          Sets the color of this commit.
 void setIsRealCommit(boolean isReal)
          Sets the 'real' status of this commit.
 void setLane(PlotLane lane)
          Sets the lane of the commit.
 void setLightColor(org.eclipse.swt.graphics.Color color)
          Sets the light color of this commit.
 void setParents(List<IPlotCommit> parents)
          Sets the parent's of this commit.
 

Method Detail

getLane

PlotLane getLane()
Returns:
The lane of the commit in the graph.

setLane

void setLane(PlotLane lane)
Sets the lane of the commit.

Parameters:
lane - The lane to set as lane for this commit.

addPassingLane

void addPassingLane(PlotLane lane)
Adds a passing lane to this commit.

Parameters:
lane - The lane to add.

getPassingLanes

PlotLane[] getPassingLanes()
Returns:
All passing lanes of this commit.

setParents

void setParents(List<IPlotCommit> parents)
Sets the parent's of this commit. Parents are commits this commit is based upon, i.e. normally parent commits came before this commit.

Parameters:
parents - A list of this commit's parents.

getParentCount

int getParentCount()
Returns:
The number of parents of this commit.

getParent

IPlotCommit getParent(int parentId)
Parameters:
parentId - The index of the parent to retrieve.
Returns:
The parent of this commit at the specified index.

addChild

void addChild(IPlotCommit child)
Adds a child to this commit. A child of a commit is a commit that is based on this commit (but may be based on others, too). See also setParents(List)

Parameters:
child - The child to add.

getChildCount

int getChildCount()
Returns:
The number of children of this commit.

getChild

IPlotCommit getChild(int childId)
Parameters:
childId - The index of the child to retrieve.
Returns:
The child of this commit at the specified index.

isChild

boolean isChild(IPlotCommit commit)
Tests whether a given commit is child of this commit.

Parameters:
commit - The potential child commit.
Returns:
true if the given commit is a child of this commit, false otherwise.

isLocalHistoryOnly

boolean isLocalHistoryOnly()
Checks whether this commit is a real (i.e. committed to the server) commit, or just a wrapper around local change sets.

Returns:
true if this commit is only a wrapper for local change sets, false otherwise.

setIsRealCommit

void setIsRealCommit(boolean isReal)
Sets the 'real' status of this commit. This commit is 'real' if e.g. in a tree this commit is on the very level where its node will be painted. Unreal commits just hold the necessary information (lanes etc.) but do not have to be completely drawn (the lanes might be in a lighter color, no commit dot etc.)

Parameters:
isReal - The new status.

isRealCommit

boolean isRealCommit()
Returns:
The 'real' status of this commit. See setIsRealCommit(boolean).

getBranch

String getBranch()
Returns:
The name of the branch this commit belongs to.

getId

int getId()
Returns:
The unique identifier of this commit, usually a number.

dispose

void dispose()
Disposes this commit and all aquired resources.


setColor

void setColor(org.eclipse.swt.graphics.Color color)
Sets the color of this commit. The color determines the color of the branch label next to the commit as well as associated lane colors.

Parameters:
color - The new color.

getColor

org.eclipse.swt.graphics.Color getColor()
Returns:
The color of this commit. See setColor(Color).

setLightColor

void setLightColor(org.eclipse.swt.graphics.Color color)
Sets the light color of this commit. It is usually a brighter version of this commit's color (see setColor(Color)). The light color is used whenever a more faded color representation for this commit is needed (e.g. label backgrounds, lane colors for expanded commit nodes).

Parameters:
color - The new light color of this commit.

getLightColor

org.eclipse.swt.graphics.Color getLightColor()
Returns:
The light color of this commit. See setLightColor(Color).


Copyright © 2015. All Rights Reserved.