private javax . swing . JToolBar getPanelToolbar ( ) { if ( panelToolbar == null ) { // Initialize the toolbar panelToolbar = new javax . swing . JToolBar ( ) ; panelToolbar . setLayout ( new java . awt . GridBagLayout ( ) ) ; panelToolbar . setEnabled ( true ) ; panelToolbar . setFloatable ( false ) ; panelToolbar . setRollover ( true ) ; panelToolbar . setPreferredSize ( new java . awt . Dimension ( 800 , 30 ) ) ; panelToolbar . setName ( "HttpSessionToolbar" ) ; // Add elements GridBagConstraints labelGridBag = new GridBagConstraints ( ) ; GridBagConstraints siteSelectGridBag = new GridBagConstraints ( ) ; GridBagConstraints newSessionGridBag = new GridBagConstraints ( ) ; GridBagConstraints emptyGridBag = new GridBagConstraints ( ) ; GridBagConstraints optionsGridBag = new GridBagConstraints ( ) ; GridBagConstraints exportButtonGbc = new GridBagConstraints ( ) ; labelGridBag . gridx = 0 ; labelGridBag . gridy = 0 ; labelGridBag . insets = new java . awt . Insets ( 0 , 0 , 0 , 0 ) ; labelGridBag . anchor = java . awt . GridBagConstraints . WEST ; siteSelectGridBag . gridx = 1 ; siteSelectGridBag . gridy = 0 ; siteSelectGridBag . insets = new java . awt . Insets ( 0 , 0 , 0 , 0 ) ; siteSelectGridBag . anchor = java . awt . GridBagConstraints . WEST ; newSessionGridBag . gridx = 2 ; newSessionGridBag . gridy = 0 ; newSessionGridBag . insets = new java . awt . Insets ( 0 , 0 , 0 , 0 ) ; newSessionGridBag . anchor = java . awt . GridBagConstraints . WEST ; exportButtonGbc . gridx = 3 ; exportButtonGbc . gridy = 0 ; exportButtonGbc . insets = new java . awt . Insets ( 0 , 0 , 0 , 0 ) ; exportButtonGbc . anchor = java . awt . GridBagConstraints . WEST ; emptyGridBag . gridx = 4 ; emptyGridBag . gridy = 0 ; emptyGridBag . weightx = 1.0 ; emptyGridBag . weighty = 1.0 ; emptyGridBag . insets = new java . awt . Insets ( 0 , 0 , 0 , 0 ) ; emptyGridBag . anchor = java . awt . GridBagConstraints . WEST ; emptyGridBag . fill = java . awt . GridBagConstraints . HORIZONTAL ; optionsGridBag . gridx = 5 ; optionsGridBag . gridy = 0 ; optionsGridBag . insets = new java . awt . Insets ( 0 , 0 , 0 , 0 ) ; optionsGridBag . anchor = java . awt . GridBagConstraints . EAST ; JLabel label = new JLabel ( Constant . messages . getString ( "httpsessions.toolbar.site.label" ) ) ; panelToolbar . add ( label , labelGridBag ) ; panelToolbar . add ( getSiteSelect ( ) , siteSelectGridBag ) ; panelToolbar . add ( getNewSessionButton ( ) , newSessionGridBag ) ; panelToolbar . add ( getExportButton ( ) , exportButtonGbc ) ; panelToolbar . add ( getOptionsButton ( ) , optionsGridBag ) ; // Add an empty JLabel to fill the space panelToolbar . add ( new JLabel ( ) , emptyGridBag ) ; } return panelToolbar ; }
Gets the panel s toolbar .