mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
some MacOS compatibility changes
git-svn-id: https://ipscan.svn.sourceforge.net/svnroot/ipscan/trunk/ipscan@102 375186e5-ef17-0410-b0b6-91563547dcda
This commit is contained in:
parent
c9ae1073da
commit
c1ecdabbdd
@ -41,7 +41,7 @@ public class DetailsDialog extends AbstractModalDialog {
|
||||
fillLayout.marginWidth = 3;
|
||||
shell.setLayout(fillLayout);
|
||||
|
||||
Text detailsText = new Text(shell, SWT.BORDER | SWT.READ_ONLY | SWT.MULTI | SWT.V_SCROLL);
|
||||
Text detailsText = new Text(shell, SWT.BORDER | SWT.READ_ONLY | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
|
||||
detailsText.setText(resultTable.getIPDetails());
|
||||
detailsText.setBackground(shell.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
|
||||
detailsText.setTabs(32);
|
||||
|
||||
@ -58,6 +58,7 @@ public class GettingStartedDialog extends AbstractModalDialog {
|
||||
closeButton = new Button(shell, SWT.NONE);
|
||||
closeButton.setText(Labels.getLabel("button.close"));
|
||||
closeButton.setBounds(110, 180, 80, 25);
|
||||
closeButton.pack();
|
||||
closeButton.addListener(SWT.Selection, new Listener() {
|
||||
public void handleEvent(Event event) {
|
||||
shell.close();
|
||||
@ -69,6 +70,7 @@ public class GettingStartedDialog extends AbstractModalDialog {
|
||||
nextButton.setText(Labels.getLabel("button.next"));
|
||||
nextButton.setBounds(210, 180, 80, 25);
|
||||
nextButton.setFocus();
|
||||
nextButton.pack();
|
||||
nextButton.addListener(SWT.Selection, new Listener() {
|
||||
public void handleEvent(Event event) {
|
||||
activePage++;
|
||||
|
||||
@ -63,7 +63,7 @@ public class MainWindow {
|
||||
// after all controls are initialized, resize and open
|
||||
shell.setBounds(Config.getDimensionsConfig().getWindowBounds());
|
||||
shell.setMaximized(Config.getDimensionsConfig().isWindowMaximized);
|
||||
shell.open();
|
||||
shell.open();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -144,12 +144,12 @@ public class MainWindow {
|
||||
|
||||
// start/stop button
|
||||
shell.setDefaultButton(startStopButton);
|
||||
startStopButton.setLayoutData(new RowData(SWT.DEFAULT, 23));
|
||||
startStopButton.setLayoutData(new RowData());
|
||||
startStopButton.addSelectionListener(startStopScanningAction);
|
||||
|
||||
// feeder selection combobox
|
||||
this.feederSelectionCombo = feederSelectionCombo;
|
||||
feederSelectionCombo.setLayoutData(new RowData(SWT.DEFAULT, 23));
|
||||
feederSelectionCombo.setLayoutData(new RowData());
|
||||
for (Iterator i = feederRegistry.iterator(); i.hasNext();) {
|
||||
AbstractFeederGUI feederGUI = (AbstractFeederGUI) i.next();
|
||||
feederSelectionCombo.add(feederGUI.getFeederName());
|
||||
|
||||
@ -75,13 +75,18 @@ public class OptionsDialog extends AbstractModalDialog {
|
||||
shell.setSize(new Point(350, 423));
|
||||
shell.setLayout(null);
|
||||
okButton = new Button(shell, SWT.NONE);
|
||||
okButton.setBounds(new Rectangle(175, 365, 75, 25));
|
||||
okButton.setLocation(175, 365);
|
||||
//okButton.setBounds(new Rectangle(175, 365, 75, 25));
|
||||
okButton.setText("OK");
|
||||
okButton.pack();
|
||||
shell.setDefaultButton(okButton);
|
||||
|
||||
cancelButton = new Button(shell, SWT.NONE);
|
||||
cancelButton.setBounds(new Rectangle(260, 365, 75, 25));
|
||||
cancelButton.setLocation(260, 365);
|
||||
//cancelButton.setBounds(new Rectangle(260, 365, 75, 25));
|
||||
cancelButton.setText("Cancel");
|
||||
|
||||
cancelButton.pack();
|
||||
|
||||
okButton.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
|
||||
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
|
||||
saveOptions();
|
||||
|
||||
@ -7,6 +7,7 @@ import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
import net.azib.ipscan.config.Labels;
|
||||
import net.azib.ipscan.config.Platform;
|
||||
import net.azib.ipscan.core.InetAddressUtils;
|
||||
import net.azib.ipscan.feeders.Feeder;
|
||||
import net.azib.ipscan.feeders.RandomFeeder;
|
||||
@ -75,7 +76,7 @@ public class RandomFeederGUI extends AbstractFeederGUI {
|
||||
formData.top = new FormAttachment(ipPrototypeText, 0, SWT.CENTER);
|
||||
ipPrototypeLabel.setLayoutData(formData);
|
||||
|
||||
formData = new FormData(105, SWT.DEFAULT);
|
||||
formData = new FormData(105 + (Platform.MAC_OS ? 35 : 0), SWT.DEFAULT);
|
||||
formData.top = new FormAttachment(0);
|
||||
formData.left = new FormAttachment(ipPrototypeLabel);
|
||||
ipPrototypeText.setLayoutData(formData);
|
||||
@ -96,7 +97,7 @@ public class RandomFeederGUI extends AbstractFeederGUI {
|
||||
ipMaskCombo.add("255..0.255");
|
||||
ipMaskCombo.add("255.0.0.255");
|
||||
ipMaskCombo.select(3);
|
||||
formData = new FormData(105, SWT.DEFAULT);
|
||||
formData = new FormData(105 + (Platform.MAC_OS ? 35 : 0), SWT.DEFAULT);
|
||||
formData.top = new FormAttachment(0);
|
||||
formData.left = new FormAttachment(ipMaskLabel);
|
||||
formData.bottom = new FormAttachment(ipPrototypeText, 0, SWT.BOTTOM);
|
||||
@ -123,7 +124,7 @@ public class RandomFeederGUI extends AbstractFeederGUI {
|
||||
|
||||
ipUpButton.setImage(new Image(getDisplay(), Labels.getInstance().getImageAsStream("button.ipUp.img")));
|
||||
ipUpButton.addSelectionListener(hostnameSelectionListener);
|
||||
formData = new FormData(35, SWT.DEFAULT);
|
||||
formData = new FormData();
|
||||
formData.top = new FormAttachment(ipPrototypeText);
|
||||
formData.left = new FormAttachment(hostnameText);
|
||||
formData.bottom = new FormAttachment(hostnameText, 0, SWT.BOTTOM);
|
||||
|
||||
@ -9,6 +9,7 @@ import java.util.logging.Logger;
|
||||
|
||||
import net.azib.ipscan.config.Labels;
|
||||
import net.azib.ipscan.config.LoggerFactory;
|
||||
import net.azib.ipscan.config.Platform;
|
||||
import net.azib.ipscan.core.InetAddressUtils;
|
||||
import net.azib.ipscan.feeders.Feeder;
|
||||
import net.azib.ipscan.feeders.FeederException;
|
||||
@ -88,7 +89,7 @@ public class RangeFeederGUI extends AbstractFeederGUI {
|
||||
formData.top = new FormAttachment(startIPText, 0, SWT.CENTER);
|
||||
ipRangeLabel.setLayoutData(formData);
|
||||
|
||||
formData = new FormData(105, SWT.DEFAULT);
|
||||
formData = new FormData(105 + (Platform.MAC_OS ? 35 : 0), SWT.DEFAULT);
|
||||
formData.top = new FormAttachment(0);
|
||||
formData.left = new FormAttachment(ipRangeLabel);
|
||||
startIPText.setLayoutData(formData);
|
||||
@ -106,7 +107,7 @@ public class RangeFeederGUI extends AbstractFeederGUI {
|
||||
catch (UnknownHostException e) {
|
||||
// leave endIPText empty
|
||||
}
|
||||
formData = new FormData(105, SWT.DEFAULT);
|
||||
formData = new FormData(105 + (Platform.MAC_OS ? 35 : 0), SWT.DEFAULT);
|
||||
formData.left = new FormAttachment(toLabel);
|
||||
endIPText.setLayoutData(formData);
|
||||
endIPText.addKeyListener(new EndIPKeyListener());
|
||||
@ -142,7 +143,7 @@ public class RangeFeederGUI extends AbstractFeederGUI {
|
||||
|
||||
ipUpButton.setImage(new Image(getDisplay(), Labels.getInstance().getImageAsStream("button.ipUp.img")));
|
||||
ipUpButton.addSelectionListener(hostnameListener);
|
||||
formData = new FormData(35, SWT.DEFAULT);
|
||||
formData = new FormData();
|
||||
formData.top = new FormAttachment(endIPText);
|
||||
formData.left = new FormAttachment(hostnameText);
|
||||
formData.bottom = new FormAttachment(hostnameText, 0, SWT.BOTTOM);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user