Class ResourceTable

java.lang.Object
org.netbeans.api.visual.widget.ResourceTable

public class ResourceTable extends Object
The ResourceTable is used to manage a widgets resource. A ResourceTable can have a parent ResourceTable. The values in the child resource table will override the values in a parent resource table.
  • Field Details

  • Constructor Details

    • ResourceTable

      public ResourceTable(ResourceTable parent)
      Create a new resource table that has a parent.
      Parameters:
      parent - the parent resource table.
    • ResourceTable

      public ResourceTable()
      Create a new resource table.
  • Method Details

    • setParentTable

      public void setParentTable(ResourceTable parent)
    • getParentTable

      public ResourceTable getParentTable()
    • removeParent

      public void removeParent()
      Removes the parent resource table.
    • clear

      public void clear()
      Clears the entire resource table. Events will be sent to the listners.
    • getProperty

      public Object getProperty(String name)
    • addProperty

      public void addProperty(String name, Object value)
      Add a resource property. If a property with the same name already exist, it will be overridden by the new property value. If the new value is null, the property will be removed from the table.
      Parameters:
      name - the name of the property.
      value - the property value.
    • getLocalPropertyNames

      public Set<String> getLocalPropertyNames()
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener listener)
      Add a PropertyChangeListener to the listener list. The listener is registered for all properties. The same listener object may be added more than once, and will be called as many times as it is added. If listener is null, no exception is thrown and no action is taken.
      Parameters:
      listener - The PropertyChangeListener to be added
    • addPropertyChangeListener

      public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
      Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property. The same listener object may be added more than once. For each property, the listener will be invoked the number of times it was added for that property. If propertyName or listener is null, no exception is thrown and no action is taken.
      Parameters:
      propertyName - The name of the property to listen on.
      listener - The PropertyChangeListener to be added.
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener listener)
      Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. If listener was added more than once to the same event source, it will be notified one less time after being removed. If listener is null, or was never added, no exception is thrown and no action is taken.
      Parameters:
      listener - The PropertyChangeListener to be rem ove
    • removePropertyChangeListener

      public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
      Remove a PropertyChangeListener for a specific property. If listener was added more than once to the same event source for the specified property, it will be notified one less time after being removed. If propertyName is null, no exception is thrown and no action is taken. If listener is null, or was never added for the specified property, no exception is thrown and no action is taken.
      Parameters:
      propertyName - The name of the property that was listened on.
      listener - The PropertyChangeListener to be removed.