OpenJUMP with Wallpaper

From OpenJUMP Wiki
Revision as of 22:41, 18 October 2009 by Mentaer (talk | contribs) (Created page with 'that code adds a wallpaper to workbench's jdesktoppane. File:Oj_wallpaper.jpg # First add the image to ''com.vividsolutions.jump.workbench.ui.images'', where is the IconLoa…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

that code adds a wallpaper to workbench's jdesktoppane.

File:Oj wallpaper.jpg

  1. First add the image to com.vividsolutions.jump.workbench.ui.images, where is the IconLoader. you can download one from here
  2. Then modified the Configuration in OpenJUMP the class org.openjump.OpenJumpConfigurationin JUMP com.vividsolutions.jump.workbench.JUMPConfiguration

adding the follow code

first add the next method.

 private static void loadBackground(WorkbenchContext workbenchContext){

     /*setting the border with a image*/
     .getDesktopPane().setBorder(new Border() {
                public void paintBorder(Component c, Graphics g, 
                      int x, int y, int width, int height) {

               //the name of the image is walljump.png in this case            
                      0, 0, null);

    	        public Insets getBorderInsets(Component c) {
    	            return new Insets(0,0,0,0);

    	        public boolean isBorderOpaque() {
    	            return true;

        /*setting background white*/

and now call the method loadBackground from in (JUMP add the line in the method setup)

	public static void loadOpenJumpPlugIns(final WorkbenchContext workbenchContext) 
            throws Exception {




.. so that's all..