protected int getSelectionState( ) {
		int p0 = fElement.getStartOffset();
		int p1 = fElement.getEndOffset();
		if (fContainer instanceof JTextComponent) {
			JTextComponent textComp = (JTextComponent)fContainer;
			int start = textComp.getSelectionStart();
			int end = textComp.getSelectionEnd();
			if( start<=p0 && end>=p1 ) {
				if( start==p0 && end==p1 && isEditable() )
					return 2;
				else
					return 1;
			}
		}
		return 0;
	}