Initialize the IPython notebook display elements
439932
def initialize_notebook():
    """"""
    try:
        from IPython.core.display import display, HTML
    except ImportError:
        print("IPython Notebook could not be loaded.")

    # Thanks to @jakevdp:
    # https://github.com/jakevdp/mpld3/blob/master/mpld3/_display.py#L85
    load_lib = """
                function vct_load_lib(url, callback){
                      if(
                typeof d3 !== 'undefined' &&
                url === '//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js'){
                        callback()
                      }
                      var s = document.createElement('script');
                      s.src = url;
                      s.async = true;
                      s.onreadystatechange = s.onload = callback;
                      s.onerror = function(){
                        console.warn("failed to load library " + url);
                        };
                      document.getElementsByTagName("head")[0].appendChild(s);
                };
                var vincent_event = new CustomEvent(
                  "vincent_libs_loaded",
                  {bubbles: true, cancelable: true}
                );
                """
    lib_urls = [
        "'//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js'",
        ("'//cdnjs.cloudflare.com/ajax/libs/d3-geo-projection/0.2.9/"
         "d3.geo.projection.min.js'"),
        "'//wrobstory.github.io/d3-cloud/d3.layout.cloud.js'",
        "'//wrobstory.github.io/vega/vega.v1.3.3.js'"
    ]
    get_lib = """vct_load_lib(%s, function(){
                  %s
                  });"""
    load_js = get_lib
    ipy_trigger = "window.dispatchEvent(vincent_event);"
    for elem in lib_urls[:-1]:
        load_js = load_js % (elem, get_lib)
    load_js = load_js % (lib_urls[-1], ipy_trigger)
    html = """
           <script>
               %s
               function load_all_libs(){
                  console.log('Loading Vincent libs...')
                  %s
               };
               if(typeof define === "function" && define.amd){
                    if (window['d3'] === undefined ||
                        window['topojson'] === undefined){
                        require.config(
                            {paths: {
    d3: '//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min',
    topojson: '//cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min'
                              }
                            }
                          );
                        require(["d3"], function(d3){
                            console.log('Loading Vincent from require.js...')
                            window.d3 = d3;
                            require(["topojson"], function(topojson){
                                window.topojson = topojson;
                                load_all_libs();
                            });
                        });
                    } else {
                        load_all_libs();
                    };
               }else{
                    console.log('Require.js not found, loading manually...')
                    load_all_libs();
               };

           </script>""" % (load_lib, load_js,)
    return display(HTML(html))
618844
def display_view(self):
        """"""
        self.idx_start.setText(str(self.parent.value('window_start')))
        self.idx_length.setText(str(self.parent.value('window_length')))
        self.idx_scaling.setText(str(self.parent.value('y_scale')))
        self.idx_distance.setText(str(self.parent.value('y_distance')))
876414
def init(self, s):
        

        # Hide cursor
        curses.curs_set(0)

        self.s = s
        self.s.keypad(1)

        self.set_screen_size()

        self.pads = {}
        self.offsets = {}

        self.init_help()
        self.init_streams_pad()
        self.current_pad = 'streams'

        self.set_title(TITLE_STRING)

        self.got_g = False

        signal.signal(28, self.resize)

        if self.config.CHECK_ONLINE_ON_START:
            self.check_online_streams()

        self.set_status('Ready')
