Create a stereo element factory for creating stereo elements using 3D
coordinates and depiction labels (up/down, wedge/hatch).

@param container the structure to create the factory for
@return the factory instance
761657
public static StereoElementFactory using3DCoordinates(IAtomContainer container) {
        EdgeToBondMap bondMap = EdgeToBondMap.withSpaceFor(container);
        int[][] graph = GraphUtil.toAdjList(container, bondMap);
        return new StereoElementFactory3D(container, graph, bondMap).checkSymmetry(true);
    }
1269548
public static IAtomContainer makeDeepCopy(IAtomContainer container) {

        IAtomContainer newAtomContainer = container.getBuilder().newInstance(IAtomContainer.class);
        //      Deep copy of the Atoms
        IAtom[] atoms = copyAtoms(container, newAtomContainer);

        //      Deep copy of the bonds
        copyBonds(atoms, container, newAtomContainer);

        //      Deep copy of the LonePairs
        for (int index = 0; index < container.getLonePairCount(); index++) {
            if (container.getAtom(index).getSymbol().equalsIgnoreCase("R")
                    || container.getAtom(index).getSymbol().equalsIgnoreCase("A")) {
                newAtomContainer.addLonePair(container.getBuilder().newInstance(ILonePair.class,
                        container.getAtom(index)));
            } else {
                newAtomContainer.addLonePair(index);
            }
        }

        for (int index = 0; index < container.getSingleElectronCount(); index++) {
            newAtomContainer.addSingleElectron(index);
        }
        newAtomContainer.addProperties(container.getProperties());
        newAtomContainer.setFlags(container.getFlags());
        newAtomContainer.setID(container.getID());
        newAtomContainer.notifyChanged();

        return newAtomContainer;
    }
915320
public ContainerCreate create(String imageId) {
		ContainerCreate command = new ContainerCreate();
		command.image(imageId);
		action.setCommand(command);
		return command;
	}
105401
public MaterializeBuilder withContainer(ViewGroup container, ViewGroup.LayoutParams layoutParams) {
        this.mContainer = container;
        this.mContainerLayoutParams = layoutParams;
        return this;
    }
40995
protected Element createPlaceholder(Element element) {

        Element result = CmsDomUtil.clone(element);
        result.addClassName(I_CmsLayoutBundle.INSTANCE.containerpageCss().groupcontainerPlaceholder());
        result.getStyle().setBackgroundColor("transparent");
        return result;
    }
984293
@Override
	public CPDisplayLayout create(long CPDisplayLayoutId) {
		CPDisplayLayout cpDisplayLayout = new CPDisplayLayoutImpl();

		cpDisplayLayout.setNew(true);
		cpDisplayLayout.setPrimaryKey(CPDisplayLayoutId);

		String uuid = PortalUUIDUtil.generate();

		cpDisplayLayout.setUuid(uuid);

		cpDisplayLayout.setCompanyId(companyProvider.getCompanyId());

		return cpDisplayLayout;
	}
743906
protected Element createLineElement(float x1, float y1, float x2, float y2)
    {
        HtmlDivLine line = new HtmlDivLine(x1, y1, x2, y2);
        String color = colorString(getGraphicsState().getStrokingColor());

        StringBuilder pstyle = new StringBuilder(50);
        pstyle.append("left:").append(style.formatLength(line.getLeft())).append(';');
        pstyle.append("top:").append(style.formatLength(line.getTop())).append(';');
        pstyle.append("width:").append(style.formatLength(line.getWidth())).append(';');
        pstyle.append("height:").append(style.formatLength(line.getHeight())).append(';');
        pstyle.append(line.getBorderSide()).append(':').append(style.formatLength(line.getLineStrokeWidth())).append(" solid ").append(color).append(';');
        if (line.getAngleDegrees() != 0)
            pstyle.append("transform:").append("rotate(").append(line.getAngleDegrees()).append("deg);");

        Element el = doc.createElement("div");
        el.setAttribute("class", "r");
        el.setAttribute("style", pstyle.toString());
        el.appendChild(doc.createEntityReference("nbsp"));
        return el;
    }
185942
private SimpleFeature createFeature(
            final SimpleFeatureBuilder featureBuilder,
            final GeometryFactory geometryFactory,
            final GridParam layerData,
            final AxisDirection direction,
            final int numDimensions,
            final double spacing,
            final double x, final double y,
            final int i,
            final int ordinate) {
        // CSON: ParameterNumber

        featureBuilder.reset();
        final int numPoints = layerData.pointsInLine + 1; // add 1 for the last point
        final LinearCoordinateSequence coordinateSequence = new LinearCoordinateSequence().
                setDimension(numDimensions).
                setOrigin(x, y).
                setVariableAxis(ordinate).
                setNumPoints(numPoints).
                setSpacing(spacing).
                setOrdinate0AxisDirection(direction);
        LineString geom = geometryFactory.createLineString(coordinateSequence);
        featureBuilder.set(Grid.ATT_GEOM, geom);

        return featureBuilder.buildFeature("grid." + (ordinate == 1 ? 'x' : 'y') + "." + i);
    }
