Default Constructor super("state", POSITION_LAST, 65, table_id); setRefreshInterval(INTERVAL_LIVE);
super("state", POSITION_LAST, 65, table_id); setRefreshInterval(INTERVAL_LIVE);
PEPeerTransport peer = (PEPeerTransport)cell.getDataSource(); //TODO fix this "naughty" cast String state_text = ""; if( peer != null ) { int state = peer.getConnectionState(); if( !cell.setSortValue( state ) && cell.isValid() ) { return; } switch( state ) { case PEPeerTransport.CONNECTION_PENDING : state_text = MessageText.getString( "PeersView.state.pending" ); break; case PEPeerTransport.CONNECTION_CONNECTING : state_text = MessageText.getString( "PeersView.state.connecting" ); break; case PEPeerTransport.CONNECTION_WAITING_FOR_HANDSHAKE : state_text = MessageText.getString( "PeersView.state.handshake" ); break; case PEPeerTransport.CONNECTION_FULLY_ESTABLISHED : state_text = MessageText.getString( "PeersView.state.established" ); break; } } cell.setText( state_text );