484093
def initUI(self):

        #self.setMinimumSize(WIDTH,HEIGTH)
        #self.setMaximumSize(WIDTH,HEIGTH)

        ''''''
        self.origButton = QRadioButton("Original")
        self.rgbButton = QRadioButton("RGB")
        self.hsvButton = QRadioButton("HSV")
        self.yuvButton = QRadioButton("YUV")
        '''HSV status scheck'''
        self.hsvCheck = QCheckBox('HSV Color Disc')
        self.hsvCheck.setObjectName("hsvCheck")
        self.hsvCheck.stateChanged.connect(self.showHSVWidget)

        '''Signals for toggled radio buttons'''
        self.origButton.toggled.connect(lambda:self.origButtonState())       
        self.rgbButton.toggled.connect(lambda:self.rgbButtonState())
        self.hsvButton.toggled.connect(lambda:self.hsvButtonState())
        self.yuvButton.toggled.connect(lambda:self.yuvButtonState())

        self.origButton.setChecked(True)

        '''Main layout of the widget will contain several vertical layouts'''
        self.gLayout = QGridLayout(self)
        self.gLayout.setObjectName("gLayout")

        ''' Vertical Layout for radio buttons '''
        self.radio1Layout = QHBoxLayout()
        self.radio2Layout = QVBoxLayout()
        self.radio3Layout = QVBoxLayout()
        self.radioLayout = QVBoxLayout()
        self.radioLayout.setObjectName("radioLayout")
        self.radio1Layout.addWidget(self.origButton)
        self.radio1Layout.addWidget(self.rgbButton)
        self.radio1Layout.addWidget(self.hsvButton)
        self.radio1Layout.addWidget(self.yuvButton)
        self.radio1Layout.addWidget(self.hsvCheck)
        #self.radio1Layout.addLayout(self.radio2Layout)
        #self.radio1Layout.addLayout(self.radio3Layout)
        self.radioLayout.addLayout(self.radio1Layout)
        self.vSpacer = QSpacerItem(10, 10, QSizePolicy.Ignored, QSizePolicy.Ignored);
        self.radioLayout.addItem(self.vSpacer)
        
        hmin,smin,vmin = HSVMIN
        hmax,smax,vmax = HSVMAX
        ''' Vertical Layout for HMIN Slider''' 
        self.hminLayout = QVBoxLayout()
        self.hminLayout.setObjectName("hminLayout")
        self.hminLabel = QLabel("HMin")
        self.hminValue = QLineEdit(str(hmin),self)
        self.hminValue.setValidator(QIntValidator(hmin, hmax, self));
        self.hminValue.setFixedWidth(40)
        self.hminValue.setFixedHeight(27)
        self.hminValue.setAlignment(Qt.AlignCenter);
        self.hminSlider = QSlider(Qt.Vertical)
        self.hminSlider.setMinimum(hmin)
        self.hminSlider.setMaximum(hmax)
        self.hminSlider.setValue(hmin)
        self.hminLayout.addWidget(self.hminLabel, Qt.AlignCenter)
        self.hminLayout.addWidget(self.hminValue,Qt.AlignCenter)
        self.hminLayout.addWidget(self.hminSlider)
        

        ''' Vertical Layout for HMAX Slider''' 
        self.hmaxLayout = QVBoxLayout()
        self.hmaxLayout.setObjectName("hmaxLayout")
        self.hmaxLabel = QLabel("HMax")
        self.hmaxValue = QLineEdit(str(hmax),self)
        self.hmaxValue.setValidator(QIntValidator(hmin, hmax, self));
        self.hmaxValue.setFixedWidth(40)
        self.hmaxValue.setFixedHeight(27)
        self.hmaxValue.setAlignment(Qt.AlignCenter);
        self.hmaxSlider = QSlider(Qt.Vertical)
        self.hmaxSlider.setMinimum(hmin)
        self.hmaxSlider.setMaximum(hmax)
        self.hmaxSlider.setValue(hmax)
        self.hmaxLayout.addWidget(self.hmaxLabel)
        self.hmaxLayout.addWidget(self.hmaxValue)
        self.hmaxLayout.addWidget(self.hmaxSlider)

        ''' Vertical Layout for SMIN Slider'''
        self.sminLayout = QVBoxLayout()
        self.sminLayout.setObjectName("sminLayout")
        self.sminLabel = QLabel("SMin")
        self.sminValue = QLineEdit(str(smin),self)
        self.sminValue.setValidator(QIntValidator(smin, smax, self));
        self.sminValue.setFixedWidth(40)
        self.sminValue.setFixedHeight(27)
        self.sminValue.setAlignment(Qt.AlignCenter);
        self.sminSlider = QSlider(Qt.Vertical)
        self.sminSlider.setMinimum(smin)
        self.sminSlider.setMaximum(smax)
        self.sminSlider.setValue(smin)
        self.sminLayout.addWidget(self.sminLabel)
        self.sminLayout.addWidget(self.sminValue)
        self.sminLayout.addWidget(self.sminSlider)

        ''' Vertical Layout for SMAX Slider'''
        self.smaxLayout = QVBoxLayout()
        self.smaxLayout.setObjectName("smaxLayout")
        self.smaxLabel = QLabel("SMax")
        self.smaxValue = QLineEdit(str(smax),self)
        self.smaxValue.setValidator(QIntValidator(smin, smax, self));
        self.smaxValue.setFixedWidth(40)
        self.smaxValue.setFixedHeight(27)
        self.smaxValue.setAlignment(Qt.AlignCenter);
        self.smaxSlider = QSlider(Qt.Vertical)
        self.smaxSlider.setMinimum(smin)
        self.smaxSlider.setMaximum(smax)
        self.smaxSlider.setValue(smax)
        self.smaxLayout.addWidget(self.smaxLabel)
        self.smaxLayout.addWidget(self.smaxValue)
        self.smaxLayout.addWidget(self.smaxSlider)

        ''' Vertical Layout for VMIN Slider'''
        self.vminLayout = QVBoxLayout()
        self.vminLayout.setObjectName("vminLayout")
        self.vminLabel = QLabel("VMin")
        self.vminValue = QLineEdit(str(vmin),self)
        self.vminValue.setValidator(QIntValidator(vmin, vmax, self));
        self.vminValue.setFixedWidth(40)
        self.vminValue.setFixedHeight(27)
        self.vminValue.setAlignment(Qt.AlignCenter);
        self.vminSlider = QSlider(Qt.Vertical)
        self.vminSlider.setMinimum(vmin)
        self.vminSlider.setMaximum(vmax)
        self.vminSlider.setValue(vmin)
        self.vminLayout.addWidget(self.vminLabel)
        self.vminLayout.addWidget(self.vminValue)
        self.vminLayout.addWidget(self.vminSlider)

        ''' Vertical Layout for VMAX Slider'''
        self.vmaxLayout = QVBoxLayout()
        self.vmaxLayout.setObjectName("vmaxLayout")
        self.vmaxLabel = QLabel("VMax")
        self.vmaxValue = QLineEdit(str(vmax),self)
        self.vmaxValue.setValidator(QIntValidator(vmin, vmax, self));
        self.vmaxValue.setFixedWidth(40)
        self.vmaxValue.setFixedHeight(27)
        self.vmaxValue.setAlignment(Qt.AlignCenter);
        self.vmaxSlider = QSlider(Qt.Vertical)
        self.vmaxSlider.setMinimum(vmin)
        self.vmaxSlider.setMaximum(vmax)
        self.vmaxSlider.setValue(vmax)
        self.vmaxLayout.addWidget(self.vmaxLabel)
        self.vmaxLayout.addWidget(self.vmaxValue)
        self.vmaxLayout.addWidget(self.vmaxSlider)
    
        '''Adding all the vertical layouts to the main horizontal layout'''
        self.gLayout.addLayout(self.radioLayout,1,0,1,6,Qt.AlignCenter)
        self.gLayout.addLayout(self.hminLayout,2,0,Qt.AlignCenter)
        self.gLayout.addLayout(self.hmaxLayout,2,1,Qt.AlignCenter)
        self.gLayout.addLayout(self.sminLayout,2,2,Qt.AlignCenter)
        self.gLayout.addLayout(self.smaxLayout,2,3,Qt.AlignCenter)
        self.gLayout.addLayout(self.vminLayout,2,4,Qt.AlignCenter)
        self.gLayout.addLayout(self.vmaxLayout,2,5,Qt.AlignCenter)
        self.setLayout(self.gLayout)


        '''Signals for sliders value changes'''
        self.hminSlider.valueChanged.connect(self.changeHmin)     
        self.hmaxSlider.valueChanged.connect(self.changeHmax)
        self.sminSlider.valueChanged.connect(self.changeSmin)     
        self.smaxSlider.valueChanged.connect(self.changeSmax)
        self.vminSlider.valueChanged.connect(self.changeVmin)     
        self.vmaxSlider.valueChanged.connect(self.changeVmax)

        self.hminValue.textChanged.connect(self.changeHmin2)
        self.hmaxValue.textChanged.connect(self.changeHmax2)
        self.sminValue.textChanged.connect(self.changeSmin2)
        self.smaxValue.textChanged.connect(self.changeSmax2)
        self.vminValue.textChanged.connect(self.changeVmin2)
        self.vmaxValue.textChanged.connect(self.changeVmax2)
