koaLa developers
  home  ::  products  ::  koaLaGML
news  ::  what is koaLaGML?  ::  examples  ::  downloads  ::  docs  ::  people

Here you can find some examples of what you can do with koaLaGML (you can find all of these and much more on the binary and source distribution) , we'll try to keep them up to date with the latest version of the product. If you have questions or would like to see some particular example let us know. Enjoy!

:: buttons & labels ::



<!--
    Document   : buttonLabel.xml
    Created on : October 24, 2002, 9:56 AM
    Author     : Ricardo Zuasti
    Description:
        Example that creates a label and a button that interact changing their captions.
-->
<form language="java" width="205" height="105" locationx="0" locationy="0" resizable="yes">
    
<head>
        
<title>
                koaLaGML button/label example
        
</title>
    
</head>
    
<body>
        
<space height="10" />
        
<label id="label1" caption="before" />
        
<space height="10" />
        
<button id="button1" caption="click me!" enable="yes" fork="no">
            
<scriptlet type="onclick" language="java">
                form.getLabel("label1").setCaption("after");
                form.getButton("button1").setCaption("ouch!");
            
</scriptlet>
        
</button>
        
<space height="10" />
    
</body>
</form>


:: top

:: combo boxes ::



<!--
    Document   : combobox2.xml
    Created on : October 28, 2002, 9:56 AM
    Author     : Ricardo Zuasti
    Description:
        Combobox usage example II.
-->
<form language="java" width="230" height="200" locationx="0" locationy="0" resizable="yes">
        
<head>
                
<title>
                        koaLaGML comboBox example
                
</title>
        
</head>
        
<body>
                
<space height="10" />
                
<combobox id="combo1" selected="2" width="150" height="25" enable="yes">
                    
<option value="1" caption="bird" />
                    
<option value="2" caption="pig" /> 
                
</combobox>                
                
<space height="10" />
                
                
<inputtext id="txtCaption" width="150" height="25" text="caption" enable="yes" />
                
<inputtext id="txtValue" width="150" height="25" text="value" enable="yes" />

                
<space height="10" />
                
                
<button caption="add" enable="yes" fork="no">
                        
<scriptlet type="onclick" language="java">
                            form.getComboBox("combo1").addItem(
                                form.getInputText("txtCaption").getText(),
                                form.getInputText("txtValue").getText());
                        
</scriptlet>
                
</button>
                
                
<space height="10" />
                
                
<button caption="show" enable="yes" fork="no">
                        
<scriptlet type="onclick" language="java">
                            form.getLabel("label1").setCaption(
                                form.getComboBox("combo1").getCaption() + " - " + 
                                form.getComboBox("combo1").getValue());
                        
</scriptlet>
                
</button>
                
                
<space height="10" />
                
                
<label id="label1" caption="make a choice and enjoy it" />
                
                
<space height="10" />
        
</body>
</form>


:: top

:: menu bar ::



<!--
    Document   : menubar.xml
    Created on : October 28, 2002, 9:56 AM
    Author     : Ricardo Zuasti
    Description:
        Menu bar example.
-->
<form language="java" width="180" height="130" locationx="0" locationy="0" resizable="yes">
        
<head>
                
<title>
                        koaLaGML menu example
                
</title>
                
<menubar>
                    
<menu id="menu1" caption="File" enable="yes">
                        
<menuitem id="menuItem1" caption="New..." mnemonic="N" enable="yes" fork="no" />
                        
<menuitem id="menuItem2" caption="Open..." enable="yes" fork="no" />
                        
<menuitem id="menuItem3" caption="Save" enable="no" fork="no" />
                        
<separator />
                        
<menuitem id="menuItem4" caption="Exit" img="images/Exit.png" enable="yes" fork="no">
                            
<scriptlet type="onclick" language="java">                                
                                System.exit(0);
                            
</scriptlet>
                        
</menuitem>
                    
</menu>
                    
<menu id="menu2" enable="no" caption="Other">
                        
<menu id="menu3" caption="submenu" enable="yes">
                            
<menuitem caption="item1" enable="yes" fork="no" />
                            
<menuitem caption="item2" enable="yes" fork="no" />
                        
</menu>
                        
<separator />
                        
<menuitem caption="item3" enable="yes" fork="no" />
                    
</menu>
                    
<menu caption="Help" enable="yes">
                        
<menuitem id="menuItem5" caption="About" enable="yes" fork="no" />
                    
</menu>
                
</menubar>
        
</head>
        
<body>
                
<space height="10" />
                
<button width="130" height="25" caption="enable save" enable="yes" fork="no">
                        
<scriptlet type="onclick" language="java">
                            form.getMenuItem("menuItem3").enable();
                        
</scriptlet>
                
</button>
                
                
<space height="10" />
                
                
<button width="130" height="25" caption="enable other" enable="yes" fork="no">
                        
<scriptlet type="onclick" language="java">
                            form.getMenu("menu2").enable();
                        
</scriptlet>
                
</button>
                
<space height="10" />
        
</body>
</form>


:: top

:: split pane & trees ::



<!--
    Document   : split.xml
    Created on : October 30, 2002, 9:56 AM
    Author     : Ricardo Zuasti
    Description:
        Split pane example.
-->
<form language="java" width="250" height="230" locationx="100" locationy="100" resizable="yes">
    
<head>
        
<title>
            koaLaGML split pane example
        
</title>
    
</head>
    
<body>
        
<space height="10" />
        
        
<split orientation="horizontal" divider="100">
            
<first>
                
<tree id="tree1" value="stuff" caption="stuff" enable="yes">
                    
<scriptlet type="ondbclick" language="java">
                        form.getLabel("label1").setCaption(
                            form.getTree("tree1").getSelectedValue() + 
                            " - " + 
                            form.getTree("tree1").getSelectedCaption());
                    
</scriptlet>
                        
<node value="a" caption="animals">
                            
<node value="k" caption="koala" />
                            
<node value="t" caption="tiger" />
                            
<node value="c" caption="cangaroo" />
                        
</node>
                        
<node value="v" caption="vegetables">
                            
<node value="l" caption="lettice" />
                            
<node value="o" caption="onion" />
                        
</node>
                
</tree>                
            
</first>
            
<second>
                
<label id="label1" width="100" height="20" caption="pick one!" />
            
</second>
        
</split>
        
<space height="10" />
    
</body>
</form>


:: top


SourceForge.net Logo     

I came, I saw, I deleted all your files
©2002 koaLa developers