xprogrammer is doing 6 things including…

Create the most popular GUI toolkit for Java

1 cheer

 

Sponsored Links

Java GUI

www.dice.com/Apply     Search the Top Tech & Software Jobs Register at Dice.com.

User Interface Design

www.zentall.com/     Enterprise software, desktop & rich internet applications

Embedded GUI Design Tools

www.densitron.com/GUI_Tools     RipDraw Web Portal For Embedded GUI Design

Java browser SDK - Swing

www.webrenderer.com/     Integrate IE, FF or Safari in Java HTML 5, CSS, SVG, XML, SSL +more

Graphical user interface design

www.projekt202.com/     Our UI Designers at Projekt202 Make Software Make sense!

Java GUI Toolkit

www.webcrawler.com/     Search multiple engines for java GUI toolkit

xprogrammer has written 6 entries about this goal

Glyphs

The basic glyphs at the moment are

  • RectangleGlyph – fill a rectangle with a specific Paint
  • LineGlyph – draw a line with a specific Stroke and Paint
  • TextGlyph – a string with a Font and Paint
  • ImageGlyph – a image.
  • GroupGlyph – a composite which can be used to apply transforms (and possibly effects) to a set of Glyphs

The advantage of this model over previous style sheet based methods is that each Glyph knows its size, position and visual state. Therefore it can exist without requiring a lot of context information. I might take the graphics state (Paint, Stroke, Font) out into a style object to allow sharing and setting of global effects more easily.



Model design

It is really important to me that the model be a plain Java object. It shouldn’t have to implement any special interfaces in order to be part of a GUI.



Controller design

The controller at the moment is looking like 2 parts.

  • Event handling
  • Binding

The main event loop looks like

Event e = getEvent();
dispatchEventToHandlers( e );
applyBindings();
repairViewDamage();


View design

I’ve taken another look at the View side of things. My preference is now a display tree modelled after SVG.

Uses Glyph as the metaphor (not sure about this), but it seems lightweight enough.

The Glyph draws its contents and reports damage up to its parent. At the root the damage is collected, then repaints are performed within the damaged region.

Currently developing this on a PIII which is good for spotting performance problems quickly.

The biggest one seems to be with Java image drawing performance.The solution is to make sure that all images are created in a screen compatible BufferedImage format.

From a design point of view I’d like to use immutable objects to represent the bounds, etc but the expense of creating objects when transforming up the Glyph hierarchy might be too much. This really needs to be very fast, as it will be called all the time in the most performance critical part of the code.



Feedback

Got some great feedback from the guys at eXtreme Wednesday. The main points were that reflection based APIs are really difficult to learn, you can’t use the code completion features of IDEs etc.

They did seem convinced that the concept is good – which was a relief.

The main concept is – “View controls repaint”



Exposure

I’m finally showing some of the stuff I developed to others tomorrow. Hopefully they will be impressed.



xprogrammer has gotten 1 cheer on this goal.

 

I want to:
43 Things Login