|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthalo.userinterface.gui.tools.Tools
public class Tools
Class containing several tools used for the graphical user interface
Constructor Summary | |
---|---|
Tools()
|
Method Summary | |
---|---|
static java.lang.String |
alignLabel(java.lang.String txt,
int width,
java.awt.FontMetrics fm)
Formats a text for a dialog window |
static double |
calculateMedianForHalfLives(double time,
Data data,
CorrectionFactors corr)
Calculates the average median over all three available half-life calculation methods |
static java.io.File |
displaySaveDialog(java.awt.Component comp,
java.lang.String text,
javax.swing.filechooser.FileFilter filter)
Displays a dialog that asks the user if he wants to save something into a file |
static java.util.ArrayList<java.lang.String> |
getColumnLabels(java.io.File file)
Reads the header/description line of a given file and provides all column labels (columns separated by tabulator) as a list |
static boolean |
hasLineColumns(java.lang.String line,
int columns)
Checks whether a line consists of at least the given number of columns, whereas columns are separated through any whitespace sign |
static boolean |
isLineValid(java.lang.String line)
Tests if a given line is composed of the letters a-z (case ignored), numbers or whitespace symbols like TAB |
static boolean |
testValidityForFile(java.io.File file,
int columns,
boolean permitUnusualLetters)
Tests the correctness of a given file according to format (= minimal number of columns has to be correct) and letters (= are there any unusual letters present?) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tools()
Method Detail |
---|
public static java.util.ArrayList<java.lang.String> getColumnLabels(java.io.File file)
file
- The file containing the expression data
public static boolean isLineValid(java.lang.String line)
line
- The line that will be tested
public static boolean hasLineColumns(java.lang.String line, int columns)
line
- The line that will be checked for validitycolumns
- The minimal number of columns that has to be in this line
public static boolean testValidityForFile(java.io.File file, int columns, boolean permitUnusualLetters)
file
- The input file that will be testedcolumns
- The minimal number of columns that has to be present in the file
public static java.lang.String alignLabel(java.lang.String txt, int width, java.awt.FontMetrics fm)
txt
- The original textwidth
- The width of the linefm
- The font metrics
public static java.io.File displaySaveDialog(java.awt.Component comp, java.lang.String text, javax.swing.filechooser.FileFilter filter)
comp
- The mother componenttext
- The text of the dialogfilter
- The file filter for the output file
public static double calculateMedianForHalfLives(double time, Data data, CorrectionFactors corr)
time
- The labeling time for the calculationsdata
- The datacorr
- The correction factors from normalization
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |