Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.
javax.swing.text

Class SimpleAttributeSet

  • All Implemented Interfaces:
    Serializable, Cloneable, AttributeSet, MutableAttributeSet

    public class SimpleAttributeSet
    extends Object
    implements MutableAttributeSet, Serializable, Cloneable
    A straightforward implementation of MutableAttributeSet using a hash table.

    Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder.

    • Field Detail

      • EMPTY

        public static final AttributeSet EMPTY
        An empty attribute set.
    • Constructor Detail

      • SimpleAttributeSet

        public SimpleAttributeSet()
        Creates a new attribute set.
      • SimpleAttributeSet

        public SimpleAttributeSet(AttributeSet source)
        Creates a new attribute set based on a supplied set of attributes.
        Parameters:
        source - the set of attributes
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Checks whether the set of attributes is empty.
        Returns:
        true if the set is empty else false
      • getAttributeCount

        public int getAttributeCount()
        Gets a count of the number of attributes.
        Specified by:
        getAttributeCount in interface AttributeSet
        Returns:
        the count
      • isDefined

        public boolean isDefined(Object attrName)
        Tells whether a given attribute is defined.
        Specified by:
        isDefined in interface AttributeSet
        Parameters:
        attrName - the attribute name
        Returns:
        true if the attribute is defined
      • isEqual

        public boolean isEqual(AttributeSet attr)
        Compares two attribute sets.
        Specified by:
        isEqual in interface AttributeSet
        Parameters:
        attr - the second attribute set
        Returns:
        true if the sets are equal, false otherwise
      • getAttributeNames

        public Enumeration<?> getAttributeNames()
        Gets the names of the attributes in the set.
        Specified by:
        getAttributeNames in interface AttributeSet
        Returns:
        the names as an Enumeration
      • getAttribute

        public Object getAttribute(Object name)
        Gets the value of an attribute.
        Specified by:
        getAttribute in interface AttributeSet
        Parameters:
        name - the attribute name
        Returns:
        the value
      • containsAttribute

        public boolean containsAttribute(Object name,
                                Object value)
        Checks whether the attribute list contains a specified attribute name/value pair.
        Specified by:
        containsAttribute in interface AttributeSet
        Parameters:
        name - the name
        value - the value
        Returns:
        true if the name/value pair is in the list
      • containsAttributes

        public boolean containsAttributes(AttributeSet attributes)
        Checks whether the attribute list contains all the specified name/value pairs.
        Specified by:
        containsAttributes in interface AttributeSet
        Parameters:
        attributes - the attribute list
        Returns:
        true if the list contains all the name/value pairs
      • addAttribute

        public void addAttribute(Object name,
                        Object value)
        Adds an attribute to the list.
        Specified by:
        addAttribute in interface MutableAttributeSet
        Parameters:
        name - the attribute name
        value - the attribute value
      • addAttributes

        public void addAttributes(AttributeSet attributes)
        Adds a set of attributes to the list.
        Specified by:
        addAttributes in interface MutableAttributeSet
        Parameters:
        attributes - the set of attributes to add
      • removeAttributes

        public void removeAttributes(AttributeSet attributes)
        Removes a set of attributes from the list.
        Specified by:
        removeAttributes in interface MutableAttributeSet
        Parameters:
        attributes - the set of attributes to remove
      • getResolveParent

        public AttributeSet getResolveParent()
        Gets the resolving parent. This is the set of attributes to resolve through if an attribute isn't defined locally. This is null if there are no other sets of attributes to resolve through.
        Specified by:
        getResolveParent in interface AttributeSet
        Returns:
        the parent
      • clone

        public Object clone()
        Clones a set of attributes.
        Overrides:
        clone in class Object
        Returns:
        the new set of attributes
        See Also:
        Cloneable
      • equals

        public boolean equals(Object obj)
        Compares this object to the specified object. The result is true if the object is an equivalent set of attributes.
        Overrides:
        equals in class Object
        Parameters:
        obj - the object to compare this attribute set with
        Returns:
        true if the objects are equal; false otherwise
        See Also:
        Object.hashCode(), HashMap
      • toString

        public String toString()
        Converts the attribute set to a String.
        Overrides:
        toString in class Object
        Returns:
        the string

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/swing/text/simpleattributeset.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut