mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-01 21:17:13 +00:00
Add missing @Override annotations.
This commit is contained in:
@@ -101,6 +101,7 @@ public class PeerMonitor {
|
||||
private void refreshUI() {
|
||||
// Tell the Swing UI thread to redraw the peers table.
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
peerTableModel.updateFromPeerGroup();
|
||||
}
|
||||
@@ -125,6 +126,7 @@ public class PeerMonitor {
|
||||
JLabel instructions = new JLabel("Number of peers to connect to: ");
|
||||
final SpinnerNumberModel spinnerModel = new SpinnerNumberModel(4, 0, 100, 1);
|
||||
spinnerModel.addChangeListener(new ChangeListener() {
|
||||
@Override
|
||||
public void stateChanged(ChangeEvent changeEvent) {
|
||||
peerGroup.setMaxConnections(spinnerModel.getNumber().intValue());
|
||||
}
|
||||
@@ -151,6 +153,7 @@ public class PeerMonitor {
|
||||
|
||||
// Refresh the UI every half second to get the latest ping times. The event handler runs in the UI thread.
|
||||
new Timer(1000, new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent actionEvent) {
|
||||
peerTableModel.updateFromPeerGroup();
|
||||
}
|
||||
@@ -174,6 +177,7 @@ public class PeerMonitor {
|
||||
fireTableDataChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRowCount() {
|
||||
return connectedPeers.size() + pendingPeers.size();
|
||||
}
|
||||
@@ -191,10 +195,12 @@ public class PeerMonitor {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColumnCount() {
|
||||
return 6;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<?> getColumnClass(int column) {
|
||||
switch (column) {
|
||||
case PROTOCOL_VERSION:
|
||||
@@ -208,6 +214,7 @@ public class PeerMonitor {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getValueAt(int row, int col) {
|
||||
if (row >= connectedPeers.size()) {
|
||||
// Peer that isn't connected yet.
|
||||
@@ -266,6 +273,7 @@ public class PeerMonitor {
|
||||
this.bold = new Font("Sans Serif", Font.BOLD, 12);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object contents,
|
||||
boolean selected, boolean hasFocus, int row, int column) {
|
||||
row = table.convertRowIndexToModel(row);
|
||||
|
||||
@@ -85,6 +85,7 @@ public class PrintPeers {
|
||||
final SettableFuture<Void> future = SettableFuture.create();
|
||||
// Once the connection has completed version handshaking ...
|
||||
peer.addEventListener(new AbstractPeerEventListener() {
|
||||
@Override
|
||||
public void onPeerConnected(Peer p, int peerCount) {
|
||||
// Check the chain height it claims to have.
|
||||
VersionMessage ver = peer.getPeerVersionMessage();
|
||||
@@ -106,6 +107,7 @@ public class PrintPeers {
|
||||
peer.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPeerDisconnected(Peer p, int peerCount) {
|
||||
if (!future.isDone())
|
||||
System.out.println("Failed to talk to " + addr);
|
||||
|
||||
Reference in New Issue
Block a user