ToolBarBox Extension

 

Adds a new button at dthe ashboard view.

Methods

methodDescription
getWidget()

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

Sample

package com.openkm.extension.frontend.client;

import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Widget;
import com.openkm.extension.frontend.client.util.OKMExtensionBundleExampleResources;
import com.openkm.frontend.client.extension.widget.toolbar.ToolBarBoxExtension;

public class ToolBarBoxExample {

    public HorizontalPanel hPanel;
    public ToolBarBoxExtension toolBarBoxExtension;

    /**
     * ToolBarBoxExample
     */
    public ToolBarBoxExample() {
        toolBarBoxExtension = new ToolBarBoxExtension(new Image(OKMExtensionBundleExampleResources.INSTANCE.general()),
                "new toolbar") {
            @Override
            public Widget getWidget() {
                return hPanel;
            }
        };

        hPanel = new HorizontalPanel();
        hPanel.add(new HTML("new toolbarbox example"));
    }

    /**
     * ToolBarBoxExtension
     */
    public ToolBarBoxExtension getToolBarBox() {
        return toolBarBoxExtension;
    }
}