public UnitTestRunner() { mainPane = new JPanel(new GridBagLayout()); mainPane.setMinimumSize(new Dimension(0, 0)); mainPane.setPreferredSize(new Dimension(270, 200)); minPane = new JPanel(new GridBagLayout()); initComponents(); addGrid( mainPane, toolbar, 0, 0, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST); addGrid( mainPane, new JSeparator(), 0, 1, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST); addGrid( mainPane, fCounterPanel, 0, 2, 2, GridBagConstraints.NONE, 0.0, GridBagConstraints.WEST); addGrid( mainPane, fProgressIndicator, 0, 3, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST); addGrid( mainPane, new JSeparator(), 0, 5, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST); addGrid( mainPane, new JLabel("Results:"), 0, 6, 2, GridBagConstraints.HORIZONTAL, 1.0, GridBagConstraints.WEST); addGrid(mainPane, fTestViewTab, 0, 7, 2, GridBagConstraints.BOTH, 1.0, GridBagConstraints.WEST); // _lineNoOfTest = new HashMap<String, Integer>(); }
private void jbInit() throws Exception { saveButton.setText("Save"); saveButton.addActionListener(new PrintfTemplateEditor_saveButton_actionAdapter(this)); cancelButton.setText("Cancel"); cancelButton.addActionListener(new PrintfTemplateEditor_cancelButton_actionAdapter(this)); this.setTitle(this.getTitle() + " Template Editor"); printfPanel.setLayout(gridBagLayout1); formatLabel.setFont(new java.awt.Font("DialogInput", 0, 12)); formatLabel.setText("Format String:"); buttonPanel.setLayout(flowLayout1); printfPanel.setBorder(BorderFactory.createEtchedBorder()); printfPanel.setMinimumSize(new Dimension(100, 160)); printfPanel.setPreferredSize(new Dimension(380, 160)); parameterPanel.setLayout(gridBagLayout2); parameterLabel.setText("Parameters:"); parameterLabel.setFont(new java.awt.Font("DialogInput", 0, 12)); parameterTextArea.setMinimumSize(new Dimension(100, 25)); parameterTextArea.setPreferredSize(new Dimension(200, 25)); parameterTextArea.setEditable(true); parameterTextArea.setText(""); insertButton.setMaximumSize(new Dimension(136, 20)); insertButton.setMinimumSize(new Dimension(136, 20)); insertButton.setPreferredSize(new Dimension(136, 20)); insertButton.setToolTipText( "insert the format in the format string and add parameter to list."); insertButton.setText("Insert Parameter"); insertButton.addActionListener(new PrintfTemplateEditor_insertButton_actionAdapter(this)); formatTextArea.setMinimumSize(new Dimension(100, 25)); formatTextArea.setPreferredSize(new Dimension(200, 15)); formatTextArea.setText(""); parameterPanel.setBorder(null); parameterPanel.setMinimumSize(new Dimension(60, 40)); parameterPanel.setPreferredSize(new Dimension(300, 40)); insertMatchButton.addActionListener( new PrintfTemplateEditor_insertMatchButton_actionAdapter(this)); insertMatchButton.setText("Insert Match"); insertMatchButton.setToolTipText( "insert the match in the format string and add parameter to list."); insertMatchButton.setPreferredSize(new Dimension(136, 20)); insertMatchButton.setMinimumSize(new Dimension(136, 20)); insertMatchButton.setMaximumSize(new Dimension(136, 20)); matchPanel.setPreferredSize(new Dimension(300, 40)); matchPanel.setBorder(null); matchPanel.setMinimumSize(new Dimension(60, 60)); matchPanel.setLayout(gridBagLayout3); InsertPanel.setLayout(gridLayout1); gridLayout1.setColumns(1); gridLayout1.setRows(2); gridLayout1.setVgap(0); InsertPanel.setBorder(BorderFactory.createEtchedBorder()); InsertPanel.setMinimumSize(new Dimension(100, 100)); InsertPanel.setPreferredSize(new Dimension(380, 120)); editorPane.setText(""); editorPane.addKeyListener(new PrintfEditor_editorPane_keyAdapter(this)); printfTabPane.addChangeListener(new PrintfEditor_printfTabPane_changeAdapter(this)); parameterPanel.add( insertButton, new GridBagConstraints( 1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(8, 6, 13, 8), 0, 10)); parameterPanel.add( paramComboBox, new GridBagConstraints( 0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(8, 8, 13, 0), 258, 11)); paramComboBox.setRenderer(new MyCellRenderer()); InsertPanel.add(matchPanel, null); InsertPanel.add(parameterPanel, null); buttonPanel.add(cancelButton, null); buttonPanel.add(saveButton, null); this.getContentPane().add(printfTabPane, BorderLayout.NORTH); this.getContentPane().add(InsertPanel, BorderLayout.CENTER); matchPanel.add( insertMatchButton, new GridBagConstraints( 1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(8, 6, 13, 8), 0, 10)); matchPanel.add( matchComboBox, new GridBagConstraints( 0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(8, 8, 13, 0), 258, 11)); printfPanel.add( parameterLabel, new GridBagConstraints( 0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(7, 5, 0, 5), 309, 0)); printfPanel.add( formatLabel, new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(4, 5, 0, 5), 288, 0)); printfPanel.add( formatTextArea, new GridBagConstraints( 0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(6, 5, 0, 5), 300, 34)); printfPanel.add( parameterTextArea, new GridBagConstraints( 0, 3, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(6, 5, 6, 5), 300, 34)); printfTabPane.addTab("Editor View", null, editorPanel, "View in Editor"); printfTabPane.addTab("Printf View", null, printfPanel, "Vies as Printf"); editorPane.setCharacterAttributes(PLAIN_ATTR, true); editorPane.addStyle("PLAIN", editorPane.getLogicalStyle()); editorPanel.getViewport().add(editorPane, null); this.getContentPane().add(buttonPanel, BorderLayout.SOUTH); buttonGroup.add(cancelButton); }
/** the JbInit method */ public void jbInit() throws Exception { // Layout definition for this panel dataPanel.setLayout(panelLayout); dataPanel.setMinimumSize(new Dimension(100, 100)); this.setLayout(borderLayout); this.setSize(new Dimension(862, 514)); this.setPreferredSize(new Dimension(479, 306)); this.setMinimumSize(new Dimension(479, 306)); this.setMaximumSize(new Dimension(479, 306)); mIdtraslo.setDocument((Document) panelBinding.bindUIControl("Idtraslo", mIdtraslo)); mIdtraslo.setEditable(false); mDescrip.setFocusable(false); mDescrip.setEditable(false); mEstadotraslotxt.setFocusable(false); mEstadopasillotxt.setFocusable(false); mEstadoprocesotraslotxt.setFocusable(false); mDescripvisualEntrada.setFocusable(false); mDescripvisualSalida.setFocusable(false); mPasilloactual.setFocusable(false); mPasillodestino.setFocusable(true); mPosplc.setFocusable(false); jCheckBoxTrasbordoEntrada.setText("Trasbord Entradas"); jCheckBoxTrasbordoEntrada.setToolTipText( "Realitzar trasbord per ubicar containers en entrada de passadis"); dataPanel.add( labelIdtraslo, new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mIdtraslo, new GridBagConstraints( 1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelIdtraslo.setLabelFor(mIdtraslo); mIdtraslo.setColumns(5); labelIdtraslo.setText(panelBinding.findCtrlValueBinding("Idtraslo").getLabel()); mIdtraslo.setToolTipText(panelBinding.findCtrlValueBinding("Idtraslo").getTooltip()); mDescrip.setDocument((Document) panelBinding.bindUIControl("Descrip", mDescrip)); dataPanel.add( labelDescrip, new GridBagConstraints( 0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mDescrip, new GridBagConstraints( 1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelDescrip.setLabelFor(mDescrip); mDescrip.setColumns(15); labelDescrip.setText(panelBinding.findCtrlValueBinding("Descrip").getLabel()); mDescrip.setToolTipText(panelBinding.findCtrlValueBinding("Descrip").getTooltip()); mEstadotraslotxt.setDocument( (Document) panelBinding.bindUIControl("Estadotraslotxt", mEstadotraslotxt)); dataPanel.add( labelEstadotraslotxt, new GridBagConstraints( 0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mEstadotraslotxt, new GridBagConstraints( 1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelEstadotraslotxt.setLabelFor(mEstadotraslotxt); mEstadotraslotxt.setColumns(20); labelEstadotraslotxt.setText(panelBinding.findCtrlValueBinding("Estadotraslotxt").getLabel()); mEstadotraslotxt.setToolTipText( panelBinding.findCtrlValueBinding("Estadotraslotxt").getTooltip()); mEstadopasillotxt.setDocument( (Document) panelBinding.bindUIControl("Estadopasillotxt", mEstadopasillotxt)); dataPanel.add( labelEstadopasillotxt, new GridBagConstraints( 0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mEstadopasillotxt, new GridBagConstraints( 1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelEstadopasillotxt.setLabelFor(mEstadopasillotxt); mEstadopasillotxt.setColumns(20); labelEstadopasillotxt.setText(panelBinding.findCtrlValueBinding("Estadopasillotxt").getLabel()); mEstadopasillotxt.setToolTipText( panelBinding.findCtrlValueBinding("Estadopasillotxt").getTooltip()); mEstadoprocesotraslotxt.setDocument( (Document) panelBinding.bindUIControl("Estadoprocesotraslotxt", mEstadoprocesotraslotxt)); dataPanel.add( labelEstadoprocesotraslotxt, new GridBagConstraints( 0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mEstadoprocesotraslotxt, new GridBagConstraints( 1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelEstadoprocesotraslotxt.setLabelFor(mEstadoprocesotraslotxt); mEstadoprocesotraslotxt.setColumns(20); labelEstadoprocesotraslotxt.setText( panelBinding.findCtrlValueBinding("Estadoprocesotraslotxt").getLabel()); mEstadoprocesotraslotxt.setToolTipText( panelBinding.findCtrlValueBinding("Estadoprocesotraslotxt").getTooltip()); mDescripvisualEntrada.setDocument( (Document) panelBinding.bindUIControl("DescripvisualEntrada", mDescripvisualEntrada)); dataPanel.add( labelDescripvisualEntrada, new GridBagConstraints( 0, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mDescripvisualEntrada, new GridBagConstraints( 1, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelDescripvisualEntrada.setLabelFor(mDescripvisualEntrada); mDescripvisualEntrada.setColumns(20); labelDescripvisualEntrada.setText( panelBinding.findCtrlValueBinding("DescripvisualEntrada").getLabel()); mDescripvisualEntrada.setToolTipText( panelBinding.findCtrlValueBinding("DescripvisualEntrada").getTooltip()); mDescripvisualSalida.setDocument( (Document) panelBinding.bindUIControl("DescripvisualSalida", mDescripvisualSalida)); dataPanel.add( labelDescripvisualSalida, new GridBagConstraints( 0, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mDescripvisualSalida, new GridBagConstraints( 1, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelDescripvisualSalida.setLabelFor(mDescripvisualSalida); mDescripvisualSalida.setColumns(20); labelDescripvisualSalida.setText( panelBinding.findCtrlValueBinding("DescripvisualSalida").getLabel()); mDescripvisualSalida.setToolTipText( panelBinding.findCtrlValueBinding("DescripvisualSalida").getTooltip()); mPasilloactual.setDocument( (Document) panelBinding.bindUIControl("Pasilloactual", mPasilloactual)); dataPanel.add( labelPasilloactual, new GridBagConstraints( 0, 7, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mPasilloactual, new GridBagConstraints( 1, 7, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelPasilloactual.setLabelFor(mPasilloactual); mPasilloactual.setColumns(3); labelPasilloactual.setText(panelBinding.findCtrlValueBinding("Pasilloactual").getLabel()); mPasilloactual.setToolTipText(panelBinding.findCtrlValueBinding("Pasilloactual").getTooltip()); mPasillodestino.setDocument( (Document) panelBinding.bindUIControl("Pasillodestino", mPasillodestino)); dataPanel.add( labelPasillodestino, new GridBagConstraints( 0, 8, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mPasillodestino, new GridBagConstraints( 1, 8, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); labelPasillodestino.setLabelFor(mPasillodestino); mPasillodestino.setColumns(3); labelPasillodestino.setText(panelBinding.findCtrlValueBinding("Pasillodestino").getLabel()); mPasillodestino.setToolTipText( panelBinding.findCtrlValueBinding("Pasillodestino").getTooltip()); mPosplc.setDocument((Document) panelBinding.bindUIControl("Posplc", mPosplc)); dataPanel.add( labelPosplc, new GridBagConstraints( 0, 9, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); dataPanel.add( mPosplc, new GridBagConstraints( 1, 9, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 1, 1)); // dataPanel.add(buttonArrancar, new GridBagConstraints(0, 10, 3, 2, 0.0, 0.0, // GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 22, 63), -98, -13)); dataPanel.add( buttonArrancar, new GridBagConstraints( 0, 10, 3, 2, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0)); // dataPanel.add(jCheckBoxTrasbordoEntrada, new GridBagConstraints(2, 8, 1, 1, 0.0, 0.0, // GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); labelPosplc.setLabelFor(mPosplc); mPosplc.setColumns(5); labelPosplc.setText(panelBinding.findCtrlValueBinding("Posplc").getLabel()); // Layout the datapanel and the navigation bar mPosplc.setToolTipText(panelBinding.findCtrlValueBinding("Posplc").getTooltip()); add(dataPanel, BorderLayout.CENTER); navBar.setModel( JUNavigationBar.createViewBinding( panelBinding, navBar, "SgavtrasloEntSalView1", null, "SgavtrasloEntSal1Iter")); statusBar.setModel(JUStatusBar.createPanelBinding(panelBinding, statusBar)); add(navBar, BorderLayout.NORTH); add(statusBar, BorderLayout.SOUTH); // Quitar botones de add / remove navBar.remove(navBar.getButton(JUNavigationBar.BUTTON_DELETE)); navBar.remove(navBar.getButton(JUNavigationBar.BUTTON_INSERT)); jCheckBoxTrasbordoEntrada.setModel( (ButtonModel) panelBinding.bindUIControl("Trasbordoentrada", jCheckBoxTrasbordoEntrada)); if (getIdTraslo() == 0) jCheckBoxTrasbordoEntrada.setEnabled(false); }