mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
Result table now changes mouse cursor to 'semi-busy' during scanning (just like Firefox while loading a page)
git-svn-id: https://ipscan.svn.sourceforge.net/svnroot/ipscan/trunk@378 375186e5-ef17-0410-b0b6-91563547dcda
This commit is contained in:
parent
3d1eecd744
commit
31395e23b4
1
TODO
1
TODO
@ -13,7 +13,6 @@ Before 3.0:
|
||||
* Exporter appending functionality exposed to the user
|
||||
* make Display: status bar right-clickable
|
||||
* rename favorite option in the Manager dialog
|
||||
* change cursor while scanning
|
||||
* show hours in statistics dialog
|
||||
* goto prev stuff (alternative shortcuts)
|
||||
* GIJ + java.util.prefs don't work
|
||||
|
||||
@ -12,7 +12,9 @@ import net.azib.ipscan.config.Labels;
|
||||
import net.azib.ipscan.core.ScanningResult;
|
||||
import net.azib.ipscan.core.ScanningResultList;
|
||||
import net.azib.ipscan.core.ScanningResult.ResultType;
|
||||
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.fetchers.Fetcher;
|
||||
import net.azib.ipscan.fetchers.FetcherRegistry;
|
||||
import net.azib.ipscan.fetchers.FetcherRegistryUpdateListener;
|
||||
@ -34,7 +36,7 @@ import org.eclipse.swt.widgets.TableItem;
|
||||
*
|
||||
* @author Anton Keks
|
||||
*/
|
||||
public class ResultTable extends Table implements FetcherRegistryUpdateListener {
|
||||
public class ResultTable extends Table implements FetcherRegistryUpdateListener, StateTransitionListener {
|
||||
|
||||
private ScanningResultList scanningResults;
|
||||
private GUIConfig guiConfig;
|
||||
@ -74,6 +76,9 @@ public class ResultTable extends Table implements FetcherRegistryUpdateListener
|
||||
|
||||
// this one populates table dynamically, taking data from ScanningResultList
|
||||
addListener(SWT.SetData, new SetDataListener());
|
||||
|
||||
// listen to state machine events
|
||||
stateMachine.addTransitionListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -219,4 +224,13 @@ public class ResultTable extends Table implements FetcherRegistryUpdateListener
|
||||
|
||||
}
|
||||
|
||||
public void transitionTo(final ScanningState state) {
|
||||
// change cursor while scanning
|
||||
getDisplay().asyncExec(new Runnable() {
|
||||
public void run() {
|
||||
setCursor(getDisplay().getSystemCursor(state == ScanningState.IDLE ? SWT.CURSOR_ARROW : SWT.CURSOR_APPSTARTING));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user