|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.editor.EditorUtilities
public class EditorUtilities
A collection of useful methods
Copyright (c) Formaria Ltd., 2002-2003
$Revision: 1.13 $
License: see License.txt
| Constructor Summary | |
|---|---|
EditorUtilities()
|
|
| Method Summary | |
|---|---|
static void |
buildPath(java.io.File file)
|
static void |
buildPath(java.lang.String path)
|
static void |
centreDialog(javax.swing.JDialog dlg)
|
static void |
centreWindow(java.awt.Window window,
java.awt.Dimension windowSize)
|
static boolean |
copy(java.io.InputStream is,
java.io.OutputStream os)
Copy a stream specified by the source path to the target path |
static boolean |
copyFile(java.io.InputStream is,
java.lang.String target)
Copy a file specified by the source path to the target path |
static boolean |
copyFile(Project currentProject,
java.lang.Class clazz,
java.lang.String source,
java.lang.String target,
boolean noResMgr)
Copy a file specified by the source path to the target path |
static boolean |
copyFile(Project currentProject,
java.lang.String source,
java.lang.String target)
Copy a file specified by the source path to the target path |
static void |
copyJar(EditorProject currentProject,
java.lang.String jarName,
java.lang.String defFolder)
Copy the named jar. |
static void |
copyJar(java.lang.String projectPath,
java.lang.String jarName,
java.lang.String defFolder)
Copy the named jar. |
static void |
createDir(java.lang.String filename)
Create the directory specified by filename |
static NanoXmlElement |
createNanoXmlElement(XmlElement source)
Create an nanoxml version of the source node if it is not already a nanoxml node |
static java.lang.String |
getComponentClassName(java.awt.Component c)
|
static int |
replaceFileTokens(java.io.File source,
java.lang.String[] sourceTokens,
java.lang.String[] replacementTokens)
Update a file by replacing a set of tokens |
static void |
setDefaultFont(java.awt.Container cont)
Set the default font for all the components in this container. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EditorUtilities()
| Method Detail |
|---|
public static boolean copy(java.io.InputStream is,
java.io.OutputStream os)
is - the input streamos - the stream we want to write to
public static boolean copyFile(java.io.InputStream is,
java.lang.String target)
is - the file input streamtarget - the file we want to create
public static boolean copyFile(Project currentProject,
java.lang.Class clazz,
java.lang.String source,
java.lang.String target,
boolean noResMgr)
currentProject - the context for this methodclazz - a class whos classloader will be used to load the resourcesource - the file which we want to copytarget - the file we want to create
public static void buildPath(java.lang.String path)
public static void buildPath(java.io.File file)
public static boolean copyFile(Project currentProject,
java.lang.String source,
java.lang.String target)
source - the file which we want to copytarget - the file we want to create
public static void createDir(java.lang.String filename)
filename - the directory to createpublic static void setDefaultFont(java.awt.Container cont)
cont - the container
public static void centreWindow(java.awt.Window window,
java.awt.Dimension windowSize)
public static void centreDialog(javax.swing.JDialog dlg)
public static java.lang.String getComponentClassName(java.awt.Component c)
public static void copyJar(EditorProject currentProject,
java.lang.String jarName,
java.lang.String defFolder)
public static void copyJar(java.lang.String projectPath,
java.lang.String jarName,
java.lang.String defFolder)
public static int replaceFileTokens(java.io.File source,
java.lang.String[] sourceTokens,
java.lang.String[] replacementTokens)
source - the file to read and modifysourceTokens - the tokens to find and replacereplacementTokens - the new values to insert in the file
public static NanoXmlElement createNanoXmlElement(XmlElement source)
source - the source xml node
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||