355084
public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String, Object> properties)
    {
        if (properties != null)
            m_StaticString = (String)properties.get(ScreenModel.DISPLAY_STRING);
        if (m_StaticString == null)
            m_StaticString = DBConstants.BLANK;
        super.init(itsLocation, parentScreen, null, ScreenConstants.DONT_DISPLAY_DESC, properties);
    }
14139
def show_xys(self, xs, ys)->None:
        ""
        from IPython.display import display, HTML
        items,names = [], xs[0].names + ['target']
        for i, (x,y) in enumerate(zip(xs,ys)):
            res = []
            cats = x.cats if len(x.cats.size()) > 0 else []
            conts = x.conts if len(x.conts.size()) > 0 else []
            for c, n in zip(cats, x.names[:len(cats)]):
                res.append(x.classes[n][c])
            res += [f'{c:.4f}' for c in conts] + [y]
            items.append(res)
        items = np.array(items)
        df = pd.DataFrame({n:items[:,i] for i,n in enumerate(names)}, columns=names)
        with pd.option_context('display.max_colwidth', -1):
            display(HTML(df.to_html(index=False)))
1291983
private void initGUI() {

        Panel pQuery   = new Panel();
        Panel pCommand = new Panel();

        // define a Panel pCard which takes four different cards/views:
        // tree of tables, command SQL text area, result window and an editor/input form
        pCard      = new Panel();
        layoutCard = new CardLayout(2, 2);

        pCard.setLayout(layoutCard);

        // four buttons at the top to quickly switch between the four views
        butTree    = new Button("Tree");
        butCommand = new Button("Command");
        butResult  = new Button("Result");
        butEditor  = new Button("Editor");

        butTree.addActionListener(this);
        butCommand.addActionListener(this);
        butResult.addActionListener(this);
        butEditor.addActionListener(this);

        Panel pButtons = new Panel();

        pButtons.setLayout(new GridLayout(1, 4, 8, 8));
        pButtons.add(butTree);
        pButtons.add(butCommand);
        pButtons.add(butResult);
        pButtons.add(butEditor);

        pResult = new Panel();

        pQuery.setLayout(new BorderLayout());
        pCommand.setLayout(new BorderLayout());
        pResult.setLayout(new BorderLayout());

        Font fFont = new Font("Dialog", Font.PLAIN, 12);

        txtCommand = new TextArea(5, 40);

        txtCommand.addKeyListener(this);

        txtResult = new TextArea(20, 40);

        txtCommand.setFont(fFont);
        txtResult.setFont(new Font("Courier", Font.PLAIN, 12));

        butExecute = new Button("Execute");

        butExecute.addActionListener(this);
        pCommand.add("South", butExecute);
        pCommand.add("Center", txtCommand);

        gResult = new Grid();

        setLayout(new BorderLayout());
        pResult.add("Center", gResult);

        tTree = new Tree();

        tTree.setMinimumSize(new Dimension(200, 100));
        gResult.setMinimumSize(new Dimension(200, 300));

        eEditor = new ZaurusEditor();

        pCard.add("tree", tTree);
        pCard.add("command", pCommand);
        pCard.add("result", pResult);
        pCard.add("editor", eEditor);
        fMain.add("Center", pCard);
        fMain.add("North", pButtons);
        doLayout();
        fMain.pack();
    }
