Java 类org.eclipse.swt.accessibility.AccessibleEvent 实例源码

项目:PDFReporter-Studio    文件:JDGuideEditPart.java   
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;
}
项目:gef-gwt    文件:GuideEditPart.java   
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;
}
项目:gef-gwt    文件:ToolBarManager.java   
/**
 * 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;
                    }
                }
            }
        }
    };

}
项目:birt    文件:ExpressionSyntaxColoringPage.java   
/**
 * 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;
                }
            } );
}
项目:termsuite-ui    文件:ProgressAnimationItem.java   
private void initButton(Image im, final String tt) {
    toolButton.setImage(im);
    toolButton.setToolTipText(tt);
    toolbar.setVisible(true);
    toolbar.getParent().layout(); // must layout

    toolbar.getAccessible().addAccessibleListener(new AccessibleAdapter() {
        @Override
        public void getName(AccessibleEvent e) {
            e.result = tt;
        }
       });
}
项目:angular-eclipse    文件:HTMLAngularEditorSyntaxColoringPreferencePage.java   
/**
 * 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;
        }
    });
}
项目:bts    文件:SWTUtil.java   
/**
 * 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) {
            e.result = text;
        }
    });
}
项目:xtext-gef    文件:StateNameEditPart.java   
/**
 * @generated
 */
protected AccessibleEditPart getAccessibleEditPart() {
    if (accessibleEP == null) {
        accessibleEP = new AccessibleGraphicalEditPart() {

            public void getName(AccessibleEvent e) {
                e.result = getLabelTextHelper(getFigure());
            }
        };
    }
    return accessibleEP;
}
项目:PDFReporter-Studio    文件:JDRulerEditPart.java   
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;
}
项目:eclipse-wtp-json    文件:JSONSyntaxColoringPage.java   
/**
 * 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;
        }
    });
}
项目:Eclipse-Postfix-Code-Completion    文件:SWTUtil.java   
/**
 * 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;
            }
        }
    });
}
项目:translationstudio8    文件:CustomMessageDialog.java   
private void addAccessibleListeners(Label label, final Image image) {
    label.getAccessible().addAccessibleListener(new AccessibleAdapter() {
        public void getName(AccessibleEvent event) {
            final String accessibleMessage = getAccessibleMessageFor(image);
            if (accessibleMessage == null) {
                return;
            }
            event.result = accessibleMessage;
        }
    });
}
项目:gef-gwt    文件:RulerEditPart.java   
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;
}
项目:gef-gwt    文件:LightweightSystem.java   
/** @see AccessibleListener#getDescription(AccessibleEvent) */
public void getDescription(AccessibleEvent e) {
    EventDispatcher.AccessibilityDispatcher ad;
    ad = getEventDispatcher().getAccessibilityDispatcher();
    if (ad != null)
        ad.getDescription(e);
}
项目:gef-gwt    文件:LightweightSystem.java   
/** @see AccessibleListener#getHelp(AccessibleEvent) */
public void getHelp(AccessibleEvent e) {
    EventDispatcher.AccessibilityDispatcher ad;
    ad = getEventDispatcher().getAccessibilityDispatcher();
    if (ad != null)
        ad.getHelp(e);
}
项目:gef-gwt    文件:LightweightSystem.java   
/** @see AccessibleListener#getKeyboardShortcut(AccessibleEvent) */
public void getKeyboardShortcut(AccessibleEvent e) {
    EventDispatcher.AccessibilityDispatcher ad;
    ad = getEventDispatcher().getAccessibilityDispatcher();
    if (ad != null)
        ad.getKeyboardShortcut(e);
}
项目:gef-gwt    文件:LightweightSystem.java   
/** @see AccessibleListener#getName(AccessibleEvent) */
public void getName(AccessibleEvent e) {
    EventDispatcher.AccessibilityDispatcher ad;
    ad = getEventDispatcher().getAccessibilityDispatcher();
    if (ad != null)
        ad.getName(e);
}
项目:gef-gwt    文件:IconAndMessageDialog.java   
/**
 * Add an accessible listener to the label if it can be inferred from the
 * image.
 * 
 * @param label
 * @param image
 */
