void addRelations () { if (relations == null) return; if (accessibleObject == null) return; for (int i = 0; i < relations.size(); i++) { Relation relation = relations.get(i); accessibleObject.addRelation(relation.type, relation.target); } }
void addRelations () { if (relations == null) return; if (accessibleObject == null) return; for (int i = 0; i < relations.size(); i++) { Relation relation = relations.get(i); accessibleObject.addRelation(relation.type, relation.target); } }
void addRelations () { if (relations == null) return; if (accessibleObject == null) return; for (int i = 0; i < relations.size(); i++) { Relation relation = relations.get(i); accessibleObject.addRelation(relation.type, relation.target); } }
/** * Adds a relation with the specified type and target * to the receiver's set of relations. * * @param type an <code>ACC</code> constant beginning with RELATION_* indicating the type of relation * @param target the accessible that is the target for this relation * * @exception IllegalArgumentException ERROR_NULL_ARGUMENT - if the Accessible target is null * @since 3.6 */ public void addRelation(int type, Accessible target) { checkWidget(); if (target == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); if (relations == null) relations = new ArrayList<>(); Relation relation = new Relation(type, target); if (relations.indexOf(relation) != -1) return; relations.add(relation); if (accessibleObject != null) accessibleObject.addRelation(type, target); }
/** * Adds a relation with the specified type and target * to the receiver's set of relations. * * @param type an <code>ACC</code> constant beginning with RELATION_* indicating the type of relation * @param target the accessible that is the target for this relation * * @exception IllegalArgumentException ERROR_NULL_ARGUMENT - if the Accessible target is null * @since 3.6 */ public void addRelation(int type, Accessible target) { checkWidget(); if (target == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); if (relations == null) relations = new ArrayList<>(); Relation relation = new Relation(type, target); if (relations.indexOf(relation) != -1) return; relations.add(relation); if (accessibleObject != null) accessibleObject.addRelation(type, target); }
/** * Adds a relation with the specified type and target * to the receiver's set of relations. * * @param type an <code>ACC</code> constant beginning with RELATION_* indicating the type of relation * @param target the accessible that is the target for this relation * * @exception IllegalArgumentException ERROR_NULL_ARGUMENT - if the Accessible target is null * @since 3.6 */ public void addRelation(int type, Accessible target) { checkWidget(); if (target == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); if (relations == null) relations = new ArrayList<>(); Relation relation = new Relation(type, target); if (relations.indexOf(relation) != -1) return; relations.add(relation); if (accessibleObject != null) accessibleObject.addRelation(type, target); }