613419
private void initComponents() {

		pnlSummary = new javax.swing.JPanel();
		lblSummary = new javax.swing.JLabel();
		lblSummaryValue = new javax.swing.JLabel();
		pnlEmptiesSummary = new javax.swing.JPanel();
		jScrollConcepts = new javax.swing.JScrollPane();
		jScrollRoles = new javax.swing.JScrollPane();

		setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N
		setMinimumSize(new java.awt.Dimension(520, 400));
		setPreferredSize(new java.awt.Dimension(520, 400));
		setLayout(new java.awt.BorderLayout());

		pnlSummary.setMinimumSize(new java.awt.Dimension(156, 23));
		pnlSummary.setPreferredSize(new java.awt.Dimension(156, 23));
		pnlSummary.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

		lblSummary.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
		lblSummary.setText("Empty concepts and roles");
		pnlSummary.add(lblSummary);

		lblSummaryValue.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
		pnlSummary.add(lblSummaryValue);

		add(pnlSummary, java.awt.BorderLayout.NORTH);

		pnlEmptiesSummary.setLayout(new javax.swing.BoxLayout(pnlEmptiesSummary, javax.swing.BoxLayout.PAGE_AXIS));
		pnlEmptiesSummary.add(jScrollConcepts);

		jScrollRoles.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
		pnlEmptiesSummary.add(jScrollRoles);

		add(pnlEmptiesSummary, java.awt.BorderLayout.CENTER);
	}
