Client Utility & Framework :: v.2.0.8 :: 2017-03-06  
   
  CUF - a basic framework for Java/Swing, Java/JavaFX and .NET/WinForms applications
Screenshots
It's hard to make screenshots for libraries and frameworks ;-)

To show something presentable, i've included a screenshoot of the CUF sample application:
CUF example app
The following two pictures show the CSV sample app, the app exists as a CUF/Swing and CUF/JavaFX example:
CUF CSV example app for Swing CUF CSV example app for JavaFX
Describing windows with XML
The main application window (everything but the use case area on the right side) is described with the following XML:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE xml2swing SYSTEM "http://www.sdm.com/dtd/xml2swing-1.3.dtd">

<xml2swing>
    <nonvisual>
        <object id="PortalPc"   class="com.sdm.cufexamples.model.portal.PortalPc"/>
        <object id="AboutDc"    class="com.sdm.cufexamples.model.portal.AboutDc"/>
        <object id="AboutPc"    class="com.sdm.cufexamples.model.portal.AboutPc"/>

        <action id="FileQuit">
            <text>Quit</text>
            <tooltip>Quit the applicatoin.</tooltip>
            <mnemonic>Q</mnemonic>
            <accelerator>control Q</accelerator>
            <text lang="de">Beenden</text>
            <tooltip lang="de">Anwendung verlassen.</tooltip>
            <mnemonic lang="de" >B</mnemonic>
        </action>

        <action id="WindowNew">
            <text>New Window</text>
            <tooltip>Creates a new main window.</tooltip>
            <mnemonic>N</mnemonic>
            <text lang="de">Neues Fenster</text>
            <tooltip lang="de">Erzeugt ein neues Hauptfenster.</tooltip>
            <mnemonic lang="de">N</mnemonic>
        </action>

        <action id="AboutClose">
            <text>OK</text>
        </action>
    </nonvisual>

    <visual>
        <frame id="Frame" closeAction="FileQuit">
            <icon name="CUF"/>
            <title>Test ValueModel's</title>

            <menubar id="MenuBar">
                <menu id="File">
                    <text>File</text>
                    <mnemonic>F</mnemonic>
                    <text lang="de">Datei</text>
                    <mnemonic lang="de">D</mnemonic>
                    <menuitem actionref="FileQuit"/>
                    <separator/>
                </menu>
                <menu id="Window">
                    <text>Window</text>
                    <mnemonic>W</mnemonic>
                    <text lang="de">Fenster</text>
                    <mnemonic lang="de">F</mnemonic>
                    <menuitem actionref="WindowNew"/>
                    <menuitem id="About">
                        <text>About</text>
                        <mnemonic>A</mnemonic>
                        <text lang="de">‹ber</text>
                        <mnemonic lang="de">‹</mnemonic>
                    </menuitem>
                    <separator/>
                </menu>
            </menubar>

            <toolbar id="Toolbar">
            </toolbar>

            <panel id="Panel">
                <layoutmanager type="form">
                    <columns>pref, fill:pref:grow</columns>
                    <rows>fill:pref:grow, pref</rows>
                </layoutmanager>

                <scrollpane id="UCScrollPane" verticalScrollBar="asNeeded"
                                              horizontalScrollBar="never" >
                     <!-- Note: we added a hack in PortalPc that asNeeded works (no
                                layout changes after the first click) -->
                    <constraint>1,1,F,F</constraint>
                    <panel id="UCSelectPanel" />
                </scrollpane>

                <panel id="SubDialogPanel">
                    <constraint>2,1</constraint>
                    <layoutmanager type="grid">
                        <rows>1</rows>
                        <columns>1</columns>
                    </layoutmanager>
                </panel>

                <panel id="Status">
                    <constraint>1,2,2,1</constraint>
                    <border type="bevel"/>
                    <layoutmanager type="table">
                        <columns>4,preferred,4,fill,4</columns>
                        <rows>4,preferred,4</rows>
                    </layoutmanager>
                    <label>
                        <constraint>1,1</constraint>
                        <text>Status:</text>
                    </label>
                    <label id="StatusText">
                        <constraint>3,1</constraint>
                    </label>
                </panel>
            </panel>

            <dialog id="AboutDialog" escapeAction="AboutClose" default="Frame/AboutDialog/Panel/OK" modal="true">
                <panel id="Panel">
                    <border type="empty"><dlu>dialog</dlu></border>
                    <layoutmanager type="form">
                        <columns>pref:grow, 60dlu</columns>
                        <rows>pref, 7dlu, pref:grow</rows>
                    </layoutmanager>
                    <label>
                        <text>This is an About dialog</text>
                        <text lang="de">Dies ist ein About-Dialog</text>
                        <constraint>1,1,2,1</constraint>
                    </label>
                    <button actionref="AboutClose" id="OK">
                        <constraint>2,3,F,B</constraint>
                    </button>
                </panel>
            </dialog>
        </frame>
    </visual>

    <connect>
        <actionAction source="FileQuit"                     target="PortalDc"   method="quit"/>
        <actionAction source="WindowNew"                    target="PortalDc"   method="newWindow"/>
        <actionAction source="Frame/MenuBar/Window/About"   target="PortalDc"   method="about"/>
        <actionAction source="AboutClose"                   target="AboutDc"    method="close"/>
    </connect>

    <databinding>
        <!-- some test stuff that is not really needed in the example, but i need a place to test it ;-) -->
        <valueholder id="testSet"/>
        <setvalue modelref="testSet" class="java.lang.String"/>
        <setvalue modelref="testSet">Hallo Welt</setvalue>
        <typeconverter   id="testtype"   trigger="testSet" class="com.sdm.util.model.converter.IntegerStringConverter"/>
        <formatconverter id="testformat" trigger="testSet" class="java.text.DecimalFormat" format="######,####" />
    </databinding>

</xml2swing>
 
           © 2004-2014 by Jürgen Zeller  •  jzeller@users.sourceforge.net