Search in sources :

Example 1 with SubnetAddressMap

use of org.netxms.ui.eclipse.topology.widgets.SubnetAddressMap in project netxms by netxms.

the class AddressMap method createTabContent.

/* (non-Javadoc)
	 * @see org.netxms.ui.eclipse.objectview.objecttabs.ObjectTab#createTabContent(org.eclipse.swt.widgets.Composite)
	 */
@Override
protected void createTabContent(Composite parent) {
    scroller = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
    addressMap = new SubnetAddressMap(scroller, SWT.NONE, getViewPart(), new VisibilityValidator() {

        @Override
        public boolean isVisible() {
            return isActive();
        }
    });
    scroller.setContent(addressMap);
    scroller.setExpandVertical(true);
    scroller.setExpandHorizontal(true);
    scroller.addControlListener(new ControlAdapter() {

        public void controlResized(ControlEvent e) {
            scroller.setMinSize(addressMap.computeSize(SWT.DEFAULT, SWT.DEFAULT));
        }
    });
}
Also used : VisibilityValidator(org.netxms.ui.eclipse.tools.VisibilityValidator) ControlAdapter(org.eclipse.swt.events.ControlAdapter) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) SubnetAddressMap(org.netxms.ui.eclipse.topology.widgets.SubnetAddressMap) ControlEvent(org.eclipse.swt.events.ControlEvent)

Aggregations

ScrolledComposite (org.eclipse.swt.custom.ScrolledComposite)1 ControlAdapter (org.eclipse.swt.events.ControlAdapter)1 ControlEvent (org.eclipse.swt.events.ControlEvent)1 VisibilityValidator (org.netxms.ui.eclipse.tools.VisibilityValidator)1 SubnetAddressMap (org.netxms.ui.eclipse.topology.widgets.SubnetAddressMap)1