260902
def init_widget(self):
        
        super(AndroidDrawerLayout, self).init_widget()
        d = self.declaration
        if d.title:
            self.set_title(d.title)
        if d.drawer_elevation:
            self.set_drawer_elevation(d.drawer_elevation)
        if d.lock_mode:
            self.set_lock_mode(d.lock_mode)
        if d.scrim_color:
            self.set_scrim_color(d.scrim_color)
        if d.status_bar_background_color:
            self.set_status_bar_background_color(d.status_bar_background_color)
1050659
def initialize_ui(self):
        

        LOGGER.debug("> Initializing '{0}' Component ui.".format(self.__class__.__name__))

        self.__model = ProjectsModel(self, default_project=self.__default_project)

        self.Script_Editor_tabWidget = ScriptEditor_QTabWidget(self.__engine)
        self.Script_Editor_tabWidget_frame_gridLayout.addWidget(self.Script_Editor_tabWidget, 0, 0)
        self.__Script_Editor_tabWidget_set_ui()

        self.__recent_files_actions = []
        for i in range(self.__maximum_recent_files):
            self.__recent_files_actions.append(QAction(self.__menu_bar,
                                                       visible=False,
                                                       triggered=self.__load_recent_file__triggered))

        self.__menu_bar = QMenuBar()
        self.__menu_bar.setNativeMenuBar(False)
        self.Menu_Bar_frame_gridLayout.addWidget(self.__menu_bar)
        # Qt 4.8.4: Needs to show the menu_bar, otherwise it doesn't appear.
        self.__menu_bar.show()
        self.__initialize_menu_bar()

        self.Script_Editor_Output_plainTextEdit.setParent(None)
        self.Script_Editor_Output_plainTextEdit = Basic_QPlainTextEdit(self)
        self.Script_Editor_Output_plainTextEdit_frame_gridLayout.addWidget(
            self.Script_Editor_Output_plainTextEdit, 0, 0)
        self.Script_Editor_Output_plainTextEdit.setObjectName("Script_Editor_Output_plainTextEdit")
        self.__Script_Editor_Output_plainTextEdit_set_ui()

        self.__search_and_replace = SearchAndReplace(self, Qt.Window)
        self.__search_in_files = SearchInFiles(self, Qt.Window)

        self.__initialize_languages_model()

        self.Editor_Status_editorStatus = EditorStatus(self)
        self.__engine.statusBar.insertPermanentWidget(0, self.Editor_Status_editorStatus)

        Editor.get_untitled_file_name = self.__get_untitled_file_name

        # Signals / Slots.
        self.__engine.timer.timeout.connect(self.__Script_Editor_Output_plainTextEdit_refresh_ui)
        self.__engine.content_dropped.connect(self.__engine__content_dropped)
        self.__engine.layouts_manager.layout_restored.connect(self.__engine_layouts_manager__layout_restored)
        self.__engine.file_system_events_manager.file_changed.connect(
            self.__engine_file_system_events_manager__file_changed)
        self.__engine.file_system_events_manager.file_invalidated.connect(
            self.__engine_file_system_events_manager__file_invalidated)
        self.__engine.file_system_events_manager.directory_changed.connect(
            self.__engine_file_system_events_manager__directory_changed)
        self.__engine.file_system_events_manager.directory_invalidated.connect(
            self.__engine_file_system_events_manager__directory_invalidated)
        self.Script_Editor_tabWidget.tabCloseRequested.connect(self.__Script_Editor_tabWidget__tabCloseRequested)
        self.Script_Editor_tabWidget.currentChanged.connect(self.__Script_Editor_tabWidget__currentChanged)
        self.Script_Editor_tabWidget.content_dropped.connect(self.__Script_Editor_tabWidget__content_dropped)
        self.Script_Editor_tabWidget.tabBar().tabMoved.connect(self.__Script_Editor_tabWidget_tabBar__tabMoved)
        self.visibilityChanged.connect(self.__script_editor__visibilityChanged)
        self.ui_refresh.connect(self.__Script_Editor_Output_plainTextEdit_refresh_ui)
        self.recent_files_changed.connect(self.__set_recent_files_actions)
        self.__model.file_registered.connect(self.__model__file_registered)
        self.__model.file_unregistered.connect(self.__model__file_unregistered)
        self.__model.directory_registered.connect(self.__model__directory_registered)
        self.__model.directory_unregistered.connect(self.__model__directory_unregistered)
        self.__model.project_registered.connect(self.__model__project_registered)
        self.__model.project_unregistered.connect(self.__model__project_unregistered)
        self.__model.editor_registered.connect(self.__model__editor_registered)
        self.__model.editor_unregistered.connect(self.__model__editor_unregistered)

        self.initialized_ui = True
        return True
