當前位置: 首頁>>代碼示例>>Java>>正文


Java AccessibleContext.setAccessibleDescription方法代碼示例

本文整理匯總了Java中javax.accessibility.AccessibleContext.setAccessibleDescription方法的典型用法代碼示例。如果您正苦於以下問題:Java AccessibleContext.setAccessibleDescription方法的具體用法?Java AccessibleContext.setAccessibleDescription怎麽用?Java AccessibleContext.setAccessibleDescription使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.accessibility.AccessibleContext的用法示例。


在下文中一共展示了AccessibleContext.setAccessibleDescription方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: 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.setAccessibleDescription方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。