Package com.sardak.antform.gui

Examples of com.sardak.antform.gui.ControlPanel


  } catch (Exception e) {
    e.printStackTrace();
  }
 
  Control control = new Control(new CallbackTest(), "Table test", null, null, false);
  ControlPanel panel = control.getPanel();
  Table t = new Table();
  t.setLabel("a table");
  t.setProperty("prop");
  t.setEditable(true);
  t.setColumns("col1,col2,col3");
View Full Code Here


    }
   
    ActionRegistry actionRegistry = new ActionRegistry(this);
   
    Control control = new Control(new CallbackTest(), "Tree component test", null, null, false);
    ControlPanel panel = control.getPanel();
    CheckSelectionProperty csh = new CheckSelectionProperty();
    csh.setLabel("a multiselect");
    csh.setProperty("prop");
    csh.setValues("element1,element2,element3,element4");
    csh.setSeparator(",");
    csh.setEscapeSequence("\\");
    csh.setEditable(true);
    csh.addToControlPanel(panel);

    ButtonBar controlBar = new ButtonBar();
    controlBar.addConfiguredButton(new Button("ok", null, ActionType.OK));
    controlBar.addConfiguredButton(new Button("reset", null, ActionType.RESET));
    controlBar.setAlign(BorderLayout.EAST);
    controlBar.setMargins(3, 3, 3, 3);
    ControlPanel controlPanel = control.getPanel();
    controlBar.applyStylesheet(controlPanel);
    controlPanel.addButtonPanel(controlBar.getPanel());
    controlBar.register(actionRegistry);

    control.show();
    System.exit(0);
  }
View Full Code Here

    } catch (Exception e) {
      e.printStackTrace();
    }
   
    Control control = new Control(new CallbackTest(), "Configure FTP Servers", null, null, false);
    ControlPanel panel = control.getPanel();
    ActionRegistry actionRegistry = new ActionRegistry(this);
   
    ButtonBar bar = new ButtonBar();
    bar.addConfiguredButton(new Button("Add an FTP server", "addserver", ActionType.OK));
    bar.addConfiguredButton(new Button("Remove an FTP server", "removeServer", ActionType.OK));
    bar.addToControlPanel(panel);
    bar.register(actionRegistry);
    Separator sep = new Separator();
    sep.addToControlPanel(panel);
   
    BooleanProperty bp = new BooleanProperty();
    bp.setLabel("Passive-mode connection:");
    bp.setProperty("pasv");
    bp.setEditable(true);
//    ValueHandle g1 = panel.addBooleanProperty("Passive-mode connection:", "pasv", true, null);
    bp.addToControlPanel(panel);
    TextProperty tp1 = new TextProperty();
    tp1.setLabel("Server address:");
    tp1.setProperty("serverAddress");
    tp1.setColumns(30);
    tp1.setEditable(true);
    tp1.setPassword(false);
    tp1.setRequired(false);
    tp1.addToControlPanel(panel);
//    ValueHandle g2 = panel.addTextProperty("Server address:", "serverAddress", 30, true, false, false, null);
    TextProperty tp2 = new TextProperty();
    tp2.setLabel("Server login:");
    tp2.setProperty("login");
    tp2.setColumns(30);
    tp2.setEditable(true);
    tp2.setPassword(false);
    tp2.setRequired(false);
    tp2.addToControlPanel(panel);
    TextProperty tp3 = new TextProperty();
    tp3.setLabel("Server password:");
    tp3.setProperty("password");
    tp3.setColumns(30);
    tp3.setEditable(true);
    tp3.setPassword(true);
    tp3.setRequired(false);
    tp3.addToControlPanel(panel);
   
    ButtonBar controlBar = new ButtonBar();
    controlBar.addConfiguredButton(new Button("Save properties", null, ActionType.OK));
    controlBar.addConfiguredButton(new Button("Reset form", null, ActionType.RESET));
    controlBar.setAlign(BorderLayout.EAST);
    controlBar.setMargins(3, 3, 3, 3);
    ControlPanel controlPanel = control.getPanel();
    controlBar.applyStylesheet(controlPanel);
    controlPanel.addButtonPanel(controlBar.getPanel());
    controlBar.register(actionRegistry);

    Properties props = new Properties();
    props.setProperty("pasv", "true");
//    control.initProperties(props);
View Full Code Here

    }
    if (controlBar != null && !controlBar.isEmpty()) {
      // do not create if no buttons
      controlBar.setAlign(BorderLayout.EAST);
      controlBar.setMargins(3, 3, 3, 3);
      ControlPanel controlPanel = control.getPanel();
      controlBar.applyStylesheet(controlPanel);
      controlPanel.addButtonPanel(controlBar.getPanel());
      controlBar.register(getActionRegistry());
    }
    super.build();
    built = true;
  }
View Full Code Here

TOP

Related Classes of com.sardak.antform.gui.ControlPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.