本文整理汇总了Java中org.eclipse.gef.AccessibleEditPart类的典型用法代码示例。如果您正苦于以下问题:Java AccessibleEditPart类的具体用法?Java AccessibleEditPart怎么用?Java AccessibleEditPart使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AccessibleEditPart类属于org.eclipse.gef包,在下文中一共展示了AccessibleEditPart类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAccessibleEditPart
import org.eclipse.gef.AccessibleEditPart; //导入依赖的package包/类
protected AccessibleEditPart getAccessibleEditPart() {
if (accPart == null)
accPart = new AccessibleGraphicalEditPart() {
public void getDescription(AccessibleEvent e) {
if (getRulerProvider() != null)
getRulerProvider().getAccGuideDescription(e, getModel());
}
public void getName(AccessibleEvent e) {
if (getRulerProvider() != null)
getRulerProvider().getAccGuideName(e, getModel());
}
public void getValue(AccessibleControlEvent e) {
if (getRulerProvider() != null)
getRulerProvider().getAccGuideValue(e, getModel());
}
};
return accPart;
}
示例2: reveal
import org.eclipse.gef.AccessibleEditPart; //导入依赖的package包/类
/**
* Reveals the specified editpart by using {@link ExposeHelper}s. A
* bottom-up scan through the parent-chain is performed, looking for expose
* helpers along the way, and asking them to expose the given editpart.
*
* @see org.eclipse.gef.EditPartViewer#reveal(EditPart)
*/
public void reveal(EditPart part) {
if (part == null)
return;
EditPart current = part.getParent();
while (current != null) {
ExposeHelper helper = (ExposeHelper) current
.getAdapter(ExposeHelper.class);
if (helper != null)
helper.exposeDescendant(part);
current = current.getParent();
}
AccessibleEditPart acc = (AccessibleEditPart) part
.getAdapter(AccessibleEditPart.class);
if (acc != null)
getControl().getAccessible().setFocus(acc.getAccessibleID());
}
示例3: getAccessibleEditPart
import org.eclipse.gef.AccessibleEditPart; //导入依赖的package包/类
protected AccessibleEditPart getAccessibleEditPart() {
if (accPart == null)
accPart = new AccessibleGraphicalEditPart() {
public void getDescription(AccessibleEvent e) {
if (getRulerProvider() != null)
getRulerProvider()
.getAccGuideDescription(e, getModel());
}
public void getName(AccessibleEvent e) {
if (getRulerProvider() != null)
getRulerProvider().getAccGuideName(e, getModel());
}
public void getValue(AccessibleControlEvent e) {
if (getRulerProvider() != null)
getRulerProvider().getAccGuideValue(e, getModel());
}
};
return accPart;
}
示例4: getAccessibleEditPart
import org.eclipse.gef.AccessibleEditPart; //导入依赖的package包/类
/**
* @generated
*/
protected AccessibleEditPart getAccessibleEditPart() {
if (accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
public void getName(AccessibleEvent e) {
e.result = getLabelTextHelper(getFigure());
}
};
}
return accessibleEP;
}
示例5: getAccessibleEditPart
import org.eclipse.gef.AccessibleEditPart; //导入依赖的package包/类
protected AccessibleEditPart getAccessibleEditPart() {
if (accPart == null)
accPart = new AccessibleGraphicalEditPart() {
public void getName(AccessibleEvent e) {
e.result = isHorizontal() ? "Horizontal" : "Vertical"; //$NON-NLS-1$ //$NON-NLS-2$
}
public void getDescription(AccessibleEvent e) {
e.result = "Ruler"; //$NON-NLS-1$
}
};
return accPart;
}
示例6: getChildren
import org.eclipse.gef.AccessibleEditPart; //导入依赖的package包/类
/**
* @see AccessibleEditPart#getChildren(AccessibleControlEvent)
*/
public void getChildren(AccessibleControlEvent e) {
List list = AbstractGraphicalEditPart.this.getChildren();
Object children[] = new Object[list.size()];
for (int i = 0; i < list.size(); i++) {
EditPart part = (EditPart) list.get(i);
AccessibleEditPart access = (AccessibleEditPart) part
.getAdapter(AccessibleEditPart.class);
if (access == null)
return; // fail if any children aren't accessible.
children[i] = new Integer(access.getAccessibleID());
}
e.children = children;
}
示例7: registerAccessibleEditPart
import org.eclipse.gef.AccessibleEditPart; //导入依赖的package包/类
/**
* Registers the accessible editpart with the event dispatcher.
*
* @param acc
* the accessible
*/
public void registerAccessibleEditPart(AccessibleEditPart acc) {
Assert.isNotNull(acc);
DomainEventDispatcher domainEventDispatcher = getEventDispatcher();
if (domainEventDispatcher != null) {
domainEventDispatcher.putAccessible(acc);
}
}
示例8: unregisterAccessibleEditPart
import org.eclipse.gef.AccessibleEditPart; //导入依赖的package包/类
/**
* @see EditPartViewer#unregisterAccessibleEditPart(org.eclipse.gef.AccessibleEditPart)
*/
public void unregisterAccessibleEditPart(AccessibleEditPart acc) {
Assert.isNotNull(acc);
DomainEventDispatcher domainEventDispatcher = getEventDispatcher();
if (domainEventDispatcher != null) {
domainEventDispatcher.removeAccessible(acc);
}
}
示例9: get
import org.eclipse.gef.AccessibleEditPart; //导入依赖的package包/类
private AccessibleEditPart get(int childID) {
if (childID == ACC.CHILDID_SELF || childID == ACC.CHILDID_NONE)
if (getViewer().getContents() != null)
return (AccessibleEditPart) getViewer().getContents()
.getAdapter(AccessibleEditPart.class);
else
return null;
return (AccessibleEditPart) accessibles.get(new Integer(childID));
}
示例10: getChildAtPoint
import org.eclipse.gef.AccessibleEditPart; //导入依赖的package包/类
/**
* @see AccessibleControlListener#getChildAtPoint(AccessibleControlEvent)
*/
public void getChildAtPoint(AccessibleControlEvent e) {
org.eclipse.swt.graphics.Point p = new org.eclipse.swt.graphics.Point(
e.x, e.y);
p = getViewer().getControl().toControl(p);
EditPart part = getViewer().findObjectAt(new Point(p.x, p.y));
if (part == null)
return;
AccessibleEditPart acc = (AccessibleEditPart) part
.getAdapter(AccessibleEditPart.class);
if (acc != null)
e.childID = acc.getAccessibleID();
}
示例11: getFocus
import org.eclipse.gef.AccessibleEditPart; //导入依赖的package包/类
/**
* @see AccessibleControlListener#getFocus(AccessibleControlEvent)
*/
public void getFocus(AccessibleControlEvent e) {
AccessibleEditPart acc = (AccessibleEditPart) getViewer()
.getFocusEditPart().getAdapter(AccessibleEditPart.class);
if (acc != null)
e.childID = acc.getAccessibleID();
}
示例12: getAccessibleEditPart
import org.eclipse.gef.AccessibleEditPart; //导入依赖的package包/类
protected AccessibleEditPart getAccessibleEditPart() {
if (accPart == null)
accPart = new AccessibleGraphicalEditPart() {
public void getName(AccessibleEvent e) {
e.result = isHorizontal() ? GEFMessages.Ruler_Horizontal_Label
: GEFMessages.Ruler_Vertical_Label;
}
public void getDescription(AccessibleEvent e) {
e.result = GEFMessages.Ruler_Desc;
}
};
return accPart;
}
示例13: getAccessibleEditPart
import org.eclipse.gef.AccessibleEditPart; //导入依赖的package包/类
protected AccessibleEditPart getAccessibleEditPart( )
{
if ( accPart == null )
accPart = new AccessibleGraphicalEditPart( )
{
public void getDescription( AccessibleEvent e )
{
if ( getRulerProvider( ) != null )
getRulerProvider( ).getAccGuideDescription( e,
getModel( ) );
}
public void getName( AccessibleEvent e )
{
if ( getRulerProvider( ) != null )
getRulerProvider( ).getAccGuideName( e, getModel( ) );
}
public void getValue( AccessibleControlEvent e )
{
if ( getRulerProvider( ) != null )
getRulerProvider( ).getAccGuideValue( e, getModel( ) );
}
};
return accPart;
}