001/*
002 * (C) Copyright 2006-2009 Nuxeo SAS (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     troger
016 */
017package org.nuxeo.ecm.platform.annotations.gwt.client.util;
018
019import com.google.gwt.dom.client.Node;
020
021/**
022 * @author <a href="mailto:troger@nuxeo.com">Thomas Roger</a>
023 */
024public class Range {
025
026    private String selectedText;
027
028    private Node startContainer;
029
030    private int startOffset;
031
032    private Node endContainer;
033
034    private int endOffset;
035
036    public Range(String selectedText, Node startContainer, int startOffset, Node endContainer, int endOfsset) {
037        this.selectedText = selectedText;
038        this.startContainer = startContainer;
039        this.startOffset = startOffset;
040        this.endContainer = endContainer;
041        this.endOffset = endOfsset;
042    }
043
044    public String getSelectedText() {
045        return selectedText;
046    }
047
048    public Node getStartContainer() {
049        return startContainer;
050    }
051
052    public int getStartOffset() {
053        return startOffset;
054    }
055
056    public Node getEndContainer() {
057        return endContainer;
058    }
059
060    public int getEndOffset() {
061        return endOffset;
062    }
063
064}