1074943
def display(self):
        ''''''
        try:
            from IPython.display import HTML
            import uuid
        except ImportError:
            raise IPythonDisplayImportError

        sequence_json = self.json()

        d3cdn = '//d3js.org/d3.v3.min.js'
        div_id = 'sequence_{}'.format(uuid.uuid1())

        cur_dir = os.path.abspath(os.path.dirname(__file__))
        d3_plasmid_path = os.path.join(cur_dir, 'd3-plasmid.js')
        with open(d3_plasmid_path) as f:
            d3_plasmid_js = f.read()

        html = '<div id={div_id}></div>'.format(div_id=div_id)
        js_databind = '''
        <script>
        require([\'{d3_cdn}\'], function(lib) {{
            window.data = {data};'''.format(div_id=div_id, d3_cdn=d3cdn,
                                            data=sequence_json)

        js_viz = '''
            d3sequence(window.data, \'{div_id}\')
        }});
        </script>
        '''.format(div_id=div_id)

        return HTML(html + js_databind + d3_plasmid_js + js_viz)
526024
def display_initialize(self):
        """"""
        echo(self.term.home + self.term.clear)
        echo(self.term.move_y(self.term.height // 2))
        echo(self.term.center('Initializing page data ...').rstrip())
        flushout()

        if LIMIT_UCS == 0x10000:
            echo('\n\n')
            echo(self.term.blink_red(self.term.center(
                'narrow Python build: upperbound value is {n}.'
                .format(n=LIMIT_UCS)).rstrip()))
            echo('\n\n')
            flushout()
713943
def _init_plot(self, key, element, plots, ranges=None):
        
        subplots = list(self.subplots.values()) if self.subplots else []

        axis_types, labels, plot_ranges = self._axes_props(plots, subplots, element, ranges)
        xlabel, ylabel, _ = labels
        x_axis_type, y_axis_type = axis_types
        properties = dict(plot_ranges)
        properties['x_axis_label'] = xlabel if 'x' in self.labelled or self.xlabel else ' '
        properties['y_axis_label'] = ylabel if 'y' in self.labelled or self.ylabel else ' '

        if not self.show_frame:
            properties['outline_line_alpha'] = 0

        if self.show_title and self.adjoined is None:
            title = self._format_title(key, separator=' ')
        else:
            title = ''

        if self.toolbar != 'disable':
            tools = self._init_tools(element)
            properties['tools'] = tools
            properties['toolbar_location'] = self.toolbar
        else:
            properties['tools'] = []
            properties['toolbar_location'] = None

        if self.renderer.webgl:
            properties['output_backend'] = 'webgl'

        properties.update(**self._plot_properties(key, element))

        with warnings.catch_warnings():
            # Bokeh raises warnings about duplicate tools but these
            # are not really an issue
            warnings.simplefilter('ignore', UserWarning)
            return bokeh.plotting.Figure(x_axis_type=x_axis_type,
                                         y_axis_type=y_axis_type, title=title,
                                         **properties)
370364
def initUi(self):
        
        self.gridLayout = QtGui.QGridLayout(self)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)

        self.buttonFrame = QtGui.QFrame(self)
        #self.buttonFrame.setMinimumSize(QtCore.QSize(250, 50))
        #self.buttonFrame.setMaximumSize(QtCore.QSize(250, 50))
        self.buttonFrame.setFrameShape(QtGui.QFrame.NoFrame)
        spacerItemButton = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)

        self.buttonFrameLayout = QtGui.QGridLayout(self.buttonFrame)
        self.buttonFrameLayout.setContentsMargins(0, 0, 0, 0)

        self.editButton = QtGui.QToolButton(self.buttonFrame)
        self.editButton.setObjectName('editbutton')
        self.editButton.setText(self.tr('edit'))
        self.editButton.setToolTip(self.tr('toggle editing mode'))
        icon = QtGui.QIcon(QtGui.QPixmap(_fromUtf8(':/icons/document-edit.png')))

        self.editButton.setIcon(icon)

        self.addColumnButton = QtGui.QToolButton(self.buttonFrame)
        self.addColumnButton.setObjectName('addcolumnbutton')
        self.addColumnButton.setText(self.tr('+col'))
        self.addColumnButton.setToolTip(self.tr('add new column'))
        icon = QtGui.QIcon(QtGui.QPixmap(_fromUtf8(':/icons/edit-table-insert-column-right.png')))

        self.addColumnButton.setIcon(icon)

        self.addRowButton = QtGui.QToolButton(self.buttonFrame)
        self.addRowButton.setObjectName('addrowbutton')
        self.addRowButton.setText(self.tr('+row'))
        self.addRowButton.setToolTip(self.tr('add new row'))
        icon = QtGui.QIcon(QtGui.QPixmap(_fromUtf8(':/icons/edit-table-insert-row-below.png')))

        self.addRowButton.setIcon(icon)

        self.removeColumnButton = QtGui.QToolButton(self.buttonFrame)
        self.removeColumnButton.setObjectName('removecolumnbutton')
        self.removeColumnButton.setText(self.tr('-col'))
        self.removeColumnButton.setToolTip(self.tr('remove a column'))
        icon = QtGui.QIcon(QtGui.QPixmap(_fromUtf8(':/icons/edit-table-delete-column.png')))

        self.removeColumnButton.setIcon(icon)

        self.removeRowButton = QtGui.QToolButton(self.buttonFrame)
        self.removeRowButton.setObjectName('removerowbutton')
        self.removeRowButton.setText(self.tr('-row'))
        self.removeRowButton.setToolTip(self.tr('remove selected rows'))
        icon = QtGui.QIcon(QtGui.QPixmap(_fromUtf8(':/icons/edit-table-delete-row.png')))

        self.removeRowButton.setIcon(icon)

        self.buttons = [self.editButton, self.addColumnButton, self.addRowButton, self.removeColumnButton, self.removeRowButton]

        for index, button in enumerate(self.buttons):
            button.setMinimumSize(self._iconSize)
            button.setMaximumSize(self._iconSize)
            button.setIconSize(self._iconSize)
            button.setCheckable(True)
            self.buttonFrameLayout.addWidget(button, 0, index, 1, 1)
        self.buttonFrameLayout.addItem(spacerItemButton, 0, index+1, 1, 1)

        for button in self.buttons[1:]:
            button.setEnabled(False)

        #self.tableView = QtGui.QTableView(self)
        self.tableView = DragTable(self)
        self.tableView.setAlternatingRowColors(True)
        self.tableView.setSortingEnabled(True)
        
        self.gridLayout.addWidget(self.buttonFrame, 0, 0, 1, 1)
        self.gridLayout.addWidget(self.tableView, 1, 0, 1, 1)

        self.editButton.toggled.connect(self.enableEditing)
        self.addColumnButton.toggled.connect(self.showAddColumnDialog)
        self.addRowButton.toggled.connect(self.addRow)
        self.removeRowButton.toggled.connect(self.removeRow)
        self.removeColumnButton.toggled.connect(self.showRemoveColumnDialog)
