Package javax.accessibility

Examples of javax.accessibility.Accessible


  {
    DefaultTableModel tm = new DefaultTableModel(new String[] {"AA", "BB", "CC"}, 3);
    JTable t = new JTable(tm);
    JTableHeader th = t.getTableHeader();
    AccessibleContext ac = th.getAccessibleContext();
    Accessible ac0 = ac.getAccessibleChild(0);
    harness.check(ac0.getClass().getName().endsWith("AccessibleJTableHeaderEntry"));
    AccessibleContext ac0ac = ac0.getAccessibleContext();
    harness.check(ac0ac.getAccessibleChild(0), null);
    harness.check(ac0ac.getAccessibleChild(-1), null);
    harness.check(ac0ac.getAccessibleChild(99), null);
  }
View Full Code Here


        // will cause the selected item to appear closest to the top.
        //
        // it is unknown whether this functionality will work outside of Sun's
        // implementation, but the code is safe and will "fail gracefully" on
        // other systems
        Accessible a = comboBox.getUI().getAccessibleChild(comboBox, 0);
       
        if (getItemCount() > 0 && a instanceof ComboPopup) {
            JList list = ((ComboPopup) a).getList();
            int lastIndex = list.getModel().getSize() - 1;
           
View Full Code Here

        @Override
        public int getAccessibleIndexInParent() {
            toolkit.lockAWT();
            try {
                Accessible aParent = getAccessibleParent();
                int aIndex = -1;
                if (aParent instanceof MenuComponent) {
                    MenuComponent parent = (MenuComponent) aParent;
                    int count = parent.getItemCount();
                    for (int i = 0; i < count; i++) {
View Full Code Here

        @Override
        public Accessible getAccessibleParent() {
            toolkit.lockAWT();
            try {
                Accessible aParent = super.getAccessibleParent();
                if (aParent != null) {
                    return aParent;
                }
                MenuContainer parent = getParent();
                if (parent instanceof Accessible) {
View Full Code Here

        @Override
        public Accessible getAccessibleParent() {
            toolkit.lockAWT();
            try {
                Accessible aParent = super.getAccessibleParent();
                if (aParent != null) {
                    return aParent;
                }
                Container parent = getParent();
                return (parent instanceof Accessible ? (Accessible) parent : null);
View Full Code Here

                if (!(Container.this instanceof Accessible) || (getAccessibleContext() == null)) {
                    return super.getAccessibleAt(p);
                }
                int count = getAccessibleChildrenCount();
                for (int i = 0; i < count; i++) {
                    Accessible aChild = getAccessibleChild(i);
                    AccessibleContext ac = aChild.getAccessibleContext();
                    if (ac != null) {
                        AccessibleComponent aComp = ac.getAccessibleComponent();
                        Point pos = new Point(p);
                        Point loc = aComp.getLocation();
                        pos.translate(-loc.x, -loc.y);
View Full Code Here

        return false;
    }

    public static Accessible getAccessibleAt(final Component component, final Point point) {
        Accessible result = null;

        if (component == null) {
            return null;
        }
        AccessibleContext context = component.getAccessibleContext();
View Full Code Here

        listenerList.remove(TabListener.class, l);
    }


    public ContentPage getContentPage(int index) {
        Accessible accessible = getAccessibleContext().getAccessibleChild(index);
        ContentPage contentPage = contentPages.get(accessible);
        if (contentPage == null) {
            contentPage = new ContentPage(this, (AccessibleContext) accessible);
            contentPages.put(accessible, contentPage);
        }
View Full Code Here

        listenerList.remove(TabListener.class, l);
    }


    public ContentPage getContentPage(int index) {
        Accessible accessible = getAccessibleContext().getAccessibleChild(index);
        ContentPage contentPage = contentPages.get(accessible);
        if (contentPage == null) {
            contentPage = new ContentPage(this, (AccessibleContext) accessible);
            contentPages.put(accessible, contentPage);
        }
View Full Code Here

        super.setTitleAt(index, "");
        super.setIconAt(index, getContentPage(index).getContentIcon());
    }

    protected ContentPage getContentPage(int index, TabbedContentUI tabbedContentUI) {
        Accessible accessible = getAccessibleContext().getAccessibleChild(index);
        ContentPage contentPage = contentPages.get(accessible);
        if (contentPage == null) {
            if (tabbedContentUI == null)
                contentPage = new ContentPage(this, (AccessibleContext) accessible, resourceManager);
            else {
View Full Code Here

TOP

Related Classes of javax.accessibility.Accessible

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.