Search in sources :

Example 1 with ObjectBrowser

use of org.netxms.webui.mobile.pages.ObjectBrowser in project netxms by netxms.

the class MobileView method createPartControl.

/* (non-Javadoc)
    * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
    */
@Override
public void createPartControl(Composite parent) {
    ConsoleSharedData.setProperty("MobileUI.PageManagerInstance", this);
    fixWorkbenchLayout(parent);
    GridLayout layout = new GridLayout();
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    layout.verticalSpacing = 0;
    layout.horizontalSpacing = 0;
    parent.setLayout(layout);
    navigationBar = new NavigationBar(parent);
    navigationBar.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
    viewArea = new Composite(parent, SWT.NONE);
    viewArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    viewArea.setLayout(new StackLayout());
    viewArea.setBackground(viewArea.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
    navigationService = RWT.getClient().getService(BrowserNavigation.class);
    navigationService.addBrowserNavigationListener(new BrowserNavigationListener() {

        @Override
        public void navigated(BrowserNavigationEvent event) {
            back();
        }
    });
    openPage(new ObjectBrowser(7));
}
Also used : NavigationBar(org.netxms.webui.mobile.widgets.NavigationBar) BrowserNavigation(org.eclipse.rap.rwt.client.service.BrowserNavigation) GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) StackLayout(org.eclipse.swt.custom.StackLayout) ObjectBrowser(org.netxms.webui.mobile.pages.ObjectBrowser) BrowserNavigationEvent(org.eclipse.rap.rwt.client.service.BrowserNavigationEvent) BrowserNavigationListener(org.eclipse.rap.rwt.client.service.BrowserNavigationListener)

Aggregations

BrowserNavigation (org.eclipse.rap.rwt.client.service.BrowserNavigation)1 BrowserNavigationEvent (org.eclipse.rap.rwt.client.service.BrowserNavigationEvent)1 BrowserNavigationListener (org.eclipse.rap.rwt.client.service.BrowserNavigationListener)1 StackLayout (org.eclipse.swt.custom.StackLayout)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 ObjectBrowser (org.netxms.webui.mobile.pages.ObjectBrowser)1 NavigationBar (org.netxms.webui.mobile.widgets.NavigationBar)1