zoukankan      html  css  js  c++  java
  • Customize Netbeans Platform Splash Screen and About Dialog

    原帖一直打不开,通过谷歌翻译找到的

    http://blogs.kiyut.com/tonny/2007/10/18/customize-netbeans-platform-splash-screen-and-about-dialog/

    http://translate.google.com.hk/translate?hl=zh-CN&sl=en&tl=zh-CN&u=http%3A%2F%2Fblogs.kiyut.com%2Ftonny%2F2007%2F10%2F18%2Fcustomize-netbeans-platform-splash-screen-and-about-dialog%2F&anno=2

    ————————————————————————————————————————————————————————————————————

    Inspiration and Expression

    KIYUT Developer Blog

    Customize Netbeans Platform Splash Screen and About Dialog

    October 18th, 2007 | by Tonny Kohar |

    During development of our product Sketsa SVG Editor , we need to customize the default Netbeans Platform About Dialog and splash screen as part our product branding.

    Nb Platform default about dialogNb Platform custom about dialog

    Note: this is tested on Netbeans IDE 6-beta1

    Customize the Splash Screen

    Create the image using any image editor application to suit your particular branding. If you want to have single image for both splash and about dialog, please make sure the image have dimension 259×252 px, so it will fit nicely with the available image space in the about dialog.

    Note: the about dialog will automatically use the splash screen image, if it is not supplied with its own image to use.

    Update: On Netbeans 6 beta2, it no longer share the splash and about image, so you need to have two files ready: splash.gif and about.png

    Now on the project suite node right click and choose properties, and go to Build-Splash Screen section. Click the browse and select your desired image for the splash screen.

    In this dialog you may also customize the progress bar and running text color, size, and position

    Customize the About Dialog

    On the about dialog you may customize the copyright info using the following methods. In the project suite (under File, not project) expand the branding folder as show in the image

    Nb Platform branding folder

    Add the following in the Bundle.properties

      LBL_Copyright =< div style = "font-size : 12pt; font-family : Verdana, 'Verdana CE', Arial, 'Arial CE', 'Lucida Grande CE', lucida, 'Helvetica CE', sans-serif; " >
     Copyright & copy ; 2003 - 2007 KIYUT. Please visit < a style = "color : # 1E2A60;" href = "http : //www.kiyut.com" > http : //www.kiyut.com</a>.<br>
     Warning : This computer program is protected by copyright law and international treaties. Unauthorized reproduction or distribution may result in severe civil and criminal penalties, and will be prosecuted to the maximum extend possible under the law. </ div > 

    Customize the About Dialog Image (Optional)

    If you need to have different image for splash and about dialog, you need to supply the about image file.
    The image must be named about.png (not gif) with dimension 259×252 px.

    The file about.png must be placed under

    Nb Platform branding folder



    Tags: , , , ,

    1. 41 Responses to “Customize Netbeans Platform Splash Screen and About Dialog”

    2. By Azlan Aziz on Dec 17, 2007 | Reply

      Dear Tony,

      Thanks for the article.

      I have managed to customize the About dialog box in NB6. However, how do I change the link (www.netbeans.org) when the top image is double clicked?

      Thanks

    3. By Tonny Kohar on Dec 18, 2007 | Reply

      To customize the link for the About image, you need to add the following into the org-netbeans-core.jar bundle.properties (the bundle.properties where you set LBL_Copyright)

        URL_ON_IMG = http : //www.kiyut.com/ 
    4. By Tom Wheeler on Feb 14, 2008 | Reply

      Hi Tonny: I just wanted to drop a quick note to say that this blog entry really helped me today when I was trying to remember where the URL_ON_IMG property gets set. Nice work!

    5. By Jaideep Ganguli on Feb 24, 2008 | Reply

      Hi Tonny: I tried this with NetBeans IDE 6.0 (Build 200711261600) and it doesn't seem to be picking up my branding. It does pick up the Branding image but not the URL_ON_IMG and LBL_Copyright. Any ideas if this changed since the Beta version.

      Thanks very much.

    6. By Tonny Kohar on Feb 25, 2008 | Reply

      @Jaideep

      As far as I know, it is working up to Netbeans 6.0.1, because we use it. Please make sure you put your branding in the correct bundle.properties and folder (core and module folder is different).

      Also note that since Netbeans 6-beta2, it no longer share splash and about image, so you need both of them

    7. By Emmanuel on Mar 12, 2008 | Reply

      Nice tutorial, I've been trying to know how to do this for the past 6 months!!!

      THANKS!

    8. By Steve Nelson on Mar 26, 2008 | Reply

      Thanks Tonny.

      By the way, if the folder org-netbeans-core.jar is not there, you can create it along with the other folders org, netbeans, core and ui then create a Bundle.properties file and add the information in you have supplied.

    9. By Isak on Jun 10, 2008 | Reply

      Thanks

      But beware: not only will you maybe have to make the correct directories, but also make sure the org/netbeans/etc. is within the org-netbeans-core.jar file.

      Still works with NB6.1

    10. By John on Jul 29, 2008 | Reply

      I cannot get this to work. I am using the netbeans platform but not the IDE. I've been using Netbeans since 5.0 and have had branding working fine. However, with the upgrade to 6, my picture is no longer being used. Do I have to rename my branding jar to org-netbeans-core.jar? If not, where do I need to install it so netbeans uses it?

    11. By Tonny Kohar on Jul 30, 2008 | Reply

      @John

      It is very important to use the correct folder structure and the naming of jar is very important as well.

    12. By ufak on Feb 25, 2009 | Reply

      Is the size 259×252 right?
      It is a rectangle, not square.
      I have my splash 432×266. It was made according to some splash image in NB 6.1.

    13. By Tonny Kohar on Feb 25, 2009 | Reply

      @ufak

      As far as I know Netbeans does not put a constraint for the image size. So you could use any reasonable size for the image.

    14. By Tonny Kohar on Feb 25, 2009 | Reply

      @ufak

      Ahh almost forget. The important things is the folder structure, not the image size

    15. By Ouaibsky on Mar 28, 2009 | Reply

      Hi,

      I have a question about splash image. I try to put an image with a blurred border. To do that my image has transparency color.
      When i configure this image with netbeans wizard (project properties) , i can see that i have a splash.gif file (and when i open it into netbeans, display it correct) but when i start my application, there is a background color (blank) which is applied and my splash is so … ugly.

      Somebody has try this (a basic example is to make a splash with round corner) ?

      can we use another image format ?

      Thx
      Christophe

    16. By Olivier on Apr 2, 2009 | Reply

      Hi,

      We have been trying to change the Application Icon. There is an option under Properties/Build but it does nothing. If you look at the help it says:

      “Note that this icon does not set the executable's icon. If you want to customize the executable's icon, you need to make use of an external resource editor, many of which are freely available on-line.”

      but they don't say what needs to be edited in the first place. Any help will be greatly appreciated.

    17. By Tonny Kohar on Apr 2, 2009 | Reply

      @Olivier

      For Application icon, please see this blog entry
      http://blogs.kiyut.com/tonny/2007/08/06/netbeans-platform-branding-and-version-info/ and add the following to the build-brand ant target

       

      Please make sure it is gif file not png file. And this is the icon for the window frame. it is not executable icon (Java is cross platform), so it does not depend on any executable (exe, sh, etc)

    18. By Philip Joslin on Jun 3, 2009 | Reply

      Thanks for this post on branding. Can you tell me where to look to change the start page as well in NetBeans or provide my own start page (when I run a module based on the NetBeans IDE)? I see it in their “welcome” project in the NetBeans build, but I want to incorporate this into my own module (app). Thanks again.

    19. By Tonny Kohar on Jun 3, 2009 | Reply

      @Philip

      Although I never tried it, but by looking at the Netbeans source code, the welcome screen/start page is easily customizable by the resource branding and layer.xml

      So based on the above, I guess you can easily branding the welcome screen by branding the resource bundle as described in
      http://blogs.kiyut.com/tonny/2008/02/13/netbeans-platform-localization-and-branding-trick/

      Another way, is to create you own welcome screen (it is just a TopComponent). But if you create your own you must implement your own url fetching.

      note: I haven't tried branding welcome screen, so it might or might not works.

    20. By Susan Montgomery on Jul 15, 2009 | Reply

      I've got almost everything going for the about dialog. I have one problem with resizing the About dialog. I am using a different image for the splash and about because the splash image is too large for the About dialog. Is it possible to set the height and width of the About dialog in this situation?

      Thanks for your branding posting. It was a huge help.

    21. By Tonny Kohar on Jul 15, 2009 | Reply

      @Susan

      Unfortunately, as far as I know, there is no way to specify the width * height for the About Dialog explicitly.

      However, you can influence the width (not height) by using the about.gif (width of the image) as the width of the About Dialog.

      note: it is the width of the image plus some few pixel margin.

    22. By Stevy on Aug 4, 2009 | Reply

      How can I disable the link?

    23. By Tonny Kohar on Aug 5, 2009 | Reply

      @Stevy

      If you mean disable the link on the About Dialog. then just leave url empty eg:

        URL_ON_IMG = 
    24. By Sarah Kho on Aug 27, 2009 | Reply

      Very good blog.
      I though I should add that the branding folder which contains code and modules should be right inside the suite folder.

      Thanks for your blog.

    25. By Savin on Oct 7, 2009 | Reply

      Thanks for this post. I am starting with NetBeans Platform development using NB 6.7. Created a platform application, was able to brand the splash screen but for some reason the about dialog text does not seem to change. The image on the about dialog has changed. I tried as described above by adding LBL_Copyright in Bundle.properties under Branding/Modules…
      Any help is greatly appreciated.

    26. By Tonny Kohar on Oct 7, 2009 | Reply

      @Savin

      The LBL_Copyright must be located under Branding/Modules/… in the suite project (not in the module project) and make sure the path is correct.

    27. By Doug on Nov 19, 2009 | Reply

      I recently upgraded my custom branded project from 6.5 to 6.7.1. If I run the application from NB, or if I run in debug mode, the images show as expected. However, after building the distribution package, the images and all other branding are no longer there, and the default values are used. Any ideas? Thank you.

    28. By Tonny Kohar on Nov 23, 2009 | Reply

      @Doug,

      Please try to clean and rebuild.

    29. By Veronica Moreno on Feb 8, 2010 | Reply

      Hello, I've been trying to change the about image. I did set the image.png in the startup folder, clean the project but it doesn't change it. Do I need to do something else?

    30. By Tonny Kohar on Feb 9, 2010 | Reply

      @Veronica

      make sure the path is correct and it must be under project suite

    31. By Veronica Moreno on Feb 9, 2010 | Reply

      @Tonny

      Thank you very much Tonny, I checked it and you were right! Thanks a lot

    32. By Roxie on Mar 27, 2010 | Reply

      Using NetBeans 6.8:
      The project must include the platform11 / Core-UI Platform Module or the About menu item will not show up. The automatic resolver didn't include this module.
      Also, the Feedreader sample's About screen worked with just the splash.gif (no about.png) so apparently they've resolved that problem too.
      Thanks for all the hints here!

    33. By Tushar Joshi on Oct 4, 2010 | Reply

      The latest NetBeans IDE version 6.9.1 has a good resource editor for Branding Platform applications. We can change icons, splash screen, and even the resource text from this dialog box and the related Bundle.properties files are automatically written by that dialog box.

      IMO branding platform application in NetBeans has become a piece of cake. I am loving it.

      with regards
      Tushar Joshi, Nagpur

    34. By Magesh kumar on Oct 7, 2010 | Reply

      HI,

      Can you help me to create customized Start Page in Netbeans through Help->Start page.

      Thanks,
      Magesh kumar J

    35. By Pankaj on Jan 10, 2011 | Reply

      Hi,

      I want to add some more information in the About Dialog for my product.
      The default information displayed is :

      Product Version: NetBeans IDE 6.5 (Build 200811100001)
      Java: 1.6.0_11; Java HotSpot(TM) Client VM 11.0-b16
      System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
      Userdir: C:Documents and Settingsuser1.netbeans6.5

      I have seen the bundle.properties where you can specify the copyright information. But I also need to add some other information, the values of which will be populated dynamically.
      EG: The Session start time or the user logged in.

      Can you please provide some help on this.

      Thanks in advance.
      -Pankaj

    36. By Tonny Kohar on Jan 11, 2011 | Reply

      @Pankaj

      As far as I know, currently the About Dialog is not very customizable. You can only change a little bit through properties file.

      So if you want to customize it, IMHO the best way is to hide the original About Box through layer.xml, and create your own About Box and put it into the layer.xml.

    37. By Pankaj on Jan 13, 2011 | Reply

      @Tonny:
      Thanks for your reply. Can you please let me know where I can find this layer.xml?

    38. By Tonny Kohar on Jan 14, 2011 | Reply

      @Pankaj

      For more info regarding layer.xml, please read the following

      - http://wiki.netbeans.org/DevFaqSystemFilesystem
      - http://wiki.netbeans.org/DevFaqModulesLayerFile

      and
      - http://wiki.netbeans.org/DevFaqActionAddMenuBar

      One of the simple ways, is to add action to the menu bar for displaying your own created About Dialog

    39. By Darren on Jun 2, 2011 | Reply

      hi,Tonny

      after branding.click the image,netbeans will open the internal browser.I want to open a system default browser.how can I do.

      Thanks

    40. By Tonny Kohar on Jun 3, 2011 | Reply

      @darren,

      To enable external (system default browser), please include external html broswer under ide cluster.

      To enable it:
      - On the suite project, right click choose properties
      - Go to Library section
      - Under ide section, tick the external html browser
      - As usual just rebuild and done

    41. By Dave on Jun 19, 2012 | Reply

      I have a similar issue to Darren. I have managed to change the url that is launched when clicking on the about box image, but want it to open in the external (system default) browser. My project is a maven project. Do I need to include an external html browser dependency?

    42. By Tonny Kohar on Jun 19, 2012 | Reply

      @dave,

      yes you need to include external html browser

  • 相关阅读:
    android activity 生命周期
    Android event logcat的研究
    关于new enhancement的一些知识
    LEAVE LIST-PROCESSING和LEAVE TO LIST-PROCESSING事件的作用
    报错消息写在AT SELECTION-SCREEN OUTPUT和START-OF-SELECTION事件下的区别
    字符串的 Base64 加密和解密
    接口的学习
    IDOC
    ABAP文件上传下载 用SMW0
    获取本机信息如IP 电脑名称等类
  • 原文地址:https://www.cnblogs.com/cuizhf/p/3505947.html
Copyright © 2011-2022 走看看