Adds a set of boxes to the given panel.

@param panel the panel to add the boxes to.
@param amount the number of boxes to add.
497366
private static void addBoxesWithDiffContent(final WPanel panel, final int amount) {
		for (int i = 1; i <= amount; i++) {
			WPanel content = new WPanel(WPanel.Type.BOX);
			content.setLayout(new FlowLayout(FlowLayout.VERTICAL, 3));
			for (int j = 1; j <= i; j++) {
				content.add(new WText(Integer.toString(i)));
			}
			panel.add(content);
		}
	}
939847
private void init() {
        this.setLayout(new BorderLayout());

        // MAIN PANEL
        JPanel mainPanel = new JPanel();
        Border margin = new EmptyBorder(10, 10, 5, 10);

        mainPanel.setBorder(margin);
        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));

        mainPanel.add(makeTitlePanel());
    }
345802
void add(MapElement element) {
		final Rectangle2d r = element.getBoundingBox();
		if (r != null) {
			if (Double.isNaN(this.minx) || this.minx > r.getMinX()) {
				this.minx = r.getMinX();
			}
			if (Double.isNaN(this.maxx) || this.maxx < r.getMaxX()) {
				this.maxx = r.getMaxX();
			}
			if (Double.isNaN(this.miny) || this.miny > r.getMinY()) {
				this.miny = r.getMinY();
			}
			if (Double.isNaN(this.maxy) || this.maxy < r.getMaxY()) {
				this.maxy = r.getMaxY();
			}
		}
		this.elements.add(element);
	}
724424
protected void fill(GroupContainerPopulator parentContainer,
                        Object factory,
                        CommandButtonConfigurer configurer,
                        List previousButtons) {
        parentContainer.add(Box.createGlue());
    }
696376
public void insertNewAttributeValue(CmsEntity value, int index, Panel container) {

        // make sure not to add more values than allowed
        int maxOccurrence = getEntityType().getAttributeMaxOccurrence(m_attributeName);
        CmsEntityAttribute attribute = m_entity.getAttribute(m_attributeName);
        boolean mayHaveMore = ((attribute == null) || (attribute.getValueCount() < maxOccurrence));
        if (mayHaveMore && value.getTypeName().equals(m_attributeType.getId())) {
            m_entity.insertAttributeValue(m_attributeName, value, index);
            int valueIndex = index;
            CmsAttributeValueView valueView = null;
            if ((m_attributeValueViews.size() == 1) && !m_attributeValueViews.get(0).hasValue()) {
                valueView = m_attributeValueViews.get(0);
            } else {
                valueView = new CmsAttributeValueView(
                    this,
                    m_widgetService.getAttributeLabel(m_attributeName),
                    m_widgetService.getAttributeHelp(m_attributeName));
            }
            CmsRenderer.setAttributeChoice(m_widgetService, valueView, getAttributeType());
            m_attributeValueViews.remove(valueView);
            m_attributeValueViews.add(index, valueView);

            ((FlowPanel)container).insert(valueView, index);

            insertHandlers(valueIndex);

            I_CmsEntityRenderer renderer = m_widgetService.getRendererForAttribute(m_attributeName, getAttributeType());
            valueView.setValueEntity(renderer, value);

            CmsUndoRedoHandler handler = CmsUndoRedoHandler.getInstance();
            if (handler.isIntitalized()) {
                handler.addChange(m_entity.getId(), m_attributeName, valueIndex, ChangeType.add);
            }
        }
    }
915023
void addFlakes(int quantity) {
        for (int i = 0; i < quantity; ++i) {
            flakes.add(Flake.createFlake(getWidth(), droid));
        }
        setNumFlakes(numFlakes + quantity);
    }
1304817
public void addHasFeature(HasFeature hasFeature) {
		widget.addHasFeature(hasFeature);

		if (hasFeature instanceof Widget) {
			panel.insert((Widget) hasFeature, panel.getWidgetCount() - 1);
		}
	}
50645
public void add(int field, int amount) {
        switch (field) {
        case MONTH:
            if (amount != 0) {
                int dom = get(DAY_OF_MONTH);
                int day = get(JULIAN_DAY) - EPOCH_JULIAN_DAY; // Get local day
                int moon = day - dom + 1; // New moon 
                offsetMonth(moon, dom, amount);
            }
            break;
        default:
            super.add(field, amount);
            break;
        }
    }
498937
private void addItem(CmsPublishResource resourceBean) {

        CmsTreeItem row = buildItem(resourceBean, m_model.getStatus(resourceBean.getId()), false);
        m_panel.add(row);

        for (CmsPublishResource related : resourceBean.getRelated()) {
            row.addChild(buildItem(related, m_model.getStatus(related.getId()), true));
        }
    }
248249
private void addHiddenField(Panel form, String fieldName, String fieldValue) {

        Hidden inputField = new Hidden();
        inputField.setName(fieldName);
        inputField.setValue(fieldValue);
        form.add(inputField);
    }
604950
void addAndGet(long amount) {
    for (int i = 0; i < ServoPollers.NUM_POLLERS; ++i) {
      getCurrent(i).addAndGet(amount);
    }
  }
722940
public void setLayout(FormLayout layout, JPanel panel)
    {
        this.panel = panel;
        this.layout = layout;
        panel.setLayout(layout);
        cc = new CellConstraints();
        row = -1;
    }
271791
public static void setContent (JInternalDialog dialog, JPanel content)
    {
        Container holder = dialog.getContentPane();
        holder.removeAll();
        holder.add(content, BorderLayout.CENTER);
        dialog.pack();
    }
1070940
public void addCell(int... elements) {
        SortedSet<Integer> cell = new TreeSet<Integer>();
        for (int element : elements) {
            cell.add(element);
        }
        this.cells.add(cell);
    }
1019958
public void setRecordsAmount(int amount) {
        int ipp = Integer.parseInt(itemsPerPageEditor.getValueAsString());
        pageTotal = amount % ipp == 0? amount / ipp : amount / ipp + 1;
        draw(0);
    }
1302622
protected void addCheckBox(CmsCheckBox checkbox) {

        assert m_checkbox == null;
        m_checkbox = checkbox;
        addDecoration(m_checkbox, CHECKBOX_WIDTH, false);
    }
140351
public void options(String panel) {
	    OptionsDialog dialog = view.getOptionsDialog(Constant.messages.getString("options.dialog.title"));
	    dialog.initParam(model.getOptionsParam());

	    int result = dialog.showDialog(false, panel);
		if (result == JOptionPane.OK_OPTION) {
		    try {
                model.getOptionsParam().getConfig().save();
            } catch (ConfigurationException e) {
                logger.error(e.getMessage(), e);
                view.showWarningDialog(Constant.messages.getString("menu.tools.options.errorSavingOptions"));
                return;
            }
		    // ZAP: Notify all OptionsChangedListener.
		    control.getExtensionLoader().optionsChangedAllPlugin(model.getOptionsParam());
		    
		    view.getMainFrame().applyViewOptions();

		    control.getProxy().stopServer();
		    control.getProxy().startServer();
		}
	}