|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.pmd.util.GraphConfiguration
public class GraphConfiguration
Configuration properties of a trend graph.
| Field Summary | |
|---|---|
protected static int |
DEFAULT_HEIGHT
The default height. |
protected static int |
DEFAULT_WIDTH
The default width. |
| Constructor Summary | |
|---|---|
GraphConfiguration(java.lang.String value)
Creates a new instance of GraphConfiguration. |
|
GraphConfiguration(java.lang.String value,
java.io.File defaultsFile)
Creates a new instance of GraphConfiguration. |
|
| Method Summary | |
|---|---|
org.jfree.chart.JFreeChart |
createGraph(AbstractHealthDescriptor healthDescriptor,
ResultAction<? extends BuildResult> resultAction,
java.lang.String url)
Creates the graph. |
int |
getBuildCount()
Returns the number of builds to consider. |
int |
getDayCount()
Returns the number of days to consider. |
GraphType |
getGraphType()
Returns the type of the graph. |
int |
getHeight()
Returns the height. |
int |
getWidth()
Returns the width. |
boolean |
isBuildCountDefined()
Returns whether a valid build count is defined. |
boolean |
isDayCountDefined()
Returns whether a valid day count is defined. |
boolean |
isDefault()
Returns whether this instance is initialized with its default values. |
protected static boolean |
isValid(int newWidth,
int newHeight,
int newBuildCount,
int newDayCount,
GraphType newGraphType)
Returns whether the configuration parameters are valid. |
protected static boolean |
isValidBuildCount(int newBuildCount)
Returns if the build count is valid. |
protected static boolean |
isValidHeight(int newHeight)
Returns whether the width is valid. |
protected static boolean |
isValidWidth(int newWidth)
Returns whether the width is valid. |
boolean |
isVisible()
Returns whether the trend graph is visible or not. |
protected java.lang.String |
serializeToString(int width,
int height,
int buildCount,
int dayCount,
GraphType graphType)
Serializes the values of this configuration. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int DEFAULT_WIDTH
protected static final int DEFAULT_HEIGHT
| Constructor Detail |
|---|
public GraphConfiguration(java.lang.String value)
GraphConfiguration.
value - the initial value of this configuration (the syntax of the
string is defined in initializeFrom(String))
public GraphConfiguration(java.lang.String value,
java.io.File defaultsFile)
GraphConfiguration.
value - the initial value of this configuration (the syntax of the
string is defined in initializeFrom(String))defaultsFile - a file with default values in case the specified value is not
valid| Method Detail |
|---|
protected java.lang.String serializeToString(int width,
int height,
int buildCount,
int dayCount,
GraphType graphType)
width - width of graphheight - height of graphbuildCount - the build countdayCount - the day countgraphType - type of graph
initializeFrom(String)
protected static boolean isValid(int newWidth,
int newHeight,
int newBuildCount,
int newDayCount,
GraphType newGraphType)
newWidth - the new widthnewHeight - the new heightnewBuildCount - the new build countnewDayCount - the new day countnewGraphType - the new graph type
true if the configuration parameters are valid,
false otherwise.protected static boolean isValidBuildCount(int newBuildCount)
newBuildCount - the new build count
true if the build count is valid.protected static boolean isValidWidth(int newWidth)
newWidth - the new width
true if the width is valid, false
otherwiseprotected static boolean isValidHeight(int newHeight)
newHeight - the new height
true if the width is valid, false
otherwisepublic int getHeight()
public int getWidth()
public int getBuildCount()
public boolean isBuildCountDefined()
true if there is a valid build count is defined,
false otherwisepublic int getDayCount()
public boolean isDayCountDefined()
true if there is a valid day count is defined,
false otherwisepublic GraphType getGraphType()
public org.jfree.chart.JFreeChart createGraph(AbstractHealthDescriptor healthDescriptor,
ResultAction<? extends BuildResult> resultAction,
java.lang.String url)
healthDescriptor - the health descriptorresultAction - the action to start the graph withurl - base URL of the graph links
public boolean isDefault()
true if this instance is initialized with its default values.public boolean isVisible()
true, if the trend graph is visible, false otherwisepublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||