1334170
def _initUI(self):
        
        self.setModal(self._modal)
        self.setWindowTitle(self._windowTitle)

        layout = QtGui.QGridLayout()

        self._filenameLabel = QtGui.QLabel('Output File', self)
        self._filenameLineEdit = QtGui.QLineEdit(self)
        chooseFileButtonIcon = QtGui.QIcon(QtGui.QPixmap(':/icons/document-save-as.png'))
        self._chooseFileAction = QtGui.QAction(self)
        self._chooseFileAction.setIcon(chooseFileButtonIcon)
        self._chooseFileAction.triggered.connect(self._createFile)

        self._chooseFileButton = QtGui.QToolButton(self)
        self._chooseFileButton.setDefaultAction(self._chooseFileAction)

        layout.addWidget(self._filenameLabel, 0, 0)
        layout.addWidget(self._filenameLineEdit, 0, 1, 1, 2)
        layout.addWidget(self._chooseFileButton, 0, 3)

        self._encodingLabel = QtGui.QLabel('File Encoding', self)


        encoding_names = list(map(lambda x: x.upper(), sorted(list(set(_encodings.values())))))

        self._encodingComboBox = QtGui.QComboBox(self)
        self._encodingComboBox.addItems(encoding_names)
        self._idx = encoding_names.index('UTF_8')
        self._encodingComboBox.setCurrentIndex(self._idx)
        #self._encodingComboBox.activated.connect(self._updateEncoding)

        layout.addWidget(self._encodingLabel, 1, 0)
        layout.addWidget(self._encodingComboBox, 1, 1, 1, 1)

        self._hasHeaderLabel = QtGui.QLabel('Header Available?', self)
        self._headerCheckBox = QtGui.QCheckBox(self)
        #self._headerCheckBox.toggled.connect(self._updateHeader)

        layout.addWidget(self._hasHeaderLabel, 2, 0)
        layout.addWidget(self._headerCheckBox, 2, 1)

        self._delimiterLabel = QtGui.QLabel('Column Delimiter', self)
        self._delimiterBox = DelimiterSelectionWidget(self)

        layout.addWidget(self._delimiterLabel, 3, 0)
        layout.addWidget(self._delimiterBox, 3, 1, 1, 3)

        self._exportButton = QtGui.QPushButton('Export Data', self)
        self._cancelButton = QtGui.QPushButton('Cancel', self)

        self._buttonBox = QtGui.QDialogButtonBox(self)
        self._buttonBox.addButton(self._exportButton, QtGui.QDialogButtonBox.AcceptRole)
        self._buttonBox.addButton(self._cancelButton, QtGui.QDialogButtonBox.RejectRole)

        self._buttonBox.accepted.connect(self.accepted)
        self._buttonBox.rejected.connect(self.rejected)

        layout.addWidget(self._buttonBox, 5, 2, 1, 2)
        self._exportButton.setDefault(False)
        self._filenameLineEdit.setFocus()

        self._statusBar = QtGui.QStatusBar(self)
        self._statusBar.setSizeGripEnabled(False)
        layout.addWidget(self._statusBar, 4, 0, 1, 4)
        self.setLayout(layout)
