Examples of Bag


Examples of org.jsurveylib.gui.swing.util.Bag

    }

    void initAnswerPanel(JPanel answerPanel) {
        textField.setText(type.getAnswer());
        textField.addChangeListener(this);
        Bag bag = new Bag();
        answerPanel.add(textField, bag.WEST());
        answerPanel.add(validationLabel, bag.nextX().inset(0, SPACE_BEFORE_VALIDATION, 0, 0));
    }
View Full Code Here

Examples of org.jsurveylib.gui.swing.util.Bag

    }

    void initAnswerPanel(JPanel answerPanel) {
        dropdown.setSelectedIndex(type.getSelectedIndex());
        dropdown.addActionListener(this);
        Bag bag = new Bag();
        answerPanel.add(dropdown, bag.WEST());
        answerPanel.add(validationLabel, bag.nextX().inset(0, SPACE_BEFORE_VALIDATION, 0, 0));
    }
View Full Code Here

Examples of org.jsurveylib.gui.swing.util.Bag

    void initAnswerPanel(JPanel answerPanel) {
        ButtonGroup group = new ButtonGroup();
        int rows = type.isVertical() ? 0 : 1;
        int cols = type.isVertical() ? 1 : 0;

        Bag bag = new Bag();

        if (!type.getLeftLabel().equals("")) {
            JLabel label = new JLabel(type.getLeftLabel());
            label.setHorizontalAlignment(JLabel.CENTER);
            answerPanel.add(label, bag.WEST().inset(0, 0, 0, 12));
            bag.inset(0);
        }

        JPanel itemPane = new JPanel(new GridLayout(rows, cols, 6, 6));
        for (Choice choice : type.getChoices()) {
            JRadioButton button = new JRadioButton(choice.getLabel());
            button.setFont(SurveyPanel.FONT_QUESTION_ANSWER);
            button.addItemListener(this);
            button.putClientProperty("choice", choice);

            group.add(button);
            itemPane.add(button);

            radioButtons.add(button);
        }
        answerPanel.add(itemPane, bag.nextX());


        if (!type.getRightLabel().equals("")) {
            JLabel label = new JLabel(type.getRightLabel());
            label.setHorizontalAlignment(JLabel.CENTER);
            answerPanel.add(label, bag.nextX().inset(0, 12, 0, 0));
            bag.inset(0);
        }

        answerPanel.add(validationLabel, bag.nextX().inset(0, SPACE_BEFORE_VALIDATION, 0, 0));
        updateRenderer();
    }
View Full Code Here

Examples of org.jsurveylib.gui.swing.util.Bag

    }

    void initAnswerPanel(JPanel answerPanel) {
        checkbox.setSelected(type.isChecked());

        Bag bag = new Bag();
        answerPanel.add(checkbox, bag);
        answerPanel.add(validationLabel, bag.nextX().WEST().inset(0, SPACE_BEFORE_VALIDATION, 0, 0));

        checkbox.addActionListener(this);
    }
View Full Code Here

Examples of org.jsurveylib.gui.swing.util.Bag

        browseButton = new JButton(browseString);
    }

    void initAnswerPanel(JPanel answerPanel) {

        Bag bag = new Bag();

        pathField.setText(type.getAnswer());
        answerPanel.add(pathField, bag.WEST().inset(0, 0, 0, 2));
        pathField.addChangeListener(this);

        answerPanel.add(browseButton, bag.nextX().inset(0));
        browseButton.addActionListener(this);

        answerPanel.add(validationLabel, bag.nextX().inset(0, SPACE_BEFORE_VALIDATION, 0, 0));
    }
View Full Code Here

Examples of org.jsurveylib.gui.swing.util.Bag

    void initAnswerPanel(JPanel answerPanel) {
        textArea.setText(type.getAnswer());
        textArea.addChangeListener(this);

        Bag bag = new Bag();
        answerPanel.add(jscrollPane, bag.WEST());
        answerPanel.add(validationLabel, bag.nextX().inset(0, SPACE_BEFORE_VALIDATION, 0, 0));

    }
View Full Code Here

Examples of org.pokenet.server.backend.entity.Bag

   * @param data
   * @return
   */
  private Bag getBagObject(ResultSet data, int memberid) {
    try {
      Bag b = new Bag(memberid);
      while(data.next()){
        b.addItem(data.getInt("item"), data.getInt("quantity"));
      }
      return b;
    } catch (Exception e) {
      e.printStackTrace();
      return null;
View Full Code Here

Examples of pdp.scrabble.game.Bag

    /**
     * @param args
     */
    public static void main(String[] args) {
  Bag bag = Factory.FACTORY.createBag();
  bag.initWithLanguage("Francais");
  bag.fill();
  Rack r = new RackImplNew(bag);
  r.fill();
  RackView view = new RackView(r);
  RackController ctrl = new RackController(view);
  JFrame frame = new JFrame("test de Rack");
View Full Code Here

Examples of webit.script.lang.Bag

    private void executeInitTemplates() throws ResourceNotFoundException {
        if (this.inits != null) {
            final Out out = new DiscardOut();
            final GlobalManager myGlobalManager = this.globalManager;
            final Bag globalBag = myGlobalManager.getGlobalBag();
            final Bag constBag = myGlobalManager.getGlobalBag();
            final KeyValues params = KeyValuesUtil.wrap(
                    new String[]{"GLOBAL", "CONST"},
                    new Object[]{globalBag, constBag}
            );
            for (String templateName : StringUtil.toArray(this.inits)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.