|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.common.constants.EnvConstants
org.compiere.util.Env
public final class Env
System Environment and static variables
| Field Summary | |
|---|---|
static String |
GOOGLE_MAPS_URL_PREFIX
|
static String |
LANGUAGE
Context Language identifier |
static String |
NL
New Line |
static BigDecimal |
ONE
Big Decimal 1 |
static BigDecimal |
ONEHUNDRED
Big Decimal 100 |
static BigDecimal |
ZERO
Big Decimal 0 |
| Fields inherited from class org.compiere.common.constants.EnvConstants |
|---|
TAB_INFO, WINDOW_ACCOUNT, WINDOW_CUSTOMIZE, WINDOW_FIND, WINDOW_INFO, WINDOW_MLOOKUP |
| Constructor Summary | |
|---|---|
Env()
|
|
| Method Summary | |
|---|---|
static void |
clearContext()
Clean up all context (i.e. delete it) |
static void |
clearContext(Ctx ctx)
Clean up all context (i.e. delete it) |
static void |
clearWinContext(Ctx ctx,
int WindowNo)
Clean up context for Window (i.e. delete it) |
static void |
clearWinContext(int WindowNo)
Clean up context for Window (i.e. delete it) |
static int |
createWindowNo(Container win)
Add Container and return WindowNo. |
static void |
exitEnv(int status)
Exit System |
static String |
getAD_Language(Ctx ctx)
Get System AD_Language |
static Ctx |
getCtx()
Get Client Context |
static JFrame |
getFrame(Container container)
Get Frame of Window |
static Graphics |
getGraphics(Container container)
Get Graphics of container or its parent. |
static String |
getHeader(Ctx ctx,
int WindowNo)
Get Header info (connection, org, user) |
static Image |
getImage(String fileNameInImageDir)
Get Image with File name |
static ImageIcon |
getImageIcon(String fileNameInImageDir)
Get ImageIcon. |
static Language |
getLanguage(Ctx ctx)
Get System Language |
static Language |
getLoginLanguage(Ctx ctx)
Get Login Language |
static Window |
getParent(Container container)
Return JDialog or JFrame Parent |
static String |
getPreference(Ctx ctx,
int AD_Window_ID,
String context,
boolean system)
Get Preference. |
static JFrame |
getWindow(int WindowNo)
Return the JFrame pointer of WindowNo - or null |
static int |
getWindowNo(Container container)
Search Window by comparing the Frames |
static boolean |
hideWindow(CFrame window)
Hide Window |
static boolean |
isBaseLanguage(Ctx ctx,
String tableName)
Check Base Language |
static boolean |
isBaseLanguage(Language language,
String tableName)
Check Base Language |
static boolean |
isBaseLanguage(String AD_Language,
String tableName)
Check Base Language |
static boolean |
isBaseTranslation(String tableName)
Table is in Base Translation (AD) |
static boolean |
isMac()
Do we run on Apple |
static boolean |
isMultiLingualDocument(Ctx ctx)
Do we have Multi-Lingual Documents. |
static boolean |
isWindows()
Do we run on Windows |
static String |
parseContext(Ctx ctx,
int WindowNo,
String value,
boolean onlyWindow)
Parse Context replaces global or Window context @tag@ with actual value. |
static String |
parseContext(Ctx ctx,
int WindowNo,
String value,
boolean onlyWindow,
boolean ignoreUnparsable)
Parse Context replaces global or Window context @tag@ with actual value. |
static void |
reset(boolean finalCall)
Reset Cache |
static boolean |
showWindow(int AD_Window_ID)
Show Window |
static void |
sleep(int sec)
Sleep |
static void |
startBrowser(String url)
Start Browser |
static Language |
verifyLanguage(Ctx ctx,
Language language)
Verify Language. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String GOOGLE_MAPS_URL_PREFIX
public static final String LANGUAGE
public static final BigDecimal ZERO
public static final BigDecimal ONE
public static final BigDecimal ONEHUNDRED
public static final String NL
| Constructor Detail |
|---|
public Env()
| Method Detail |
|---|
public static void exitEnv(int status)
status - System exit status (usually 0 for no error)public static void reset(boolean finalCall)
finalCall - everything otherwise login data remainspublic static final Ctx getCtx()
public static String getPreference(Ctx ctx,
int AD_Window_ID,
String context,
boolean system)
0) Current Setting
1) Window Preference
2) Global Preference
3) Login settings
4) Accounting settings
ctx - contextAD_Window_ID - window nocontext - Entity to searchsystem - System level preferences (vs. user defined)
public static boolean isBaseLanguage(Ctx ctx,
String tableName)
ctx - contexttableName - table to be translated
public static boolean isBaseLanguage(String AD_Language,
String tableName)
AD_Language - languagetableName - table to be translated
public static boolean isBaseLanguage(Language language,
String tableName)
language - languagetableName - table to be translated
public static boolean isBaseTranslation(String tableName)
tableName - table
public static boolean isMultiLingualDocument(Ctx ctx)
ctx - context
public static String getAD_Language(Ctx ctx)
ctx - context
public static Language getLanguage(Ctx ctx)
ctx - context
public static Language getLoginLanguage(Ctx ctx)
ctx - context
public static Language verifyLanguage(Ctx ctx,
Language language)
ctx - might be updated with new AD_Languagelanguage - language
public static String getHeader(Ctx ctx,
int WindowNo)
ctx - contextWindowNo - window
public static void clearWinContext(Ctx ctx,
int WindowNo)
ctx - contextWindowNo - windowpublic static void clearContext(Ctx ctx)
ctx - context
public static String parseContext(Ctx ctx,
int WindowNo,
String value,
boolean onlyWindow,
boolean ignoreUnparsable)
ctx - contextWindowNo - Number of Windowvalue - Message to be parsedonlyWindow - if true, no defaults are usedignoreUnparsable - if true, unsuccessful return parsed String or "" if not successful and ignoreUnparsable
public static String parseContext(Ctx ctx,
int WindowNo,
String value,
boolean onlyWindow)
ctx - contextWindowNo - Number of Windowvalue - Message to be parsedonlyWindow - if true, no defaults are used
public static int createWindowNo(Container win)
win - window
public static int getWindowNo(Container container)
container - container
public static JFrame getWindow(int WindowNo)
WindowNo - window
public static void clearWinContext(int WindowNo)
WindowNo - windowpublic static void clearContext()
public static JFrame getFrame(Container container)
container - Container
public static Graphics getGraphics(Container container)
container - Container
public static Window getParent(Container container)
container - Container
public static Image getImage(String fileNameInImageDir)
fileNameInImageDir - full file name in imgaes folder (e.g. Bean16.gif)
public static ImageIcon getImageIcon(String fileNameInImageDir)
fileNameInImageDir - full file name in images folder (e.g. Bean16.gif)
public static void startBrowser(String url)
url - urlpublic static boolean isMac()
public static boolean isWindows()
public static boolean hideWindow(CFrame window)
window - window
public static boolean showWindow(int AD_Window_ID)
AD_Window_ID - window
public static void sleep(int sec)
sec - seconds
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||