|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Provides the base interface from which all snap-ins extend.
Every snap-in written for ConsoleOne (namespace, view, property pages, menus, toolbars, status bars, etc.) derive from the Snapin interface. Therefore, the four methods defined in the Snapin interface must be implemented in each snap-in's interface.
| Method Summary | |
java.lang.String |
getSnapinDescription()
Returns the localized description of the snap-in. |
java.lang.String |
getSnapinName()
Returns the localized name of the snap-in. |
boolean |
initSnapin(InitSnapinInfo info)
Called by the shell to allow the snap-in to be initialized. |
void |
shutdownSnapin()
Called by the shell when the snap-in is being shut down. |
| Method Detail |
public java.lang.String getSnapinName()
The getSnapinName() method will be called before initSnapin(). This method allows the shell to provide a translated descriptive name for your snap-in.
Following is an example of the getSnapinName() implementation:
public String getSnapinName()
{
ResourceBundle resources =
ResourceBundle.getBundle("com.test.resource");
String name =
resources.getString("TestNamespaceName");
return name;
}
public java.lang.String getSnapinDescription()
The getSnapinDescription() method will be called before initSnapin(). This method returns the description of the selected snap-in.
Following is an example of the getSnapinDescription() implementation:
public String getSnapinDescription()
{
ResourceBundle resources =
ResourceBundle.getBundle("com.test.resource");
String description =
resources.getString("TestNamespace_Description");
return description;
}
public boolean initSnapin(InitSnapinInfo info)
The initSnapin() method is called by the shell to allow each snap-in to perform any necessary initialization; for example adding itself as an event listener. The snap-in is initialized by passing a reference to the InitSnapinInfo class. The getSnapinName() and getSnapinDescription() methods will be called before initSnapin().
Following is an example of the initSnapin() implementation:
public boolean initSnapin( InitSnapinInfo info )
{
...
shell = info.getShell();
mytype = info.getSnapinType();
...
return true;
}
info - Contains data the snap-in may use for initialization, such as
references to the shell and the snap-in type, and may contain
a reference to snap-in context data.shutdownSnapin(),
InitSnapinInfo,
SnapinContextpublic void shutdownSnapin()
Called by the shell for each snap-in when it is no longer required. This allows the snap-in to perform any necessary cleanup; for example removing itself as an event listener.
initSnapin(com.novell.application.console.snapin.InitSnapinInfo)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||