Package com.sardak.antform.types

Examples of com.sardak.antform.types.ButtonBar


    Label label = new Label();
    label.setProject(project);
    label.addText("This is a simple label");
    addConfiguredLabel(label);
   
    ButtonBar bar = new ButtonBar();
    bar.setProject(project);
    bar.addConfiguredButton(new Button("Ok button", null, ActionType.OK));
    bar.addConfiguredButton(new Button("Cancel button", null, ActionType.CANCEL));
    bar.addConfiguredButton(new Button("Reset button", null, ActionType.RESET));
    addConfiguredButtonBar(bar);
   
    addConfiguredSeparator(new Separator());
   
    BooleanProperty bp = new BooleanProperty();
    bp.setProject(project);
    bp.setLabel("booleanproperty");
    bp.setProperty("booleanproperty");
    bp.setEditable(true);
    addConfiguredBooleanProperty(bp);
   
    TextProperty tp = new TextProperty();
    tp.setProject(project);
    tp.setLabel("textproperty");
    tp.setProperty("textproperty");
    tp.setColumns(30);
    tp.setEditable(true);
    tp.setPassword(false);
    tp.setRequired(false);
    addConfiguredTextProperty(tp);

    ButtonBar controlBar = new ButtonBar();
    controlBar.setProject(project);
    controlBar.addConfiguredButton(new Button("Save properties", null, ActionType.OK));
    controlBar.addConfiguredButton(new Button("Reset form", null, ActionType.RESET));
    addConfiguredControlBar(controlBar);

    execute();

    System.out.println(project.getProperties());
View Full Code Here


    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

   
    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);
//    g2.setValue("login");
View Full Code Here

  /**
   * add a button
   */
  public void addConfiguredButton(Button button) {
    ButtonBar buttonBar = new ButtonBar();
    buttonBar.setProject(getProject());
    buttonBar.addConfiguredButton(button);
    buttonBar.setMargins(0, 100, 0, 100);
    addConfiguredButtonBar(buttonBar);
  }
View Full Code Here

      actionType.setValue(ActionType.getType(type));
      button.setType(actionType);
      button.setLabel(label);
      button.setTarget(target);
      if (controlBar == null) {
        controlBar = new ButtonBar();
      }
      controlBar.addConfiguredButton(button);
    }
  }
View Full Code Here

TOP

Related Classes of com.sardak.antform.types.ButtonBar

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.