Difference between revisions of "ToolBarBoxExtension"

From OpenKM Documentation
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Methods ==
 
== Methods ==
Widget getWidget()
+
=== getWidget() ===
String getExtensionUUID()
 
void refreshAll()
 
 
 
== getWidget() ==
 
 
Returns the associated widget to the tool box that will be showed when it'll be selected.
 
Returns the associated widget to the tool box that will be showed when it'll be selected.
  
== getExtensionUUID() ==
+
=== getExtensionUUID() ===
 
Return unique extension id
 
Return unique extension id
 
== refreshAll() ==
 
Refresh all data
 
  
 
== Example ==
 
== Example ==
 
<source lang="java">
 
<source lang="java">
 
public class ToolBarBoxExample extends ToolBarBoxExtension {
 
public class ToolBarBoxExample extends ToolBarBoxExtension {
 +
public ToolBarBoxEx(Image img, String text) {
 +
super(img, text);
 +
}
  
public ToolBarBoxEx(Image img, String text) {
+
@Override
super(img, text);
+
public Widget getWidget() {
}
+
// TODO Auto-generated method stub
 +
return null;
 +
}
  
@Override
+
              @Override
public Widget getWidget() {
+
        public String getExtensionUUID() {
// TODO Auto-generated method stub
+
          return String.valueOf("d9dab640-d098-11df-bd3b-0800200c9a66");
return null;
+
        }
}
+
}
 
 
                @Override
 
        public String getExtensionUUID() {
 
            return String.valueOf("d9dab640-d098-11df-bd3b-0800200c9a66");
 
        }
 
               
 
                @Override
 
public void refreshAll() {
 
                      // Do something RPC calls, etc..
 
}
 
}
 
 
</source>
 
</source>
  
[[Category: OpenKM plugin extensions]]
+
[[Category: Extension Guide]]

Latest revision as of 13:27, 2 December 2010

Methods

getWidget()

Returns the associated widget to the tool box that will be showed when it'll be selected.

getExtensionUUID()

Return unique extension id

Example

public class ToolBarBoxExample extends ToolBarBoxExtension {
	public ToolBarBoxEx(Image img, String text) {
		super(img, text);
	}

	@Override
	public Widget getWidget() {
		// TODO Auto-generated method stub
		return null;
	}

               @Override
        public String getExtensionUUID() {
	   	        return String.valueOf("d9dab640-d098-11df-bd3b-0800200c9a66");
        }
}