|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsources.Utils
A class with static utility functions
Constructor Summary | |
Utils()
Creates new Utils |
Method Summary | |
static void |
arrangeDesktopCascade(javax.swing.JDesktopPane pane)
|
static void |
arrangeDesktopNext(javax.swing.JDesktopPane pane)
|
static void |
changeOrder(int oldpos,
int newpos,
int[] array)
|
static int[] |
createCatsAnzFeld(CategorialVariable[] vs)
creates the catsAnzFeld, an array with the number of categories for each variable |
static int[] |
createMosaic(CategorialVariable[] vs,
int[] catsanzfeld)
creates an int array of mosaics |
static CategorialVariable |
createNewFromSelected(CategorialVariable catvar,
Selectioner slect,
int nid)
|
static ContinuousVariable |
createNewFromSelected(ContinuousVariable catvar,
Selectioner slect,
int nid)
|
static boolean |
iscont(java.lang.String c)
|
static boolean |
isDataSetFile(java.io.File f,
java.lang.String[] str)
|
static boolean |
isImageFile(java.io.File f,
java.lang.String[] str)
|
static boolean |
isMapFile(java.io.File f,
java.lang.String[] str)
|
static boolean |
isord(java.lang.String c)
|
static boolean |
isPotentialPopupTrigger(java.awt.event.MouseEvent e)
|
static void |
main(java.lang.String[] args)
test |
static CategorialVariable |
makeCat(Variable var)
|
static ContinuousVariable |
makeCont(Variable var)
|
static java.awt.Polygon |
paintArrow(int x1,
int y1,
int x2,
int y2,
float thick)
Paints an arrow |
static java.awt.Polygon |
paintBar(int x1,
int y1,
int x2,
int y2,
float thick)
|
static java.awt.geom.GeneralPath |
paintCubicArrow(int x1,
int y1,
int xp1,
int yp1,
int xp2,
int yp2,
int x2,
int y2,
float thick)
|
static java.awt.geom.GeneralPath |
paintCurveArrow(int x1,
int y1,
int xp,
int yp,
int x2,
int y2,
float thick)
paints a curve arrow |
static void |
paintVertString(java.awt.Graphics g,
int x,
int y,
java.lang.String s)
paints a string vetically |
static void |
quicksort1(int left,
int right,
int[] array,
int[] listarray,
boolean up)
Quicksort Algorithm for int |
static void |
quicksort2(int left,
int right,
double[] array,
int[] listarray,
boolean up)
Quicksort Algorithm for double |
static void |
quicksort3(int left,
int right,
java.lang.String[] array,
int[] listarray,
boolean up)
Quicksort Algorithm for String |
static double |
round(double val,
double anzst)
rounds a double |
static void |
swap(int x,
int y,
int[] listarray)
help function for quicksort |
static java.lang.String |
truncTo(java.lang.String s,
int n)
truncs a String |
static double |
trunctoafterComma(double s,
int n)
truncates a double value |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Utils()
Method Detail |
public static double round(double val, double anzst)
val
- the double valueanzst
- the #numbers to round
public static java.lang.String truncTo(java.lang.String s, int n)
s
- the String to truncn
- the number of characters to trunc to
public static double trunctoafterComma(double s, int n)
s
- the double valuen
- the number of chars after comma
public static void quicksort1(int left, int right, int[] array, int[] listarray, boolean up)
left
- left borderright
- right borderarray
- the array to sortlistarray
- the array that is sorted instead of the arrayup
- true: sort upwards
false: sort downwardspublic static void quicksort2(int left, int right, double[] array, int[] listarray, boolean up)
left
- left borderright
- right borderarray
- the array to sortlistarray
- the array that is sorted instead of the arrayup
- true: sort upwards
false: sort downwardspublic static void quicksort3(int left, int right, java.lang.String[] array, int[] listarray, boolean up)
left
- left borderright
- right borderarray
- the array to sortlistarray
- the array that is sorted instead of the arrayup
- true: sort upwards
false: sort downwardspublic static void swap(int x, int y, int[] listarray)
x
- first value to swapy
- 2nd value to swaplistarray
- the array to swappublic static int[] createMosaic(CategorialVariable[] vs, int[] catsanzfeld)
vs
- the categorial Variables to build the mosaic ofcatsanzfeld
- the catsanzfeld, see createCatsAnzFeld(...)
public static int[] createCatsAnzFeld(CategorialVariable[] vs)
vs
- the araay of categorial variables
public static void main(java.lang.String[] args)
args
- the argspublic static void paintVertString(java.awt.Graphics g, int x, int y, java.lang.String s)
g
- the Graphics to paint onx
- the x coordinatey
- the y coordinates
- the String to drawpublic static java.awt.Polygon paintArrow(int x1, int y1, int x2, int y2, float thick)
x1
- source x-coordinatey1
- source y-coordinatex2
- target x-coordinatey2
- target y-coordinatethick
- the thickness of the arrow
public static java.awt.Polygon paintBar(int x1, int y1, int x2, int y2, float thick)
public static java.awt.geom.GeneralPath paintCurveArrow(int x1, int y1, int xp, int yp, int x2, int y2, float thick)
x1
- start x coordinatey1
- start y coordinatexp
- x coordinate of transfer pointyp
- y coordinate of transfer pointx2
- end x coordinatey2
- end y coordinatethick
- thickness of the arrow
public static java.awt.geom.GeneralPath paintCubicArrow(int x1, int y1, int xp1, int yp1, int xp2, int yp2, int x2, int y2, float thick)
x1
- y1
- xp1
- yp1
- xp2
- yp2
- x2
- y2
- thick
-
public static CategorialVariable createNewFromSelected(CategorialVariable catvar, Selectioner slect, int nid)
public static ContinuousVariable createNewFromSelected(ContinuousVariable catvar, Selectioner slect, int nid)
public static boolean isPotentialPopupTrigger(java.awt.event.MouseEvent e)
public static boolean iscont(java.lang.String c)
public static boolean isord(java.lang.String c)
public static CategorialVariable makeCat(Variable var)
public static ContinuousVariable makeCont(Variable var)
public static void arrangeDesktopNext(javax.swing.JDesktopPane pane)
public static void arrangeDesktopCascade(javax.swing.JDesktopPane pane)
public static void changeOrder(int oldpos, int newpos, int[] array)
public static boolean isImageFile(java.io.File f, java.lang.String[] str)
public static boolean isDataSetFile(java.io.File f, java.lang.String[] str)
public static boolean isMapFile(java.io.File f, java.lang.String[] str)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |