Adempiere 3.5.2a

org.adempiere.webui.apps
Class AEnv

java.lang.Object
  extended by org.adempiere.webui.apps.AEnv

public final class AEnv
extends Object

Windows Application Environment and utilities

Version:
$Id: AEnv.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $ Colin Rooney (croo) & kstan_79 RFE#1670185
Author:
Jorg Janke

Constructor Summary
AEnv()
           
 
Method Summary
static void actionRefresh(Lookup lookup, Object value, boolean mandatory)
           
static void actionZoom(Lookup lookup, Object value)
           
static void cacheReset(String tableName, int Record_ID)
          Cache Reset
static boolean canAccessInfo(String infoWindowName)
          Validate permissions to access Info queries on the view menu
static void exit(int status)
          Exit System
static URI getImage(String fileNameInImageDir)
          Get ImageIcon.
static URI getImage2(String fileName)
          Get ImageIcon.
static char getMnemonic(String text)
          Get Mnemonic character from text.
static GridWindowVO getMWindowVO(int WindowNo, int AD_Window_ID, int AD_Menu_ID)
          Get Window Model
static String getServerVersion()
          Get Server Version
static boolean isServerActive()
          Is AppsServer Active ?
static boolean isWorkflowProcess()
          Is Workflow Process view enabled.
static void logout()
           
static void positionCenterScreen(Window window)
          Position window in center of the screen
static String postImmediate(int WindowNo, int AD_Client_ID, int AD_Table_ID, int Record_ID, boolean force)
          Post Immediate
static void showCenterScreen(Window window)
          Show in the center of the screen.
static void showCenterWindow(Window parent, Window window)
          Position in center of the parent window.
static void showScreen(Window window, int position)
          Show in the center of the screen.
static void showWindow(Window win)
           
static void startWorkflowProcess(int AD_Table_ID, int Record_ID)
          Start Workflow Process Window
static void zoom(int AD_Table_ID, int Record_ID)
          Zoom
static void zoom(int AD_Window_ID, MQuery query)
          Zoom to a window with the provided window id and filters according to the query
static void zoom(MQuery query)
          Zoom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AEnv

public AEnv()
Method Detail

showCenterScreen

public static void showCenterScreen(Window window)
Show in the center of the screen. (pack, set location and set visibility)

Parameters:
window - Window to position

positionCenterScreen

public static void positionCenterScreen(Window window)
Position window in center of the screen

Parameters:
window - Window to position

showScreen

public static void showScreen(Window window,
                              int position)
Show in the center of the screen. (pack, set location and set visibility)

Parameters:
window - Window to position
position - SwingConstants

showCenterWindow

public static void showCenterWindow(Window parent,
                                    Window window)
Position in center of the parent window. (pack, set location and set visibility)

Parameters:
parent - Parent Window
window - Window to position

getMnemonic

public static char getMnemonic(String text)
Get Mnemonic character from text.

Parameters:
text - text with '&'
Returns:
Mnemonic or 0

zoom

public static void zoom(int AD_Table_ID,
                        int Record_ID)
Zoom

Parameters:
AD_Table_ID -
Record_ID -

exit

public static void exit(int status)
Exit System

Parameters:
status - System exit status (usually 0 for no error)

logout

public static void logout()

isWorkflowProcess

public static boolean isWorkflowProcess()
Is Workflow Process view enabled.

Returns:
true if enabled

startWorkflowProcess

public static void startWorkflowProcess(int AD_Table_ID,
                                        int Record_ID)
Start Workflow Process Window

Parameters:
AD_Table_ID - optional table
Record_ID - optional record

isServerActive

public static boolean isServerActive()
Is AppsServer Active ?

Returns:
true if active

getServerVersion

public static String getServerVersion()
Get Server Version

Returns:
Apps Server Version
See Also:
ALogin.checkVersion()

getMWindowVO

public static GridWindowVO getMWindowVO(int WindowNo,
                                        int AD_Window_ID,
                                        int AD_Menu_ID)
Get Window Model

Parameters:
WindowNo - Window No
AD_Window_ID - window
AD_Menu_ID - menu
Returns:
Model Window Value Obkect

postImmediate

public static String postImmediate(int WindowNo,
                                   int AD_Client_ID,
                                   int AD_Table_ID,
                                   int Record_ID,
                                   boolean force)
Post Immediate

Parameters:
WindowNo - window
AD_Table_ID - Table ID of Document
AD_Client_ID - Client ID of Document
Record_ID - Record ID of this document
force - force posting
Returns:
null if success, otherwise error

cacheReset

public static void cacheReset(String tableName,
                              int Record_ID)
Cache Reset

Parameters:
tableName - table name
Record_ID - record id

canAccessInfo

public static boolean canAccessInfo(String infoWindowName)
Validate permissions to access Info queries on the view menu

Returns:
true if access is allowed

actionRefresh

public static void actionRefresh(Lookup lookup,
                                 Object value,
                                 boolean mandatory)

actionZoom

public static void actionZoom(Lookup lookup,
                              Object value)
Parameters:
lookup -
value -

zoom

public static void zoom(int AD_Window_ID,
                        MQuery query)
Zoom to a window with the provided window id and filters according to the query

Parameters:
AD_Window_ID - Window on which to zoom
query - Filter to be applied on the records.

showWindow

public static void showWindow(Window win)

zoom

public static void zoom(MQuery query)
Zoom

Parameters:
query - query

getImage

public static URI getImage(String fileNameInImageDir)
Get ImageIcon.

Parameters:
fileNameInImageDir - full file name in imgaes folder (e.g. Bean16.gif)
Returns:
image

getImage2

public static URI getImage2(String fileName)
Get ImageIcon. This method different from getImageIcon where the fileName parameter is without extension. The method will first try .gif and then .png if .gif does not exists.

Parameters:
fileName - file name in imgaes folder without the extension(e.g. Bean16)
Returns:
image

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.