936394
public Element createDOMNode(Element parent) {
        Element domNode = parent.getOwnerDocument().createElement(tagName);
        LayoutUtil.copyAttributes(attributes, domNode);
        parent.appendChild(domNode);
        return domNode;
    }
768057
public static double getBondLengthMedian(final IAtomContainer container) {
        if (container.getBondCount() == 0) throw new IllegalArgumentException("Container has no bonds.");
        double[] lengths = new double[container.getBondCount()];
        for (int i = 0; i < container.getBondCount(); i++) {
            final IBond bond = container.getBond(i);
            final IAtom atom1 = bond.getBegin();
            final IAtom atom2 = bond.getEnd();
            if (atom1.getPoint2d() == null || atom2.getPoint2d() == null)
                throw new IllegalArgumentException("An atom has no 2D coordinates.");
            lengths[i] = getLength2D(bond);
        }
        Arrays.sort(lengths);
        return lengths[lengths.length / 2];
    }
380880
public Container ixor(Container x) {
    if (x instanceof ArrayContainer) {
      return ixor((ArrayContainer) x);
    } else if (x instanceof BitmapContainer) {
      return ixor((BitmapContainer) x);
    }
    return ixor((RunContainer) x);
  }
1325967
@Override
    public StereoEncoder create(IAtomContainer container, int[][] graph) {

        List<StereoEncoder> encoders = new ArrayList<StereoEncoder>(5);

        for (IBond bond : container.bonds()) {

            // if double bond and not E or Z query bond
            if (DOUBLE.equals(bond.getOrder()) && !E_OR_Z.equals(bond.getStereo())) {

                IAtom left = bond.getBegin();
                IAtom right = bond.getEnd();

                // skip -N=N- double bonds which exhibit inversion
                if (Integer.valueOf(7).equals(left.getAtomicNumber())
                        && Integer.valueOf(7).equals(right.getAtomicNumber())) continue;

                StereoEncoder encoder = newEncoder(container, left, right, right, left, graph);

                if (encoder != null) {
                    encoders.add(encoder);
                }
            }
        }

        return encoders.isEmpty() ? StereoEncoder.EMPTY : new MultiStereoEncoder(encoders);
    }
1148759
function(containerID) {
        if (!this.supported()) { 
            return; 
        }
        if (!document.namespaces.olv) {
            document.namespaces.add("olv", this.xmlns);
            var style = document.createStyleSheet();
            var shapes = ['shape','rect', 'oval', 'fill', 'stroke', 'imagedata', 'group','textbox']; 
            for (var i = 0, len = shapes.length; i < len; i++) {

                style.addRule('olv\\:' + shapes[i], "behavior: url(#default#VML); " +
                              "position: absolute; display: inline-block;");
            }                  
        }
        
        OpenLayers.Renderer.Elements.prototype.initialize.apply(this, 
                                                                arguments);
    }
926403
public static ServletContainer defaultContainer() {
        if (container != null) {
            return container;
        }
        synchronized (Servlets.class) {
            if (container != null) {
                return container;
            }
            return container = ServletContainer.Factory.newInstance();
        }
    }
120413
private HtmlContainer getOrCreateLayerContainer(Layer layer) {
		if (layerContainers.containsKey(layer)) {
			return layerContainers.get(layer);
		}
		HtmlContainer layerContainer = new HtmlGroup();
		layerContainer.asWidget().getElement().setId(layer.getId());
		layersModelContainer.add(layerContainer);
		layerContainers.put(layer, layerContainer);
		return layerContainer;
	}
168733
public static TypeAdapterFactory create() {

    if (geometryTypeFactory == null) {
      geometryTypeFactory = RuntimeTypeAdapterFactory.of(Geometry.class, "type", true)
        .registerSubtype(GeometryCollection.class, "GeometryCollection")
        .registerSubtype(Point.class, "Point")
        .registerSubtype(MultiPoint.class, "MultiPoint")
        .registerSubtype(LineString.class, "LineString")
        .registerSubtype(MultiLineString.class, "MultiLineString")
        .registerSubtype(Polygon.class, "Polygon")
         .registerSubtype(MultiPolygon.class, "MultiPolygon");
    }
    return geometryTypeFactory;
  }
829076
@Override
    protected void prepareGUI(Container container)
    {
        renderer = new SwingBiomorphRenderer();
        console = new SwingConsole(5);
        selectionDialog = new JDialog((JFrame) null, "Biomorph Selection", true);
        biomorphHolder = new JPanel(new GridLayout(1, 1));

        container.add(new ControlPanel(), BorderLayout.WEST);
        container.add(biomorphHolder, BorderLayout.CENTER);
        biomorphHolder.setBorder(BorderFactory.createTitledBorder("Last Evolved Biomorph"));
        biomorphHolder.add(new JLabel("Nothing generated yet.", JLabel.CENTER));
        selectionDialog.add(console, BorderLayout.CENTER);
        selectionDialog.setSize(800, 600);
        selectionDialog.validate();
    }