private void addAccessibleListeners(Label label, final Image image) {
    label.getAccessible().addAccessibleListener(new AccessibleAdapter() {
        public void getName(AccessibleEvent event) {
            final String accessibleMessage = getAccessibleMessageFor(image);
            if (accessibleMessage == null) {
                return;
            }
            event.result = accessibleMessage;
        }
    });
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:SWTUtil.java   
/**
 * 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;
            }
        }
    });
}
项目:ROADDesigner    文件:ContractNameEditPart.java   
/**
 * @generated
 */
protected AccessibleEditPart getAccessibleEditPart() {
    if (accessibleEP == null) {
        accessibleEP = new AccessibleGraphicalEditPart() {

            public void getName(AccessibleEvent e) {
                e.result = getLabelTextHelper(getFigure());
            }
        };
    }
    return accessibleEP;
}
项目:ROADDesigner    文件:WrappingLabelEditPart.java   
/**
 * @generated
 */
protected AccessibleEditPart getAccessibleEditPart() {
    if (accessibleEP == null) {
        accessibleEP = new AccessibleGraphicalEditPart() {

            public void getName(AccessibleEvent e) {
                e.result = getLabelTextHelper(getFigure());
            }
        };
    }
    return accessibleEP;
}
项目:ROADDesigner    文件:SMCNameEditPart.java   
/**
 * @generated
 */
protected AccessibleEditPart getAccessibleEditPart() {
    if (accessibleEP == null) {
        accessibleEP = new AccessibleGraphicalEditPart() {

            public void getName(AccessibleEvent e) {
                e.result = getLabelTextHelper(getFigure());
            }
        };
    }
    return accessibleEP;
}
项目:ROADDesigner    文件:WrappingLabel3EditPart.java   
/**
 * @generated
 */
protected AccessibleEditPart getAccessibleEditPart() {
    if (accessibleEP == null) {
        accessibleEP = new AccessibleGraphicalEditPart() {

            public void getName(AccessibleEvent e) {
                e.result = getLabelTextHelper(getFigure());
            }
        };
    }
    return accessibleEP;
}
项目:ROADDesigner    文件:WrappingLabel2EditPart.java   
/**
 * @generated
 */
protected AccessibleEditPart getAccessibleEditPart() {
    if (accessibleEP == null) {
        accessibleEP = new AccessibleGraphicalEditPart() {

            public void getName(AccessibleEvent e) {
                e.result = getLabelTextHelper(getFigure());
            }
        };
    }
    return accessibleEP;
}
项目:eclipsensis    文件:InstallOptionsDialogEditPart.java   
@Override
protected AccessibleEditPart createAccessible()
{
    return new AccessibleGraphicalEditPart() {
        @Override
        public void getName(AccessibleEvent e)
        {
            e.result = InstallOptionsPlugin.getResourceString("install.options.dialog.name"); //$NON-NLS-1$
        }
    };
}
项目:tmxeditor8    文件:CustomMessageDialog.java   
private void addAccessibleListeners(Label label, final Image image) {
    label.getAccessible().addAccessibleListener(new AccessibleAdapter() {
        public void getName(AccessibleEvent event) {
            final String accessibleMessage = getAccessibleMessageFor(image);
            if (accessibleMessage == null) {
                return;
            }
            event.result = accessibleMessage;
        }
    });
}
项目:birt    文件:ChartUIUtil.java   
/**
 * Add specified description to composite to support Screen Reader tool.
 * 
 * @param composite composite
 * @param description description
 */
public static void addScreenReaderAccessbility( Control composite,
        final String description )
{
    if ( composite == null )
    {
        // if control component is null, do nothing.
        return;
    }
    if ( description != null )
    {
        if ( composite instanceof Spinner )
        {
            addSpinnerScreenReaderAccessbility( (Spinner) composite, description );
        }
        else
        {
            composite.getAccessible( )
                    .addAccessibleListener( new AccessibleAdapter( ) {

                        public void getName( AccessibleEvent e )
                        {
                            e.result = description.replaceAll( "&", IConstants.EMPTY_STRING ) //$NON-NLS-1$
                                    .replaceAll( ":", IConstants.EMPTY_STRING ) //$NON-NLS-1$
                                    .replaceAll( "\\*", IConstants.EMPTY_STRING ); //$NON-NLS-1$
                        }
                    } );
        }

    }
}
项目:birt    文件:BreadcrumbItemDropDown.java   
private void setAccessibilityText( Control control, final String text )
{
    control.getAccessible( )
            .addAccessibleListener( new AccessibleAdapter( ) {

                public void getName( AccessibleEvent e )
                {
                    e.result = text;
                }
            } );
}
项目:birt    文件:EditorGuideEditPart.java   
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;
}
项目:birt    文件:MarignSection.java   
private void setAccessible (final Control control)
{
    if ( control instanceof Composite )
    {
        Composite parent = (Composite)control;
        if ( parent != null && parent.getTabList( ) != null )
        {
            Control[] children = parent.getTabList( );
            for ( int i = 0; i < children.length; i++ )
            {
                setAccessible( children[i] );
            }
        }
    }
    else
    {
        control.getAccessible( )
                .addAccessibleListener( new AccessibleAdapter( ) {

                    public void getName( AccessibleEvent e )
                    {
                        Label lbl = getLabelControl( );
                        if ( lbl != null )
                        {
                            if (control instanceof Text)
                            {
                                e.result = UIUtil.stripMnemonic( getLabelControl( ).getText( ))
                                        + ((Text) control).getText();
                            }
                        }
                    }

                } );
    }
}
项目:birt    文件:ComplexUnitSection.java   
private void setAccessible( final Control control )
{
    if ( control instanceof Composite )
    {
        Composite parent = (Composite) control;
        if ( parent != null && parent.getTabList( ) != null )
        {
            Control[] children = parent.getTabList( );
            for ( int i = 0; i < children.length; i++ )
            {
                setAccessible( children[i] );
            }
        }
    }
    else
    {
        control.getAccessible( )
                .addAccessibleListener( new AccessibleAdapter( ) {

                    public void getName( AccessibleEvent e )
                    {
                        Label lbl = getLabelControl( );
                        if ( lbl != null )
                        {
                            if (control instanceof Text)
                            {
                                e.result = UIUtil.stripMnemonic( getLabelControl( ).getText( ) )
                                    + ((Text) control).getText( );
                            }
                        }
                    }

                } );
    }
}
项目:birt    文件:ColorSection.java   
private void setAccessible (final Control control)
{
    if ( control instanceof Composite )
    {
        Composite parent = (Composite)control;
        if ( parent != null && parent.getTabList( ) != null )
        {
            Control[] children = parent.getTabList( );
            for ( int i = 0; i < children.length; i++ )
            {
                setAccessible( children[i] );
            }
        }
    }
    else
    {
        control.getAccessible( )
                .addAccessibleListener( new AccessibleAdapter( ) {

                    public void getName( AccessibleEvent e )
                    {
                        Label lbl = getLabelControl( );
                        if ( lbl != null )
                        {
                            if (control instanceof Button)
                            {
                                e.result = UIUtil.stripMnemonic( getLabelControl( ).getText( ))
                                        + JFaceResources.getString( "ColorSelector.Name" ); //$NON-NLS-1$
                            }
                            else if (control instanceof Text)
                            {
                                e.result = UIUtil.stripMnemonic( getLabelControl( ).getText( ))
                                        + ((Text) control).getText( );
                            }
                        }
                    }

                } );
    }
}
项目:birt    文件:FontSizeSection.java   
private void setAccessible( Control control )
{
    if ( control instanceof Composite )
    {
        Composite parent = (Composite)control;
        if ( parent != null && parent.getTabList( ) != null )
        {
            Control[] children = parent.getTabList( );
            for ( int i = 0; i < children.length; i++ )
            {
                setAccessible( children[i] );
            }
        }
    }
    else
    {
        control.getAccessible( )
                .addAccessibleListener( new AccessibleAdapter( ) {

                    public void getName( AccessibleEvent e )
                    {
                        Label lbl = getLabelControl( );
                        if ( lbl != null )
                        {
                            e.result = UIUtil.stripMnemonic( getLabelControl( ).getText( ))
                                    + fontSize.getFontSizeValue( );
                        }
                    }

                } );
    }
}
项目:birt    文件:OutputSection.java   
private void setAccessible(final Control control)
{
    if ( control instanceof Composite )
    {
        Composite parent = (Composite)control;
        if ( parent != null && parent.getTabList( ) != null )
        {
            Control[] children = parent.getTabList( );
            for ( int i = 0; i < children.length; i++ )
            {
                setAccessible( children[i] );
            }
        }
    }
    else
    {
        control.getAccessible( )
                .addAccessibleListener( new AccessibleAdapter( ) {

                    public void getName( AccessibleEvent e )
                    {
                        if ( control instanceof Text && control.getParent( ) instanceof ExpressionComposite )
                        {
                            e.result = UIUtil.stripMnemonic(Messages.getString( "VisibilityPage.Label.Expression" )) + ((Text)control).getText( ); //$NON-NLS-1$
                        }
                    }
                } );
    }
}
项目:HelloBrazil    文件:EliminationMatchIdEditPart.java   
/**
 * @generated
 */
