Java 8 AccessibleContext - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 AccessibleContext class.

This code example shows how to use the following methods:getAccessibleRole
        JLayer l = new JLayer();
        AccessibleContext acc = l.getAccessibleContext();
        if (acc == null) {
            throw new RuntimeException("JLayer's AccessibleContext is null");
        } 
        if (acc.getAccessibleRole() != AccessibleRole.PANEL) {
            throw new RuntimeException("JLayer's AccessibleRole must be PANEL");
        } 
    } 
} 
4
CodeRank
This code example shows how to use the following methods:getAccessibleRole
        JLayer l = new JLayer();
        AccessibleContext acc = l.getAccessibleContext();
        if (acc == null) {
            throw new RuntimeException("JLayer's AccessibleContext is null");
        } 
        if (acc.getAccessibleRole() != AccessibleRole.PANEL) {
            throw new RuntimeException("JLayer's AccessibleRole must be PANEL");
        } 
    } 
} 
4
CodeRank
This code example shows how to use the following methods:setAccessibleDescription, setAccessibleName
    		text = ((AbstractButton)comp).getText() ;
    	else 
    		text = comp.getName();
    	if (text != null)
    	{ 
    		ac.setAccessibleName(text);
    		ac.setAccessibleDescription(text) ;
    	} 
    	return comp ;
    } 
     
     
	public static Frame tryFindSuitableFrameOwner ()
	{ 
		Frame owner = null;
		// find a suitable owner, if any 
		Frame[] allFrames = Frame.getFrames();
		if (allFrames != null) {
			for (Frame frame : allFrames) {
				if (frame == null)
4
CodeRank
This code example shows how to use the following methods:firePropertyChange
 
		if (newModel != null) {
			newModel.addChangeListener(changeListener);
 
			if (accessibleContext != null) {
				accessibleContext.firePropertyChange(
						AccessibleContext.ACCESSIBLE_VALUE_PROPERTY,
						(oldModel == null
						? null : new Integer(oldModel.getValue())),
						(newModel == null
						? null : new Integer(newModel.getValue())));
			} 
		} 
 
		firePropertyChange("model", oldModel, this.sliderModels[index]);
	} 
 
	/*** 
	 * Sets the models minimum property. 
	 * 
3
CodeRank
This code example shows how to use the following methods:setAccessibleName
 
	@Override 
	public AccessibleContext getAccessibleContext() {
		AccessibleContext ac = super.getAccessibleContext();
		if (uiKey != null) {
			ac.setAccessibleName(UIManager.getString(uiKey));
			uiKey = null;
		} 
		return ac;
	} 
} 
3
CodeRank
See Code Examples for Java 8 AccessibleContext Methods: