Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: df418054d7d478a913bc2db647bdea040028a113 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                                                 
                                                           








                                                                           





                                                                       




                                     
                                                                                              














                                                                                           
/*******************************************************************************
 * Copyright (c) 2006 Sybase, Inc. and others.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Sybase, Inc. - initial API and implementation
 *******************************************************************************/
package org.eclipse.jst.pagedesigner.validation.caret;

import org.eclipse.jst.jsf.core.internal.tld.IJSFConstants;
import org.eclipse.jst.pagedesigner.dom.EditModelQuery;
import org.w3c.dom.Node;

/**
 * In some place, wen can't do inline editing, like the area between td, in
 * panelGrid, etc. In these places we can't place caret
 * 
 * @author mengbo
 */
/*package*/ class IEPanelgridPositionRule extends DefaultPositionRule {
	/**
	 * @param actionData
	 */
	public IEPanelgridPositionRule(ActionData actionData) {
		super(actionData);
	}

	/**
	 * PanelGrid is not editable.
	 * 
	 * @see org.eclipse.jst.pagedesigner.validation.caret.IPositionRule#isEditable(Target)
	 */
	public boolean isEditable(Target target) {
		Node node = target.getNode();
		return !EditModelQuery.isChild(new String[] {
				IJSFConstants.TAG_PANELGRID, IJSFConstants.TAG_DATATABLE },
				node, false, false);
	}

	public boolean hasEditableArea(Target target) {
		Node node = target.getNode();
		return !EditModelQuery.isChild(new String[] {
				IJSFConstants.TAG_PANELGRID, IJSFConstants.TAG_DATATABLE },
				node, false, false);
	}
}

Back to the top