--Replacing standard About dialog
1 post
• Page 1 of 1
--Replacing standard About dialog
This article is outdated - please use our new system at
https://doc.sibvisions.com
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);
}
public void doAbout(UIActionEvent pEvent) throws Throwable
{
openContent(this, null, true, "com.sibvisions.apps.demo.DemoAbout", this);
}
Your DemoAbout class should extend the standard About class:
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
}
}
{
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
}
}
Out custom About dialog adds a new Tabset and a Clear Button in the bottom area.
-
Development@SIB - Posts: 325
- Joined: Mon Sep 28, 2009 1:54 pm
1 post
• Page 1 of 1