|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.chart.util.ChartUtil
Utility class for Charts.
Field Summary | |
static java.lang.String |
CHART_MAX_ROW
The constant defined as the key in RuntimeContext or JVM arguments, to represent the value of chart max row number. |
Constructor Summary | |
ChartUtil()
|
Method Summary | |
static boolean |
checkDoublePrecise(double dValue)
Checks a double value is double precise. |
static double |
computeHeightOfOrthogonalAxisTitle(ChartWithAxes cm,
IDisplayServer xs)
Computes the height of orthogonal axis title. |
static Fill |
convertFill(Fill fill,
double dValue,
Fill fNegative)
Converts Fill if possible. |
static double |
convertPixelsToPoints(IDisplayServer idsSWT,
double dOriginalHeight)
Convert pixel value to points. |
static int |
convertUnitTypeToCalendarConstant(ScaleUnitType unitType)
Convers Scale unit type to ICU Calendar constant. |
static int |
getQuadrant(double dAngle)
Returns the quadrant (1-4) for given angle in degree. |
static int |
getSupportedMaxRowCount(RunTimeContext rtc)
Returns max row count that will be supported in charts. |
static java.lang.String[] |
getSupportedOutputFormats()
Gets all supported output formats. |
static boolean |
intersects(Polygon pg1,
Polygon pg2)
Returns if two polygons intersect each other. |
static boolean |
isColorTransparent(ColorDefinition cdef)
Returns if the given color definition is totally transparent. |
static boolean |
isOutputFormatSupport(java.lang.String output)
Checks current output format can be supported |
static boolean |
isRightToLeftLocale(com.ibm.icu.util.ULocale lcl)
Returns if specified locale uses right-to-left direction. |
static boolean |
isShadowDefined(Label la)
Returns if the given label has defined a shadow. |
static boolean |
mathEqual(double v1,
double v2)
Returns if the given two double values are equal within a small precision. |
static boolean |
mathGE(double lv,
double rv)
Returns if the given left double value is greater than or equals to the given right value within a small precision. |
static boolean |
mathGT(double lv,
double rv)
Returns if the given left double value is greater than the given right value within a small precision. |
static boolean |
mathLE(double lv,
double rv)
Returns if the given left double value is less than or equals to the given right value within a small precision. |
static boolean |
mathLT(double lv,
double rv)
Returns if the given left double value is less than the given right value within a small precision. |
static boolean |
mathNE(double v1,
double v2)
Returns if the given two double values are not equal within a small precision. |
static void |
mergeFont(FontDefinition original,
FontDefinition source)
Merges two fonts to the original one from a source. |
static java.lang.String |
stringValue(java.lang.Object value)
Returns the string representation for given object. |
static TextAlignment |
transposeAlignment(TextAlignment ta)
|
static Anchor |
transposeAnchor(Anchor an)
Transposes the anchor |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CHART_MAX_ROW
Constructor Detail |
public ChartUtil()
Method Detail |
public static final boolean isColorTransparent(ColorDefinition cdef)
cdef
-
public static final boolean isShadowDefined(Label la)
la
-
public static final boolean mathEqual(double v1, double v2)
v1
- v2
- public static final boolean mathNE(double v1, double v2)
v1
- v2
- public static final boolean mathLT(double lv, double rv)
public static final boolean mathLE(double lv, double rv)
public static final boolean mathGT(double lv, double rv)
public static final boolean mathGE(double lv, double rv)
lv
- rv
- public static final double convertPixelsToPoints(IDisplayServer idsSWT, double dOriginalHeight)
idsSWT
- dOriginalHeight
-
public static final int getQuadrant(double dAngle)
dAngle
-
public static boolean intersects(Polygon pg1, Polygon pg2)
pg1
- pg2
-
public static void mergeFont(FontDefinition original, FontDefinition source)
original
- source
- public static java.lang.String stringValue(java.lang.Object value)
value
-
public static Fill convertFill(Fill fill, double dValue, Fill fNegative)
fill
- Fill to convertdValue
- numeric valuefNegative
- Fill for negative value. Useless for positive value or
MultipleFillpublic static Anchor transposeAnchor(Anchor an) throws java.lang.IllegalArgumentException
an
- anchor
java.lang.IllegalArgumentException
public static TextAlignment transposeAlignment(TextAlignment ta)
public static int convertUnitTypeToCalendarConstant(ScaleUnitType unitType)
unitType
- Scale unit type
public static int getSupportedMaxRowCount(RunTimeContext rtc)
public static java.lang.String[] getSupportedOutputFormats() throws ChartException
ChartException
public static boolean isOutputFormatSupport(java.lang.String output) throws ChartException
output
- current output format
ChartException
public static boolean isRightToLeftLocale(com.ibm.icu.util.ULocale lcl)
lcl
- locale to check direction
public static boolean checkDoublePrecise(double dValue)
dValue
-
public static double computeHeightOfOrthogonalAxisTitle(ChartWithAxes cm, IDisplayServer xs)
cm
- chart modelxs
- display server to compute pixel
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |