Monday Jun 16, 2008

How to Cripple the NetBeans Window System

Are you building an application using NetBeans platform? Then perhaps you may find the NetBeans window system too feature rich - why would you let users drag and drop windows to destroy your deeply thought-out window layout? Who would want to minimize the window you've spent so much work on? Floating windows? - that's just a plain silly idea...

Well, here's the good news: now in NetBeans 6.5M1 you can disable many window system feature very easily by branding org-netbeans-core-windows.jar module. The features you can turn off are:

  • Window drag and drop - it isn't possible to reorganize window layout by dragging windows to new position.
  • Floating windows - windows cannot 'float' in a standalone frames.
  • Sliding windows - it's not possible to minimize (slide out) a window.
  • Maximized windows - windows cannot be maximized by clicking their header.
  • Closing windows - users cannot close any document/non-document window.
  • Resizing windows - users cannot adjust the width and height of windows by dragging splitter bars.
  • Minimum size - user can resize internal windows to zero width/height using splitter bars.

So to customize the window system of your NetBeans platform application simply open Project Properties window, turn the features you don't need off and the API support will add necessary branding resources for you:

You can click here for more details.

Thursday May 15, 2008

Drag and Drop Text into Palette Window to Create Custom Code CLips

The Common Palette associated with HTML editor has been improved a bit - now it's possible to drag any text and drop it in the palette window to create a new custom code snippet:

Other editors will follow soon. Adding such support to your own palette is quite easy. Just override
org.netbeans.spi.palette.DragAndDropHandler
and let it handle everything:

class MyDragAndDropHandler extends DragAndDropHandler {
    MyDragAndDropHandler() {
       super( true );
    }
    
    public void customize(ExTransferable t, Lookup item) {
    }
}

...

PaletteFactory.createPalette("_path_to_my_palette_root_", 
                             new MyPaletteActions(), 
                             null, 
                             new MyDragAndDropHandler());

Friday Aug 24, 2007

New Welcome Screen

NetBeans 6.0 is/will be a new release so a new welcome screen is needed. I committed the source files to CVS today so tomorrow's nightly build should welcome screen looking like this:


I really like the new design - the graphics are much more lightweight, there's lot more information. The content is also divided into two parts - for first time users with getting started, tutorials and sample projects. And for returning users with useful blogs, NetBeans news and recent projects.

Hopefully less users will tick the Show On Startup checkbox off in NetBeans 6.0 ...:)

Thursday Aug 23, 2007

Task List extensions Part II

The new Task List window in NetBeans 6.0 has a new API so the Checkstyle module that is available in earlier NetBeans releases isn't working in NB 6.0.

Since I'm responsible for the new Task List I tried to fix this deficiency by implementing a new Checkstyle integration module for NetBeans 6.0. You can find it here, source files are in NetBeans CVS in contrib/tasklist/checkstyle.

There is one known issue though - if there is another NetBeans plugin that adds ANTLR runtime jar to the classpath (e.g. UML, Struts, ...) the Checkstyle plugin won't work. I'll try to fix this problem.

Friday Aug 03, 2007

Task List extensions

One of the features I was working on for NetBeans 6.0 is the Task List window. It shows Java problems (errors, warnings), TODO items from comments in source files. Other task types will be added later on.

There are three default scopes in which the Task List scans for these tasks - currently edited file, the main project and projects that depend on the main one and all opened projects. I've create a plugin that adds extra scopes:

  • All opened files
  • All files from the same folder/package as the currently edited file.
  • Files from the main project without dependecies
The plugin is available here.

About

Stanislav Aubrecht

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today