protected AccessibleEditPart getAccessibleEditPart() {
    if (accessibleEP == null) {
        accessibleEP = new AccessibleGraphicalEditPart() {

            public void getName(AccessibleEvent e) {
                e.result = getLabelTextHelper(getFigure());
            }
        };
    }
    return accessibleEP;
}
项目:HelloBrazil    文件:TeamCountryEditPart.java   
/**
 * @generated
 */
protected AccessibleEditPart getAccessibleEditPart() {
    if (accessibleEP == null) {
        accessibleEP = new AccessibleGraphicalEditPart() {

            public void getName(AccessibleEvent e) {
                e.result = getLabelTextHelper(getFigure());
            }
        };
    }
    return accessibleEP;
}
项目:HelloBrazil    文件:GroupGroupNameEditPart.java   
/**
 * @generated
 */
protected AccessibleEditPart getAccessibleEditPart() {
    if (accessibleEP == null) {
        accessibleEP = new AccessibleGraphicalEditPart() {

            public void getName(AccessibleEvent e) {
                e.result = getLabelTextHelper(getFigure());
            }
        };
    }
    return accessibleEP;
}
项目:HelloBrazil    文件:GroupMatchIdEditPart.java   
/**
 * @generated
 */
protected AccessibleEditPart getAccessibleEditPart() {
    if (accessibleEP == null) {
        accessibleEP = new AccessibleGraphicalEditPart() {

            public void getName(AccessibleEvent e) {
                e.result = getLabelTextHelper(getFigure());
            }
        };
    }
    return accessibleEP;
}
项目:simplified-bpmn-example    文件:XORName2EditPart.java   
/**
 * @generated
 */
protected AccessibleEditPart getAccessibleEditPart() {
    if (accessibleEP == null) {
        accessibleEP = new AccessibleGraphicalEditPart() {

            public void getName(AccessibleEvent e) {
                e.result = getLabelTextHelper(getFigure());
            }
        };
    }
    return accessibleEP;
}
项目:simplified-bpmn-example    文件:DataObjectNameEditPart.java   
/**
 * @generated
 */
protected AccessibleEditPart getAccessibleEditPart() {
    if (accessibleEP == null) {
        accessibleEP = new AccessibleGraphicalEditPart() {

            public void getName(AccessibleEvent e) {
                e.result = getLabelTextHelper(getFigure());
            }
        };
    }
    return accessibleEP;
}