Loading ...
Sorry, an error occurred while loading the content.

SDL/Swing

Expand Messages
  • Daniel Leuck
    Hi Guys, I hope 2009 is treating you well. I wanted to mention there are about 50 developer positions posted on TechHui
    Message 1 of 1 , Jan 18, 2009
    View Source
    • 0 Attachment
      Hi Guys,

      I hope 2009 is treating you well. I wanted to mention there are about
      50 developer positions posted on TechHui
      (http://www.techhui.com/forum/categories/1702911:Category:76/listForCategory)
      in case any of you are looking for work.

      On an unrelated note, we have been working on a MVC Swing framework
      using SDL (simple declarative language) to define screens. We also
      have a C# version for WPF in the works. I thought I would share it
      with this group in case any of you are interested. Here are some
      examples:

      -- Menu --

      "File" {
      "Open" do="openFile" icon="fileOpen"
      "---" // This creates a menu separator
      "Exit" do="exit"
      }

      Controller:

      public class MenuController extends FormController {

      public void openFile() {
      File file = OoiFileDialog.openFile();
      String text = FileUtils.read(file);
      textPane.setText(text);
      }

      public void exit() {
      System.exit(0);
      }
      }

      -- Login Dialog --

      form ID="Login" border="5,5,5,5" {
      pane layout="vertical" {
      pane {
      "User Name " halign="right" preferredWidth=70
      constraint="west"
      text ID="username" columns=15
      }
      strut size=5
      pane {
      "Password " halign="right" preferredWidth=70
      constraint="west"
      password ID="password" do="login" columns=15
      }
      pane constraint="fill"
      pane {
      pane {
      "Press F1 for help." font="default_small"
      foreground="100,100,100" constraint="south"
      }
      pane constraint="east" layout="horizontal" {
      button "Exit" do="exit" style="red"
      strut size=5
      button "Login" do="login"
      }
      }
      }
      }

      Controller:

      public class LoginController extends FormController {

      public void login() {
      if(getValue("username").equals("dan") &&
      getValue("password").equals("monkey")) {
      getWindow().setVisible(false);
      } else {
      showMessage("Incorrect password");
      }
      }

      public void exit() {
      System.exit(0);
      }
      }

      Comments, questions and creative insults are welcome.

      How is it different from JavaFX? It has _much_ simpler syntax,
      utilizes the MVC design pattern and will eventually be cross platform.

      Dan



      --
      Daniel Leuck
      President
      Ikayzo, inc.
      +1 (808) 539-3804 (US Direct)
      +1 (808) 393-9119 (US Mobile)
      +81 090.7016.6635 (Japan Mobile)
      +1 (808) 591-1496 (Fax)
      http://www.ikayzo.com
      http://www.javaui.net
    Your message has been successfully submitted and would be delivered to recipients shortly.