Class ResourceTable
java.lang.Object
org.netbeans.api.visual.widget.ResourceTable
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new resource table.ResourceTable
(ResourceTable parent) Create a new resource table that has a parent. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperty
(String name, Object value) Add a resource property.void
Add a PropertyChangeListener to the listener list.void
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) Add a PropertyChangeListener for a specific property.void
clear()
Clears the entire resource table.getProperty
(String name) void
Removes the parent resource table.void
Remove a PropertyChangeListener from the listener list.void
removePropertyChangeListener
(String propertyName, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property.void
setParentTable
(ResourceTable parent)
-
Field Details
-
PARENT_RESOURCE_TABLE
- See Also:
-
-
Constructor Details
-
ResourceTable
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
-
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
-
addProperty
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
-
addPropertyChangeListener
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
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
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
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.
-