Class MyGraphicsTools
java.lang.Object
de.ipk_gatersleben.ag_nw.graffiti.plugins.gui.layout_control.helper_classes.MyGraphicsTools
public class MyGraphicsTools extends Object
-
Constructor Summary
Constructors Constructor Description MyGraphicsTools()
-
Method Summary
Modifier and Type Method Description static void
drawBarChartVarianceLine(Graphics g, int height, int borderNode, int barWidth, double maxValue, Double curVariance, int x1, int y1, int w)
static void
drawFrame(Graphics g, Color color, Color color2, int x1, int y1, int w, int h)
static String
stringReplace(String s, String find, String replace)
Replace occurrences of a substring.
-
Constructor Details
-
MyGraphicsTools
public MyGraphicsTools()
-
-
Method Details
-
stringReplace
Replace occurrences of a substring. http://ostermiller.org/utils/StringHelper.html StringHelper.replace("1-2-3", "-", "|");
result: "1|2|3"
StringHelper.replace("-1--2-", "-", "|");
result: "|1||2|"
StringHelper.replace("123", "", "|");
result: "123"
StringHelper.replace("1-2---3----4", "--", "|");
result: "1-2|-3||4"
StringHelper.replace("1-2---3----4", "--", "---");
result: "1-2----3------4"- Parameters:
s
- String to be modified.find
- String to find.replace
- String to replace.- Returns:
- a string with all the occurrences of the string to find replaced.
- Throws:
NullPointerException
- if s is null.
-
drawFrame
- Parameters:
g
-color
-color2
-x1
-y1
-w
-h
-
-
drawBarChartVarianceLine
-