当前位置: 首页>>代码示例>>Java>>正文


Java AccessibleContext.setAccessibleName方法代码示例

本文整理汇总了Java中javax.accessibility.AccessibleContext.setAccessibleName方法的典型用法代码示例。如果您正苦于以下问题:Java AccessibleContext.setAccessibleName方法的具体用法?Java AccessibleContext.setAccessibleName怎么用?Java AccessibleContext.setAccessibleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.accessibility.AccessibleContext的用法示例。


在下文中一共展示了AccessibleContext.setAccessibleName方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initAccessibility

import javax.accessibility.AccessibleContext; //导入方法依赖的package包/类
private void initAccessibility() {
    ResourceBundle bundle = NbBundle.getBundle(ResultView.class);

    AccessibleContext accessCtx;
    OutlineView outlineView = resultsOutlineSupport.getOutlineView();

    accessCtx = outlineView.getHorizontalScrollBar().getAccessibleContext();
    accessCtx.setAccessibleName(
            bundle.getString("ACSN_HorizontalScrollbar"));          //NOI18N

    accessCtx = outlineView.getVerticalScrollBar().getAccessibleContext();
    accessCtx.setAccessibleName(
            bundle.getString("ACSN_VerticalScrollbar"));            //NOI18N

    accessCtx = outlineView.getAccessibleContext();
    accessCtx.setAccessibleName(
            bundle.getString("ACSN_ResultTree"));                   //NOI18N
    accessCtx.setAccessibleDescription(
            bundle.getString("ACSD_ResultTree"));                   //NOI18N
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:BasicAbstractResultsPanel.java

示例2: getAccessibleContext

import javax.accessibility.AccessibleContext; //导入方法依赖的package包/类
public AccessibleContext getAccessibleContext() {
    AccessibleContext ctx = super.getAccessibleContext();
    if (ctx != null) {
        // Lazily set the accessible name and desc
        // since JEditorPane.AccessibleJEditorPane resp. AccessibleJTextComponent
        // attaches document listener which prevents cloned JEPs from being GCed.
        ctx.setAccessibleName(
                NbBundle.getMessage(CloneableEditor.class, "ACS_CloneableEditor_QuietEditorPane", this.getName())
        );
        ctx.setAccessibleDescription(
                NbBundle.getMessage(
                        CloneableEditor.class, "ACSD_CloneableEditor_QuietEditorPane",
                        this.getName()
                )
        );
    }
    return ctx;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:19,代码来源:QuietEditorPane.java

示例3: initAccessibility

import javax.accessibility.AccessibleContext; //导入方法依赖的package包/类
@NbBundle.Messages({"ACSN_HorizontalScrollbar=Horizontal scrollbar of the results panel",
    "ACSN_VerticalScrollbar=Vertical scrollbar of the results panel"})
private void initAccessibility() {
    AccessibleContext accessCtx;

    accessCtx = getAccessibleContext();
    accessCtx.setAccessibleName(Bundle.ACSN_ResultPanelTree());
    accessCtx.setAccessibleDescription(Bundle.ACSD_ResultPanelTree());

    accessCtx = treeView.getHorizontalScrollBar().getAccessibleContext();
    accessCtx.setAccessibleName(Bundle.ACSN_HorizontalScrollbar());

    accessCtx = treeView.getVerticalScrollBar().getAccessibleContext();
    accessCtx.setAccessibleName(Bundle.ACSN_VerticalScrollbar());

}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:ResultPanelTree.java

示例4: ResultPanelOutput

import javax.accessibility.AccessibleContext; //导入方法依赖的package包/类
/**
 * Creates a new instance of ResultPanelOutput
 */
ResultPanelOutput(ResultDisplayHandler displayHandler) {
    super();
    if (LOG) {
        System.out.println("ResultPanelOutput.<init>");
    }
    
    textPane = new JEditorPane();
    textPane.setFont(new Font("monospaced", Font.PLAIN, getFont().getSize()));
    textPane.setEditorKit(new OutputEditorKit());
    textPane.setEditable(false);
    textPane.getCaret().setVisible(true);
    textPane.getCaret().setBlinkRate(0);
    textPane.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
    setViewportView(textPane);

    /*
     * On GTK L&F, background of the text pane is gray, even though it is
     * white on a JTextArea. The following is a hack to fix it:
     */
    Color background = UIManager.getColor("TextPane.background");   //NOI18N
    if (background != null) {
        textPane.setBackground(background);
    }

    doc = textPane.getDocument();

    AccessibleContext ac = textPane.getAccessibleContext();
    ac.setAccessibleName(NbBundle.getMessage(getClass(),
                                            "ACSN_OutputTextPane"));//NOI18N
    ac.setAccessibleDescription(NbBundle.getMessage(getClass(),
                                            "ACSD_OutputTextPane"));//NOI18N
    
    this.displayHandler = displayHandler;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:38,代码来源:ResultPanelOutput.java

示例5: initAccessibility

import javax.accessibility.AccessibleContext; //导入方法依赖的package包/类
@NbBundle.Messages({"ACSN_ResultPanelTree=Information about passed and failed tests",
"ACSD_ResultPanelTree=Displays in a tree structure information about passed, failed and erroneous tests"})
private void initAccessibility() {
    AccessibleContext accContext = tree.getAccessibleContext();
    accContext.setAccessibleName(Bundle.ACSN_ResultPanelTree());
    accContext.setAccessibleDescription(Bundle.ACSD_ResultPanelTree());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:ResultTreeView.java

示例6: ResultWindow

import javax.accessibility.AccessibleContext; //导入方法依赖的package包/类
/** Creates a new instance of ResultWindow */
@NbBundle.Messages({"TITLE_TEST_RESULTS=Test Results",
    "ACSN_TestResults=Test Results",
    "ACSD_TestResults=Displays information about passed and failed tests and output generated by them"})
public ResultWindow() {
    super();
    setFocusable(true);
    setLayout(new BorderLayout());

    setName(ID);
    setDisplayName(Bundle.TITLE_TEST_RESULTS());
    setIcon(ImageUtilities.loadImage( "org/netbeans/modules/gsf/testrunner/ui/resources/testResults.png", true));//NOI18N
     
    AccessibleContext accContext = getAccessibleContext();
    accContext.setAccessibleName(Bundle.ACSN_TestResults());
    accContext.setAccessibleDescription(Bundle.ACSD_TestResults());

    pop = new JPopupMenu();
    pop.add(new Close());
    pop.add(new CloseAll());
    pop.add(new CloseAllButCurrent());
    popL = new PopupListener();
    closeL = new CloseListener();

    tabPane = TabbedPaneFactory.createCloseButtonTabbedPane();
    tabPane.setMinimumSize(new Dimension(0, 0));
    tabPane.addMouseListener(popL);
    tabPane.addPropertyChangeListener(closeL);
    add(tabPane);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:31,代码来源:ResultWindow.java

示例7: initAccessibility

import javax.accessibility.AccessibleContext; //导入方法依赖的package包/类
private void initAccessibility() {
    this.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(getClass(), "ACS_PropertyPanel"));                
    AccessibleContext context;
    context = keyText.getAccessibleContext();
    context.setAccessibleName(NbBundle.getMessage(getClass(), "ACSN_CTL_KeyText"));
    context.setAccessibleDescription(NbBundle.getMessage(getClass(), "ACSD_CTL_KeyText"));
    context = valueText.getAccessibleContext();
    context.setAccessibleName(NbBundle.getMessage(getClass(), "ACSN_CTL_ValueText"));
    context.setAccessibleDescription(NbBundle.getMessage(getClass(), "ACSD_CTL_ValueText"));
    context = commentText.getAccessibleContext();
    context.setAccessibleName(NbBundle.getMessage(getClass(), "ACSN_CTL_CommentText"));
    context.setAccessibleDescription(NbBundle.getMessage(getClass(), "ACSD_CTL_CommentText"));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:PropertyPanel.java

示例8: createCheckBoxes

import javax.accessibility.AccessibleContext; //导入方法依赖的package包/类
/**
 * Creates a specified set of checkboxes.
 * The checkboxes are specified by unique identifiers.
 * The identifiers are given by this class's constants <code>CHK_xxx</code>.
 * <p>
 * The array of strings passed as the argument may also contain
 * <code>null</code> items. In such a case, the resulting array
 * of check-boxes will contain <code>null</code>s on the corresponding
 * possitions.
 *
 * @param  ids  identifiers of the checkboxes to be created
 * @return  array of checkboxes corresponding to the array of identifiers
 *          passed as the argument
 */
public static JCheckBox[] createCheckBoxes(String[] ids) {
    JCheckBox[] chkBoxes = new JCheckBox[ids.length];
    
    if (chkBoxes.length == 0) {
        return chkBoxes;
    }
    
    ResourceBundle bundle = NbBundle.getBundle(GuiUtils.class);
    for (int i = 0; i < ids.length; i++) {
        String id = ids[i];
        
        if (id == null) {
            chkBoxes[i] = null;
            continue;
        }
        
        JCheckBox chkBox = new JCheckBox();
        String baseName = "CommonTestsCfgOfCreate.chk" + id;              //NOI18N
        AccessibleContext accessCtx = chkBox.getAccessibleContext();
        Mnemonics.setLocalizedText(
                chkBox,
                bundle.getString(baseName + ".text"));              //NOI18N
        chkBox.setToolTipText(
                bundle.getString(baseName + ".toolTip"));           //NOI18N
        accessCtx.setAccessibleName(
                bundle.getString(baseName + ".AN"));                //NOI18N
        accessCtx.setAccessibleDescription(
                bundle.getString(baseName + ".AD"));                //NOI18N
        
        chkBoxes[i] = chkBox;
    }
    return chkBoxes;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:48,代码来源:GuiUtils.java

示例9: getAccessibleContext

import javax.accessibility.AccessibleContext; //导入方法依赖的package包/类
public AccessibleContext getAccessibleContext() {
    AccessibleContext ac = super.getAccessibleContext();
    if (uiKey != null) {
        ac.setAccessibleName(UIManager.getString(uiKey));
        uiKey = null;
    }
    return ac;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:BasicInternalFrameTitlePane.java

示例10: DashboardViewer

import javax.accessibility.AccessibleContext; //导入方法依赖的package包/类
private DashboardViewer() {
    expandedNodes = new HashMap<TreeListNode, Boolean>();
    dashboardComponent = new JScrollPane() {
        @Override
        public void requestFocus() {
            Component view = getViewport().getView();
            if (view != null) {
                view.requestFocus();
            } else {
                super.requestFocus();
            }
        }

        @Override
        public boolean requestFocusInWindow() {
            Component view = getViewport().getView();
            return view != null ? view.requestFocusInWindow() : super.requestFocusInWindow();
        }
    };
    dashboardComponent.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    dashboardComponent.setBorder(BorderFactory.createEmptyBorder());
    dashboardComponent.setBackground(ColorManager.getDefault().getDefaultBackground());
    dashboardComponent.getViewport().setBackground(ColorManager.getDefault().getDefaultBackground());
    mapCategoryToNode = new HashMap<Category, CategoryNode>();
    mapRepositoryToNode = new HashMap<String, RepositoryNode>();
    mapRepositoryToUnsubmittedNode = new HashMap<RepositoryImpl, UnsubmittedCategoryNode>();
    categoryNodes = new ArrayList<CategoryNode>();
    repositoryNodes = new ArrayList<RepositoryNode>();

    LinkButton btnAddCategory = new LinkButton(ImageUtilities.loadImageIcon("org/netbeans/modules/bugtracking/tasks/resources/add_category.png", true), new CreateCategoryAction()); //NOI18N
    btnAddCategory.setToolTipText(NbBundle.getMessage(DashboardViewer.class, "LBL_CreateCategory")); // NOI18N
    LinkButton btnClearCategories = new LinkButton(ImageUtilities.loadImageIcon("org/netbeans/modules/bugtracking/tasks/resources/clear.png", true), new Actions.ClearCategoriesAction());
    btnClearCategories.setToolTipText(NbBundle.getMessage(DashboardViewer.class, "LBL_ClearCategories")); // NOI18N
    titleCategoryNode = new TitleNode(NbBundle.getMessage(TitleNode.class, "LBL_Categories"), btnAddCategory, btnClearCategories); // NOI18N

    LinkButton btnAddRepo = new LinkButton(ImageUtilities.loadImageIcon("org/netbeans/modules/bugtracking/tasks/resources/add_repo.png", true), new CreateRepositoryAction()); //NOI18N
    btnAddRepo.setToolTipText(NbBundle.getMessage(DashboardViewer.class, "LBL_AddRepo")); // NOI18N
    titleRepositoryNode = new TitleNode(NbBundle.getMessage(TitleNode.class, "LBL_Repositories"), btnAddRepo); // NOI18N

    AbstractAction reloadAction = new AbstractAction() {
        @Override
        public void actionPerformed(ActionEvent e) {
            loadData();
        }
    };
    errorRepositories = new ErrorNode(NbBundle.getMessage(TitleNode.class, "ERR_Repositories"), reloadAction); // NOI18N
    errorCategories = new ErrorNode(NbBundle.getMessage(TitleNode.class, "ERR_Categories"), reloadAction); // NOI18N

    modelListener = new ModelListener();
    model.addModelListener(modelListener);
    model.addRoot(-1, titleCategoryNode);
    model.addRoot(-1, titleRepositoryNode);

    AccessibleContext accessibleContext = treeList.getAccessibleContext();
    String a11y = NbBundle.getMessage(DashboardViewer.class, "A11Y_TeamProjects"); //NOI18N
    accessibleContext.setAccessibleName(a11y);
    accessibleContext.setAccessibleDescription(a11y);
    appliedTaskFilters = new AppliedFilters<TaskNode>();
    appliedCategoryFilters = new AppliedFilters<CategoryNode>();
    appliedRepositoryFilters = new AppliedFilters<RepositoryNode>();
    appliedCategoryFilters.addFilter(new UnsubmittedCategoryFilter());
    taskHits = 0;
    treeList.setTransferHandler(new DashboardTransferHandler());
    treeList.setDragEnabled(true);
    treeList.setDropMode(DropMode.ON_OR_INSERT);
    treeList.setModel(model);
    attachActions();
    dashboardComponent.setViewportView(treeList);
    dashboardComponent.invalidate();
    dashboardComponent.revalidate();
    dashboardComponent.repaint();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:73,代码来源:DashboardViewer.java


注:本文中的javax.accessibility.AccessibleContext.setAccessibleName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。