001/*
002 * (C) Copyright 2006-2009 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     troger
018 */
019package org.nuxeo.ecm.platform.annotations.gwt.client.util;
020
021import com.google.gwt.dom.client.Node;
022
023/**
024 * @author <a href="mailto:troger@nuxeo.com">Thomas Roger</a>
025 */
026public class Range {
027
028    private String selectedText;
029
030    private Node startContainer;
031
032    private int startOffset;
033
034    private Node endContainer;
035
036    private int endOffset;
037
038    public Range(String selectedText, Node startContainer, int startOffset, Node endContainer, int endOfsset) {
039        this.selectedText = selectedText;
040        this.startContainer = startContainer;
041        this.startOffset = startOffset;
042        this.endContainer = endContainer;
043        this.endOffset = endOfsset;
044    }
045
046    public String getSelectedText() {
047        return selectedText;
048    }
049
050    public Node getStartContainer() {
051        return startContainer;
052    }
053
054    public int getStartOffset() {
055        return startOffset;
056    }
057
058    public Node getEndContainer() {
059        return endContainer;
060    }
061
062    public int getEndOffset() {
063        return endOffset;
064    }
065
066}