111913
private void init() {
        this.setLayout(new BorderLayout());

        // MAIN PANEL
        JPanel mainPanel = new JPanel();
        Border margin = new EmptyBorder(10, 10, 5, 10);

        mainPanel.setBorder(margin);
        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));

        mainPanel.add(JMeterPluginsUtils.addHelpLinkToPanel(makeTitlePanel(),
                WIKIPAGE));

        // SortFilterModel mySortedModel =
        // new SortFilterModel(myStatTableModel);
        JTable myJTable = new JTable(model);
        myJTable.getTableHeader().setDefaultRenderer(new JMeterHeaderAsPropertyRenderer(COLUMNS_MSG_PARAMETERS));
        myJTable.setPreferredScrollableViewportSize(new Dimension(500, 70));
        RendererUtils.applyRenderers(myJTable, RENDERERS);
        JScrollPane myScrollPane = new JScrollPane(myJTable);
        this.add(mainPanel, BorderLayout.NORTH);
        this.add(myScrollPane, BorderLayout.CENTER);
        saveTable.addActionListener(this);
        JPanel opts = new JPanel();
        opts.add(useGroupName, BorderLayout.WEST);
        opts.add(saveTable, BorderLayout.CENTER);
        opts.add(saveHeaders, BorderLayout.EAST);
        this.add(opts, BorderLayout.SOUTH);
    }
836049
private void initialize() {
		this.setJMenuBar(getMainMenuBar());
		this.setContentPane(getPaneContent());
    	this.setPreferredSize(new Dimension(1000, 800));
		this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
		this.addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosing(WindowEvent e) {
				getMainMenuBar().getMenuFileControl().exit();
			}
		});

		this.setVisible(false);
	}