com.adventnet.nms.policyui
Class PolicyObjectCustomizer
java.lang.Object
java.beans.PropertyEditorSupport
com.adventnet.nms.policyui.PolicyObjectCustomizer
- All Implemented Interfaces:
- java.beans.PropertyEditor
- Direct Known Subclasses:
- DefaultPolicyCustomizer
public abstract class PolicyObjectCustomizer
- extends java.beans.PropertyEditorSupport
This abstract class is the base for writing Customizer which is vital for
designing our own Property from , on otherwords UI for viewing PolicyObject properties.
Make sure that access specifier of Customizer class is of type public when it
belongs to a package other than com.adventnet.nms.policyui. User can plugin their
UI froms with a very easy implementation described below.
Steps to be followed are
1. Write a class extending PolicyObjectCustomizer . You have three methods to override.
2. method init(Properties p) will be called first, with properties of PolicyObject
to be shown.
3. Construct a GUI and return it as "Window" Object so that WebNMS takes
care of making it visible
4. On instantiating your customizer class , a Property change listener will be
added to your class .Once you have finished with all your modifications make your component
invisible and fire the property changed event by calling the method firePropertyChange()
This is to initimate us that all modifications have been completed.
5. On listening to Property changed event WebNMS will get back the modified
properties by calling the method getProperties() ,at this point you are
required to return the modified properties through the getProperties() mthod
6. WebNMS finally updates the Policy with modified properties.
For further reference go thro the example provided in /help/examples/policy
directory.
|
Method Summary |
abstract java.awt.Window |
getCustomizer()
This method is used to get the Property form constructed by user as
a Window Object.so user required to return the Property form as window thro' this method. |
abstract java.util.Properties |
getProperties()
This method is called to get back the modified Properties. |
abstract void |
init(java.util.Properties p)
With this method Properties to be shown in Property form is passed. |
| Methods inherited from class java.beans.PropertyEditorSupport |
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText, setSource, setValue, supportsCustomEditor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PolicyObjectCustomizer
public PolicyObjectCustomizer()
getProperties
public abstract java.util.Properties getProperties()
- This method is called to get back the modified Properties.
init
public abstract void init(java.util.Properties p)
- With this method Properties to be shown in Property form is passed.
- Parameters:
p - Policy Object Properties to be shown in UI
getCustomizer
public abstract java.awt.Window getCustomizer()
- This method is used to get the Property form constructed by user as
a Window Object.so user required to return the Property form as window thro' this method.
- Returns:
- constructed GUI as Window Object
Copyright © 2011 ZOHO Corp., All Rights Reserved.