«

»

Sep 06 2010

Release 1 Beta 0 is ready for testing

Hi everyone. I’ve just pushed back a bunch of changes to Leonardo. A detailed change list is below. The highlights are:

  • Added export to PDF using the older iText library, also added unit tests to verify all of the export formats work.
  • Completely removed the old skinning replaced with a new from scratch CSS 3 theming engine. This will make theming the UI very easy. For example, the buttons are defined thusly:
    
    Button, Checkbox, Radiobutton, Togglebutton {
        margin: 3px;
        padding: 8px;
        background-color: #c0c0c0;
        border-width: 1px;
        color: #444444;
        border-color: #f8f8f8;
        border-radius: 11px;
        text-align: center;
        shrink-to-fit: true;
    }
    
    Button, Togglebutton {
        background: linear-gradient(center top, #ebebeb 0%, #a1a1a1 100%);
        /* a black shadow offset by 3,2 with a blur radius of 4 */
        text-shadow: #000000 0px 1px 4px;
    }
    
    Button:hover, Togglebutton:hover {
        background: linear-gradient(center top, #04acec 0%, #0186ba 100%);
        color: #ffffff;
        border-color: #808080;
    }
    
  • Completely removed the old layout system, replaced with a new from scratch CSS Box Flex Layout implementation. This makes layouts a lot easier to create declaratively. For example, create a resizable toolbar like this:
                return new HFlexBox()
                        .add(new Button("before"))
                        .add(new Spacer(),1)
                        .add(new Button("between"))
                        .add(new Spacer(),1)
                        .add(new Button("after"))
                        .add(new Button("wide button"));
    
    
  • Added a localization system so we can make translations into other languages (we’re looking for volunteers).

You can get the new build here.
Please bang on it and file bugs. My goal is to have R1 final done by the end of the month.

Thanks!

Read more for full change log details


#36 (Sep 6, 2010 5:15:32 PM)

make publish dir configurable
added itext lib
added savePDF action using older rev of iText
added unit test for export actions
moved all export actions into the IO package
make css skin new margin,padding,borderWidth that uses insets instead of a single value
support shorthand form of padding and border-width by expanding into separate properties
added unit tests for the new css shorthands
support shorthand form of margin by expanding into separate properties
support css hex values in both upper and lower case
added the ability to append more css rules to the default set
added an 'id' property to all controls
make the MasterCSSSkin use the control's ID if available.
make hflexbox skip invisible children
fix NPE with button in Sketchy
skin the linkbutton with css
skin the progress bar with css
updated images for checkbox and radiobutton to be smaller
added debugging bounds support
fixed margins and border on the selected item of a popupmenu so that it looks correct now.
delete dead code
make textbox and passwordbox have the correct baseline
set a default baseline for non shrink-to-fit controls
made linkbutton shrink-to-fit
fixed baseline positioning of linkbuttton, popupmenu
make cssskin return more metrics to the control
added getBaseline to Control
make button, checkbox, radiobutton work properly with baseline alignment
removed debugging statements
added a baseline test
removed vbox, hbox
fixed button & textbox crashing when called incorrectly
updated Leonardo to use flexboxes instead of h & vboxes
safely removed the gridlinelayout and growbar layouts
removed unnecessary exception from Linkbutton
removed  old addressbook test
properly use preflayout before layout in vflexbox and gridbox
support align right, stretch, bottom, top
added pref width/height to control
added doPrefLayout() to control
make button support prefwidth overrideing
update HBox to use new layout system
removed dead code
changed column to createColumn
added another layout test
added another layout test
removed some unneeded exceptions
added flex box models
moved grid to proper layout package, renamed to GridBox
added new LayoutTests
added a proper spacer
made splitpane support more method chaining
removed ioexception from togglebutton, since it's no longer required by the superclass


#35 (Sep 6, 2010 5:05:33 PM)

use locale from user.language and user.country
added a simple localization system
added english translations for the File menu
improved CSS support: handle multiple elements in the same rule
improved CSS support. we can parse ids and css classes now
completely removed old skinning system. replaced with CSS
removed debugging

4 comments

Skip to comment form

  1. dmoebius

    Looks very promising. I quickly glanced over your code. CSS3 styling, stages, scenes, … are you creating your own lightweight JavaFX here?!? Any reason why you don’t use JavaFX?

  2. dmoebius

    PS: When I try to start Leonardo using the JNLP file from http://projects.joshy.org/Leonardo/daily/jnlp/Leonardo.jnlp I get:

    java.lang.NoClassDefFoundError: com/apple/eawt/ApplicationListener
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
    at java.lang.Class.getMethod0(Unknown Source)
    at java.lang.Class.getMethod(Unknown Source)
    at com.sun.javaws.Launcher.executeApplication(Unknown Source)
    at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
    at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
    at com.sun.javaws.Launcher.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: com.apple.eawt.ApplicationListener
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    … 9 more

  3. admin

    dmoebius , yes this is sort of like a lightweight JavaFX underneath. Soon to be released has it’s own project.

  4. admin

    This should be fixed now. Sorry about that!

Comments have been disabled.