本文整理汇总了Java中org.eclipse.swt.accessibility.ACC类的典型用法代码示例。如果您正苦于以下问题:Java ACC类的具体用法?Java ACC怎么用?Java ACC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ACC类属于org.eclipse.swt.accessibility包,在下文中一共展示了ACC类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setFocusCell
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
void setFocusCell(ViewerCell focusCell) {
ViewerCell oldCell = this.focusCell;
if( this.focusCell != null && ! this.focusCell.getItem().isDisposed() ) {
this.focusCell.getItem().removeDisposeListener(itemDeletionListener);
}
this.focusCell = focusCell;
if( this.focusCell != null && ! this.focusCell.getItem().isDisposed() ) {
this.focusCell.getItem().addDisposeListener(itemDeletionListener);
}
if( focusCell != null ) {
focusCell.scrollIntoView();
}
this.cellHighlighter.focusCellChanged(focusCell,oldCell);
getViewer().getControl().getAccessible().setFocus(ACC.CHILDID_SELF);
}
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:22,代码来源:SWTFocusCellManager.java
示例2: getAccessibleListener
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
/**
* Get the accessible listener for the tool bar.
*
* @return AccessibleListener
*
* @since 3.1
*/
private AccessibleListener getAccessibleListener() {
return new AccessibleAdapter() {
public void getName(AccessibleEvent e) {
if (e.childID != ACC.CHILDID_SELF) {
ToolItem item = toolBar.getItem(e.childID);
if (item != null) {
String toolTip = item.getToolTipText();
if (toolTip != null) {
e.result = toolTip;
}
}
}
}
};
}
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:24,代码来源:ToolBarManager.java
示例3: setAccessible
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
/**
* Specifically set the reporting name of a control for accessibility
*/
private void setAccessible( Control control, String name )
{
if ( control == null )
return;
final String n = name;
control.getAccessible( )
.addAccessibleListener( new AccessibleAdapter( ) {
public void getName( AccessibleEvent e )
{
if ( e.childID == ACC.CHILDID_SELF )
e.result = n;
}
} );
}
开发者ID:eclipse,项目名称:birt,代码行数:19,代码来源:ExpressionSyntaxColoringPage.java
示例4: setAccessible
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
/**
* Specifically set the reporting name of a control for accessibility
*/
private void setAccessible(Control control, String name) {
if (control == null)
return;
final String n = name;
control.getAccessible().addAccessibleListener(new AccessibleAdapter() {
public void getName(AccessibleEvent e) {
if (e.childID == ACC.CHILDID_SELF)
e.result = n;
}
});
}
开发者ID:angelozerr,项目名称:angular-eclipse,代码行数:15,代码来源:HTMLAngularEditorSyntaxColoringPreferencePage.java
示例5: notifyAccessibleTextChanged
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
/**
* Notifies <code>org.eclipse.swt.accessibility.Accessible<code> object that selected item has been changed.
*/
private void notifyAccessibleTextChanged() {
if (table.getSelection().length == 0) { return; }
final TableItem item = table.getSelection()[0];
selectedString = NLS.bind("{0}: {1}", item.getText(0), item.getText(1));
text.getAccessible().sendEvent(ACC.EVENT_NAME_CHANGED, null);
}
开发者ID:gama-platform,项目名称:gama,代码行数:10,代码来源:GamlSearchField.java
示例6: setAccessibilityText
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
/**
* Adds an accessibility listener returning the given fixed name.
*
* @param control the control to add the accessibility support to
* @param text the name
*/
public static void setAccessibilityText(Control control, final String text) {
control.getAccessible().addAccessibleListener(new AccessibleAdapter() {
@Override
public void getName(AccessibleEvent e) {
if (e.childID == ACC.CHILDID_SELF) {
e.result= text;
}
}
});
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:17,代码来源:SWTUtil.java
示例7: getState
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
/**
* @see AccessibleEditPart#getState(AccessibleControlEvent)
*/
public void getState(AccessibleControlEvent e) {
e.detail = ACC.STATE_SELECTABLE | ACC.STATE_FOCUSABLE;
if (getSelected() != EditPart.SELECTED_NONE)
e.detail |= ACC.STATE_SELECTED;
if (getViewer().getFocusEditPart() == AbstractGraphicalEditPart.this)
e.detail |= ACC.STATE_FOCUSED;
}
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:11,代码来源:AbstractGraphicalEditPart.java
示例8: get
import org.eclipse.swt.accessibility.ACC; //导入依赖的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));
}
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:10,代码来源:DomainEventDispatcher.java
示例9: addRelation
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
void addRelation(Control control) {
if (!control.isDescribedByLabel())
return;
if (labelHandle == 0)
return;
control._getAccessible().addRelation(ACC.RELATION_LABELLED_BY,
_getAccessible());
control.labelRelation = this;
}
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:10,代码来源:Label.java
示例10: removeRelation
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
void removeRelation() {
if (!isDescribedByLabel())
return; /* there will not be any */
if (labelRelation != null) {
_getAccessible().removeRelation(ACC.RELATION_LABELLED_BY,
labelRelation._getAccessible());
labelRelation = null;
}
}
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:10,代码来源:Control.java
示例11: getChildAtPoint
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
public void getChildAtPoint( AccessibleControlEvent e )
{
Point testPoint = toControl( new Point( e.x, e.y ) );
if ( getBounds( ).contains( testPoint ) )
{
e.childID = ACC.CHILDID_SELF;
}
}
开发者ID:eclipse,项目名称:birt,代码行数:9,代码来源:CustomChooserComposite.java
示例12: setAccessibilityText
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
/**
* Adds an accessibility listener returning the given fixed name.
*
* @param control the control to add the accessibility support to
* @param text the name
*/
public static void setAccessibilityText(Control control, final String text) {
control.getAccessible().addAccessibleListener(new AccessibleAdapter() {
@Override
public void getName(AccessibleEvent e) {
if (e.childID == ACC.CHILDID_SELF) {
e.result = text;
}
}
});
}
开发者ID:fabioz,项目名称:Pydev,代码行数:17,代码来源:SWTUtil.java
示例13: setAccessible
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
/**
* Specifically set the reporting name of a control for accessibility
*/
private void setAccessible(Control control, String name) {
if (control == null)
return;
final String n = name;
control.getAccessible().addAccessibleListener(new AccessibleAdapter() {
public void getName(AccessibleEvent e) {
if (e.childID == ACC.CHILDID_SELF)
e.result = n;
}
});
}
开发者ID:UndefinedOffset,项目名称:eclipse-silverstripedt,代码行数:15,代码来源:SilverStripeSyntaxColoringPage.java
示例14: ProjectPropertiesComposite
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
/**
* Creates the composite.
*
* @param parent
* The parent composite.
* @param style
* Style which will be used.
* @param preferencesDTO
* Stores connection information.
* @param validatorStatusListener
* The IChangeListener used for the validator.
*/
public ProjectPropertiesComposite(Composite parent, int style, ProjectPropertiesDTO preferencesDTO,
IChangeListener validatorStatusListener) {
super(parent, style);
this.preferencesDTO = preferencesDTO;
this.validatorStatusListener = validatorStatusListener;
setLayout(new GridLayout(1, false));
Group grpCdo = new Group(this, SWT.NONE);
grpCdo.setLayout(new GridLayout(2, false));
GridData gdGrpCdo = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
gdGrpCdo.minimumHeight = 150;
gdGrpCdo.heightHint = 156;
grpCdo.setLayoutData(gdGrpCdo);
grpCdo.setText("CDO");
Label lblHostname = new Label(grpCdo, SWT.NONE);
lblHostname.setText("Hostname:");
txtCDOHostname = new Text(grpCdo, SWT.BORDER);
txtCDOHostname.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
Accessible accLblHostname = lblHostname.getAccessible();
Accessible accTxtHostname = txtCDOHostname.getAccessible();
accLblHostname.addRelation(ACC.RELATION_LABEL_FOR, accTxtHostname);
accTxtHostname.addRelation(ACC.RELATION_LABELLED_BY, accLblHostname);
Label lblPort = new Label(grpCdo, SWT.NONE);
lblPort.setText("Port:");
txtCDOPort = new Text(grpCdo, SWT.BORDER);
txtCDOPort.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
Accessible accLblPort = lblPort.getAccessible();
Accessible accTxtPort = txtCDOPort.getAccessible();
accLblPort.addRelation(ACC.RELATION_LABEL_FOR, accTxtPort);
accTxtPort.addRelation(ACC.RELATION_LABELLED_BY, accLblPort);
Label lblRepository = new Label(grpCdo, SWT.NONE);
lblRepository.setText("Repository:");
txtCDORepository = new Text(grpCdo, SWT.BORDER);
txtCDORepository.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
Accessible accLblRepository = lblRepository.getAccessible();
Accessible accTxtRepository = txtCDORepository.getAccessible();
accLblRepository.addRelation(ACC.RELATION_LABEL_FOR, accTxtRepository);
accTxtRepository.addRelation(ACC.RELATION_LABELLED_BY, accLblRepository);
Label lblUsername = new Label(grpCdo, SWT.NONE);
lblUsername.setText("Username:");
txtCDOUsername = new Text(grpCdo, SWT.BORDER);
txtCDOUsername.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
Accessible accLblUsername = lblUsername.getAccessible();
Accessible accTxtUsername = txtCDOUsername.getAccessible();
accLblUsername.addRelation(ACC.RELATION_LABEL_FOR, accTxtUsername);
accTxtUsername.addRelation(ACC.RELATION_LABELLED_BY, accLblUsername);
Label lblPassword = new Label(grpCdo, SWT.NONE);
lblPassword.setText("Password:");
txtCDOPassword = new Text(grpCdo, SWT.BORDER | SWT.PASSWORD);
txtCDOPassword.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
Accessible accLblPassword = lblPassword.getAccessible();
Accessible accTxtPassword = txtCDOPassword.getAccessible();
accLblPassword.addRelation(ACC.RELATION_LABEL_FOR, accTxtPassword);
accTxtPassword.addRelation(ACC.RELATION_LABELLED_BY, accLblPassword);
mBindingContext = createDataBindings();
}
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:76,代码来源:ProjectPropertiesComposite.java
示例15: getRole
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
/**
* @see AccessibleEditPart#getRole(AccessibleControlEvent)
*/
public void getRole(AccessibleControlEvent e) {
e.detail = ACC.ROLE_LABEL;
}
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:7,代码来源:AbstractGraphicalEditPart.java
示例16: getRole
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
public void getRole( AccessibleControlEvent e )
{
e.detail = ACC.ROLE_COMBOBOX;
}
开发者ID:eclipse,项目名称:birt,代码行数:5,代码来源:CustomChooserComposite.java
示例17: getState
import org.eclipse.swt.accessibility.ACC; //导入依赖的package包/类
public void getState( AccessibleControlEvent e )
{
e.detail = ACC.STATE_NORMAL;
}
开发者ID:eclipse,项目名称:birt,代码行数:5,代码来源:CustomChooserComposite.java
注:本文中的org.eclipse.swt.accessibility.ACC类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论