diff --git a/resources/Labels.txt b/resources/Labels.txt
index 6d57d62f..e538b056 100755
--- a/resources/Labels.txt
+++ b/resources/Labels.txt
@@ -4,8 +4,8 @@ menu.file=&File
menu.file.newWindow=&New window
menu.file.saveAll=&Save...
menu.file.saveSelection=Save se&lection...
-menu.file.exportOptions=Export &options...
-menu.file.importOptions=&Import options...
+menu.file.exportPreferences=Export &preferences...
+menu.file.importPreferences=&Import preferences...
menu.file.exit=E&xit
menu.goto=&Go to
menu.goto.aliveHost=Next alive &host
@@ -25,7 +25,7 @@ menu.favorites=Fa&vorites
menu.favorites.add=Ad&d current...
menu.favorites.edit=&Manage favorites...
menu.tools=&Tools
-menu.tools.options=&Options...
+menu.tools.preferences=&Preferences...
menu.tools.fetchers=Select &fetchers...
menu.tools.delete=Delete from list
menu.tools.scanInfo=Show scan &info
@@ -40,7 +40,7 @@ menu.help.about=&About...
menu.columns.sortBy=Sort by
menu.columns.sortDirection=Change sort direction
menu.columns.info=Fetcher info
-menu.columns.options=Fetcher options...
+menu.columns.preferences=Fetcher preferences...
state.ready=Ready
state.scanning=Scanning
state.waitForThreads=Wait for all threads to terminate...
@@ -52,11 +52,11 @@ state.retrievingVersion=Retrieving the latest version...
title.about=About
title.configDetect=Configuration Detection
title.statistics=Scan Statistics
-title.options=Options
-title.options.scanning=&Scanning
-title.options.display=&Display
-title.options.fetchers=&Fetchers
-title.options.ports=&Ports
+title.preferences=Preferences
+title.preferences.scanning=&Scanning
+title.preferences.display=&Display
+title.preferences.fetchers=&Fetchers
+title.preferences.ports=&Ports
title.details=IP address details
title.saveAll=Export All Results
title.saveSelection=Export Selected Results
@@ -111,7 +111,7 @@ text.fetchers.selectedList=Selected fetchers
text.fetchers.availableList=Available fetchers
text.fetchers.info=Fetcher information:
text.fetchers.info.notAvailable=Unfortunately, no additional information about this fetcher is available.
-text.about=%NAME\n\nVersion: %VERSION\nBuild: %BUILD\nBuild date: %DATE\n\n%COPYLEFT\nVisit %WEBSITE\n\nJava: %JAVA
+text.about=%NAME\n\nVersion: %VERSION\nBuild: %BUILD\nBuild date: %DATE\n\n%COPYLEFT\nVisit %WEBSITE\n\nJava: %JAVA\nOS: %OS
button.OK=OK
button.cancel=Cancel
button.close=&Close
@@ -167,13 +167,13 @@ feeder.random.count=Count:
fetcher.ip=IP
fetcher.ip.info=Displays the scanned IP address.\nThis fetcher is mandatory and cannot be removed from the list.
fetcher.ping=Ping
-fetcher.ping.info=Shows whether the host replies to ping requests and shows average packet roundtrip time to the host and back if it was detected (depending on the pinging method selected in the Options dialog).
+fetcher.ping.info=Shows whether the host replies to ping requests and shows average packet roundtrip time to the host and back if it was detected (depending on the pinging method selected in the Preferences dialog).
fetcher.ping.ttl=TTL
fetcher.ping.ttl.info=Shows the TTL (Time To Live) value in ping reply packets (works only with ICMP pinging).\n\nThis value is usually decremented by each node in the network that forwards the packet, so if initial value is guessable (usually 64, 128, or 255), then the difference shows the distance to the host (in number of nodes).
fetcher.hostname=Hostname
fetcher.hostname.info=Shows the hostname of the host obtained by the reverse DNS lookup.\n\nThis is the registered host name on the DNS server and may be different from the host name configured on the machine itself.
fetcher.ports=Ports
-fetcher.ports.info=Shows the list of open ports from the ones that were scanned.\n\nA port is open when it is possible to complete TCP handshake with it and estabilish a connection.\nYou can select scanned ports in the Options dialog.
+fetcher.ports.info=Shows the list of open ports from the ones that were scanned.\n\nA port is open when it is possible to complete TCP handshake with it and estabilish a connection.\nYou can select scanned ports in the Preferences dialog.
fetcher.ports.filtered=Filtered Ports
fetcher.ports.filtered.info=Shows the list of filtered ports from the ones that were scanned.\n\nA port is filtered when no response is being received to the connection attempt within specified amount of time. If a port is filtered, then it is probably blocked by a firewall.
fetcher.comment=Comments
@@ -183,33 +183,33 @@ fetcher.webDetect.info=Detects the web server software name and version, if poss
fetcher.value.ms=\u00A0ms
fetcher.value.notAvailable=[n/a]
fetcher.value.notScanned=[n/s]
-options.threads=Threads
-options.threads.delay=Delay between starting threads (in ms):
-options.threads.maxThreads=Maximum number of threads:
-options.pinging.deadHosts=Scan dead hosts, which don't reply to pings
-options.pinging=Pinging
-options.pinging.type=Pinging method:
-options.pinging.count=Number of ping probes (packets to send):
-options.pinging.timeout=Ping timeout (in ms):
-options.broadcast=Broadcast
-options.broadcast.skip=Skip likely broadcast IP addresses
-options.fetchers.info=Here you can change options, specific to fetchers
-options.ports.timing=Timing
-options.ports.timing.timeout=Default port connect timeout (in ms):
-options.ports.timing.adaptTimeout=Adapt timeout to ping roundtrip time (if available)
-options.ports.timing.minTimeout=Minimal adapted connect timeout (in ms):
-options.ports.ports=Port selection
-options.ports.portsDescription=Specify ports to scan here. Ranges are supported.\nExample: 1-3,5,7,10-15,6000-6100\nIf many ports are specified, scanning can take a lot of time.
-options.display.list=Display in the results list
-options.display.list.ALL=All scanned hosts
-options.display.list.ALIVE=Alive hosts (responding to pings) only
-options.display.list.PORTS=Hosts with open ports only
-options.display.labels=Labels displayed in the results list
-options.display.labels.notAvailable=The value is not available (no results):
-options.display.labels.notScanned=The actual value was not scanned (unknown):
-options.display.confirmation=Confirmation
-options.display.confirmation.newScan=Ask for confirmation before starting a new scan
-options.display.confirmation.showInfo=Show info dialog after each scan
+preferences.threads=Threads
+preferences.threads.delay=Delay between starting threads (in ms):
+preferences.threads.maxThreads=Maximum number of threads:
+preferences.pinging.deadHosts=Scan dead hosts, which don't reply to pings
+preferences.pinging=Pinging
+preferences.pinging.type=Pinging method:
+preferences.pinging.count=Number of ping probes (packets to send):
+preferences.pinging.timeout=Ping timeout (in ms):
+preferences.broadcast=Broadcast
+preferences.broadcast.skip=Skip likely broadcast IP addresses
+preferences.fetchers.info=Here you can change preferences, specific to fetchers
+preferences.ports.timing=Timing
+preferences.ports.timing.timeout=Default port connect timeout (in ms):
+preferences.ports.timing.adaptTimeout=Adapt timeout to ping roundtrip time (if available)
+preferences.ports.timing.minTimeout=Minimal adapted connect timeout (in ms):
+preferences.ports.ports=Port selection
+preferences.ports.portsDescription=Specify ports to scan here. Ranges are supported.\nExample: 1-3,5,7,10-15,6000-6100\nIf many ports are specified, scanning can take a lot of time.
+preferences.display.list=Display in the results list
+preferences.display.list.ALL=All scanned hosts
+preferences.display.list.ALIVE=Alive hosts (responding to pings) only
+preferences.display.list.PORTS=Hosts with open ports only
+preferences.display.labels=Labels displayed in the results list
+preferences.display.labels.notAvailable=The value is not available (no results):
+preferences.display.labels.notScanned=The actual value was not scanned (unknown):
+preferences.display.confirmation=Confirmation
+preferences.display.confirmation.newScan=Ask for confirmation before starting a new scan
+preferences.display.confirmation.showInfo=Show info dialog after each scan
exporter.txt=Text file (txt)
exporter.txt.generated=Generated by
exporter.txt.scanned=Scanned %INFO
@@ -224,10 +224,10 @@ exception.FeederException.random.invalidCount=Random address count must be great
exception.FeederException.file.notExists=Specified file doesn't exist or you don't have permissions to read it
exception.FeederException.file.errorWhileReading=Error while reading the file
exception.FeederException.file.nothingFound=No IP addresses found in the file
-exception.FetcherException.options.notAvailable=This fetcher doesn't have any options.
+exception.FetcherException.preferences.notAvailable=This fetcher doesn't have any preferences.
exception.FetcherException.unparseablePortString=The port string is either invalid or incomplete.\nPlease check that it is in the correct format and port numbers are in the correct range (1-65535)
exception.FetcherException.unsupportedPinger=The selected pinger is not supported in the current environment.\n\nThis can be the case with ICMP pingers, which require RawSocket support from the operating system (e.g. support was removed from consumer versions of Windows since XP SP2) and the respective rights (on almost all systems this requires root or administrator privileges)
-exception.FetcherException.pingerCreateFailure=Unable to initialize the requested pinger.\nYou can try selecting another pinger in the Options dialog.
+exception.FetcherException.pingerCreateFailure=Unable to initialize the requested pinger.\nYou can try selecting another pinger in the Preferences dialog.
exception.ExporterException.failed=Exporting failed
exception.ExporterException.exporter.unknown=Unknown file type, please specify correct extension in the file name.
exception.ExporterException.xml.noAppend=Appending to XML files is not supported.
@@ -256,12 +256,12 @@ Fetcher - gathers specific information about a host, e.g. ping time, hostname, o
text.gettingStarted3=Main terminology (continued):\n\n\
Alive host - is the host, responding to pinging. These are blue in the results list.\n\n\
-Dead host - is the host, not responding to pinging (red in the list). However, it may still have ports open (if firewall blocks pings). In order to scan these hosts fully, check "scan dead hosts" in the Tools->Options dialog.\n\n\
+Dead host - is the host, not responding to pinging (red in the list). However, it may still have ports open (if firewall blocks pings). In order to scan these hosts fully, check "scan dead hosts" in the Tools->Preferences dialog.\n\n\
Open port - a TCP port, responding to connection attempts. Hosts with open ports are green in the results list.\n\n\
Filtered port - a TCP port, not responding that it is closed (no RST packet). These ports are usually specifically blocked by firewalls for some reason.
text.gettingStarted4=Pinging (checking if hosts are alive):\n\n\
-Angry IP Scanner can use different methods for pinging hosts. You can choose between them in the Options dialog.\n\n\
+Angry IP Scanner can use different methods for pinging hosts. You can choose between them in the Preferences dialog.\n\n\
ICMP echo - is the standard method used by the 'ping' program. This one requires administrator or root privileges on most platforms. Note that some firewall software disables sending of ICMP echo reply packets, making alive hosts appear like dead.\n\n\
UDP - sends UDP packets (datagrams) to one of the host's ports and sees if there is any response (either positive or negative). This is non-standard, but works without special privileges.\n\n\
TCP - tries to connect to port 80 (http) on the host. This may work better than UDP for some networks, but usually it is worse.\n\n\
@@ -269,7 +269,7 @@ UDP and TCP pinging most often doesn't properly detect routers or other network
TTL (time to live) - this fetcher works only with ICMP pinging method. Its initial value is usually 64 or 128, and the difference represents the distance to the host in number of nodes it has travelled.
text.gettingStarted5=The results list displays the scanning results, one line per each scanned address.\n\n\
-Using the Options dialog, you may configure to display:\n\
+Using the Preferences dialog, you may configure to display:\n\
- all scanned hosts\n\
- only alive hosts\n\
- only hosts with any ports open\n\n\
@@ -279,4 +279,4 @@ Special values (also configurable):\n\
text.crippledWindowsInfo=Thank you for trying Angry IP Scanner!\n\n\
However, keep in mind that consumer versions of Windows (e.g. Windows XP SP2, Windows Vista) have limited ability to be hosts for scanning, due to removed RawSocket support and TCP connection rate limiting.\n\n\
-Because of that, some configuration options were changed for you, making scanning a lot slower than on full-featured operating systems. See the FAQ on Angry IP Scanner homepage.
+Because of that, some preferences were changed for you, making scanning a lot slower than on full-featured operating systems. See the FAQ on Angry IP Scanner homepage.
diff --git a/src/net/azib/ipscan/config/ComponentRegistry.java b/src/net/azib/ipscan/config/ComponentRegistry.java
index 81c286bc..c8a6c2e2 100755
--- a/src/net/azib/ipscan/config/ComponentRegistry.java
+++ b/src/net/azib/ipscan/config/ComponentRegistry.java
@@ -28,7 +28,7 @@ import net.azib.ipscan.fetchers.WebDetectFetcher;
import net.azib.ipscan.gui.ConfigDetectorDialog;
import net.azib.ipscan.gui.MainMenu;
import net.azib.ipscan.gui.MainWindow;
-import net.azib.ipscan.gui.OptionsDialog;
+import net.azib.ipscan.gui.PreferencesDialog;
import net.azib.ipscan.gui.ResultTable;
import net.azib.ipscan.gui.SelectFetchersDialog;
import net.azib.ipscan.gui.StatisticsDialog;
@@ -164,7 +164,7 @@ public class ComponentRegistry {
anyComponentParameter,
anyComponentParameter});
- container.registerComponentImplementation(OptionsDialog.class);
+ container.registerComponentImplementation(PreferencesDialog.class);
container.registerComponentImplementation(ConfigDetectorDialog.class);
container.registerComponentImplementation(SelectFetchersDialog.class);
container.registerComponentImplementation(StatisticsDialog.class);
@@ -172,7 +172,7 @@ public class ComponentRegistry {
// various actions / listeners
container.registerComponentImplementation(StartStopScanningAction.class);
container.registerComponentImplementation(ColumnsActions.SortBy.class);
- container.registerComponentImplementation(ColumnsActions.FetcherOptions.class);
+ container.registerComponentImplementation(ColumnsActions.FetcherPreferences.class);
container.registerComponentImplementation(ColumnsActions.FetcherInfo.class);
container.registerComponentImplementation(ColumnsActions.ColumnClick.class);
container.registerComponentImplementation(ColumnsActions.ColumnResize.class);
diff --git a/src/net/azib/ipscan/config/Config.java b/src/net/azib/ipscan/config/Config.java
index 98d4857a..fe3c0569 100755
--- a/src/net/azib/ipscan/config/Config.java
+++ b/src/net/azib/ipscan/config/Config.java
@@ -6,7 +6,7 @@ package net.azib.ipscan.config;
import java.util.prefs.Preferences;
/**
- * This class encapsulates configuration options of the program.
+ * This class encapsulates preferences of the program.
* It is a singleton class.
*
* @author Anton Keks
diff --git a/src/net/azib/ipscan/exporters/Exporter.java b/src/net/azib/ipscan/exporters/Exporter.java
index c40f2d6d..44a15f50 100755
--- a/src/net/azib/ipscan/exporters/Exporter.java
+++ b/src/net/azib/ipscan/exporters/Exporter.java
@@ -43,7 +43,7 @@ public interface Exporter extends Cloneable {
/**
* Called on start of the exporting.
* @param outputStream this OutputStream should be used to output exported data.
- * @param feederInfo summary of feeder options, which were used for this scan
+ * @param feederInfo summary of feeder preferences, which were used for this scan
* @throws IOException
*/
public void start(OutputStream outputStream, String feederInfo) throws IOException;
diff --git a/src/net/azib/ipscan/fetchers/PortsFetcher.java b/src/net/azib/ipscan/fetchers/PortsFetcher.java
index 6dbd343b..239fb7b6 100755
--- a/src/net/azib/ipscan/fetchers/PortsFetcher.java
+++ b/src/net/azib/ipscan/fetchers/PortsFetcher.java
@@ -35,7 +35,7 @@ public class PortsFetcher implements Fetcher {
private GlobalConfig config;
- // initialize options for this scan
+ // initialize preferences for this scan
private PortIterator portIteratorPrototype;
protected boolean displayAsRanges = true; // TODO: make configurable
diff --git a/src/net/azib/ipscan/gui/AboutDialog.java b/src/net/azib/ipscan/gui/AboutDialog.java
index e681a3bf..6a604380 100755
--- a/src/net/azib/ipscan/gui/AboutDialog.java
+++ b/src/net/azib/ipscan/gui/AboutDialog.java
@@ -53,7 +53,8 @@ public class AboutDialog extends AbstractModalDialog {
text = text.replaceAll("%VERSION", Version.getVersion());
text = text.replaceAll("%BUILD", Version.getBuildNumber());
text = text.replaceAll("%DATE", Version.getBuildDate());
- text = text.replaceAll("%JAVA", System.getProperty("java.vm.vendor") + " " + System.getProperty("java.vm.version") + "\n" + System.getProperty("os.name") + " " + System.getProperty("os.version"));
+ text = text.replaceAll("%JAVA", System.getProperty("java.vm.vendor") + " " + System.getProperty("java.vm.version"));
+ text = text.replaceAll("%OS", System.getProperty("os.name") + " " + System.getProperty("os.version"));
text = text.replaceAll("%COPYLEFT", Version.COPYLEFT);
text = text.replaceAll("%WEBSITE", Version.WEBSITE);
text = text.replaceAll("%MAILTO", Version.MAILTO);
diff --git a/src/net/azib/ipscan/gui/MainMenu.java b/src/net/azib/ipscan/gui/MainMenu.java
index 62a9ae23..45b465e8 100755
--- a/src/net/azib/ipscan/gui/MainMenu.java
+++ b/src/net/azib/ipscan/gui/MainMenu.java
@@ -68,8 +68,8 @@ public class MainMenu {
initMenuItem(subMenu, "menu.file.saveAll", "Ctrl+S", new Integer(SWT.MOD1 | 'S'), initListener(FileActions.SaveAll.class));
initMenuItem(subMenu, "menu.file.saveSelection", null, null, initListener(FileActions.SaveSelection.class));
initMenuItem(subMenu, null, null, null, null);
- initMenuItem(subMenu, "menu.file.exportOptions", null, null, null);
- initMenuItem(subMenu, "menu.file.importOptions", null, null, null);
+ initMenuItem(subMenu, "menu.file.exportPreferences", null, null, null);
+ initMenuItem(subMenu, "menu.file.importPreferences", null, null, null);
if (!Platform.MAC_OS) {
initMenuItem(subMenu, null, null, null, null);
initMenuItem(subMenu, "menu.file.exit", !Platform.MAC_OS ? "Alt+F4" : null, null, initListener(FileActions.Exit.class));
@@ -88,7 +88,7 @@ public class MainMenu {
createFavoritesMenu(menu);
subMenu = initMenu(menu, "menu.tools");
- initMenuItem(subMenu, "menu.tools.options", "Ctrl+O", new Integer(SWT.MOD1 | (Platform.MAC_OS ? ',' : 'O')), initListener(ToolsActions.Options.class));
+ initMenuItem(subMenu, "menu.tools.preferences", "Ctrl+O", new Integer(SWT.MOD1 | (Platform.MAC_OS ? ',' : 'O')), initListener(ToolsActions.Preferences.class));
initMenuItem(subMenu, "menu.tools.fetchers", "Ctrl+Shift+O", new Integer(SWT.MOD1 | SWT.MOD2 | (Platform.MAC_OS ? ',' : 'O')), initListener(ToolsActions.SelectFetchers.class));
initMenuItem(subMenu, null, null, null, null);
initMenuItem(subMenu, "menu.tools.delete", null, null, null);
@@ -221,11 +221,11 @@ public class MainMenu {
* This is the menu when clicking on a column header.
*/
public static class ColumnsMenu extends Menu {
- public ColumnsMenu(Decorations parent, ColumnsActions.SortBy sortByListener, ColumnsActions.FetcherInfo infoListener, ColumnsActions.FetcherOptions optionsListener) {
+ public ColumnsMenu(Decorations parent, ColumnsActions.SortBy sortByListener, ColumnsActions.FetcherInfo infoListener, ColumnsActions.FetcherPreferences preferencesListener) {
super(parent, SWT.POP_UP);
initMenuItem(this, "menu.columns.sortBy", null, null, sortByListener);
- initMenuItem(this, "menu.columns.options", null, null, optionsListener);
+ initMenuItem(this, "menu.columns.preferences", null, null, preferencesListener);
initMenuItem(this, "menu.columns.info", null, null, infoListener);
}
protected void checkSubclass() { } // allow extending of Menu class
diff --git a/src/net/azib/ipscan/gui/OptionsDialog.java b/src/net/azib/ipscan/gui/PreferencesDialog.java
similarity index 84%
rename from src/net/azib/ipscan/gui/OptionsDialog.java
rename to src/net/azib/ipscan/gui/PreferencesDialog.java
index aec6b689..478af067 100755
--- a/src/net/azib/ipscan/gui/OptionsDialog.java
+++ b/src/net/azib/ipscan/gui/PreferencesDialog.java
@@ -36,11 +36,11 @@ import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Text;
/**
- * Options Dialog
+ * Preferences Dialog
*
* @author Anton Keks
*/
-public class OptionsDialog extends AbstractModalDialog {
+public class PreferencesDialog extends AbstractModalDialog {
private PingerRegistry pingerRegistry;
private GlobalConfig globalConfig;
@@ -73,7 +73,7 @@ public class OptionsDialog extends AbstractModalDialog {
private Button showInfoCheckbox;
private Button askConfirmationCheckbox;
- public OptionsDialog(PingerRegistry pingerRegistry, GlobalConfig globalConfig, ConfigDetectorDialog configDetectorDialog) {
+ public PreferencesDialog(PingerRegistry pingerRegistry, GlobalConfig globalConfig, ConfigDetectorDialog configDetectorDialog) {
this.pingerRegistry = pingerRegistry;
this.globalConfig = globalConfig;
this.configDetectorDialog = configDetectorDialog;
@@ -85,17 +85,17 @@ public class OptionsDialog extends AbstractModalDialog {
}
/**
- * Opens the specified tab of options dialog
+ * Opens the specified tab of preferences dialog
* @param tabIndex
*/
public void openTab(int tabIndex) {
// widgets are created on demand
createShell();
- loadOptions();
+ loadPreferences();
tabFolder.setSelection(tabIndex);
// select ports text by default if ports tab is opened
- // this is needed for PortsFetcher that uses this tab as its options
+ // this is needed for PortsFetcher that uses this tab as its preferences
if (tabFolder.getItem(tabIndex) == portsTabItem) {
portsText.forceFocus();
}
@@ -110,7 +110,7 @@ public class OptionsDialog extends AbstractModalDialog {
Display currentDisplay = Display.getCurrent();
shell = new Shell(currentDisplay != null ? currentDisplay.getActiveShell() : null, SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);
- shell.setText(Labels.getLabel("title.options"));
+ shell.setText(Labels.getLabel("title.preferences"));
shell.setLayout(LayoutHelper.formLayout(10, 10, 4));
createTabFolder();
@@ -128,7 +128,7 @@ public class OptionsDialog extends AbstractModalDialog {
okButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- saveOptions();
+ savePreferences();
shell.close();
}
});
@@ -147,24 +147,24 @@ public class OptionsDialog extends AbstractModalDialog {
createScanningTab();
TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
- tabItem.setText(Labels.getLabel("title.options.scanning"));
+ tabItem.setText(Labels.getLabel("title.preferences.scanning"));
tabItem.setControl(scanningTab);
scanningTabItem = tabItem;
createPortsTab();
tabItem = new TabItem(tabFolder, SWT.NONE);
- tabItem.setText(Labels.getLabel("title.options.ports"));
+ tabItem.setText(Labels.getLabel("title.preferences.ports"));
tabItem.setControl(portsTab);
portsTabItem = tabItem;
createDisplayTab();
tabItem = new TabItem(tabFolder, SWT.NONE);
- tabItem.setText(Labels.getLabel("title.options.display"));
+ tabItem.setText(Labels.getLabel("title.preferences.display"));
tabItem.setControl(displayTab);
// createFetchersTab();
// tabItem = new TabItem(tabFolder, SWT.NONE);
-// tabItem.setText(Labels.getLabel("title.options.fetchers"));
+// tabItem.setText(Labels.getLabel("title.preferences.fetchers"));
// tabItem.setControl(fetchersTab);
tabFolder.pack();
@@ -181,7 +181,7 @@ public class OptionsDialog extends AbstractModalDialog {
GridLayout groupLayout = new GridLayout();
groupLayout.numColumns = 2;
Group threadsGroup = new Group(scanningTab, SWT.NONE);
- threadsGroup.setText(Labels.getLabel("options.threads"));
+ threadsGroup.setText(Labels.getLabel("preferences.threads"));
threadsGroup.setLayout(groupLayout);
GridData gridData = new GridData(80, SWT.DEFAULT);
@@ -189,12 +189,12 @@ public class OptionsDialog extends AbstractModalDialog {
Label label;
label = new Label(threadsGroup, SWT.NONE);
- label.setText(Labels.getLabel("options.threads.delay"));
+ label.setText(Labels.getLabel("preferences.threads.delay"));
threadDelayText = new Text(threadsGroup, SWT.BORDER);
threadDelayText.setLayoutData(gridData);
label = new Label(threadsGroup, SWT.NONE);
- label.setText(Labels.getLabel("options.threads.maxThreads"));
+ label.setText(Labels.getLabel("preferences.threads.maxThreads"));
maxThreadsText = new Text(threadsGroup, SWT.BORDER);
maxThreadsText.setLayoutData(gridData);
// new Label(threadsGroup, SWT.NONE);
@@ -205,42 +205,42 @@ public class OptionsDialog extends AbstractModalDialog {
Group pingingGroup = new Group(scanningTab, SWT.NONE);
pingingGroup.setLayout(groupLayout);
- pingingGroup.setText(Labels.getLabel("options.pinging"));
+ pingingGroup.setText(Labels.getLabel("preferences.pinging"));
label = new Label(pingingGroup, SWT.NONE);
- label.setText(Labels.getLabel("options.pinging.type"));
+ label.setText(Labels.getLabel("preferences.pinging.type"));
pingersCombo = new Combo(pingingGroup, SWT.DROP_DOWN | SWT.READ_ONLY);
pingersCombo.setLayoutData(gridData);
String[] pingerNames = pingerRegistry.getRegisteredNames();
for (int i = 0; i < pingerNames.length; i++) {
pingersCombo.add(Labels.getLabel(pingerNames[i]));
- // this is used by saveOptions()
+ // this is used by savePreferences()
pingersCombo.setData(Integer.toString(i), pingerNames[i]);
}
pingersCombo.select(0);
label = new Label(pingingGroup, SWT.NONE);
- label.setText(Labels.getLabel("options.pinging.count"));
+ label.setText(Labels.getLabel("preferences.pinging.count"));
pingingCountText = new Text(pingingGroup, SWT.BORDER);
pingingCountText.setLayoutData(gridData);
label = new Label(pingingGroup, SWT.NONE);
- label.setText(Labels.getLabel("options.pinging.timeout"));
+ label.setText(Labels.getLabel("preferences.pinging.timeout"));
pingingTimeoutText = new Text(pingingGroup, SWT.BORDER);
pingingTimeoutText.setLayoutData(gridData);
GridData gridDataWithSpan = new GridData();
gridDataWithSpan.horizontalSpan = 2;
deadHostsCheckbox = new Button(pingingGroup, SWT.CHECK);
- deadHostsCheckbox.setText(Labels.getLabel("options.pinging.deadHosts"));
+ deadHostsCheckbox.setText(Labels.getLabel("preferences.pinging.deadHosts"));
deadHostsCheckbox.setLayoutData(gridDataWithSpan);
Group broadcastGroup = new Group(scanningTab, SWT.NONE);
broadcastGroup.setLayout(groupLayout);
- broadcastGroup.setText(Labels.getLabel("options.broadcast"));
+ broadcastGroup.setText(Labels.getLabel("preferences.broadcast"));
skipBroadcastsCheckbox = new Button(broadcastGroup, SWT.CHECK);
- skipBroadcastsCheckbox.setText(Labels.getLabel("options.broadcast.skip"));
+ skipBroadcastsCheckbox.setText(Labels.getLabel("preferences.broadcast.skip"));
GridData gridDataWithSpan2 = new GridData();
gridDataWithSpan2.horizontalSpan = 2;
skipBroadcastsCheckbox.setLayoutData(gridDataWithSpan2);
@@ -257,36 +257,36 @@ public class OptionsDialog extends AbstractModalDialog {
GridLayout groupLayout = new GridLayout();
groupLayout.numColumns = 1;
Group listGroup = new Group(displayTab, SWT.NONE);
- listGroup.setText(Labels.getLabel("options.display.list"));
+ listGroup.setText(Labels.getLabel("preferences.display.list"));
listGroup.setLayout(groupLayout);
listGroup.setLayoutData(new RowData(260, SWT.DEFAULT));
displayMethod = new Button[DisplayMethod.values().length];
Button allRadio = new Button(listGroup, SWT.RADIO);
- allRadio.setText(Labels.getLabel("options.display.list" + '.' + DisplayMethod.ALL));
+ allRadio.setText(Labels.getLabel("preferences.display.list" + '.' + DisplayMethod.ALL));
displayMethod[DisplayMethod.ALL.ordinal()] = allRadio;
Button aliveRadio = new Button(listGroup, SWT.RADIO);
- aliveRadio.setText(Labels.getLabel("options.display.list" + '.' + DisplayMethod.ALIVE));
+ aliveRadio.setText(Labels.getLabel("preferences.display.list" + '.' + DisplayMethod.ALIVE));
displayMethod[DisplayMethod.ALIVE.ordinal()] = aliveRadio;
Button portsRadio = new Button(listGroup, SWT.RADIO);
- portsRadio.setText(Labels.getLabel("options.display.list" + '.' + DisplayMethod.PORTS));
+ portsRadio.setText(Labels.getLabel("preferences.display.list" + '.' + DisplayMethod.PORTS));
displayMethod[DisplayMethod.PORTS.ordinal()] = portsRadio;
groupLayout = new GridLayout();
groupLayout.numColumns = 2;
Group labelsGroup = new Group(displayTab, SWT.NONE);
- labelsGroup.setText(Labels.getLabel("options.display.labels"));
+ labelsGroup.setText(Labels.getLabel("preferences.display.labels"));
labelsGroup.setLayout(groupLayout);
GridData gridData = new GridData();
gridData.widthHint = 50;
Label label = new Label(labelsGroup, SWT.NONE);
- label.setText(Labels.getLabel("options.display.labels.notAvailable"));
+ label.setText(Labels.getLabel("preferences.display.labels.notAvailable"));
notAvailableText = new Text(labelsGroup, SWT.BORDER);
notAvailableText.setLayoutData(gridData);
label = new Label(labelsGroup, SWT.NONE);
- label.setText(Labels.getLabel("options.display.labels.notScanned"));
+ label.setText(Labels.getLabel("preferences.display.labels.notScanned"));
notScannedText = new Text(labelsGroup, SWT.BORDER);
notScannedText.setLayoutData(gridData);
@@ -294,12 +294,12 @@ public class OptionsDialog extends AbstractModalDialog {
groupLayout.numColumns = 1;
Group showStatsGroup = new Group(displayTab, SWT.NONE);
showStatsGroup.setLayout(groupLayout);
- showStatsGroup.setText(Labels.getLabel("options.display.confirmation"));
+ showStatsGroup.setText(Labels.getLabel("preferences.display.confirmation"));
askConfirmationCheckbox = new Button(showStatsGroup, SWT.CHECK);
- askConfirmationCheckbox.setText(Labels.getLabel("options.display.confirmation.newScan"));
+ askConfirmationCheckbox.setText(Labels.getLabel("preferences.display.confirmation.newScan"));
showInfoCheckbox = new Button(showStatsGroup, SWT.CHECK);
- showInfoCheckbox.setText(Labels.getLabel("options.display.confirmation.showInfo"));
+ showInfoCheckbox.setText(Labels.getLabel("preferences.display.confirmation.showInfo"));
}
/**
@@ -313,21 +313,21 @@ public class OptionsDialog extends AbstractModalDialog {
GridLayout groupLayout = new GridLayout();
groupLayout.numColumns = 2;
Group timingGroup = new Group(portsTab, SWT.NONE);
- timingGroup.setText(Labels.getLabel("options.ports.timing"));
+ timingGroup.setText(Labels.getLabel("preferences.ports.timing"));
timingGroup.setLayout(groupLayout);
GridData gridData = new GridData();
gridData.widthHint = 50;
Label label = new Label(timingGroup, SWT.NONE);
- label.setText(Labels.getLabel("options.ports.timing.timeout"));
+ label.setText(Labels.getLabel("preferences.ports.timing.timeout"));
portTimeoutText = new Text(timingGroup, SWT.BORDER);
portTimeoutText.setLayoutData(gridData);
GridData gridData1 = new GridData();
gridData1.horizontalSpan = 2;
adaptTimeoutCheckbox = new Button(timingGroup, SWT.CHECK);
- adaptTimeoutCheckbox.setText(Labels.getLabel("options.ports.timing.adaptTimeout"));
+ adaptTimeoutCheckbox.setText(Labels.getLabel("preferences.ports.timing.adaptTimeout"));
adaptTimeoutCheckbox.setLayoutData(gridData1);
adaptTimeoutCheckbox.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
@@ -336,7 +336,7 @@ public class OptionsDialog extends AbstractModalDialog {
});
label = new Label(timingGroup, SWT.NONE);
- label.setText(Labels.getLabel("options.ports.timing.minTimeout"));
+ label.setText(Labels.getLabel("preferences.ports.timing.minTimeout"));
minPortTimeoutText = new Text(timingGroup, SWT.BORDER);
minPortTimeoutText.setLayoutData(gridData);
@@ -345,11 +345,11 @@ public class OptionsDialog extends AbstractModalDialog {
portsLayout.marginHeight = 2;
portsLayout.marginWidth = 2;
Group portsGroup = new Group(portsTab, SWT.NONE);
- portsGroup.setText(Labels.getLabel("options.ports.ports"));
+ portsGroup.setText(Labels.getLabel("preferences.ports.ports"));
portsGroup.setLayout(portsLayout);
label = new Label(portsGroup, SWT.WRAP);
- label.setText(Labels.getLabel("options.ports.portsDescription"));
+ label.setText(Labels.getLabel("preferences.ports.portsDescription"));
//label.setLayoutData(new RowData(300, SWT.DEFAULT));
portsText = new Text(portsGroup, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
portsText.setLayoutData(new RowData(SWT.DEFAULT, 60));
@@ -365,7 +365,7 @@ public class OptionsDialog extends AbstractModalDialog {
// fetchersTab = new Composite(tabFolder, SWT.NONE);
// fetchersTab.setLayout(gridLayout);
// Label label = new Label(fetchersTab, SWT.NONE);
-// label.setText(Labels.getLabel("options.fetchers.info"));
+// label.setText(Labels.getLabel("preferences.fetchers.info"));
// }
/**
@@ -381,7 +381,7 @@ public class OptionsDialog extends AbstractModalDialog {
return rowLayout;
}
- private void loadOptions() {
+ private void loadPreferences() {
maxThreadsText.setText(Integer.toString(globalConfig.maxThreads));
threadDelayText.setText(Integer.toString(globalConfig.threadDelay));
String[] pingerNames = pingerRegistry.getRegisteredNames();
@@ -406,7 +406,7 @@ public class OptionsDialog extends AbstractModalDialog {
askConfirmationCheckbox.setSelection(globalConfig.askScanConfirmation);
}
- private void saveOptions() {
+ private void savePreferences() {
// validate port string
try {
new PortIterator(portsText.getText());
diff --git a/src/net/azib/ipscan/gui/actions/ColumnsActions.java b/src/net/azib/ipscan/gui/actions/ColumnsActions.java
index ee5f8cb8..dd988e3c 100755
--- a/src/net/azib/ipscan/gui/actions/ColumnsActions.java
+++ b/src/net/azib/ipscan/gui/actions/ColumnsActions.java
@@ -15,7 +15,7 @@ import net.azib.ipscan.fetchers.Fetcher;
import net.azib.ipscan.fetchers.FetcherException;
import net.azib.ipscan.fetchers.PingFetcher;
import net.azib.ipscan.fetchers.PortsFetcher;
-import net.azib.ipscan.gui.OptionsDialog;
+import net.azib.ipscan.gui.PreferencesDialog;
import net.azib.ipscan.gui.ResultTable;
import net.azib.ipscan.gui.MainMenu.ColumnsMenu;
@@ -67,7 +67,7 @@ public class ColumnsActions {
sortMenuItem.setText(Labels.getLabel("menu.columns.sortBy") + tableColumn.getText());
}
- // remember the clicked column (see SortBy, FetcherOptions, and FetcherInfo below)
+ // remember the clicked column (see SortBy, FetcherPreferences, and FetcherInfo below)
columnsMenu.setData(tableColumn);
// show the menu
@@ -103,12 +103,12 @@ public class ColumnsActions {
}
}
- public static class FetcherOptions implements Listener {
+ public static class FetcherPreferences implements Listener {
- private OptionsDialog optionsDialog;
+ private PreferencesDialog preferencesDialog;
- public FetcherOptions(OptionsDialog optionsDialog) {
- this.optionsDialog = optionsDialog;
+ public FetcherPreferences(PreferencesDialog preferencesDialog) {
+ this.preferencesDialog = preferencesDialog;
}
public void handleEvent(Event event) {
@@ -119,14 +119,14 @@ public class ColumnsActions {
// some hardcodes here for 'special' fetchers
if (fetcher instanceof PingFetcher) {
- optionsDialog.open();
+ preferencesDialog.open();
}
else
if (fetcher instanceof PortsFetcher) {
- optionsDialog.openTab(1);
+ preferencesDialog.openTab(1);
}
else {
- throw new FetcherException("options.notAvailable");
+ throw new FetcherException("preferences.notAvailable");
}
}
}
diff --git a/src/net/azib/ipscan/gui/actions/ToolsActions.java b/src/net/azib/ipscan/gui/actions/ToolsActions.java
index 204a4ced..217005ea 100755
--- a/src/net/azib/ipscan/gui/actions/ToolsActions.java
+++ b/src/net/azib/ipscan/gui/actions/ToolsActions.java
@@ -13,7 +13,7 @@ import net.azib.ipscan.config.GlobalConfig;
import net.azib.ipscan.core.state.ScanningState;
import net.azib.ipscan.core.state.StateMachine;
import net.azib.ipscan.core.state.StateTransitionListener;
-import net.azib.ipscan.gui.OptionsDialog;
+import net.azib.ipscan.gui.PreferencesDialog;
import net.azib.ipscan.gui.ResultTable;
import net.azib.ipscan.gui.SelectFetchersDialog;
import net.azib.ipscan.gui.StatisticsDialog;
@@ -26,21 +26,21 @@ import net.azib.ipscan.gui.StatusBar;
*/
public class ToolsActions {
- public static class Options implements Listener {
+ public static class Preferences implements Listener {
- private OptionsDialog optionsDialog;
+ private PreferencesDialog preferencesDialog;
private ResultTable resultTable;
private StatusBar statusBar;
- public Options(OptionsDialog optionsDialog, ResultTable resultTable, StatusBar statusBar) {
- this.optionsDialog = optionsDialog;
+ public Preferences(PreferencesDialog preferencesDialog, ResultTable resultTable, StatusBar statusBar) {
+ this.preferencesDialog = preferencesDialog;
this.resultTable = resultTable;
this.statusBar = statusBar;
}
public void handleEvent(Event event) {
- // show the options dialog
- optionsDialog.open();
+ // show the preferences dialog
+ preferencesDialog.open();
// refresh the results and status bar in case anything was changed
resultTable.updateResults();
diff --git a/src/net/azib/ipscan/gui/mac/CarbonUIEnhancer.java b/src/net/azib/ipscan/gui/mac/CarbonUIEnhancer.java
index 4907f2ed..096c72c1 100644
--- a/src/net/azib/ipscan/gui/mac/CarbonUIEnhancer.java
+++ b/src/net/azib/ipscan/gui/mac/CarbonUIEnhancer.java
@@ -12,7 +12,7 @@ package net.azib.ipscan.gui.mac;
import net.azib.ipscan.config.Labels;
import net.azib.ipscan.gui.AboutDialog;
-import net.azib.ipscan.gui.OptionsDialog;
+import net.azib.ipscan.gui.PreferencesDialog;
import org.eclipse.swt.internal.Callback;
import org.eclipse.swt.internal.carbon.*;
@@ -30,11 +30,11 @@ public class CarbonUIEnhancer {
private static final int kHICommandAbout = ('a' << 24) + ('b' << 16) + ('o' << 8) + 'u';
private final AboutDialog aboutDialog;
- private final OptionsDialog optionsDialog;
+ private final PreferencesDialog preferencesDialog;
- public CarbonUIEnhancer(AboutDialog aboutDialog, OptionsDialog optionsDialog) {
+ public CarbonUIEnhancer(AboutDialog aboutDialog, PreferencesDialog preferencesDialog) {
this.aboutDialog = aboutDialog;
- this.optionsDialog = optionsDialog;
+ this.preferencesDialog = preferencesDialog;
}
public void startup() {
@@ -61,7 +61,7 @@ public class CarbonUIEnhancer {
OS.GetEventParameter(theEvent, OS.kEventParamDirectObject, OS.typeHICommand, null, HICommand.sizeof, null, command);
switch (command.commandID) {
case kHICommandPreferences: {
- optionsDialog.open();
+ preferencesDialog.open();
return OS.noErr;
}
case kHICommandAbout:
diff --git a/test/net/azib/ipscan/gui/OptionsDialogTest.java b/test/net/azib/ipscan/gui/PreferencesDialogTest.java
similarity index 85%
rename from test/net/azib/ipscan/gui/OptionsDialogTest.java
rename to test/net/azib/ipscan/gui/PreferencesDialogTest.java
index 1c393260..4603b7af 100644
--- a/test/net/azib/ipscan/gui/OptionsDialogTest.java
+++ b/test/net/azib/ipscan/gui/PreferencesDialogTest.java
@@ -17,15 +17,15 @@ import org.junit.Test;
/**
- * OptionsDialogTest
+ * PreferencesDialogTest
*
* @author Anton Keks
*/
-public class OptionsDialogTest {
+public class PreferencesDialogTest {
@Test
public void testPortsTextValidationListenerKeyPressed() throws Exception {
- KeyListener listener = new OptionsDialog.PortsTextValidationListener();
+ KeyListener listener = new PreferencesDialog.PortsTextValidationListener();
Event ev = new Event();
ev.widget = new Shell();
ev.doit = true;
@@ -38,7 +38,7 @@ public class OptionsDialogTest {
@Test
public void testPortsTextValidationListenerLogic() throws Exception {
- OptionsDialog.PortsTextValidationListener listener = new OptionsDialog.PortsTextValidationListener();
+ PreferencesDialog.PortsTextValidationListener listener = new PreferencesDialog.PortsTextValidationListener();
assertFalse(listener.validateChar('-', "", 0));
assertFalse(listener.validateChar('-', "-", 0));
assertFalse(listener.validateChar('-', ",", 0));