|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.devaki.nextobjects.util.NOTools
This class containts all properties load-dump plus some usefull functions
Field Summary | |
static java.lang.String |
APP_HOME
Directory of nextObjects |
static java.lang.String |
NEXTOBJECT_USER_HOME
Directory of nextObjects in the user home directory |
static java.awt.Color |
NO_LOG_BACKGROUND
Logger window background color |
static java.awt.Color |
NO_LOG_FOREGROUND
Logger window foreground color |
static java.lang.String |
NO_LOG_PATTERN
Logger window log pattern |
static java.util.Properties |
NO_PROPS
Properties of nextObjects |
static boolean |
save
Do we save properties whille quitting |
static java.lang.String |
TMP_DIR
Temporary Directory |
static java.util.Vector |
TORQUE_DB
List of supported database engines |
static java.lang.String |
TORQUE_HOME
Directory of Torque in the user home directory |
static java.util.Vector |
TORQUE_TYPES
List of supported datatypes |
static java.lang.String |
TORQUE_VERSION
Torque Version |
static java.lang.String |
USER_HOME
Home directory of the user currently using nextObjects |
Constructor Summary | |
NOTools()
Construct a 'NOHelper' object. |
Method Summary | |
static void |
createDirectory(java.lang.String path)
Given a path string create all the directories in the path. |
static boolean |
deleteFile(java.io.File file)
Deletes a file or a directory along with all files and directories it contains. |
static int |
distance(java.awt.Point p1,
java.awt.Point p2)
Calcultate distance |
static int |
getCardType(Association theAssociation)
return the type of the relation (11,1N,1N) so we know wich Merise rule to apply for a given association (cardinalities) card_is 01 11 0N 1N (right) is_card -------------------------------- 01 | 11 11 1N 1N 11 | 11 11 1N 1N 0N | 1N 1N NM NM 1N | 1N 1N NM NM (left) |
static java.lang.String |
getJavaName(java.lang.String schemaName)
Converts a database schema name to java object name. |
static java.awt.Point |
getMiddle(java.awt.Point pA,
java.awt.Point pB)
Calculate middle |
static java.util.Properties |
getNOProperties()
Give a reference to the app Properties. |
static javax.swing.ImageIcon |
loadIconResource(java.lang.String pImgName)
Load an icon |
void |
loadProperties()
Load preferences from the 'NO_PREFS' properties file |
void |
loadTorqueType()
Load torque types. |
static void |
saveProperties()
Save preferences to the 'NO_PREFS' properties file |
static void |
unzip(java.lang.String file,
java.lang.String dest,
javax.swing.JProgressBar jProgressBar)
Unzip a fie |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean save
public static final java.lang.String TORQUE_VERSION
public static final java.lang.String APP_HOME
public static final java.lang.String USER_HOME
public static final java.lang.String NEXTOBJECT_USER_HOME
public static final java.lang.String TORQUE_HOME
public static final java.lang.String TMP_DIR
public static java.util.Properties NO_PROPS
public static final java.util.Vector TORQUE_DB
public static final java.util.Vector TORQUE_TYPES
public static final java.awt.Color NO_LOG_FOREGROUND
public static final java.awt.Color NO_LOG_BACKGROUND
public static final java.lang.String NO_LOG_PATTERN
Constructor Detail |
public NOTools()
Method Detail |
public void loadTorqueType()
public static final javax.swing.ImageIcon loadIconResource(java.lang.String pImgName)
pImgName
- the name of the image
public void loadProperties()
public static void saveProperties()
public static final boolean deleteFile(java.io.File file)
file
- the file or directory to delete
public static void createDirectory(java.lang.String path)
path
- Directory path string.public static int distance(java.awt.Point p1, java.awt.Point p2)
p1
- the A pointp2
- the B point
public static java.awt.Point getMiddle(java.awt.Point pA, java.awt.Point pB)
pA
- the A pointpB
- the B point
public static void unzip(java.lang.String file, java.lang.String dest, javax.swing.JProgressBar jProgressBar) throws java.util.zip.ZipException, java.io.IOException
file
- the filedest
- the destination directoryjProgressBar
- the load advance
java.util.zip.ZipException
java.io.IOException
public static int getCardType(Association theAssociation)
theAssociation
- the association to indentify
public static java.lang.String getJavaName(java.lang.String schemaName)
schemaName
- name to be converted.
org.apache.torque.engine.database.model.NameGenerator
,
#underscoreMethod(String)
public static java.util.Properties getNOProperties()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |