rootShell = new Shell(display, SWT.NO_TRIM);
rootShell.setFullScreen(true);
Rectangle bounds = display.getBounds();
+ rootShell.setLocation(0, 0);
rootShell.setSize(bounds.width, bounds.height);
} else {
rootShell = new Shell(display, SWT.CLOSE | SWT.RESIZE);
homeTabItem.setControl(background);
tabFolder.setFocus();
} else {
- if (isFullscreen())
- createBackground(rootShell);
- else
- rootShell.pack();
+ createBackground(rootShell);
}
rootShell.open();
// rootShell.layout(true, true);
if (toolBarShell != null) {
- toolBarShell.setLocation(new Point(0, 0));
+ int toolBarShellY = (display.getBounds().height - toolBar.getSize().y) / 2;
+ toolBarShell.setLocation(0, toolBarShellY);
toolBarShell.open();
}
}
item.setControl(appParent);
return new AppContext(item);
} else {
- Shell shell = new Shell(rootShell.getDisplay(), SWT.SHELL_TRIM);
+ Shell shell = isFullscreen() ? new Shell(rootShell, SWT.SHELL_TRIM)
+ : new Shell(rootShell.getDisplay(), SWT.SHELL_TRIM);
shell.setImage(icon);
return new AppContext(shell);
}
if (netInterfaces != null)
while (netInterfaces.hasMoreElements()) {
NetworkInterface netInterface = netInterfaces.nextElement();
+ byte[] hardwareAddress = null;
try {
- label(hostGroup, convertHardwareAddress(netInterface.getHardwareAddress()));
+ hardwareAddress = netInterface.getHardwareAddress();
+ if (hardwareAddress != null) {
+ label(hostGroup, convertHardwareAddress(hardwareAddress));
+ label(hostGroup, netInterface.getName());
+ for (InterfaceAddress addr : netInterface.getInterfaceAddresses()) {
+ label(hostGroup, cleanHostAddress(addr.getAddress().getHostAddress()));
+ label(hostGroup, Short.toString(addr.getNetworkPrefixLength()));
+ }
+ }
} catch (SocketException e) {
label(hostGroup, e.getMessage());
}
- label(hostGroup, netInterface.getName());
- for (InterfaceAddress addr : netInterface.getInterfaceAddresses()) {
- label(hostGroup, cleanHostAddress(addr.getAddress().getHostAddress()));
- label(hostGroup, Short.toString(addr.getNetworkPrefixLength()));
- }
}
// Resources