修改表单(form)在菜单上的显示图标

来源:互联网 发布:手机上淘宝号怎么申请 编辑:程序博客网 时间:2024/04/28 13:17

修改表单(form)在菜单上的显示图标

修改表单的图标,以区别于普通窗口。

1,  拷贝一个新的gif文件到.../client/Src/org/compiere/images文件夹下,注意文件大小,然后改名mForm.gif.

  

2,  修改MTreeNode.java类,声明一个常量,如下:

  public static int    TYPE_DOCACTION = 8; 

    /** start add by huhailong 20071115 */

    public static int    TYPE_FORM = 9;

    /** end add by huhailong 20071115 */

  

3,  修改MTreeNode.java类,修改IMAGES常量,如下:

  public static Icon[] IMAGES = new Icon[]

    {

       null,

       Env.getImageIcon("mWindow.gif"),

       Env.getImageIcon("mReport.gif"),

       Env.getImageIcon("mProcess.gif"),

       Env.getImageIcon("mWorkFlow.gif"),

       Env.getImageIcon("mWorkbench.gif"),

       Env.getImageIcon("mSetVariable.gif"),

       Env.getImageIcon("mUserChoice.gif"),

       Env.getImageIcon("mDocAction.gif"),

       /** start add by huhailong 20071115 */

       Env.getImageIcon("mForm.gif")

       /** end add by huhailong 20071115 */

    };

  

4修改MTreeNode.java类,修改getImageIndex(……)方法,如下:

  if (imageIndicator == null)

           ;

       else if (imageIndicator.equals(MWFNode.ACTION_UserWindow)      //  Window

           /** start comment by huhailong 20071115 */

           // || imageIndicator.equals(MWFNode.ACTION_UserForm)

           /** end comment by huhailong 20071115 */

           )

           imageIndex = TYPE_WINDOW;

       /** start add by huhailong 20071115 */

       else if (imageIndicator.equals(MWFNode.ACTION_UserForm))       //  Form

           imageIndex = TYPE_FORM;

       /** end add by huhailong 20071115 */

    ……

     }

  

5,重新编译base, client, 测试成功。   By Huhailong 20071115.

 
原创粉丝点击