private JXTable getHttpSessionsTable ( ) { if ( sessionsTable == null ) { sessionsTable = new JXTable ( sessionsModel ) ; sessionsTable . setColumnSelectionAllowed ( false ) ; sessionsTable . setCellSelectionEnabled ( false ) ; sessionsTable . setRowSelectionAllowed ( true ) ; sessionsTable . setAutoCreateRowSorter ( true ) ; sessionsTable . setColumnControlVisible ( true ) ; sessionsTable . setAutoCreateColumnsFromModel ( false ) ; sessionsTable . getColumnExt ( 0 ) . setCellRenderer ( new DefaultTableRenderer ( new MappedValue ( StringValues . EMPTY , IconValues . NONE ) , JLabel . CENTER ) ) ; sessionsTable . getColumnExt ( 0 ) . setHighlighters ( new ActiveSessionIconHighlighter ( 0 ) ) ; this . setSessionsTableColumnSizes ( ) ; sessionsTable . setName ( PANEL_NAME ) ; sessionsTable . setDoubleBuffered ( true ) ; sessionsTable . setSelectionMode ( javax . swing . ListSelectionModel . SINGLE_SELECTION ) ; sessionsTable . addMouseListener ( new java . awt . event . MouseAdapter ( ) { @ Override public void mousePressed ( java . awt . event . MouseEvent e ) { showPopupMenuIfTriggered ( e ) ; } @ Override public void mouseReleased ( java . awt . event . MouseEvent e ) { showPopupMenuIfTriggered ( e ) ; } private void showPopupMenuIfTriggered ( java . awt . event . MouseEvent e ) { if ( e . isPopupTrigger ( ) ) { // Select table item int row = sessionsTable . rowAtPoint ( e . getPoint ( ) ) ; if ( row < 0 || ! sessionsTable . getSelectionModel ( ) . isSelectedIndex ( row ) ) { sessionsTable . getSelectionModel ( ) . clearSelection ( ) ; if ( row >= 0 ) { sessionsTable . getSelectionModel ( ) . setSelectionInterval ( row , row ) ; } } View . getSingleton ( ) . getPopupMenu ( ) . show ( e . getComponent ( ) , e . getX ( ) , e . getY ( ) ) ; } } } ) ; } return sessionsTable ; }
Gets the http sessions table .