Documentation

(applications)

Replacing Standard About Dialog

It's not tricky to replace the standard About dialog. Simply override the method

@Override
public void doAbout(UIActionEvent pEvent) throws Throwable
{
    openContent(this, null, true, "com.sibvisions.apps.demo.DemoAbout", this);
}

in your custom application class. If you don't have a custom application class, simply create one by extending ProjX. The class should be located in the src.client folder. Be sure that you change your launcher files and the deployment descriptor (replace ProjX with your application class).

Your DemoAbout class should extend the ProjX' About class:

DemoAbout.java
public class DemoAbout extends About
{
    public DemoAbout(IWorkScreenApplication pApplication)
    {
        super(pApplication);
    }
 
    @Override
    protected void init()
    {
        super.init();
 
        IWorkScreenApplication app = getApplication();
 
        UIPanel panLicense = new UIPanel();
        ...                
 
        getTabsetPanel().add(panLicense, "License");
 
        UIButton butClear = new UIButton("Clear");
        butClear.setBorderOnMouseEntered(true);
        butClear.eventAction().addListener(this, "doClear");
        butClear.setFocusable(false);
 
        UIPanel panButtons = getButtonPanel();
 
        UIFormLayout flButtons = (UIFormLayout)panButtons.getLayout();
 
        panButtons.add(butChangeLicense, flButtons.getLeftAlignedConstraints(0, 0));
    }
 
    public void doClear()
    {
        //Custom code
    }
}

Our custom About dialog adds a new Tabset and a Clear Button in the bottom area.

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information