private boolean evaluateAttachClause(String str) {
		if (!(model instanceof MolecularModel))
			return false;
		if (str == null)
			return false;
		if (str.trim().length() == 0)
			return false;
		String lcStr = str.toLowerCase();
		if (lcStr.startsWith("line")) {
			str = lcStr.substring(4).trim();
			String[] s = str.split("\\s+");
			if (s.length < 4)
				return false;
			for (int i = 0; i < s.length; i++)
				s[i] = s[i].trim();
			int i1 = Math.round(Float.parseFloat(s[0]));
			LineComponent lc = view.getLine(i1);
			if (lc == null) {
				out(ScriptEvent.FAILED, "Line " + i1 + " does not exist.");
				return false;
			}
			int i2 = Math.round(Float.parseFloat(s[3]));
			if ("atom".equals(s[2])) {
				Atom at = ((MolecularModel) model).getAtom(i2);
				if (at == null) {
					out(ScriptEvent.FAILED, "Atom " + i2 + " does not exist.");
					return false;
				}
				lc.setHost(at);
				view.repaint();
			} else if ("bond".equals(s[2])) {
				RadialBond rb = ((MolecularModel) model).getBonds().get(i2);
				if (rb == null) {
					out(ScriptEvent.FAILED, "Radial bond " + i2 + " does not exist.");
					return false;
				}
				lc.setHost(rb);
				view.repaint();
			}
			return true;
		} else if (lcStr.startsWith("rectangle")) {
			str = lcStr.substring(9).trim();
			String[] s = str.split("\\s+");
			if (s.length < 4)
				return false;
			for (int i = 0; i < s.length; i++)
				s[i] = s[i].trim();
			int i1 = Math.round(Float.parseFloat(s[0]));
			RectangleComponent rc = view.getRectangle(i1);
			if (rc == null) {
				out(ScriptEvent.FAILED, "Rectangle " + i1 + " does not exist.");
				return false;
			}
			int i2 = Math.round(Float.parseFloat(s[3]));
			if ("atom".equals(s[2])) {
				Atom at = ((MolecularModel) model).getAtom(i2);
				if (at == null) {
					out(ScriptEvent.FAILED, "Atom " + i2 + " does not exist.");
					return false;
				}
				rc.setHost(at);
				view.repaint();
			}
			return true;
		} else if (lcStr.startsWith("ellipse")) {
			str = lcStr.substring(7).trim();
			String[] s = str.split("\\s+");
			if (s.length < 4)
				return false;
			for (int i = 0; i < s.length; i++)
				s[i] = s[i].trim();
			int i1 = Math.round(Float.parseFloat(s[0]));
			EllipseComponent ec = view.getEllipse(i1);
			if (ec == null) {
				out(ScriptEvent.FAILED, "Ellipse " + i1 + " does not exist.");
				return false;
			}
			int i2 = Math.round(Float.parseFloat(s[3]));
			if ("atom".equals(s[2])) {
				ec.setHost(((MolecularModel) model).getAtom(i2));
				view.repaint();
			}
			return true;
		} else if (lcStr.startsWith("image")) {
			str = lcStr.substring(5).trim();
			String[] s = str.split("\\s+");
			if (s.length < 4)
				return false;
			for (int i = 0; i < s.length; i++)
				s[i] = s[i].trim();
			int i1 = Math.round(Float.parseFloat(s[0]));
			ImageComponent ic = view.getImage(i1);
			if (ic == null) {
				out(ScriptEvent.FAILED, "Image " + i1 + " does not exist.");
				return false;
			}
			int i2 = Math.round(Float.parseFloat(s[3]));
			if ("atom".equals(s[2])) {
				Atom at = ((MolecularModel) model).getAtom(i2);
				ic.setHost(null);
				ic.setHost(at);
				view.repaint();
			} else if ("bond".equals(s[2])) {
				RadialBond rb = ((MolecularModel) model).getBonds().get(i2);
				if (rb == null) {
					out(ScriptEvent.FAILED, "Radial bond " + i2 + " does not exist.");
					return false;
				}
				ic.setHost(rb);
				view.repaint();
			}
			return true;
		} else if (lcStr.startsWith("textbox")) {
			str = lcStr.substring(7).trim();
			String[] s = str.split("\\s+");
			if (s.length < 4)
				return false;
			for (int i = 0; i < s.length; i++)
				s[i] = s[i].trim();
			int i1 = Math.round(Float.parseFloat(s[0]));
			TextBoxComponent tc = view.getTextBox(i1);
			if (tc == null) {
				out(ScriptEvent.FAILED, "Text box " + i1 + " does not exist.");
				return false;
			}
			int i2 = Math.round(Float.parseFloat(s[3]));
			if ("atom".equals(s[2])) {
				Atom at = ((MolecularModel) model).getAtom(i2);
				if (at == null) {
					out(ScriptEvent.FAILED, "Atom " + i2 + " does not exist.");
					return false;
				}
				tc.setHost(at);
				tc.setAttachmentPosition(TextBoxComponent.BOX_CENTER);
				view.repaint();
			}
			return true;
		}
		return false;
	}