List of usage examples for java.awt GridBagConstraints VERTICAL
int VERTICAL
To view the source code for java.awt GridBagConstraints VERTICAL.
Click Source Link
From source file:net.technicpack.launcher.ui.InstallerFrame.java
private void setupPortableMode(JPanel panel) { panel.setLayout(new GridBagLayout()); JLabel portableSpiel = new JLabel("<html><body align=\"left\" style='margin-right:10px;'>" + resources.getString("launcher.installer.portablespiel") + "</body></html>"); portableSpiel.setFont(resources.getFont(ResourceLoader.FONT_OPENSANS, 16)); portableSpiel.setForeground(LauncherFrame.COLOR_WHITE_TEXT); portableSpiel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); panel.add(portableSpiel, new GridBagConstraints(0, 0, 3, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(9, 8, 9, 3), 0, 0)); panel.add(Box.createGlue(), new GridBagConstraints(0, 1, 3, 1, 1.0, 0.7, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); JLabel installFolderLabel = new JLabel(resources.getString("launcher.installer.folder")); installFolderLabel.setFont(resources.getFont(ResourceLoader.FONT_OPENSANS, 18)); installFolderLabel.setForeground(LauncherFrame.COLOR_WHITE_TEXT); panel.add(installFolderLabel, new GridBagConstraints(0, 2, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 24, 0, 8), 0, 0)); String installDir = ""; if (settings.isPortable()) installDir = settings.getTechnicRoot().getAbsolutePath(); portableInstallDir = new JTextField(installDir); portableInstallDir.setFont(resources.getFont(ResourceLoader.FONT_OPENSANS, 18)); portableInstallDir.setForeground(LauncherFrame.COLOR_BLUE); portableInstallDir.setBackground(LauncherFrame.COLOR_FORMELEMENT_INTERNAL); portableInstallDir.setHighlighter(null); portableInstallDir.setEditable(false); portableInstallDir.setCursor(null);/*from www.j a v a 2 s .co m*/ portableInstallDir.setBorder(new RoundBorder(LauncherFrame.COLOR_BUTTON_BLUE, 1, 8)); panel.add(portableInstallDir, new GridBagConstraints(1, 2, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0)); RoundedButton selectInstall = new RoundedButton(resources.getString("launcher.installer.select")); selectInstall.setFont(resources.getFont(ResourceLoader.FONT_OPENSANS, 18)); selectInstall.setContentAreaFilled(false); selectInstall.setForeground(LauncherFrame.COLOR_BUTTON_BLUE); selectInstall.setHoverForeground(LauncherFrame.COLOR_BLUE); selectInstall.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { selectPortable(); } }); panel.add(selectInstall, new GridBagConstraints(2, 2, 1, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 0, 16), 0, 0)); panel.add(Box.createGlue(), new GridBagConstraints(0, 3, 3, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); String defaultLocaleText = resources.getString("launcheroptions.language.default"); if (!resources.isDefaultLocaleSupported()) { defaultLocaleText = defaultLocaleText .concat(" (" + resources.getString("launcheroptions.language.unavailable") + ")"); } portableLanguages = new JComboBox(); portableLanguages.addItem(new LanguageItem(ResourceLoader.DEFAULT_LOCALE, defaultLocaleText, resources)); for (int i = 0; i < ResourceLoader.SUPPORTED_LOCALES.length; i++) { portableLanguages .addItem(new LanguageItem(resources.getCodeFromLocale(ResourceLoader.SUPPORTED_LOCALES[i]), ResourceLoader.SUPPORTED_LOCALES[i].getDisplayName(ResourceLoader.SUPPORTED_LOCALES[i]), resources.getVariant(ResourceLoader.SUPPORTED_LOCALES[i]))); } if (!settings.getLanguageCode().equalsIgnoreCase(ResourceLoader.DEFAULT_LOCALE)) { Locale loc = resources.getLocaleFromCode(settings.getLanguageCode()); for (int i = 0; i < ResourceLoader.SUPPORTED_LOCALES.length; i++) { if (loc.equals(ResourceLoader.SUPPORTED_LOCALES[i])) { portableLanguages.setSelectedIndex(i + 1); break; } } } portableLanguages.setBorder(new RoundBorder(LauncherFrame.COLOR_SCROLL_THUMB, 1, 10)); portableLanguages.setFont(resources.getFont(ResourceLoader.FONT_OPENSANS, 14)); portableLanguages.setUI(new LanguageCellUI(resources)); portableLanguages.setForeground(LauncherFrame.COLOR_WHITE_TEXT); portableLanguages.setBackground(LauncherFrame.COLOR_SELECTOR_BACK); portableLanguages.setRenderer(new LanguageCellRenderer(resources, "globe.png", LauncherFrame.COLOR_SELECTOR_BACK, LauncherFrame.COLOR_WHITE_TEXT)); portableLanguages.setEditable(false); portableLanguages.setFocusable(false); portableLanguages.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { portableLanguageChanged(); } }); panel.add(portableLanguages, new GridBagConstraints(0, 4, 1, 0, 0, 0, GridBagConstraints.SOUTHWEST, GridBagConstraints.NONE, new Insets(0, 8, 8, 0), 0, 0)); portableInstallButton = new RoundedButton(resources.getString("launcher.installer.install")); portableInstallButton.setFont(resources.getFont(ResourceLoader.FONT_OPENSANS, 18)); portableInstallButton.setContentAreaFilled(false); portableInstallButton.setForeground(LauncherFrame.COLOR_GREY_TEXT); portableInstallButton.setHoverForeground(LauncherFrame.COLOR_BLUE); portableInstallButton.setBorder(BorderFactory.createEmptyBorder(8, 56, 8, 56)); portableInstallButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { portableInstall(); } }); portableInstallButton.setEnabled(false); if (!installDir.equals("")) { portableInstallButton.setForeground(LauncherFrame.COLOR_BUTTON_BLUE); portableInstallButton.setEnabled(true); } panel.add(portableInstallButton, new GridBagConstraints(1, 4, 2, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.VERTICAL, new Insets(0, 0, 8, 8), 0, 0)); }
From source file:com.sec.ose.osi.ui.dialog.setting.JPanProjectAnalysisSetting.java
/** * This method initializes jPanel1 //from w w w . jav a 2 s .c o m * * @return javax.swing.JPanel */ private JPanel getJPanelProjectSplit() { if (jPanelProjectSplit == null) { jPanelProjectSplit = new JPanel(); jPanelProjectSplit.setLayout(new GridBagLayout()); jPanelProjectSplit.setBorder(BorderFactory.createTitledBorder(null, "Project Split", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51))); GridBagConstraints gridBagConstraintsLabelFileCountLimit = new GridBagConstraints(); gridBagConstraintsLabelFileCountLimit.gridx = 0; gridBagConstraintsLabelFileCountLimit.ipadx = 0; gridBagConstraintsLabelFileCountLimit.insets = new Insets(0, 5, 0, 0); gridBagConstraintsLabelFileCountLimit.gridwidth = 2; gridBagConstraintsLabelFileCountLimit.gridy = 1; jLabelPojectSplitFileCountLimit = new JLabel(); jLabelPojectSplitFileCountLimit.setText("Max Number of Files for a project :"); GridBagConstraints gridBagConstraintsTextFieldSplit = new GridBagConstraints(); gridBagConstraintsTextFieldSplit.fill = GridBagConstraints.VERTICAL; gridBagConstraintsTextFieldSplit.gridy = 1; gridBagConstraintsTextFieldSplit.weightx = 0.0; gridBagConstraintsTextFieldSplit.insets = new Insets(0, 5, 0, 0); gridBagConstraintsTextFieldSplit.anchor = GridBagConstraints.WEST; gridBagConstraintsTextFieldSplit.gridx = 2; GridBagConstraints gridBagConstraintsLabelSplitRange = new GridBagConstraints(); gridBagConstraintsLabelSplitRange.gridx = 3; gridBagConstraintsLabelSplitRange.insets = new Insets(0, 5, 0, 0); gridBagConstraintsLabelSplitRange.weightx = 1.0; gridBagConstraintsLabelSplitRange.anchor = GridBagConstraints.WEST; gridBagConstraintsLabelSplitRange.gridy = 1; jLabel = new JLabel(); jLabel.setText("( " + Property.getInstance().getMinNumOfFilesUpperLimit() + " ~ " + Property.getInstance().getMaxNumOfFilesUpperLimit() + " )"); jPanelProjectSplit.add(jLabelPojectSplitFileCountLimit, gridBagConstraintsLabelFileCountLimit); jPanelProjectSplit.add(getJTextFieldProjectSplitFileCountLimit(), gridBagConstraintsTextFieldSplit); jPanelProjectSplit.add(jLabel, gridBagConstraintsLabelSplitRange); } return jPanelProjectSplit; }
From source file:org.multibit.viewsystem.swing.view.panels.ShowPreferencesPanel.java
private JPanel createAppearancePanel(int stentWidth) { MultiBitTitledPanel appearancePanel = new MultiBitTitledPanel( controller.getLocaliser().getString("showPreferencesPanel.appearanceTitle"), ComponentOrientation.getOrientation(controller.getLocaliser().getLocale())); GridBagConstraints constraints = new GridBagConstraints(); constraints.fill = GridBagConstraints.BOTH; constraints.gridx = 0;// www . j av a 2 s .c o m constraints.gridy = 3; constraints.weightx = 0.1; constraints.weighty = 0.3; constraints.gridwidth = 1; constraints.gridheight = 1; constraints.anchor = GridBagConstraints.LINE_START; JPanel indent = MultiBitTitledPanel.getIndentPanel(1); appearancePanel.add(indent, constraints); constraints.fill = GridBagConstraints.BOTH; constraints.gridx = 1; constraints.gridy = 4; constraints.weightx = 0.3; constraints.weighty = 0.3; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; JPanel stent = MultiBitTitledPanel.createStent(stentWidth); appearancePanel.add(stent, constraints); constraints.fill = GridBagConstraints.BOTH; constraints.gridx = 2; constraints.gridy = 3; constraints.weightx = 0.05; constraints.weighty = 0.3; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.CENTER; appearancePanel.add( MultiBitTitledPanel.createStent(MultiBitTitledPanel.SEPARATION_BETWEEN_NAME_VALUE_PAIRS), constraints); MultiBitLabel fontNameLabel = new MultiBitLabel( controller.getLocaliser().getString("fontChooser.fontName")); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 1; constraints.gridy = 4; constraints.weightx = 0.3; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_END; appearancePanel.add(fontNameLabel, constraints); fontNameTextLabel = new MultiBitLabel(""); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 3; constraints.gridy = 4; constraints.weightx = 0.3; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; appearancePanel.add(fontNameTextLabel, constraints); MultiBitLabel fontStyleLabel = new MultiBitLabel( controller.getLocaliser().getString("fontChooser.fontStyle")); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 1; constraints.gridy = 5; constraints.weightx = 0.3; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_END; appearancePanel.add(fontStyleLabel, constraints); fontStyleTextLabel = new MultiBitLabel(""); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 3; constraints.gridy = 5; constraints.weightx = 0.3; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; appearancePanel.add(fontStyleTextLabel, constraints); MultiBitLabel fontSizeLabel = new MultiBitLabel( controller.getLocaliser().getString("fontChooser.fontSize")); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 1; constraints.gridy = 6; constraints.weightx = 0.3; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_END; appearancePanel.add(fontSizeLabel, constraints); fontSizeTextLabel = new MultiBitLabel(""); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 3; constraints.gridy = 6; constraints.weightx = 0.3; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; appearancePanel.add(fontSizeTextLabel, constraints); ChooseFontAction chooseFontAction = new ChooseFontAction(controller, this, null); MultiBitButton fontChooserButton = new MultiBitButton(chooseFontAction, controller); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 3; constraints.gridy = 7; constraints.weightx = 1; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; appearancePanel.add(fontChooserButton, constraints); constraints.fill = GridBagConstraints.VERTICAL; constraints.gridx = 4; constraints.gridy = 8; constraints.weightx = 0.2; constraints.weighty = 0.3; constraints.gridwidth = 3; constraints.anchor = GridBagConstraints.LINE_START; appearancePanel.add(MultiBitTitledPanel.createStent(1, 30), constraints); MultiBitLabel lookAndFeelLabel = new MultiBitLabel( controller.getLocaliser().getString("showPreferencesPanel.lookAndFeel")); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 1; constraints.gridy = 9; constraints.weightx = 0.3; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_END; appearancePanel.add(lookAndFeelLabel, constraints); originalLookAndFeel = controller.getModel().getUserPreference(CoreModel.LOOK_AND_FEEL); LookAndFeelInfo[] lookAndFeels = UIManager.getInstalledLookAndFeels(); lookAndFeelComboBox = new JComboBox(); lookAndFeelComboBox.addItem(localisedSystemLookAndFeelName); if (lookAndFeels != null) { for (LookAndFeelInfo info : lookAndFeels) { lookAndFeelComboBox.addItem(info.getName()); if (info.getName().equalsIgnoreCase(originalLookAndFeel)) { lookAndFeelComboBox.setSelectedItem(info.getName()); } } } if (originalLookAndFeel == null || originalLookAndFeel.equals("") || CoreModel.SYSTEM_LOOK_AND_FEEL.equalsIgnoreCase(originalLookAndFeel)) { lookAndFeelComboBox.setSelectedItem(localisedSystemLookAndFeelName); } lookAndFeelComboBox.setFont(FontSizer.INSTANCE.getAdjustedDefaultFont()); lookAndFeelComboBox.setOpaque(false); FontMetrics fontMetrics = getFontMetrics(FontSizer.INSTANCE.getAdjustedDefaultFont()); int textWidth = Math.max(fontMetrics.stringWidth("CDE/Motif"), fontMetrics.stringWidth("Windows classic")); Dimension preferredSize = new Dimension(textWidth + TICKER_COMBO_WIDTH_DELTA, fontMetrics.getHeight() + EXCHANGE_COMBO_HEIGHT_DELTA); lookAndFeelComboBox.setPreferredSize(preferredSize); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 3; constraints.gridy = 9; constraints.weightx = 0.8; constraints.weighty = 0.6; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; appearancePanel.add(lookAndFeelComboBox, constraints); JPanel fill1 = new JPanel(); fill1.setOpaque(false); constraints.fill = GridBagConstraints.BOTH; constraints.gridx = 4; constraints.gridy = 10; constraints.weightx = 20; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_END; appearancePanel.add(fill1, constraints); return appearancePanel; }
From source file:com.rapidminer.gui.new_plotter.gui.ColorSchemeDialog.java
/** * @return//from ww w . j a va 2 s .com */ private JPanel createColorCategoriesPanel() { JPanel categoryColorsConfigurationPanel = new JPanel(new GridBagLayout()); categoryColorsConfigurationPanel.setPreferredSize(new Dimension(180, 200)); GridBagConstraints itemConstraint = new GridBagConstraints(); JLabel categoryColorsLabel = new ResourceLabel( "plotter.configuration_dialog.color_scheme_dialog.category_colors"); { itemConstraint.fill = GridBagConstraints.HORIZONTAL; itemConstraint.anchor = GridBagConstraints.WEST; itemConstraint.gridwidth = GridBagConstraints.RELATIVE; itemConstraint.insets = new Insets(0, 5, 5, 5); itemConstraint.weightx = 1.0; categoryColorsConfigurationPanel.add(categoryColorsLabel, itemConstraint); } // add button panel { JPanel buttonPanel = new JPanel(new GridBagLayout()); // remove scheme button { removeCategoryColorButton = new JButton(new ResourceAction(true, "plotter.configuration_dialog.color_scheme_dialog.remove_category_color_button") { private static final long serialVersionUID = 1L; @Override public void actionPerformed(ActionEvent e) { removeSelectedColorAction(); } }); itemConstraint = new GridBagConstraints(); itemConstraint.gridwidth = GridBagConstraints.RELATIVE; itemConstraint.fill = GridBagConstraints.NONE; buttonPanel.add(removeCategoryColorButton, itemConstraint); } { addCategoryButton = new JButton(new ResourceAction(true, "plotter.configuration_dialog.color_scheme_dialog.add_category_color_button") { private static final long serialVersionUID = 1L; @Override public void actionPerformed(ActionEvent e) { Color oldColor = Color.white; Color newSchemeColor = createColorDialog(oldColor); if (newSchemeColor != null && !newSchemeColor.equals(oldColor)) { addColorAction(newSchemeColor); } } }); itemConstraint = new GridBagConstraints(); itemConstraint.gridwidth = GridBagConstraints.REMAINDER; itemConstraint.fill = GridBagConstraints.NONE; buttonPanel.add(addCategoryButton, itemConstraint); } itemConstraint = new GridBagConstraints(); itemConstraint.gridwidth = GridBagConstraints.REMAINDER; itemConstraint.fill = GridBagConstraints.NONE; itemConstraint.anchor = GridBagConstraints.EAST; itemConstraint.insets = new Insets(0, 5, 5, 5); categoryColorsConfigurationPanel.add(buttonPanel, itemConstraint); } { JPanel categoryListPanel = new JPanel(new GridBagLayout()); // add list of categorie colors { colorList = new JList<Color>(nominalColorListModel); categoryColorsLabel.setLabelFor(colorList); colorList.setCellRenderer(new ColorListCellRenderer()); colorList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); MouseAdapter ma = new MouseAdapter() { private void myPopupEvent(MouseEvent e) { int x = e.getX(); int y = e.getY(); JList<?> list = (JList<?>) e.getSource(); list.setSelectedIndex(list.locationToIndex(e.getPoint())); Color selectedColor = (Color) list.getSelectedValue(); if (selectedColor == null) { return; } removeMenuItem.setEnabled(nominalColorListModel.getSize() > 2); popupMenu.show(list, x, y); } @Override public void mousePressed(MouseEvent e) { if (e.isPopupTrigger()) { myPopupEvent(e); } } @Override public void mouseReleased(MouseEvent e) { if (e.isPopupTrigger()) { myPopupEvent(e); } } }; colorList.addMouseListener(ma); colorList.addKeyListener(new KeyListener() { @Override public void keyTyped(KeyEvent e) { return; // Nothing to be done } @Override public void keyReleased(KeyEvent e) { return; // Nothing to be done } @Override public void keyPressed(KeyEvent e) { int key = e.getKeyCode(); if (key == KeyEvent.VK_DELETE) { if (nominalColorListModel.getSize() > 2) { removeSelectedColorAction(); } } if (key == KeyEvent.VK_F2) { replaceSelectedColorAction(); } if (key == KeyEvent.VK_UP && SwingTools.isControlOrMetaDown(e)) { moveSelectedColorUpAction(); } if (key == KeyEvent.VK_DOWN && SwingTools.isControlOrMetaDown(e)) { moveSelectedColorDownAction(); } } }); colorListScrollPane = new JScrollPane(colorList); colorListScrollPane.setPreferredSize(new Dimension(170, 200)); colorListScrollPane.setMaximumSize(new Dimension(170, 200)); colorListScrollPane.setMinimumSize(new Dimension(170, 180)); colorListScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); colorListScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); itemConstraint = new GridBagConstraints(); itemConstraint.fill = GridBagConstraints.BOTH; itemConstraint.weightx = 0.0; itemConstraint.weighty = 0.5; itemConstraint.gridwidth = GridBagConstraints.RELATIVE; categoryListPanel.add(colorListScrollPane, itemConstraint); } // add up/down button panel { JPanel upAndDownButtonPanel = new JPanel(new GridBagLayout()); // add up button { JButton upButton = new JButton( new ResourceAction(true, "plotter.configuration_dialog.move_color_up") { private static final long serialVersionUID = 1L; @Override public void actionPerformed(ActionEvent e) { moveSelectedColorUpAction(); } }); itemConstraint = new GridBagConstraints(); itemConstraint.gridwidth = GridBagConstraints.REMAINDER; itemConstraint.weightx = 0; itemConstraint.weighty = 0; itemConstraint.fill = GridBagConstraints.NONE; itemConstraint.insets = new Insets(0, 2, 0, 12); upAndDownButtonPanel.add(upButton, itemConstraint); } // add down button { JButton downButton = new JButton( new ResourceAction(true, "plotter.configuration_dialog.move_color_down") { private static final long serialVersionUID = 1L; @Override public void actionPerformed(ActionEvent e) { moveSelectedColorDownAction(); } }); itemConstraint = new GridBagConstraints(); itemConstraint.gridwidth = GridBagConstraints.REMAINDER; itemConstraint.weightx = 0; itemConstraint.weighty = 0; itemConstraint.fill = GridBagConstraints.NONE; itemConstraint.insets = new Insets(0, 2, 0, 12); upAndDownButtonPanel.add(downButton, itemConstraint); } // add spacer panel { JPanel spacer = new JPanel(); itemConstraint.gridwidth = GridBagConstraints.REMAINDER; itemConstraint.weightx = 0; itemConstraint.weighty = 1; itemConstraint.fill = GridBagConstraints.VERTICAL; upAndDownButtonPanel.add(spacer, itemConstraint); } itemConstraint = new GridBagConstraints(); itemConstraint.gridwidth = GridBagConstraints.REMAINDER; itemConstraint.weightx = 1; itemConstraint.weighty = 1; itemConstraint.fill = GridBagConstraints.VERTICAL; categoryListPanel.add(upAndDownButtonPanel, itemConstraint); } itemConstraint = new GridBagConstraints(); itemConstraint.gridwidth = GridBagConstraints.REMAINDER; itemConstraint.weightx = 1; itemConstraint.weighty = 1; itemConstraint.fill = GridBagConstraints.BOTH; categoryColorsConfigurationPanel.add(categoryListPanel, itemConstraint); } return categoryColorsConfigurationPanel; }
From source file:ca.uhn.hl7v2.testpanel.ui.conn.Hl7ConnectionPanelBackup.java
/** * Create the panel./*from w w w . j av a 2 s . c o m*/ */ public Hl7ConnectionPanelBackup(Controller theController) { myController = theController; setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagLayout gridBagLayout = new GridBagLayout(); gridBagLayout.columnWidths = new int[] { 150, 0 }; gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; gridBagLayout.columnWeights = new double[] { 0.0, 1.0 }; gridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE }; setLayout(gridBagLayout); mySinglePortRadio = new JRadioButton("Single Port MLLP"); mySinglePortRadio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updatePortsModel(); updatePortsUi(); } }); myPortButtonGroup.add(mySinglePortRadio); GridBagConstraints gbc_SinglePortRadio = new GridBagConstraints(); gbc_SinglePortRadio.anchor = GridBagConstraints.WEST; gbc_SinglePortRadio.insets = new Insets(0, 0, 5, 5); gbc_SinglePortRadio.gridx = 0; gbc_SinglePortRadio.gridy = 0; add(mySinglePortRadio, gbc_SinglePortRadio); JPanel panel_4 = new JPanel(); panel_4.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagConstraints gbc_panel_4 = new GridBagConstraints(); gbc_panel_4.fill = GridBagConstraints.BOTH; gbc_panel_4.insets = new Insets(0, 0, 5, 0); gbc_panel_4.gridx = 1; gbc_panel_4.gridy = 0; add(panel_4, gbc_panel_4); GridBagLayout gbl_panel_4 = new GridBagLayout(); gbl_panel_4.columnWidths = new int[] { 0, 0, 0 }; gbl_panel_4.rowHeights = new int[] { 0, 0 }; gbl_panel_4.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE }; gbl_panel_4.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; panel_4.setLayout(gbl_panel_4); mySinglePortTextBox = new JTextField(); mySinglePortTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { String text = mySinglePortTextBox.getText(); text = text.replaceAll("[^0-9]+", ""); if (!StringUtils.equals(mySinglePortTextBox.getText(), text)) { final String newVal = text; SwingUtilities.invokeLater(new Runnable() { public void run() { mySinglePortTextBox.setText(newVal); } }); } if (mySinglePortRadio.isSelected()) { if (text.length() > 0) { myConnection.setIncomingOrSinglePort(Integer.parseInt(text)); } else { myConnection.setIncomingOrSinglePort(-1); } } } }); mylabel = new JLabel("Port"); mylabel.setHorizontalAlignment(SwingConstants.CENTER); mylabel.setPreferredSize(new Dimension(60, 16)); mylabel.setMinimumSize(new Dimension(60, 16)); mylabel.setMaximumSize(new Dimension(60, 16)); GridBagConstraints gbc_label = new GridBagConstraints(); gbc_label.anchor = GridBagConstraints.EAST; gbc_label.insets = new Insets(0, 0, 0, 5); gbc_label.gridx = 0; gbc_label.gridy = 0; panel_4.add(mylabel, gbc_label); GridBagConstraints gbc_SinglePortTextBox = new GridBagConstraints(); gbc_SinglePortTextBox.insets = new Insets(0, 5, 0, 0); gbc_SinglePortTextBox.anchor = GridBagConstraints.WEST; gbc_SinglePortTextBox.gridx = 1; gbc_SinglePortTextBox.gridy = 0; panel_4.add(mySinglePortTextBox, gbc_SinglePortTextBox); mySinglePortTextBox.setMinimumSize(new Dimension(100, 28)); mySinglePortTextBox.setMaximumSize(new Dimension(100, 2147483647)); mySinglePortTextBox.setColumns(10); myDualPortRadio = new JRadioButton("Dual Port MLLP"); myDualPortRadio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updatePortsModel(); updatePortsUi(); } }); myPortButtonGroup.add(myDualPortRadio); GridBagConstraints gbc_DualPortRadio = new GridBagConstraints(); gbc_DualPortRadio.anchor = GridBagConstraints.WEST; gbc_DualPortRadio.insets = new Insets(0, 0, 5, 5); gbc_DualPortRadio.gridx = 0; gbc_DualPortRadio.gridy = 1; add(myDualPortRadio, gbc_DualPortRadio); JPanel panel = new JPanel(); panel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagConstraints gbc_BottomPanel = new GridBagConstraints(); gbc_BottomPanel.insets = new Insets(0, 0, 5, 0); gbc_BottomPanel.fill = GridBagConstraints.BOTH; gbc_BottomPanel.gridx = 1; gbc_BottomPanel.gridy = 1; add(panel, gbc_BottomPanel); GridBagLayout gbl_panel = new GridBagLayout(); gbl_panel.columnWidths = new int[] { 0, 0, 0, 0, 0, 0 }; gbl_panel.rowHeights = new int[] { 0, 0 }; gbl_panel.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE }; gbl_panel.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; panel.setLayout(gbl_panel); JLabel lblInbound = new JLabel("Inbound"); lblInbound.setHorizontalAlignment(SwingConstants.CENTER); lblInbound.setPreferredSize(new Dimension(60, 16)); lblInbound.setMinimumSize(new Dimension(60, 16)); lblInbound.setMaximumSize(new Dimension(60, 16)); GridBagConstraints gbc_lblInbound = new GridBagConstraints(); gbc_lblInbound.insets = new Insets(0, 5, 0, 5); gbc_lblInbound.anchor = GridBagConstraints.EAST; gbc_lblInbound.gridx = 0; gbc_lblInbound.gridy = 0; panel.add(lblInbound, gbc_lblInbound); myDualIncomingTextBox = new JTextField(); myDualIncomingTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { String text = myDualIncomingTextBox.getText(); text = text.replaceAll("[^0-9]+", ""); if (!StringUtils.equals(myDualIncomingTextBox.getText(), text)) { final String newVal = text; SwingUtilities.invokeLater(new Runnable() { public void run() { myDualIncomingTextBox.setText(newVal); } }); } if (myDualPortRadio.isSelected()) { if (text.length() > 0) { myConnection.setIncomingOrSinglePort(Integer.parseInt(text)); } else { myConnection.setIncomingOrSinglePort(-1); } } } }); myDualIncomingTextBox.setMaximumSize(new Dimension(100, 2147483647)); myDualIncomingTextBox.setMinimumSize(new Dimension(100, 28)); GridBagConstraints gbc_DualIncomingTextBox = new GridBagConstraints(); gbc_DualIncomingTextBox.anchor = GridBagConstraints.WEST; gbc_DualIncomingTextBox.insets = new Insets(0, 0, 0, 5); gbc_DualIncomingTextBox.gridx = 1; gbc_DualIncomingTextBox.gridy = 0; panel.add(myDualIncomingTextBox, gbc_DualIncomingTextBox); myDualIncomingTextBox.setColumns(10); JLabel lblOutbound = new JLabel("Outbound"); GridBagConstraints gbc_lblOutbound = new GridBagConstraints(); gbc_lblOutbound.anchor = GridBagConstraints.EAST; gbc_lblOutbound.insets = new Insets(0, 0, 0, 5); gbc_lblOutbound.gridx = 2; gbc_lblOutbound.gridy = 0; panel.add(lblOutbound, gbc_lblOutbound); myDualOutgoingTextBox = new JTextField(); myDualOutgoingTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { String text = myDualOutgoingTextBox.getText(); text = text.replaceAll("[^0-9]+", ""); if (!StringUtils.equals(myDualOutgoingTextBox.getText(), text)) { final String newVal = text; SwingUtilities.invokeLater(new Runnable() { public void run() { myDualOutgoingTextBox.setText(newVal); } }); } if (myDualPortRadio.isSelected()) { if (text.length() > 0) { myConnection.setOutgoingPort(Integer.parseInt(text)); } else { myConnection.setOutgoingPort(-1); } } } }); myDualOutgoingTextBox.setMinimumSize(new Dimension(100, 28)); myDualOutgoingTextBox.setMaximumSize(new Dimension(100, 2147483647)); GridBagConstraints gbc_DualOutgoingTextBox = new GridBagConstraints(); gbc_DualOutgoingTextBox.insets = new Insets(0, 0, 0, 5); gbc_DualOutgoingTextBox.anchor = GridBagConstraints.WEST; gbc_DualOutgoingTextBox.gridx = 3; gbc_DualOutgoingTextBox.gridy = 0; panel.add(myDualOutgoingTextBox, gbc_DualOutgoingTextBox); myDualOutgoingTextBox.setColumns(10); myHl7OverHttpRadioButton = new JRadioButton("HL7 over HTTP"); myHl7OverHttpRadioButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updatePortsModel(); updatePortsUi(); } }); myPortButtonGroup.add(myHl7OverHttpRadioButton); GridBagConstraints gbc_Hl7OverHttpRadioButton = new GridBagConstraints(); gbc_Hl7OverHttpRadioButton.anchor = GridBagConstraints.WEST; gbc_Hl7OverHttpRadioButton.insets = new Insets(0, 0, 5, 5); gbc_Hl7OverHttpRadioButton.gridx = 0; gbc_Hl7OverHttpRadioButton.gridy = 2; add(myHl7OverHttpRadioButton, gbc_Hl7OverHttpRadioButton); mypanel = new JPanel(); mypanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagConstraints gbc_panel = new GridBagConstraints(); gbc_panel.insets = new Insets(0, 0, 5, 0); gbc_panel.fill = GridBagConstraints.BOTH; gbc_panel.gridx = 1; gbc_panel.gridy = 2; add(mypanel, gbc_panel); GridBagLayout gbl_panel2 = new GridBagLayout(); gbl_panel2.columnWidths = new int[] { 0, 0 }; gbl_panel2.rowHeights = new int[] { 0, 0 }; gbl_panel2.columnWeights = new double[] { 0.0, 1.0 }; gbl_panel2.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; mypanel.setLayout(gbl_panel2); mylabel_1 = new JLabel("URL"); mylabel_1.setHorizontalAlignment(SwingConstants.CENTER); mylabel_1.setPreferredSize(new Dimension(60, 16)); mylabel_1.setMinimumSize(new Dimension(60, 16)); mylabel_1.setMaximumSize(new Dimension(60, 16)); GridBagConstraints gbc_label_1 = new GridBagConstraints(); gbc_label_1.anchor = GridBagConstraints.EAST; gbc_label_1.insets = new Insets(0, 0, 0, 5); gbc_label_1.gridx = 0; gbc_label_1.gridy = 0; mypanel.add(mylabel_1, gbc_label_1); myHoHUrlTextField = new JTextField(); myHoHUrlTextField.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { if (myHohUrlTextFieldUpdating) { return; } String value = myHoHUrlTextField.getText(); try { URL url = new URL(value); boolean tls; if (url.getProtocol().equals("http")) { tls = false; } else if (url.getProtocol().equals("https")) { tls = true; } else { ourLog.info("Unknown protocol: {}", url.getProtocol()); myHoHUrlTextField.setBackground(ERROR_BG); return; } myConnection.setTls(tls); myConnection.setHost(url.getHost()); myConnection .setIncomingOrSinglePort(url.getPort() != -1 ? url.getPort() : url.getDefaultPort()); myConnection.setHttpUriPath(url.getPath()); myHohUrlTextFieldUpdating = true; updatePortsUi(); myHohUrlTextFieldUpdating = false; myTlsCheckbox.setSelected(tls); myHohTlsCheckbox.setSelected(tls); myHoHUrlTextField.setBackground(Color.white); } catch (MalformedURLException e) { myHoHUrlTextField.setBackground(ERROR_BG); } } }); GridBagConstraints gbc_HohUsernameTextbox = new GridBagConstraints(); gbc_HohUsernameTextbox.fill = GridBagConstraints.HORIZONTAL; gbc_HohUsernameTextbox.gridx = 1; gbc_HohUsernameTextbox.gridy = 0; mypanel.add(myHoHUrlTextField, gbc_HohUsernameTextbox); myHoHUrlTextField.setColumns(10); JLabel lblEncoding = new JLabel("Encoding"); GridBagConstraints gbc_lblEncoding = new GridBagConstraints(); gbc_lblEncoding.insets = new Insets(0, 0, 5, 5); gbc_lblEncoding.gridx = 0; gbc_lblEncoding.gridy = 3; add(lblEncoding, gbc_lblEncoding); JPanel encodingPanel = new JPanel(); GridBagConstraints gbc_encodingPanel = new GridBagConstraints(); gbc_encodingPanel.fill = GridBagConstraints.HORIZONTAL; gbc_encodingPanel.insets = new Insets(0, 0, 5, 0); gbc_encodingPanel.gridx = 1; gbc_encodingPanel.gridy = 3; add(encodingPanel, gbc_encodingPanel); encodingPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagLayout gbl_encodingPanel = new GridBagLayout(); gbl_encodingPanel.columnWidths = new int[] { 144, 58, 0 }; gbl_encodingPanel.rowHeights = new int[] { 23, 0 }; gbl_encodingPanel.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE }; gbl_encodingPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; encodingPanel.setLayout(gbl_encodingPanel); myXmlRadio = new JRadioButton("XML"); myXmlRadio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent theE) { updateEncodingModel(); } }); myEr7Radio = new JRadioButton("ER7 (Pipe and hat)"); myEr7Radio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateEncodingModel(); } }); encodingButtonGroup.add(myEr7Radio); GridBagConstraints gbc_Er7Radio = new GridBagConstraints(); gbc_Er7Radio.anchor = GridBagConstraints.NORTHWEST; gbc_Er7Radio.insets = new Insets(0, 0, 0, 5); gbc_Er7Radio.gridx = 0; gbc_Er7Radio.gridy = 0; encodingPanel.add(myEr7Radio, gbc_Er7Radio); encodingButtonGroup.add(myXmlRadio); GridBagConstraints gbc_XmlRadio = new GridBagConstraints(); gbc_XmlRadio.anchor = GridBagConstraints.NORTHWEST; gbc_XmlRadio.gridx = 1; gbc_XmlRadio.gridy = 0; encodingPanel.add(myXmlRadio, gbc_XmlRadio); JLabel lblCharset = new JLabel("Charset"); GridBagConstraints gbc_lblCharset = new GridBagConstraints(); gbc_lblCharset.insets = new Insets(0, 0, 5, 5); gbc_lblCharset.gridx = 0; gbc_lblCharset.gridy = 4; add(lblCharset, gbc_lblCharset); JPanel panel_2 = new JPanel(); GridBagConstraints gbc_panel_2 = new GridBagConstraints(); gbc_panel_2.fill = GridBagConstraints.HORIZONTAL; gbc_panel_2.insets = new Insets(0, 0, 5, 0); gbc_panel_2.gridx = 1; gbc_panel_2.gridy = 4; add(panel_2, gbc_panel_2); panel_2.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagLayout gbl_panel_2 = new GridBagLayout(); gbl_panel_2.columnWidths = new int[] { 28, 198, 0, 0 }; gbl_panel_2.rowHeights = new int[] { 27, 0 }; gbl_panel_2.columnWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE }; gbl_panel_2.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; panel_2.setLayout(gbl_panel_2); myCharsetSelectRadio = new JRadioButton(""); myCharsetSelectRadio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateCharsetModel(); } }); charsetButtonGroup.add(myCharsetSelectRadio); GridBagConstraints gbc_CharsetSelectRadio = new GridBagConstraints(); gbc_CharsetSelectRadio.anchor = GridBagConstraints.WEST; gbc_CharsetSelectRadio.insets = new Insets(0, 0, 0, 5); gbc_CharsetSelectRadio.gridx = 0; gbc_CharsetSelectRadio.gridy = 0; panel_2.add(myCharsetSelectRadio, gbc_CharsetSelectRadio); myCharsetCombo = new JComboBox(); myCharsetCombo.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateCharsetModel(); } }); GridBagConstraints gbc_CharsetCombo = new GridBagConstraints(); gbc_CharsetCombo.anchor = GridBagConstraints.NORTHWEST; gbc_CharsetCombo.insets = new Insets(0, 0, 0, 5); gbc_CharsetCombo.gridx = 1; gbc_CharsetCombo.gridy = 0; panel_2.add(myCharsetCombo, gbc_CharsetCombo); myCharsetDetectRadio = new JRadioButton("Detect in Message (MSH-18)"); myCharsetDetectRadio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateCharsetModel(); } }); charsetButtonGroup.add(myCharsetDetectRadio); GridBagConstraints gbc_CharsetDetectRadio = new GridBagConstraints(); gbc_CharsetDetectRadio.anchor = GridBagConstraints.NORTH; gbc_CharsetDetectRadio.gridwidth = 2; gbc_CharsetDetectRadio.gridx = 2; gbc_CharsetDetectRadio.gridy = 0; panel_2.add(myCharsetDetectRadio, gbc_CharsetDetectRadio); mylabel_5 = new JLabel("Debug"); GridBagConstraints gbc_label_5 = new GridBagConstraints(); gbc_label_5.insets = new Insets(0, 0, 5, 5); gbc_label_5.gridx = 0; gbc_label_5.gridy = 5; add(mylabel_5, gbc_label_5); mypanel_2 = new JPanel(); mypanel_2.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagConstraints gbc_panel_75 = new GridBagConstraints(); gbc_panel_75.insets = new Insets(0, 0, 5, 0); gbc_panel_75.fill = GridBagConstraints.BOTH; gbc_panel_75.gridx = 1; gbc_panel_75.gridy = 5; add(mypanel_2, gbc_panel_75); GridBagLayout gbl_panel_74 = new GridBagLayout(); gbl_panel_74.columnWidths = new int[] { 0, 0 }; gbl_panel_74.rowHeights = new int[] { 0, 0 }; gbl_panel_74.columnWeights = new double[] { 0.0, Double.MIN_VALUE }; gbl_panel_74.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; mypanel_2.setLayout(gbl_panel_74); myCaptureByteStreamCheckbox = new JCheckBox("Capture Bytes"); GridBagConstraints gbc_CaptureByteStreamCheckbox = new GridBagConstraints(); gbc_CaptureByteStreamCheckbox.gridx = 0; gbc_CaptureByteStreamCheckbox.gridy = 0; mypanel_2.add(myCaptureByteStreamCheckbox, gbc_CaptureByteStreamCheckbox); myCaptureByteStreamCheckbox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myConnection.setCaptureBytes(myCaptureByteStreamCheckbox.isSelected()); } }); myCaptureByteStreamCheckbox.setToolTipText("Check this box to capture the transport level communication"); myInterfaceTypeCardPanel = new JPanel(); myInterfaceTypeCardPanel.setBorder(null); GridBagConstraints gbc_InterfaceTypeCardPanel = new GridBagConstraints(); gbc_InterfaceTypeCardPanel.gridwidth = 2; gbc_InterfaceTypeCardPanel.fill = GridBagConstraints.BOTH; gbc_InterfaceTypeCardPanel.gridx = 0; gbc_InterfaceTypeCardPanel.gridy = 6; add(myInterfaceTypeCardPanel, gbc_InterfaceTypeCardPanel); myInterfaceTypeCardPanel.setLayout(new CardLayout(0, 0)); myMllpCard = new JPanel(); myMllpCard.setBorder(null); myInterfaceTypeCardPanel.add(myMllpCard, IFACE_TYPE_CARD_MLLP); GridBagLayout gbl_MllpCard = new GridBagLayout(); gbl_MllpCard.columnWidths = new int[] { 150, 0, 0 }; gbl_MllpCard.rowHeights = new int[] { 0, 0, 0, 0 }; gbl_MllpCard.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE }; gbl_MllpCard.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE }; myMllpCard.setLayout(gbl_MllpCard); JLabel lblHost = new JLabel("Host"); GridBagConstraints gbc_lblHost = new GridBagConstraints(); gbc_lblHost.insets = new Insets(0, 0, 5, 5); gbc_lblHost.gridx = 0; gbc_lblHost.gridy = 0; myMllpCard.add(lblHost, gbc_lblHost); mypanel_1 = new JPanel(); mypanel_1.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagConstraints gbc_panel_1 = new GridBagConstraints(); gbc_panel_1.insets = new Insets(0, 0, 5, 0); gbc_panel_1.fill = GridBagConstraints.BOTH; gbc_panel_1.gridx = 1; gbc_panel_1.gridy = 0; myMllpCard.add(mypanel_1, gbc_panel_1); GridBagLayout gbl_panel_1 = new GridBagLayout(); gbl_panel_1.columnWidths = new int[] { 134, 0 }; gbl_panel_1.rowHeights = new int[] { 28, 0 }; gbl_panel_1.columnWeights = new double[] { 1.0, Double.MIN_VALUE }; gbl_panel_1.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; mypanel_1.setLayout(gbl_panel_1); myHostBox = new JTextField(); GridBagConstraints gbc_HostBox = new GridBagConstraints(); gbc_HostBox.fill = GridBagConstraints.HORIZONTAL; gbc_HostBox.anchor = GridBagConstraints.NORTH; gbc_HostBox.gridx = 0; gbc_HostBox.gridy = 0; mypanel_1.add(myHostBox, gbc_HostBox); myHostBox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { myConnection.setHost(myHostBox.getText()); } }); myHostBox.setColumns(10); JLabel lblTransport = new JLabel("Transport"); GridBagConstraints gbc_lblTransport = new GridBagConstraints(); gbc_lblTransport.insets = new Insets(0, 0, 5, 5); gbc_lblTransport.gridx = 0; gbc_lblTransport.gridy = 1; myMllpCard.add(lblTransport, gbc_lblTransport); JPanel panel_3 = new JPanel(); GridBagConstraints gbc_hohAuthPanel = new GridBagConstraints(); gbc_hohAuthPanel.fill = GridBagConstraints.HORIZONTAL; gbc_hohAuthPanel.insets = new Insets(0, 0, 5, 0); gbc_hohAuthPanel.gridx = 1; gbc_hohAuthPanel.gridy = 1; myMllpCard.add(panel_3, gbc_hohAuthPanel); panel_3.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagLayout gbl_hohAuthPanel = new GridBagLayout(); gbl_hohAuthPanel.columnWidths = new int[] { 0, 0, 0 }; gbl_hohAuthPanel.rowHeights = new int[] { 0, 0 }; gbl_hohAuthPanel.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE }; gbl_hohAuthPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; panel_3.setLayout(gbl_hohAuthPanel); myTlsCheckbox = new JCheckBox("Use TLS/SSL"); myTlsCheckbox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myHohTlsCheckbox.setSelected(myTlsCheckbox.isSelected()); myConnection.setTls(myTlsCheckbox.isSelected()); } }); GridBagConstraints gbc_TlsCheckbox = new GridBagConstraints(); gbc_TlsCheckbox.insets = new Insets(0, 0, 0, 5); gbc_TlsCheckbox.anchor = GridBagConstraints.WEST; gbc_TlsCheckbox.gridx = 0; gbc_TlsCheckbox.gridy = 0; panel_3.add(myTlsCheckbox, gbc_TlsCheckbox); myHoHCard = new JPanel(); myInterfaceTypeCardPanel.add(myHoHCard, IFACE_TYPE_CARD_HOH); GridBagLayout gbl_HoHCard = new GridBagLayout(); gbl_HoHCard.columnWidths = new int[] { 150, 0, 0 }; gbl_HoHCard.rowHeights = new int[] { 0, 0, 0, 0 }; gbl_HoHCard.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE }; gbl_HoHCard.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE }; myHoHCard.setLayout(gbl_HoHCard); mylabel_6 = new JLabel("Authorization"); GridBagConstraints gbc_label_6 = new GridBagConstraints(); gbc_label_6.insets = new Insets(0, 0, 5, 5); gbc_label_6.gridx = 0; gbc_label_6.gridy = 0; myHoHCard.add(mylabel_6, gbc_label_6); hohAuthPanel = new JPanel(); hohAuthPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagConstraints gbc_hohAuthPanel2 = new GridBagConstraints(); gbc_hohAuthPanel2.insets = new Insets(0, 0, 5, 0); gbc_hohAuthPanel2.fill = GridBagConstraints.BOTH; gbc_hohAuthPanel2.gridx = 1; gbc_hohAuthPanel2.gridy = 0; myHoHCard.add(hohAuthPanel, gbc_hohAuthPanel2); GridBagLayout gbl_hohAuthPanel3 = new GridBagLayout(); gbl_hohAuthPanel3.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 0 }; gbl_hohAuthPanel3.rowHeights = new int[] { 0, 0 }; gbl_hohAuthPanel3.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE }; gbl_hohAuthPanel3.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; hohAuthPanel.setLayout(gbl_hohAuthPanel3); myHohAuthEnabledCheckbox = new JCheckBox("Enabled"); myHohAuthEnabledCheckbox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent theE) { myConnection.setHohAuthenticationEnabled(myHohAuthEnabledCheckbox.isSelected()); } }); GridBagConstraints gbc_HohAuthEnabledCheckbox = new GridBagConstraints(); gbc_HohAuthEnabledCheckbox.insets = new Insets(0, 0, 0, 5); gbc_HohAuthEnabledCheckbox.gridx = 0; gbc_HohAuthEnabledCheckbox.gridy = 0; hohAuthPanel.add(myHohAuthEnabledCheckbox, gbc_HohAuthEnabledCheckbox); mylabel_7 = new JLabel("Username:"); GridBagConstraints gbc_label_7 = new GridBagConstraints(); gbc_label_7.insets = new Insets(0, 0, 0, 5); gbc_label_7.anchor = GridBagConstraints.EAST; gbc_label_7.gridx = 1; gbc_label_7.gridy = 0; hohAuthPanel.add(mylabel_7, gbc_label_7); myHohAuthUsernameTextbox = new JTextField(); myHohAuthUsernameTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { myConnection.setHohAuthenticationUsername(myHohAuthUsernameTextbox.getText()); } }); myHohAuthUsernameTextbox.setMaximumSize(new Dimension(200, 2147483647)); myHohAuthUsernameTextbox.setMinimumSize(new Dimension(100, 28)); myHohAuthUsernameTextbox.setPreferredSize(new Dimension(100, 28)); GridBagConstraints gbc_HohUsernameTextbox2 = new GridBagConstraints(); gbc_HohUsernameTextbox2.insets = new Insets(0, 0, 0, 5); gbc_HohUsernameTextbox2.fill = GridBagConstraints.HORIZONTAL; gbc_HohUsernameTextbox2.gridx = 2; gbc_HohUsernameTextbox2.gridy = 0; hohAuthPanel.add(myHohAuthUsernameTextbox, gbc_HohUsernameTextbox2); myHohAuthUsernameTextbox.setColumns(10); mylabel_8 = new JLabel("Password:"); GridBagConstraints gbc_label_8 = new GridBagConstraints(); gbc_label_8.insets = new Insets(0, 0, 0, 5); gbc_label_8.anchor = GridBagConstraints.EAST; gbc_label_8.gridx = 3; gbc_label_8.gridy = 0; hohAuthPanel.add(mylabel_8, gbc_label_8); myHohAuthPasswordTextbox = new JTextField(); myHohAuthPasswordTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { myConnection.setHohAuthenticationPassword(myHohAuthPasswordTextbox.getText()); } }); myHohAuthPasswordTextbox.setPreferredSize(new Dimension(100, 28)); myHohAuthPasswordTextbox.setMaximumSize(new Dimension(200, 2147483647)); myHohAuthPasswordTextbox.setMinimumSize(new Dimension(100, 28)); GridBagConstraints gbc_textField = new GridBagConstraints(); gbc_textField.insets = new Insets(0, 0, 0, 5); gbc_textField.fill = GridBagConstraints.HORIZONTAL; gbc_textField.gridx = 4; gbc_textField.gridy = 0; hohAuthPanel.add(myHohAuthPasswordTextbox, gbc_textField); myHohAuthPasswordTextbox.setColumns(10); mylabel_2 = new JLabel("Security Profile"); GridBagConstraints gbc_label_2 = new GridBagConstraints(); gbc_label_2.insets = new Insets(0, 0, 5, 5); gbc_label_2.gridx = 0; gbc_label_2.gridy = 1; myHoHCard.add(mylabel_2, gbc_label_2); securityProfilePanel = new JPanel(); GridBagConstraints gbc_securityProfilePanel = new GridBagConstraints(); gbc_securityProfilePanel.insets = new Insets(0, 0, 5, 0); gbc_securityProfilePanel.fill = GridBagConstraints.BOTH; gbc_securityProfilePanel.gridx = 1; gbc_securityProfilePanel.gridy = 1; myHoHCard.add(securityProfilePanel, gbc_securityProfilePanel); securityProfilePanel.setLayout(new BorderLayout(0, 0)); myHohTlsCheckbox = new JCheckBox("TLS Enabled"); myHohTlsCheckbox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myConnection.setTls(myHohTlsCheckbox.isSelected()); myTlsCheckbox.setSelected(myHohTlsCheckbox.isSelected()); updatePortsUi(); } }); securityProfilePanel.add(myHohTlsCheckbox, BorderLayout.WEST); tlsKeystorePanel = new JPanel(); tlsKeystorePanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); securityProfilePanel.add(tlsKeystorePanel, BorderLayout.CENTER); GridBagLayout gbl_tlsKeystorePanel = new GridBagLayout(); gbl_tlsKeystorePanel.columnWidths = new int[] { 58, 107, 77, 0, 0 }; gbl_tlsKeystorePanel.rowHeights = new int[] { 28, 16, 0 }; gbl_tlsKeystorePanel.columnWeights = new double[] { 0.0, 1.0, 1.0, 0.0, Double.MIN_VALUE }; gbl_tlsKeystorePanel.rowWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE }; tlsKeystorePanel.setLayout(gbl_tlsKeystorePanel); mylabel_3 = new JLabel("Keystore:"); GridBagConstraints gbc_label_3 = new GridBagConstraints(); gbc_label_3.anchor = GridBagConstraints.WEST; gbc_label_3.fill = GridBagConstraints.VERTICAL; gbc_label_3.insets = new Insets(0, 0, 5, 5); gbc_label_3.gridx = 0; gbc_label_3.gridy = 0; tlsKeystorePanel.add(mylabel_3, gbc_label_3); myHohSecurityKeystoreTextbox = new JTextField(); GridBagConstraints gbc_HohKeystoreTextbox = new GridBagConstraints(); gbc_HohKeystoreTextbox.gridwidth = 2; gbc_HohKeystoreTextbox.anchor = GridBagConstraints.NORTH; gbc_HohKeystoreTextbox.fill = GridBagConstraints.HORIZONTAL; gbc_HohKeystoreTextbox.insets = new Insets(0, 0, 5, 5); gbc_HohKeystoreTextbox.gridx = 1; gbc_HohKeystoreTextbox.gridy = 0; tlsKeystorePanel.add(myHohSecurityKeystoreTextbox, gbc_HohKeystoreTextbox); myHohSecurityKeystoreTextbox.setColumns(10); myHohSecurityKeystoreTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { String text = myHohSecurityKeystoreTextbox.getText(); myHohSecurityKeyPwTextBox.setEnabled(isNotBlank(text)); myConnection.setTlsKeystoreLocation(text); scheduleHohSecurityKeystoreCheck(); } }); myHohSecurityKeystoreChooseBtn = new JButton("Choose"); myHohSecurityKeystoreChooseBtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String directory = Prefs.getInstance().getInterfaceHohSecurityKeystoreDirectory(); directory = StringUtils.defaultString(directory, "."); JFileChooser chooser = new JFileChooser(directory); chooser.setDialogType(JFileChooser.OPEN_DIALOG); chooser.setDialogTitle("Select a Java Keystore"); int result = chooser.showOpenDialog(Hl7ConnectionPanelBackup.this); if (result == JFileChooser.APPROVE_OPTION) { Prefs.getInstance() .setInterfaceHohSecurityKeystoreDirectory(chooser.getSelectedFile().getParent()); myHohSecurityKeystoreTextbox.setText(chooser.getSelectedFile().getAbsolutePath()); } } }); myHohSecurityKeystoreChooseBtn.setIcon(new ImageIcon( Hl7ConnectionPanelBackup.class.getResource("/ca/uhn/hl7v2/testpanel/images/open.png"))); GridBagConstraints gbc_button = new GridBagConstraints(); gbc_button.insets = new Insets(0, 0, 5, 0); gbc_button.gridx = 3; gbc_button.gridy = 0; tlsKeystorePanel.add(myHohSecurityKeystoreChooseBtn, gbc_button); mylabel_4 = new JLabel("Store Pass:"); GridBagConstraints gbc_label_4 = new GridBagConstraints(); gbc_label_4.insets = new Insets(0, 0, 0, 5); gbc_label_4.anchor = GridBagConstraints.EAST; gbc_label_4.gridx = 0; gbc_label_4.gridy = 1; tlsKeystorePanel.add(mylabel_4, gbc_label_4); myHohSecurityKeyPwTextBox = new JTextField(); myHohSecurityKeyPwTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { myConnection.setTlsKeystorePassword(myHohSecurityKeyPwTextBox.getText()); scheduleHohSecurityKeystoreCheck(); } }); GridBagConstraints gbc_HohSecurityKeyPwTextBox = new GridBagConstraints(); gbc_HohSecurityKeyPwTextBox.insets = new Insets(0, 0, 0, 5); gbc_HohSecurityKeyPwTextBox.fill = GridBagConstraints.HORIZONTAL; gbc_HohSecurityKeyPwTextBox.gridx = 1; gbc_HohSecurityKeyPwTextBox.gridy = 1; tlsKeystorePanel.add(myHohSecurityKeyPwTextBox, gbc_HohSecurityKeyPwTextBox); myHohSecurityKeyPwTextBox.setColumns(10); myHohSecurityProfileKeystoreStatus = new JLabel("Value goes here"); myHohSecurityProfileKeystoreStatus.setHorizontalAlignment(SwingConstants.LEFT); GridBagConstraints gbc_HohSecurityProfileKeystoreStatus = new GridBagConstraints(); gbc_HohSecurityProfileKeystoreStatus.anchor = GridBagConstraints.NORTH; gbc_HohSecurityProfileKeystoreStatus.fill = GridBagConstraints.HORIZONTAL; gbc_HohSecurityProfileKeystoreStatus.gridwidth = 2; gbc_HohSecurityProfileKeystoreStatus.gridx = 2; gbc_HohSecurityProfileKeystoreStatus.gridy = 1; tlsKeystorePanel.add(myHohSecurityProfileKeystoreStatus, gbc_HohSecurityProfileKeystoreStatus); init(); }
From source file:ca.uhn.hl7v2.testpanel.ui.conn.Hl7ConnectionPanel.java
/** * Create the panel./*from w w w . ja v a 2 s . co m*/ */ public Hl7ConnectionPanel(Controller theController) { setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagLayout gridBagLayout = new GridBagLayout(); gridBagLayout.columnWidths = new int[] { 150, 0 }; gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; gridBagLayout.columnWeights = new double[] { 0.0, 1.0 }; gridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE }; setLayout(gridBagLayout); mySinglePortRadio = new JRadioButton("Single Port MLLP"); mySinglePortRadio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updatePortsModel(); updatePortsUi(); } }); myPortButtonGroup.add(mySinglePortRadio); GridBagConstraints gbc_SinglePortRadio = new GridBagConstraints(); gbc_SinglePortRadio.anchor = GridBagConstraints.WEST; gbc_SinglePortRadio.insets = new Insets(0, 0, 5, 5); gbc_SinglePortRadio.gridx = 0; gbc_SinglePortRadio.gridy = 0; add(mySinglePortRadio, gbc_SinglePortRadio); JPanel panel_4 = new JPanel(); panel_4.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagConstraints gbc_panel_4 = new GridBagConstraints(); gbc_panel_4.fill = GridBagConstraints.BOTH; gbc_panel_4.insets = new Insets(0, 0, 5, 0); gbc_panel_4.gridx = 1; gbc_panel_4.gridy = 0; add(panel_4, gbc_panel_4); GridBagLayout gbl_panel_4 = new GridBagLayout(); gbl_panel_4.columnWidths = new int[] { 0, 0, 0 }; gbl_panel_4.rowHeights = new int[] { 0, 0 }; gbl_panel_4.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE }; gbl_panel_4.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; panel_4.setLayout(gbl_panel_4); mySinglePortTextBox = new JTextField(); mySinglePortTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { String text = mySinglePortTextBox.getText(); text = text.replaceAll("[^0-9]+", ""); if (!StringUtils.equals(mySinglePortTextBox.getText(), text)) { final String newVal = text; SwingUtilities.invokeLater(new Runnable() { public void run() { mySinglePortTextBox.setText(newVal); } }); } if (mySinglePortRadio.isSelected()) { if (text.length() > 0) { myConnection.setIncomingOrSinglePort(Integer.parseInt(text)); } else { myConnection.setIncomingOrSinglePort(-1); } } } }); mylabel = new JLabel("Port"); mylabel.setHorizontalAlignment(SwingConstants.CENTER); mylabel.setPreferredSize(new Dimension(60, 16)); mylabel.setMinimumSize(new Dimension(60, 16)); mylabel.setMaximumSize(new Dimension(60, 16)); GridBagConstraints gbc_label = new GridBagConstraints(); gbc_label.anchor = GridBagConstraints.EAST; gbc_label.insets = new Insets(0, 0, 0, 5); gbc_label.gridx = 0; gbc_label.gridy = 0; panel_4.add(mylabel, gbc_label); GridBagConstraints gbc_SinglePortTextBox = new GridBagConstraints(); gbc_SinglePortTextBox.insets = new Insets(0, 5, 0, 0); gbc_SinglePortTextBox.anchor = GridBagConstraints.WEST; gbc_SinglePortTextBox.gridx = 1; gbc_SinglePortTextBox.gridy = 0; panel_4.add(mySinglePortTextBox, gbc_SinglePortTextBox); mySinglePortTextBox.setMinimumSize(new Dimension(100, 28)); mySinglePortTextBox.setMaximumSize(new Dimension(100, 2147483647)); mySinglePortTextBox.setColumns(10); myDualPortRadio = new JRadioButton("Dual Port MLLP"); myDualPortRadio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updatePortsModel(); updatePortsUi(); } }); myPortButtonGroup.add(myDualPortRadio); GridBagConstraints gbc_DualPortRadio = new GridBagConstraints(); gbc_DualPortRadio.anchor = GridBagConstraints.WEST; gbc_DualPortRadio.insets = new Insets(0, 0, 5, 5); gbc_DualPortRadio.gridx = 0; gbc_DualPortRadio.gridy = 1; add(myDualPortRadio, gbc_DualPortRadio); JPanel panel = new JPanel(); panel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagConstraints gbc_BottomPanel = new GridBagConstraints(); gbc_BottomPanel.insets = new Insets(0, 0, 5, 0); gbc_BottomPanel.fill = GridBagConstraints.BOTH; gbc_BottomPanel.gridx = 1; gbc_BottomPanel.gridy = 1; add(panel, gbc_BottomPanel); GridBagLayout gbl_panel = new GridBagLayout(); gbl_panel.columnWidths = new int[] { 0, 0, 0, 0, 0, 0 }; gbl_panel.rowHeights = new int[] { 0, 0 }; gbl_panel.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE }; gbl_panel.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; panel.setLayout(gbl_panel); JLabel lblInbound = new JLabel("Inbound"); lblInbound.setHorizontalAlignment(SwingConstants.CENTER); lblInbound.setPreferredSize(new Dimension(60, 16)); lblInbound.setMinimumSize(new Dimension(60, 16)); lblInbound.setMaximumSize(new Dimension(60, 16)); GridBagConstraints gbc_lblInbound = new GridBagConstraints(); gbc_lblInbound.insets = new Insets(0, 5, 0, 5); gbc_lblInbound.anchor = GridBagConstraints.EAST; gbc_lblInbound.gridx = 0; gbc_lblInbound.gridy = 0; panel.add(lblInbound, gbc_lblInbound); myDualIncomingTextBox = new JTextField(); myDualIncomingTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { String text = myDualIncomingTextBox.getText(); text = text.replaceAll("[^0-9]+", ""); if (!StringUtils.equals(myDualIncomingTextBox.getText(), text)) { final String newVal = text; SwingUtilities.invokeLater(new Runnable() { public void run() { myDualIncomingTextBox.setText(newVal); } }); } if (myDualPortRadio.isSelected()) { if (text.length() > 0) { myConnection.setIncomingOrSinglePort(Integer.parseInt(text)); } else { myConnection.setIncomingOrSinglePort(-1); } } } }); myDualIncomingTextBox.setMaximumSize(new Dimension(100, 2147483647)); myDualIncomingTextBox.setMinimumSize(new Dimension(100, 28)); GridBagConstraints gbc_DualIncomingTextBox = new GridBagConstraints(); gbc_DualIncomingTextBox.anchor = GridBagConstraints.WEST; gbc_DualIncomingTextBox.insets = new Insets(0, 0, 0, 5); gbc_DualIncomingTextBox.gridx = 1; gbc_DualIncomingTextBox.gridy = 0; panel.add(myDualIncomingTextBox, gbc_DualIncomingTextBox); myDualIncomingTextBox.setColumns(10); JLabel lblOutbound = new JLabel("Outbound"); GridBagConstraints gbc_lblOutbound = new GridBagConstraints(); gbc_lblOutbound.anchor = GridBagConstraints.EAST; gbc_lblOutbound.insets = new Insets(0, 0, 0, 5); gbc_lblOutbound.gridx = 2; gbc_lblOutbound.gridy = 0; panel.add(lblOutbound, gbc_lblOutbound); myDualOutgoingTextBox = new JTextField(); myDualOutgoingTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { String text = myDualOutgoingTextBox.getText(); text = text.replaceAll("[^0-9]+", ""); if (!StringUtils.equals(myDualOutgoingTextBox.getText(), text)) { final String newVal = text; SwingUtilities.invokeLater(new Runnable() { public void run() { myDualOutgoingTextBox.setText(newVal); } }); } if (myDualPortRadio.isSelected()) { if (text.length() > 0) { myConnection.setOutgoingPort(Integer.parseInt(text)); } else { myConnection.setOutgoingPort(-1); } } } }); myDualOutgoingTextBox.setMinimumSize(new Dimension(100, 28)); myDualOutgoingTextBox.setMaximumSize(new Dimension(100, 2147483647)); GridBagConstraints gbc_DualOutgoingTextBox = new GridBagConstraints(); gbc_DualOutgoingTextBox.insets = new Insets(0, 0, 0, 5); gbc_DualOutgoingTextBox.anchor = GridBagConstraints.WEST; gbc_DualOutgoingTextBox.gridx = 3; gbc_DualOutgoingTextBox.gridy = 0; panel.add(myDualOutgoingTextBox, gbc_DualOutgoingTextBox); myDualOutgoingTextBox.setColumns(10); myHl7OverHttpRadioButton = new JRadioButton("HL7 over HTTP"); myHl7OverHttpRadioButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updatePortsModel(); updatePortsUi(); } }); myPortButtonGroup.add(myHl7OverHttpRadioButton); GridBagConstraints gbc_Hl7OverHttpRadioButton = new GridBagConstraints(); gbc_Hl7OverHttpRadioButton.anchor = GridBagConstraints.WEST; gbc_Hl7OverHttpRadioButton.insets = new Insets(0, 0, 5, 5); gbc_Hl7OverHttpRadioButton.gridx = 0; gbc_Hl7OverHttpRadioButton.gridy = 2; add(myHl7OverHttpRadioButton, gbc_Hl7OverHttpRadioButton); mypanel = new JPanel(); mypanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagConstraints gbc_panel = new GridBagConstraints(); gbc_panel.insets = new Insets(0, 0, 5, 0); gbc_panel.fill = GridBagConstraints.BOTH; gbc_panel.gridx = 1; gbc_panel.gridy = 2; add(mypanel, gbc_panel); GridBagLayout gbl_panel2 = new GridBagLayout(); gbl_panel2.columnWidths = new int[] { 0, 0 }; gbl_panel2.rowHeights = new int[] { 0, 0 }; gbl_panel2.columnWeights = new double[] { 0.0, 1.0 }; gbl_panel2.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; mypanel.setLayout(gbl_panel2); mylabel_1 = new JLabel("URL"); mylabel_1.setHorizontalAlignment(SwingConstants.CENTER); mylabel_1.setPreferredSize(new Dimension(60, 16)); mylabel_1.setMinimumSize(new Dimension(60, 16)); mylabel_1.setMaximumSize(new Dimension(60, 16)); GridBagConstraints gbc_label_1 = new GridBagConstraints(); gbc_label_1.anchor = GridBagConstraints.EAST; gbc_label_1.insets = new Insets(0, 0, 0, 5); gbc_label_1.gridx = 0; gbc_label_1.gridy = 0; mypanel.add(mylabel_1, gbc_label_1); myHoHUrlTextField = new JTextField(); myHoHUrlTextField.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { if (myHohUrlTextFieldUpdating) { return; } String value = myHoHUrlTextField.getText(); try { URL url = new URL(value); boolean tls; if (url.getProtocol().equals("http")) { tls = false; } else if (url.getProtocol().equals("https")) { tls = true; } else { ourLog.info("Unknown protocol: {}", url.getProtocol()); myHoHUrlTextField.setBackground(ERROR_BG); return; } myConnection.setTls(tls); myConnection.setHost(url.getHost()); myConnection .setIncomingOrSinglePort(url.getPort() != -1 ? url.getPort() : url.getDefaultPort()); myConnection.setHttpUriPath(url.getPath()); myHohUrlTextFieldUpdating = true; updatePortsUi(); myHohUrlTextFieldUpdating = false; myTlsCheckbox.setSelected(tls); myHohTlsCheckbox.setSelected(tls); myHoHUrlTextField.setBackground(Color.white); } catch (MalformedURLException e) { myHoHUrlTextField.setBackground(ERROR_BG); } } }); GridBagConstraints gbc_HohUsernameTextbox = new GridBagConstraints(); gbc_HohUsernameTextbox.fill = GridBagConstraints.HORIZONTAL; gbc_HohUsernameTextbox.gridx = 1; gbc_HohUsernameTextbox.gridy = 0; mypanel.add(myHoHUrlTextField, gbc_HohUsernameTextbox); myHoHUrlTextField.setColumns(10); JLabel lblEncoding = new JLabel("Encoding"); GridBagConstraints gbc_lblEncoding = new GridBagConstraints(); gbc_lblEncoding.insets = new Insets(0, 0, 5, 5); gbc_lblEncoding.gridx = 0; gbc_lblEncoding.gridy = 3; add(lblEncoding, gbc_lblEncoding); JPanel encodingPanel = new JPanel(); GridBagConstraints gbc_encodingPanel = new GridBagConstraints(); gbc_encodingPanel.fill = GridBagConstraints.HORIZONTAL; gbc_encodingPanel.insets = new Insets(0, 0, 5, 0); gbc_encodingPanel.gridx = 1; gbc_encodingPanel.gridy = 3; add(encodingPanel, gbc_encodingPanel); encodingPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagLayout gbl_encodingPanel = new GridBagLayout(); gbl_encodingPanel.columnWidths = new int[] { 144, 58, 0 }; gbl_encodingPanel.rowHeights = new int[] { 23, 0 }; gbl_encodingPanel.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE }; gbl_encodingPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; encodingPanel.setLayout(gbl_encodingPanel); myXmlRadio = new JRadioButton("XML"); myXmlRadio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent theE) { updateEncodingModel(); } }); myEr7Radio = new JRadioButton("ER7 (Pipe and hat)"); myEr7Radio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateEncodingModel(); } }); encodingButtonGroup.add(myEr7Radio); GridBagConstraints gbc_Er7Radio = new GridBagConstraints(); gbc_Er7Radio.anchor = GridBagConstraints.NORTHWEST; gbc_Er7Radio.insets = new Insets(0, 0, 0, 5); gbc_Er7Radio.gridx = 0; gbc_Er7Radio.gridy = 0; encodingPanel.add(myEr7Radio, gbc_Er7Radio); encodingButtonGroup.add(myXmlRadio); GridBagConstraints gbc_XmlRadio = new GridBagConstraints(); gbc_XmlRadio.anchor = GridBagConstraints.NORTHWEST; gbc_XmlRadio.gridx = 1; gbc_XmlRadio.gridy = 0; encodingPanel.add(myXmlRadio, gbc_XmlRadio); JLabel lblCharset = new JLabel("Charset"); GridBagConstraints gbc_lblCharset = new GridBagConstraints(); gbc_lblCharset.insets = new Insets(0, 0, 5, 5); gbc_lblCharset.gridx = 0; gbc_lblCharset.gridy = 4; add(lblCharset, gbc_lblCharset); JPanel panel_2 = new JPanel(); GridBagConstraints gbc_panel_2 = new GridBagConstraints(); gbc_panel_2.fill = GridBagConstraints.HORIZONTAL; gbc_panel_2.insets = new Insets(0, 0, 5, 0); gbc_panel_2.gridx = 1; gbc_panel_2.gridy = 4; add(panel_2, gbc_panel_2); panel_2.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagLayout gbl_panel_2 = new GridBagLayout(); gbl_panel_2.columnWidths = new int[] { 28, 198, 0, 0 }; gbl_panel_2.rowHeights = new int[] { 27, 0 }; gbl_panel_2.columnWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE }; gbl_panel_2.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; panel_2.setLayout(gbl_panel_2); myCharsetSelectRadio = new JRadioButton(""); myCharsetSelectRadio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateCharsetModel(); } }); charsetButtonGroup.add(myCharsetSelectRadio); GridBagConstraints gbc_CharsetSelectRadio = new GridBagConstraints(); gbc_CharsetSelectRadio.anchor = GridBagConstraints.WEST; gbc_CharsetSelectRadio.insets = new Insets(0, 0, 0, 5); gbc_CharsetSelectRadio.gridx = 0; gbc_CharsetSelectRadio.gridy = 0; panel_2.add(myCharsetSelectRadio, gbc_CharsetSelectRadio); myCharsetCombo = new JComboBox(); myCharsetCombo.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateCharsetModel(); } }); GridBagConstraints gbc_CharsetCombo = new GridBagConstraints(); gbc_CharsetCombo.anchor = GridBagConstraints.NORTHWEST; gbc_CharsetCombo.insets = new Insets(0, 0, 0, 5); gbc_CharsetCombo.gridx = 1; gbc_CharsetCombo.gridy = 0; panel_2.add(myCharsetCombo, gbc_CharsetCombo); myCharsetDetectRadio = new JRadioButton("Detect in Message (MSH-18)"); myCharsetDetectRadio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { updateCharsetModel(); } }); charsetButtonGroup.add(myCharsetDetectRadio); GridBagConstraints gbc_CharsetDetectRadio = new GridBagConstraints(); gbc_CharsetDetectRadio.anchor = GridBagConstraints.NORTH; gbc_CharsetDetectRadio.gridwidth = 2; gbc_CharsetDetectRadio.gridx = 2; gbc_CharsetDetectRadio.gridy = 0; panel_2.add(myCharsetDetectRadio, gbc_CharsetDetectRadio); mylabel_5 = new JLabel("Debug"); GridBagConstraints gbc_label_5 = new GridBagConstraints(); gbc_label_5.insets = new Insets(0, 0, 5, 5); gbc_label_5.gridx = 0; gbc_label_5.gridy = 5; add(mylabel_5, gbc_label_5); mypanel_2 = new JPanel(); mypanel_2.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagConstraints gbc_panel_75 = new GridBagConstraints(); gbc_panel_75.insets = new Insets(0, 0, 5, 0); gbc_panel_75.fill = GridBagConstraints.BOTH; gbc_panel_75.gridx = 1; gbc_panel_75.gridy = 5; add(mypanel_2, gbc_panel_75); GridBagLayout gbl_panel_74 = new GridBagLayout(); gbl_panel_74.columnWidths = new int[] { 0, 0 }; gbl_panel_74.rowHeights = new int[] { 0, 0 }; gbl_panel_74.columnWeights = new double[] { 0.0, Double.MIN_VALUE }; gbl_panel_74.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; mypanel_2.setLayout(gbl_panel_74); myCaptureByteStreamCheckbox = new JCheckBox("Capture Bytes"); GridBagConstraints gbc_CaptureByteStreamCheckbox = new GridBagConstraints(); gbc_CaptureByteStreamCheckbox.gridx = 0; gbc_CaptureByteStreamCheckbox.gridy = 0; mypanel_2.add(myCaptureByteStreamCheckbox, gbc_CaptureByteStreamCheckbox); myCaptureByteStreamCheckbox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myConnection.setCaptureBytes(myCaptureByteStreamCheckbox.isSelected()); } }); myCaptureByteStreamCheckbox.setToolTipText("Check this box to capture the transport level communication"); myInterfaceTypeCardPanel = new JPanel(); myInterfaceTypeCardPanel.setBorder(null); GridBagConstraints gbc_InterfaceTypeCardPanel = new GridBagConstraints(); gbc_InterfaceTypeCardPanel.gridwidth = 2; gbc_InterfaceTypeCardPanel.fill = GridBagConstraints.BOTH; gbc_InterfaceTypeCardPanel.gridx = 0; gbc_InterfaceTypeCardPanel.gridy = 6; add(myInterfaceTypeCardPanel, gbc_InterfaceTypeCardPanel); myInterfaceTypeCardPanel.setLayout(new CardLayout(0, 0)); myMllpCard = new JPanel(); myMllpCard.setBorder(null); myInterfaceTypeCardPanel.add(myMllpCard, IFACE_TYPE_CARD_MLLP); GridBagLayout gbl_MllpCard = new GridBagLayout(); gbl_MllpCard.columnWidths = new int[] { 150, 0, 0 }; gbl_MllpCard.rowHeights = new int[] { 0, 0, 0, 0 }; gbl_MllpCard.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE }; gbl_MllpCard.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE }; myMllpCard.setLayout(gbl_MllpCard); JLabel lblHost = new JLabel("Host"); GridBagConstraints gbc_lblHost = new GridBagConstraints(); gbc_lblHost.insets = new Insets(0, 0, 5, 5); gbc_lblHost.gridx = 0; gbc_lblHost.gridy = 0; myMllpCard.add(lblHost, gbc_lblHost); mypanel_1 = new JPanel(); mypanel_1.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagConstraints gbc_panel_1 = new GridBagConstraints(); gbc_panel_1.insets = new Insets(0, 0, 5, 0); gbc_panel_1.fill = GridBagConstraints.BOTH; gbc_panel_1.gridx = 1; gbc_panel_1.gridy = 0; myMllpCard.add(mypanel_1, gbc_panel_1); GridBagLayout gbl_panel_1 = new GridBagLayout(); gbl_panel_1.columnWidths = new int[] { 134, 0 }; gbl_panel_1.rowHeights = new int[] { 28, 0 }; gbl_panel_1.columnWeights = new double[] { 1.0, Double.MIN_VALUE }; gbl_panel_1.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; mypanel_1.setLayout(gbl_panel_1); myHostBox = new JTextField(); GridBagConstraints gbc_HostBox = new GridBagConstraints(); gbc_HostBox.fill = GridBagConstraints.HORIZONTAL; gbc_HostBox.anchor = GridBagConstraints.NORTH; gbc_HostBox.gridx = 0; gbc_HostBox.gridy = 0; mypanel_1.add(myHostBox, gbc_HostBox); myHostBox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { myConnection.setHost(myHostBox.getText()); } }); myHostBox.setColumns(10); JLabel lblTransport = new JLabel("Transport"); GridBagConstraints gbc_lblTransport = new GridBagConstraints(); gbc_lblTransport.insets = new Insets(0, 0, 5, 5); gbc_lblTransport.gridx = 0; gbc_lblTransport.gridy = 1; myMllpCard.add(lblTransport, gbc_lblTransport); JPanel panel_3 = new JPanel(); GridBagConstraints gbc_hohAuthPanel = new GridBagConstraints(); gbc_hohAuthPanel.fill = GridBagConstraints.HORIZONTAL; gbc_hohAuthPanel.insets = new Insets(0, 0, 5, 0); gbc_hohAuthPanel.gridx = 1; gbc_hohAuthPanel.gridy = 1; myMllpCard.add(panel_3, gbc_hohAuthPanel); panel_3.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagLayout gbl_hohAuthPanel = new GridBagLayout(); gbl_hohAuthPanel.columnWidths = new int[] { 0, 0, 0 }; gbl_hohAuthPanel.rowHeights = new int[] { 0, 0 }; gbl_hohAuthPanel.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE }; gbl_hohAuthPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; panel_3.setLayout(gbl_hohAuthPanel); myTlsCheckbox = new JCheckBox("Use TLS/SSL"); myTlsCheckbox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myHohTlsCheckbox.setSelected(myTlsCheckbox.isSelected()); myConnection.setTls(myTlsCheckbox.isSelected()); } }); GridBagConstraints gbc_TlsCheckbox = new GridBagConstraints(); gbc_TlsCheckbox.insets = new Insets(0, 0, 0, 5); gbc_TlsCheckbox.anchor = GridBagConstraints.WEST; gbc_TlsCheckbox.gridx = 0; gbc_TlsCheckbox.gridy = 0; panel_3.add(myTlsCheckbox, gbc_TlsCheckbox); myHoHCard = new JPanel(); myInterfaceTypeCardPanel.add(myHoHCard, IFACE_TYPE_CARD_HOH); GridBagLayout gbl_HoHCard = new GridBagLayout(); gbl_HoHCard.columnWidths = new int[] { 150, 0, 0 }; gbl_HoHCard.rowHeights = new int[] { 0, 0, 0, 0 }; gbl_HoHCard.columnWeights = new double[] { 0.0, 1.0, Double.MIN_VALUE }; gbl_HoHCard.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE }; myHoHCard.setLayout(gbl_HoHCard); mylabel_6 = new JLabel("Authorization"); GridBagConstraints gbc_label_6 = new GridBagConstraints(); gbc_label_6.insets = new Insets(0, 0, 5, 5); gbc_label_6.gridx = 0; gbc_label_6.gridy = 0; myHoHCard.add(mylabel_6, gbc_label_6); hohAuthPanel = new JPanel(); hohAuthPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagConstraints gbc_hohAuthPanel2 = new GridBagConstraints(); gbc_hohAuthPanel2.insets = new Insets(0, 0, 5, 0); gbc_hohAuthPanel2.fill = GridBagConstraints.BOTH; gbc_hohAuthPanel2.gridx = 1; gbc_hohAuthPanel2.gridy = 0; myHoHCard.add(hohAuthPanel, gbc_hohAuthPanel2); GridBagLayout gbl_hohAuthPanel3 = new GridBagLayout(); gbl_hohAuthPanel3.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 0 }; gbl_hohAuthPanel3.rowHeights = new int[] { 0, 0 }; gbl_hohAuthPanel3.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE }; gbl_hohAuthPanel3.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; hohAuthPanel.setLayout(gbl_hohAuthPanel3); myHohAuthEnabledCheckbox = new JCheckBox("Enabled"); myHohAuthEnabledCheckbox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent theE) { myConnection.setHohAuthenticationEnabled(myHohAuthEnabledCheckbox.isSelected()); } }); GridBagConstraints gbc_HohAuthEnabledCheckbox = new GridBagConstraints(); gbc_HohAuthEnabledCheckbox.insets = new Insets(0, 0, 0, 5); gbc_HohAuthEnabledCheckbox.gridx = 0; gbc_HohAuthEnabledCheckbox.gridy = 0; hohAuthPanel.add(myHohAuthEnabledCheckbox, gbc_HohAuthEnabledCheckbox); mylabel_7 = new JLabel("Username:"); GridBagConstraints gbc_label_7 = new GridBagConstraints(); gbc_label_7.insets = new Insets(0, 0, 0, 5); gbc_label_7.anchor = GridBagConstraints.EAST; gbc_label_7.gridx = 1; gbc_label_7.gridy = 0; hohAuthPanel.add(mylabel_7, gbc_label_7); myHohAuthUsernameTextbox = new JTextField(); myHohAuthUsernameTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { myConnection.setHohAuthenticationUsername(myHohAuthUsernameTextbox.getText()); } }); myHohAuthUsernameTextbox.setMaximumSize(new Dimension(200, 2147483647)); myHohAuthUsernameTextbox.setMinimumSize(new Dimension(100, 28)); myHohAuthUsernameTextbox.setPreferredSize(new Dimension(100, 28)); GridBagConstraints gbc_HohUsernameTextbox2 = new GridBagConstraints(); gbc_HohUsernameTextbox2.insets = new Insets(0, 0, 0, 5); gbc_HohUsernameTextbox2.fill = GridBagConstraints.HORIZONTAL; gbc_HohUsernameTextbox2.gridx = 2; gbc_HohUsernameTextbox2.gridy = 0; hohAuthPanel.add(myHohAuthUsernameTextbox, gbc_HohUsernameTextbox2); myHohAuthUsernameTextbox.setColumns(10); mylabel_8 = new JLabel("Password:"); GridBagConstraints gbc_label_8 = new GridBagConstraints(); gbc_label_8.insets = new Insets(0, 0, 0, 5); gbc_label_8.anchor = GridBagConstraints.EAST; gbc_label_8.gridx = 3; gbc_label_8.gridy = 0; hohAuthPanel.add(mylabel_8, gbc_label_8); myHohAuthPasswordTextbox = new JTextField(); myHohAuthPasswordTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { myConnection.setHohAuthenticationPassword(myHohAuthPasswordTextbox.getText()); } }); myHohAuthPasswordTextbox.setPreferredSize(new Dimension(100, 28)); myHohAuthPasswordTextbox.setMaximumSize(new Dimension(200, 2147483647)); myHohAuthPasswordTextbox.setMinimumSize(new Dimension(100, 28)); GridBagConstraints gbc_HohSignatureKeystoreTextbox = new GridBagConstraints(); gbc_HohSignatureKeystoreTextbox.insets = new Insets(0, 0, 0, 5); gbc_HohSignatureKeystoreTextbox.fill = GridBagConstraints.HORIZONTAL; gbc_HohSignatureKeystoreTextbox.gridx = 4; gbc_HohSignatureKeystoreTextbox.gridy = 0; hohAuthPanel.add(myHohAuthPasswordTextbox, gbc_HohSignatureKeystoreTextbox); myHohAuthPasswordTextbox.setColumns(10); mylabel_2 = new JLabel("Security Profile"); mylabel_2.setVerticalTextPosition(SwingConstants.TOP); mylabel_2.setVerticalAlignment(SwingConstants.TOP); GridBagConstraints gbc_label_2 = new GridBagConstraints(); gbc_label_2.insets = new Insets(0, 0, 5, 5); gbc_label_2.gridx = 0; gbc_label_2.gridy = 1; myHoHCard.add(mylabel_2, gbc_label_2); // securityProfilePanel = new JPanel(); GridBagConstraints gbc_securityProfilePanel = new GridBagConstraints(); gbc_securityProfilePanel.insets = new Insets(0, 0, 5, 0); gbc_securityProfilePanel.fill = GridBagConstraints.BOTH; gbc_securityProfilePanel.gridx = 1; gbc_securityProfilePanel.gridy = 1; // myHoHCard.add(securityProfilePanel, gbc_securityProfilePanel); // securityProfilePanel.setLayout(new BorderLayout(0, 0)); tlsKeystorePanel = new JPanel(); tlsKeystorePanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); // securityProfilePanel.add(tlsKeystorePanel, BorderLayout.CENTER); myHoHCard.add(tlsKeystorePanel, gbc_securityProfilePanel); GridBagLayout gbl_tlsKeystorePanel = new GridBagLayout(); gbl_tlsKeystorePanel.columnWidths = new int[] { 0, 58, 107, 77, 0, 0 }; gbl_tlsKeystorePanel.rowHeights = new int[] { 28, 16, 0, 0 }; gbl_tlsKeystorePanel.columnWeights = new double[] { 0.0, 0.0, 1.0, 1.0, 0.0, Double.MIN_VALUE }; gbl_tlsKeystorePanel.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE }; tlsKeystorePanel.setLayout(gbl_tlsKeystorePanel); myHohTlsCheckbox = new JCheckBox("TLS Enabled"); GridBagConstraints gbc_HohTlsCheckbox = new GridBagConstraints(); gbc_HohTlsCheckbox.gridheight = 2; gbc_HohTlsCheckbox.insets = new Insets(0, 0, 5, 5); gbc_HohTlsCheckbox.gridx = 0; gbc_HohTlsCheckbox.gridy = 0; tlsKeystorePanel.add(myHohTlsCheckbox, gbc_HohTlsCheckbox); myHohTlsCheckbox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myConnection.setTls(myHohTlsCheckbox.isSelected()); myTlsCheckbox.setSelected(myHohTlsCheckbox.isSelected()); updatePortsUi(); } }); mylabel_3 = new JLabel("Keystore:"); GridBagConstraints gbc_label_3 = new GridBagConstraints(); gbc_label_3.anchor = GridBagConstraints.WEST; gbc_label_3.fill = GridBagConstraints.VERTICAL; gbc_label_3.insets = new Insets(0, 0, 5, 5); gbc_label_3.gridx = 1; gbc_label_3.gridy = 0; tlsKeystorePanel.add(mylabel_3, gbc_label_3); myHohSecurityKeystoreTextbox = new JTextField(); GridBagConstraints gbc_HohKeystoreTextbox = new GridBagConstraints(); gbc_HohKeystoreTextbox.gridwidth = 2; gbc_HohKeystoreTextbox.anchor = GridBagConstraints.NORTH; gbc_HohKeystoreTextbox.fill = GridBagConstraints.HORIZONTAL; gbc_HohKeystoreTextbox.insets = new Insets(0, 0, 5, 5); gbc_HohKeystoreTextbox.gridx = 2; gbc_HohKeystoreTextbox.gridy = 0; tlsKeystorePanel.add(myHohSecurityKeystoreTextbox, gbc_HohKeystoreTextbox); myHohSecurityKeystoreTextbox.setColumns(10); myHohSecurityKeystoreTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { String text = myHohSecurityKeystoreTextbox.getText(); myHohSecurityKeyPwTextBox.setEnabled(isNotBlank(text)); myConnection.setTlsKeystoreLocation(text); } }); myHohSecurityKeystoreChooseBtn = new JButton("Choose"); myHohSecurityKeystoreChooseBtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Hl7ConnectionPanel.chooseKeystore(Hl7ConnectionPanel.this, myHohSecurityKeystoreTextbox); } }); myHohSecurityKeystoreChooseBtn.setIcon( new ImageIcon(Hl7ConnectionPanel.class.getResource("/ca/uhn/hl7v2/testpanel/images/open.png"))); GridBagConstraints gbc_HohSignatureKeystoreChooseButton = new GridBagConstraints(); gbc_HohSignatureKeystoreChooseButton.insets = new Insets(0, 0, 5, 0); gbc_HohSignatureKeystoreChooseButton.gridx = 4; gbc_HohSignatureKeystoreChooseButton.gridy = 0; tlsKeystorePanel.add(myHohSecurityKeystoreChooseBtn, gbc_HohSignatureKeystoreChooseButton); mylabel_4 = new JLabel("Store Pass:"); GridBagConstraints gbc_label_4 = new GridBagConstraints(); gbc_label_4.insets = new Insets(0, 0, 0, 5); gbc_label_4.anchor = GridBagConstraints.EAST; gbc_label_4.gridx = 1; gbc_label_4.gridy = 1; tlsKeystorePanel.add(mylabel_4, gbc_label_4); myHohSecurityKeyPwTextBox = new JTextField(); myHohSecurityKeyPwTextBox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { myConnection.setTlsKeystorePassword(myHohSecurityKeyPwTextBox.getText()); } }); GridBagConstraints gbc_HohSecurityKeyPwTextBox = new GridBagConstraints(); gbc_HohSecurityKeyPwTextBox.insets = new Insets(0, 0, 0, 5); gbc_HohSecurityKeyPwTextBox.fill = GridBagConstraints.HORIZONTAL; gbc_HohSecurityKeyPwTextBox.gridx = 2; gbc_HohSecurityKeyPwTextBox.gridy = 1; tlsKeystorePanel.add(myHohSecurityKeyPwTextBox, gbc_HohSecurityKeyPwTextBox); myHohSecurityKeyPwTextBox.setColumns(10); myHohSecurityProfileKeystoreStatus = new JLabel("Value goes here"); myHohSecurityProfileKeystoreStatus.setHorizontalAlignment(SwingConstants.CENTER); GridBagConstraints gbc_HohSecurityProfileKeystoreStatus = new GridBagConstraints(); gbc_HohSecurityProfileKeystoreStatus.anchor = GridBagConstraints.NORTH; gbc_HohSecurityProfileKeystoreStatus.fill = GridBagConstraints.HORIZONTAL; gbc_HohSecurityProfileKeystoreStatus.gridwidth = 5; gbc_HohSecurityProfileKeystoreStatus.gridx = 0; gbc_HohSecurityProfileKeystoreStatus.gridy = 2; tlsKeystorePanel.add(myHohSecurityProfileKeystoreStatus, gbc_HohSecurityProfileKeystoreStatus); mylabel_9 = new JLabel("Signature Profile"); GridBagConstraints gbc_label_9 = new GridBagConstraints(); gbc_label_9.insets = new Insets(0, 0, 0, 5); gbc_label_9.gridx = 0; gbc_label_9.gridy = 2; myHoHCard.add(mylabel_9, gbc_label_9); mypanel_3 = new JPanel(); mypanel_3.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); GridBagConstraints gbc_panel_3 = new GridBagConstraints(); gbc_panel_3.fill = GridBagConstraints.BOTH; gbc_panel_3.gridx = 1; gbc_panel_3.gridy = 2; myHoHCard.add(mypanel_3, gbc_panel_3); GridBagLayout gbl_panel_3 = new GridBagLayout(); gbl_panel_3.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 50, 0, 0 }; gbl_panel_3.rowHeights = new int[] { 0, 0, 0, 0 }; gbl_panel_3.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, Double.MIN_VALUE }; gbl_panel_3.rowWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE }; mypanel_3.setLayout(gbl_panel_3); myHohSignatureEnabled = new JCheckBox("Enabled"); myHohSignatureEnabled.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent theE) { myConnection.setHohSignatureEnabled(myHohSignatureEnabled.isSelected()); } }); GridBagConstraints gbc_HohSignatureEnabled = new GridBagConstraints(); gbc_HohSignatureEnabled.insets = new Insets(0, 0, 5, 5); gbc_HohSignatureEnabled.gridx = 0; gbc_HohSignatureEnabled.gridy = 0; mypanel_3.add(myHohSignatureEnabled, gbc_HohSignatureEnabled); mylabel_10 = new JLabel("Keystore:"); GridBagConstraints gbc_label_10 = new GridBagConstraints(); gbc_label_10.anchor = GridBagConstraints.EAST; gbc_label_10.insets = new Insets(0, 0, 5, 5); gbc_label_10.gridx = 1; gbc_label_10.gridy = 0; mypanel_3.add(mylabel_10, gbc_label_10); myHohSignatureKeystoreTextbox = new JTextField(); myHohSignatureKeystoreTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { myConnection.setHohSignatureKeystore(myHohSignatureKeystoreTextbox.getText()); } }); GridBagConstraints gbc_HohSignatureKeystoreTextbox2 = new GridBagConstraints(); gbc_HohSignatureKeystoreTextbox2.gridwidth = 5; gbc_HohSignatureKeystoreTextbox2.insets = new Insets(0, 0, 5, 5); gbc_HohSignatureKeystoreTextbox2.fill = GridBagConstraints.HORIZONTAL; gbc_HohSignatureKeystoreTextbox2.gridx = 2; gbc_HohSignatureKeystoreTextbox2.gridy = 0; mypanel_3.add(myHohSignatureKeystoreTextbox, gbc_HohSignatureKeystoreTextbox2); myHohSignatureKeystoreTextbox.setColumns(10); myHohSignatureKeystoreChooseButton = new JButton("Choose"); myHohSignatureKeystoreChooseButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Hl7ConnectionPanel.chooseKeystore(Hl7ConnectionPanel.this, myHohSignatureKeystoreTextbox); } }); myHohSignatureKeystoreChooseButton.setIcon( new ImageIcon(Hl7ConnectionPanel.class.getResource("/ca/uhn/hl7v2/testpanel/images/open.png"))); GridBagConstraints gbc_HohSignatureKeystoreChooseButton2 = new GridBagConstraints(); gbc_HohSignatureKeystoreChooseButton2.insets = new Insets(0, 0, 5, 0); gbc_HohSignatureKeystoreChooseButton2.gridx = 7; gbc_HohSignatureKeystoreChooseButton2.gridy = 0; mypanel_3.add(myHohSignatureKeystoreChooseButton, gbc_HohSignatureKeystoreChooseButton2); mylabel_11 = new JLabel("Store Pass:"); GridBagConstraints gbc_label_11 = new GridBagConstraints(); gbc_label_11.anchor = GridBagConstraints.EAST; gbc_label_11.insets = new Insets(0, 0, 5, 5); gbc_label_11.gridx = 1; gbc_label_11.gridy = 1; mypanel_3.add(mylabel_11, gbc_label_11); myHohSignatureKeystorePasswordTextbox = new JTextField(); myHohSignatureKeystorePasswordTextbox.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { myConnection.setHohSignatureKeystorePassword(myHohSignatureKeystorePasswordTextbox.getText()); } }); myHohSignatureKeystorePasswordTextbox.setPreferredSize(new Dimension(100, 28)); myHohSignatureKeystorePasswordTextbox.setMinimumSize(new Dimension(100, 28)); myHohSignatureKeystorePasswordTextbox.setMaximumSize(new Dimension(200, 2147483647)); GridBagConstraints gbc_HohSignatureKeystorePasswordTextbox = new GridBagConstraints(); gbc_HohSignatureKeystorePasswordTextbox.insets = new Insets(0, 0, 5, 5); gbc_HohSignatureKeystorePasswordTextbox.fill = GridBagConstraints.HORIZONTAL; gbc_HohSignatureKeystorePasswordTextbox.gridx = 2; gbc_HohSignatureKeystorePasswordTextbox.gridy = 1; mypanel_3.add(myHohSignatureKeystorePasswordTextbox, gbc_HohSignatureKeystorePasswordTextbox); myHohSignatureKeystorePasswordTextbox.setColumns(10); mylabel_12 = new JLabel("Key:"); GridBagConstraints gbc_label_12 = new GridBagConstraints(); gbc_label_12.anchor = GridBagConstraints.EAST; gbc_label_12.insets = new Insets(0, 0, 5, 5); gbc_label_12.gridx = 3; gbc_label_12.gridy = 1; mypanel_3.add(mylabel_12, gbc_label_12); myHohSignatureKeyAliasCombo = new JComboBox(); myHohSignatureKeyAliasCombo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent theE) { if (myUpdatingHohSignatureKeyAliasCombo) { return; } String selection = (String) myHohSignatureKeyAliasCombo.getSelectedItem(); if (selection == HOH_SIGNATURE_KEY_USE_ANY_AVAILABLE) { myConnection.setHohSignatureKey(null); } else { myConnection.setHohSignatureKey(selection.replaceAll(" .*", "")); } } }); GridBagConstraints gbc_HohSignatureKeyAliasCombo = new GridBagConstraints(); gbc_HohSignatureKeyAliasCombo.insets = new Insets(0, 0, 5, 5); gbc_HohSignatureKeyAliasCombo.fill = GridBagConstraints.HORIZONTAL; gbc_HohSignatureKeyAliasCombo.gridx = 4; gbc_HohSignatureKeyAliasCombo.gridy = 1; mypanel_3.add(myHohSignatureKeyAliasCombo, gbc_HohSignatureKeyAliasCombo); mylabel_13 = new JLabel("Key Pass:"); GridBagConstraints gbc_label_13 = new GridBagConstraints(); gbc_label_13.anchor = GridBagConstraints.EAST; gbc_label_13.insets = new Insets(0, 0, 5, 5); gbc_label_13.gridx = 5; gbc_label_13.gridy = 1; mypanel_3.add(mylabel_13, gbc_label_13); myHohSignatureKeyPass = new JTextField(); myHohSignatureKeyPass.getDocument().addDocumentListener(new SimpleDocumentListener() { @Override public void update(DocumentEvent theE) { myConnection.setHohSignatureKeyPassword(myHohSignatureKeyPass.getText()); } }); myHohSignatureKeyPass.setMinimumSize(new Dimension(50, 28)); myHohSignatureKeyPass.setMaximumSize(new Dimension(50, 2147483647)); myHohSignatureKeyPass.setPreferredSize(new Dimension(50, 28)); GridBagConstraints gbc_HohSignatureKeyPass = new GridBagConstraints(); gbc_HohSignatureKeyPass.gridwidth = 2; gbc_HohSignatureKeyPass.insets = new Insets(0, 0, 5, 0); gbc_HohSignatureKeyPass.fill = GridBagConstraints.HORIZONTAL; gbc_HohSignatureKeyPass.gridx = 6; gbc_HohSignatureKeyPass.gridy = 1; mypanel_3.add(myHohSignatureKeyPass, gbc_HohSignatureKeyPass); myHohSignatureKeyPass.setColumns(10); myHohSignatureStatusLabel = new JLabel("New label"); myHohSignatureStatusLabel.setHorizontalAlignment(SwingConstants.CENTER); GridBagConstraints gbc_HohSignatureStatusLabel = new GridBagConstraints(); gbc_HohSignatureStatusLabel.fill = GridBagConstraints.HORIZONTAL; gbc_HohSignatureStatusLabel.gridwidth = 8; gbc_HohSignatureStatusLabel.insets = new Insets(0, 0, 0, 5); gbc_HohSignatureStatusLabel.gridx = 0; gbc_HohSignatureStatusLabel.gridy = 2; mypanel_3.add(myHohSignatureStatusLabel, gbc_HohSignatureStatusLabel); init(); }
From source file:org.multibit.viewsystem.swing.view.panels.ShowPreferencesPanel.java
private JPanel createTickerPanel(int stentWidth) { // Load up the original values. originalShowTicker = !Boolean.FALSE.toString() .equals(controller.getModel().getUserPreference(ExchangeModel.TICKER_SHOW)); originalExchange1 = controller.getModel().getUserPreference(ExchangeModel.TICKER_FIRST_ROW_EXCHANGE); originalCurrency1 = controller.getModel().getUserPreference(ExchangeModel.TICKER_FIRST_ROW_CURRENCY); // Map MtGox to Bitstamp + USD if (ExchangeData.MT_GOX_EXCHANGE_NAME.equalsIgnoreCase(originalExchange1)) { originalExchange1 = ExchangeData.BITSTAMP_EXCHANGE_NAME; controller.getModel().setUserPreference(ExchangeModel.TICKER_FIRST_ROW_EXCHANGE, ExchangeData.BITSTAMP_EXCHANGE_NAME); originalCurrency1 = "USD"; controller.getModel().setUserPreference(ExchangeModel.TICKER_FIRST_ROW_CURRENCY, "USD"); }/* w ww.j a va 2 s .c o m*/ originalShowSecondRow = Boolean.TRUE.toString() .equals(controller.getModel().getUserPreference(ExchangeModel.TICKER_SHOW_SECOND_ROW)); originalExchange2 = controller.getModel().getUserPreference(ExchangeModel.TICKER_SECOND_ROW_EXCHANGE); originalCurrency2 = controller.getModel().getUserPreference(ExchangeModel.TICKER_SECOND_ROW_CURRENCY); // Map MtGox to Bitstamp if (ExchangeData.MT_GOX_EXCHANGE_NAME.equalsIgnoreCase(originalExchange2)) { originalExchange2 = ExchangeData.BITSTAMP_EXCHANGE_NAME; controller.getModel().setUserPreference(ExchangeModel.TICKER_SECOND_ROW_EXCHANGE, ExchangeData.BITSTAMP_EXCHANGE_NAME); originalCurrency2 = "USD"; controller.getModel().setUserPreference(ExchangeModel.TICKER_SECOND_ROW_CURRENCY, "USD"); } MultiBitTitledPanel tickerPanel = new MultiBitTitledPanel( controller.getLocaliser().getString("showPreferencesPanel.ticker.title2"), ComponentOrientation.getOrientation(controller.getLocaliser().getLocale())); GridBagConstraints constraints = new GridBagConstraints(); constraints.fill = GridBagConstraints.BOTH; constraints.gridx = 3; constraints.gridy = 3; constraints.weightx = 0.05; constraints.weighty = 0.3; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.CENTER; tickerPanel.add(MultiBitTitledPanel.createStent(MultiBitTitledPanel.SEPARATION_BETWEEN_NAME_VALUE_PAIRS), constraints); String showTickerText = controller.getLocaliser().getString("multiBitFrame.ticker.show.text"); if (showTickerText != null && showTickerText.length() >= 1) { // Capitalise text (this is to save adding a new I18n term. showTickerText = Character.toUpperCase(showTickerText.charAt(0)) + showTickerText.toLowerCase().substring(1); } showTicker = new JCheckBox(showTickerText); showTicker.setOpaque(false); showTicker.setFont(FontSizer.INSTANCE.getAdjustedDefaultFont()); showTicker.setSelected(originalShowTicker); exchangeInformationLabel = new MultiBitLabel( controller.getLocaliser().getString("showPreferencesPanel.ticker.exchangeInformation")); exchangeInformationLabel.setVisible(originalShowBitcoinConvertedToFiat); showBitcoinConvertedToFiat = new JCheckBox( controller.getLocaliser().getString("showPreferencesPanel.ticker.showBitcoinConvertedToFiat")); showBitcoinConvertedToFiat.setOpaque(false); showBitcoinConvertedToFiat.setFont(FontSizer.INSTANCE.getAdjustedDefaultFont()); showBitcoinConvertedToFiat.setSelected(originalShowBitcoinConvertedToFiat); showBitcoinConvertedToFiat.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { boolean selectedChange = (e.getStateChange() == ItemEvent.SELECTED); boolean unSelectedChange = (e.getStateChange() == ItemEvent.DESELECTED); if (exchangeInformationLabel != null) { if (selectedChange) { exchangeInformationLabel.setVisible(true); } if (unSelectedChange) { exchangeInformationLabel.setVisible(false); } } } }); showExchange = new JCheckBox(controller.getLocaliser().getString("tickerTableModel.exchange")); showExchange.setOpaque(false); showExchange.setFont(FontSizer.INSTANCE.getAdjustedDefaultFont()); showCurrency = new JCheckBox(controller.getLocaliser().getString("tickerTableModel.currency")); showCurrency.setOpaque(false); showCurrency.setFont(FontSizer.INSTANCE.getAdjustedDefaultFont()); showLastPrice = new JCheckBox(controller.getLocaliser().getString("tickerTableModel.lastPrice")); showLastPrice.setOpaque(false); showLastPrice.setFont(FontSizer.INSTANCE.getAdjustedDefaultFont()); showBid = new JCheckBox(controller.getLocaliser().getString("tickerTableModel.bid")); showBid.setOpaque(false); showBid.setFont(FontSizer.INSTANCE.getAdjustedDefaultFont()); showAsk = new JCheckBox(controller.getLocaliser().getString("tickerTableModel.ask")); showAsk.setOpaque(false); showAsk.setFont(FontSizer.INSTANCE.getAdjustedDefaultFont()); String tickerColumnsToShow = controller.getModel().getUserPreference(ExchangeModel.TICKER_COLUMNS_TO_SHOW); if (tickerColumnsToShow == null || tickerColumnsToShow.equals("")) { tickerColumnsToShow = TickerTableModel.DEFAULT_COLUMNS_TO_SHOW; } originalShowCurrency = tickerColumnsToShow.contains(TickerTableModel.TICKER_COLUMN_CURRENCY); showCurrency.setSelected(originalShowCurrency); originalShowRate = tickerColumnsToShow.contains(TickerTableModel.TICKER_COLUMN_LAST_PRICE); showLastPrice.setSelected(originalShowRate); originalShowBid = tickerColumnsToShow.contains(TickerTableModel.TICKER_COLUMN_BID); showBid.setSelected(originalShowBid); originalShowAsk = tickerColumnsToShow.contains(TickerTableModel.TICKER_COLUMN_ASK); showAsk.setSelected(originalShowAsk); originalShowExchange = tickerColumnsToShow.contains(TickerTableModel.TICKER_COLUMN_EXCHANGE); showExchange.setSelected(originalShowExchange); constraints.fill = GridBagConstraints.HORIZONTAL; constraints.gridx = 1; constraints.gridy = 4; constraints.weightx = 0.2; constraints.weighty = 0.3; constraints.gridwidth = 4; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(showTicker, constraints); constraints.fill = GridBagConstraints.HORIZONTAL; constraints.gridx = 1; constraints.gridy = 5; constraints.weightx = 0.2; constraints.weighty = 0.3; constraints.gridwidth = 4; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(showBitcoinConvertedToFiat, constraints); constraints.fill = GridBagConstraints.VERTICAL; constraints.gridx = 0; constraints.gridy = 6; constraints.weightx = 0.2; constraints.weighty = 0.3; constraints.gridwidth = 3; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(MultiBitTitledPanel.createStent(1, 12), constraints); MultiBitTitledPanel.addLeftJustifiedTextAtIndent( controller.getLocaliser().getString("showPreferencesPanel.ticker.columnsToShow"), 7, tickerPanel); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 1; constraints.gridy = 8; constraints.weightx = 0.2; constraints.weighty = 0.3; constraints.gridwidth = 3; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(showExchange, constraints); constraints.fill = GridBagConstraints.HORIZONTAL; constraints.gridx = 1; constraints.gridy = 9; constraints.weightx = 0.2; constraints.weighty = 0.3; constraints.gridwidth = 3; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(showCurrency, constraints); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 1; constraints.gridy = 10; constraints.weightx = 0.2; constraints.weighty = 0.3; constraints.gridwidth = 3; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(showLastPrice, constraints); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 1; constraints.gridy = 11; constraints.weightx = 0.2; constraints.weighty = 0.3; constraints.gridwidth = 3; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(showBid, constraints); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 1; constraints.gridy = 12; constraints.weightx = 0.2; constraints.weighty = 0.3; constraints.gridwidth = 3; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(showAsk, constraints); constraints.fill = GridBagConstraints.VERTICAL; constraints.gridx = 1; constraints.gridy = 13; constraints.weightx = 0.3; constraints.weighty = 0.3; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(MultiBitTitledPanel.createStent(1, 13), constraints); MultiBitTitledPanel.addLeftJustifiedTextAtIndent( controller.getLocaliser().getString("showPreferencesPanel.ticker.firstRow"), 14, tickerPanel); MultiBitLabel exchangeLabel1 = new MultiBitLabel( controller.getLocaliser().getString("showPreferencesPanel.ticker.exchange")); exchangeLabel1.setHorizontalAlignment(JLabel.TRAILING); constraints.fill = GridBagConstraints.HORIZONTAL; constraints.gridx = 1; constraints.gridy = 15; constraints.weightx = 0.3; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_END; tickerPanel.add(exchangeLabel1, constraints); String exchangeToUse1; if (originalExchange1 == null | "".equals(originalExchange1)) { exchangeToUse1 = ExchangeData.DEFAULT_EXCHANGE; } else { exchangeToUse1 = originalExchange1; } String exchangeToUse2; if (originalExchange2 == null | "".equals(originalExchange2)) { exchangeToUse2 = ExchangeData.DEFAULT_EXCHANGE; } else { exchangeToUse2 = originalExchange2; } exchangeComboBox1 = new JComboBox(ExchangeData.getAvailableExchanges()); exchangeComboBox1.setSelectedItem(exchangeToUse1); exchangeComboBox1.setFont(FontSizer.INSTANCE.getAdjustedDefaultFont()); exchangeComboBox1.setOpaque(false); FontMetrics fontMetrics = getFontMetrics(FontSizer.INSTANCE.getAdjustedDefaultFont()); int textWidth = Math.max(fontMetrics.stringWidth(ExchangeData.OPEN_EXCHANGE_RATES_EXCHANGE_NAME), fontMetrics.stringWidth("USD")) + COMBO_WIDTH_DELTA; Dimension preferredSize = new Dimension(textWidth + TICKER_COMBO_WIDTH_DELTA, fontMetrics.getHeight() + EXCHANGE_COMBO_HEIGHT_DELTA); exchangeComboBox1.setPreferredSize(preferredSize); constraints.fill = GridBagConstraints.BOTH; constraints.gridx = 1; constraints.gridy = 15; constraints.weightx = 0.3; constraints.weighty = 0.3; constraints.gridwidth = 2; constraints.anchor = GridBagConstraints.LINE_START; JPanel stent = MultiBitTitledPanel.createStent(stentWidth); tickerPanel.add(stent, constraints); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 4; constraints.gridy = 15; constraints.weightx = 0.8; constraints.weighty = 0.6; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(exchangeComboBox1, constraints); oerMessageLabel1 = new MultiBitLabel( " " + controller.getLocaliser().getString("showPreferencesPanel.getAppId.label")); oerMessageLabel1.setForeground(Color.GREEN.darker().darker()); boolean showMessageLabel1 = isBrowserSupported() && ExchangeData.OPEN_EXCHANGE_RATES_EXCHANGE_NAME.equalsIgnoreCase(exchangeToUse1) && (originalOERApiCode == null || originalOERApiCode.trim().length() == 0); oerMessageLabel1.setVisible(showMessageLabel1); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 5; constraints.gridy = 15; constraints.weightx = 0.8; constraints.weighty = 0.6; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(oerMessageLabel1, constraints); MultiBitLabel currencyLabel1 = new MultiBitLabel( controller.getLocaliser().getString("showPreferencesPanel.ticker.currency")); currencyLabel1.setHorizontalAlignment(JLabel.TRAILING); constraints.fill = GridBagConstraints.HORIZONTAL; constraints.gridx = 1; constraints.gridy = 16; constraints.weightx = 0.3; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_END; tickerPanel.add(currencyLabel1, constraints); // Make sure the exchange1 has been created and initialised the list of // currencies. if (mainFrame != null && mainFrame.getTickerTimerTask1() != null) { TickerTimerTask tickerTimerTask = mainFrame.getTickerTimerTask1(); synchronized (tickerTimerTask) { if (tickerTimerTask.getExchange() == null) { tickerTimerTask.createExchangeObjects(exchangeToUse1); } } } currencyComboBox1 = new JComboBox(); Collection<String> currenciesToUse = ExchangeData.getAvailableCurrenciesForExchange(exchangeToUse1); if (currenciesToUse != null) { for (String currency : currenciesToUse) { String item = currency; String description = CurrencyConverter.INSTANCE.getCurrencyCodeToDescriptionMap().get(currency); if (description != null && description.trim().length() > 0) { item = item + " (" + description + ")"; } currencyComboBox1.addItem(item); if (currency.equals(originalCurrency1)) { currencyComboBox1.setSelectedItem(item); } } } currencyComboBox1.setFont(FontSizer.INSTANCE.getAdjustedDefaultFont()); currencyComboBox1.setOpaque(false); currencyComboBox1.setPreferredSize(preferredSize); exchangeComboBox1.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent event) { if (event.getStateChange() == ItemEvent.SELECTED) { Object item = event.getItem(); String exchangeShortName = item.toString(); // Make sure the exchange1 has been created and initialised // the list of currencies. if (mainFrame != null && mainFrame.getTickerTimerTask1() != null) { TickerTimerTask tickerTimerTask = mainFrame.getTickerTimerTask1(); synchronized (tickerTimerTask) { tickerTimerTask.createExchangeObjects(exchangeShortName); currencyComboBox1.removeAllItems(); Collection<String> currenciesToUse = ExchangeData .getAvailableCurrenciesForExchange(exchangeShortName); if (currenciesToUse != null) { for (String currency : currenciesToUse) { String loopItem = currency; String description = CurrencyConverter.INSTANCE .getCurrencyCodeToDescriptionMap().get(currency); if (description != null && description.trim().length() > 0) { loopItem = loopItem + " (" + description + ")"; } currencyComboBox1.addItem(loopItem); } } } } // Enable the OpenExchangeRates App ID if required. boolean showOER = ExchangeData.OPEN_EXCHANGE_RATES_EXCHANGE_NAME .equalsIgnoreCase(exchangeShortName) || ExchangeData.OPEN_EXCHANGE_RATES_EXCHANGE_NAME .equalsIgnoreCase((String) exchangeComboBox2.getSelectedItem()); oerStent.setVisible(showOER); oerApiCodeLabel.setVisible(showOER); oerApiCodeTextField.setVisible(showOER); getOerAppIdButton.setVisible(showOER); boolean showMessageLabel = isBrowserSupported() && ExchangeData.OPEN_EXCHANGE_RATES_EXCHANGE_NAME.equalsIgnoreCase(exchangeShortName) && (oerApiCodeTextField.getText() == null || oerApiCodeTextField.getText().trim().length() == 0); oerMessageLabel1.setVisible(showMessageLabel); } } }); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 4; constraints.gridy = 16; constraints.weightx = 0.8; constraints.weighty = 0.6; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(currencyComboBox1, constraints); constraints.fill = GridBagConstraints.BOTH; constraints.gridx = 1; constraints.gridy = 17; constraints.weightx = 0.3; constraints.weighty = 0.3; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(MultiBitTitledPanel.createStent(12, 12), constraints); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 4; constraints.gridy = 18; constraints.weightx = 0.8; constraints.weighty = 0.6; constraints.gridwidth = 2; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(MultiBitTitledPanel.createStent(fontMetrics.stringWidth(exchangeInformationLabel.getText()), fontMetrics.getHeight()), constraints); tickerPanel.add(exchangeInformationLabel, constraints); constraints.fill = GridBagConstraints.BOTH; constraints.gridx = 1; constraints.gridy = 19; constraints.weightx = 0.3; constraints.weighty = 0.3; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(MultiBitTitledPanel.createStent(12, 12), constraints); MultiBitTitledPanel.addLeftJustifiedTextAtIndent( controller.getLocaliser().getString("showPreferencesPanel.ticker.secondRow"), 20, tickerPanel); showSecondRowCheckBox = new JCheckBox( controller.getLocaliser().getString("showPreferencesPanel.ticker.showSecondRow")); showSecondRowCheckBox.setOpaque(false); showSecondRowCheckBox.setFont(FontSizer.INSTANCE.getAdjustedDefaultFont()); showSecondRowCheckBox.addItemListener(new ChangeTickerShowSecondRowListener()); constraints.fill = GridBagConstraints.HORIZONTAL; constraints.gridx = 1; constraints.gridy = 21; constraints.weightx = 0.3; constraints.weighty = 1; constraints.gridwidth = 3; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(showSecondRowCheckBox, constraints); exchangeLabel2 = new MultiBitLabel( controller.getLocaliser().getString("showPreferencesPanel.ticker.exchange")); exchangeLabel2.setHorizontalAlignment(JLabel.TRAILING); constraints.fill = GridBagConstraints.HORIZONTAL; constraints.gridx = 1; constraints.gridy = 22; constraints.weightx = 0.3; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_END; tickerPanel.add(exchangeLabel2, constraints); exchangeComboBox2 = new JComboBox(ExchangeData.getAvailableExchanges()); exchangeComboBox2.setSelectedItem(exchangeToUse2); exchangeComboBox2.setFont(FontSizer.INSTANCE.getAdjustedDefaultFont()); exchangeComboBox2.setOpaque(false); exchangeComboBox2.setPreferredSize(preferredSize); exchangeComboBox2.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent event) { if (event.getStateChange() == ItemEvent.SELECTED) { Object item = event.getItem(); String exchangeShortName = item.toString(); // Make sure the exchange2 has been created and initialised // the list of currencies. if (mainFrame != null && mainFrame.getTickerTimerTask2() != null) { TickerTimerTask tickerTimerTask = mainFrame.getTickerTimerTask2(); synchronized (tickerTimerTask) { tickerTimerTask.createExchangeObjects(exchangeShortName); currencyComboBox2.removeAllItems(); Collection<String> currenciesToUse = ExchangeData .getAvailableCurrenciesForExchange(exchangeShortName); if (currenciesToUse != null) { for (String currency : currenciesToUse) { String loopItem = currency; String description = CurrencyConverter.INSTANCE .getCurrencyCodeToDescriptionMap().get(currency); if (description != null && description.trim().length() > 0) { loopItem = loopItem + " (" + description + ")"; } currencyComboBox2.addItem(loopItem); } } } } // Enable the OpenExchangeRates App ID if required. boolean showOER = ExchangeData.OPEN_EXCHANGE_RATES_EXCHANGE_NAME .equalsIgnoreCase(exchangeShortName) || ExchangeData.OPEN_EXCHANGE_RATES_EXCHANGE_NAME .equalsIgnoreCase((String) exchangeComboBox1.getSelectedItem()); oerStent.setVisible(showOER); oerApiCodeLabel.setVisible(showOER); oerApiCodeTextField.setVisible(showOER); getOerAppIdButton.setVisible(showOER); boolean showMessageLabel = isBrowserSupported() && ExchangeData.OPEN_EXCHANGE_RATES_EXCHANGE_NAME.equalsIgnoreCase(exchangeShortName) && (oerApiCodeTextField.getText() == null || oerApiCodeTextField.getText().trim().length() == 0); oerMessageLabel2.setVisible(showMessageLabel); } } }); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 4; constraints.gridy = 22; constraints.weightx = 0.8; constraints.weighty = 0.6; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(exchangeComboBox2, constraints); oerMessageLabel2 = new MultiBitLabel( " " + controller.getLocaliser().getString("showPreferencesPanel.getAppId.label")); oerMessageLabel2.setForeground(Color.GREEN.darker().darker()); boolean showMessageLabel2 = isBrowserSupported() && ExchangeData.OPEN_EXCHANGE_RATES_EXCHANGE_NAME.equalsIgnoreCase(exchangeToUse2) && (originalOERApiCode == null || originalOERApiCode.trim().length() == 0); oerMessageLabel2.setVisible(showMessageLabel2); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 5; constraints.gridy = 22; constraints.weightx = 0.8; constraints.weighty = 0.6; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(oerMessageLabel2, constraints); currencyLabel2 = new MultiBitLabel( controller.getLocaliser().getString("showPreferencesPanel.ticker.currency")); currencyLabel2.setHorizontalAlignment(JLabel.TRAILING); constraints.fill = GridBagConstraints.HORIZONTAL; constraints.gridx = 1; constraints.gridy = 23; constraints.weightx = 0.3; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_END; tickerPanel.add(currencyLabel2, constraints); // Make sure the exchange2 has been created and initialised the list of // currencies. if (mainFrame != null && mainFrame.getTickerTimerTask2() != null) { TickerTimerTask tickerTimerTask = mainFrame.getTickerTimerTask2(); synchronized (tickerTimerTask) { if (tickerTimerTask.getExchange() == null) { tickerTimerTask.createExchangeObjects(exchangeToUse2); } } } currencyComboBox2 = new JComboBox(); currenciesToUse = ExchangeData.getAvailableCurrenciesForExchange(exchangeToUse2); if (currenciesToUse != null) { for (String currency : currenciesToUse) { String loopItem = currency; String description = CurrencyConverter.INSTANCE.getCurrencyCodeToDescriptionMap().get(currency); if (description != null && description.trim().length() > 0) { loopItem = loopItem + " (" + description + ")"; } currencyComboBox2.addItem(loopItem); if (currency.equals(originalCurrency2)) { currencyComboBox2.setSelectedItem(loopItem); } } } currencyComboBox2.setFont(FontSizer.INSTANCE.getAdjustedDefaultFont()); currencyComboBox2.setOpaque(false); currencyComboBox2.setPreferredSize(preferredSize); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 4; constraints.gridy = 23; constraints.weightx = 0.8; constraints.weighty = 0.6; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(currencyComboBox2, constraints); showSecondRowCheckBox.setSelected(originalShowSecondRow); enableTickerSecondRow(originalShowSecondRow); constraints.fill = GridBagConstraints.BOTH; constraints.gridx = 1; constraints.gridy = 24; constraints.weightx = 0.3; constraints.weighty = 0.3; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(MultiBitTitledPanel.createStent(12, 12), constraints); JPanel fill1 = new JPanel(); fill1.setOpaque(false); constraints.fill = GridBagConstraints.BOTH; constraints.gridx = 5; constraints.gridy = 25; constraints.weightx = 20; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_END; tickerPanel.add(fill1, constraints); boolean showOerSignup = ExchangeData.OPEN_EXCHANGE_RATES_EXCHANGE_NAME.equalsIgnoreCase(exchangeToUse1) || ExchangeData.OPEN_EXCHANGE_RATES_EXCHANGE_NAME.equalsIgnoreCase(exchangeToUse2); oerStent = MultiBitTitledPanel.createStent(12, 12); constraints.fill = GridBagConstraints.BOTH; constraints.gridx = 1; constraints.gridy = 26; constraints.weightx = 0.3; constraints.weighty = 0.3; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; oerStent.setVisible(showOerSignup); tickerPanel.add(oerStent, constraints); oerApiCodeLabel = new MultiBitLabel( controller.getLocaliser().getString("showPreferencesPanel.oerLabel.text")); oerApiCodeLabel.setToolTipText(HelpContentsPanel .createTooltipText(controller.getLocaliser().getString("showPreferencesPanel.oerLabel.tooltip"))); oerApiCodeLabel.setVisible(showOerSignup); oerApiCodeTextField = new MultiBitTextField("", 25, controller); oerApiCodeTextField.setHorizontalAlignment(JLabel.LEADING); oerApiCodeTextField.setMinimumSize(new Dimension(API_CODE_FIELD_WIDTH, API_CODE_FIELD_HEIGHT)); oerApiCodeTextField.setPreferredSize(new Dimension(API_CODE_FIELD_WIDTH, API_CODE_FIELD_HEIGHT)); oerApiCodeTextField.setMaximumSize(new Dimension(API_CODE_FIELD_WIDTH, API_CODE_FIELD_HEIGHT)); oerApiCodeTextField.setVisible(showOerSignup); oerApiCodeTextField.setText(originalOERApiCode); oerApiCodeTextField.addFocusListener(new FocusListener() { @Override public void focusGained(FocusEvent arg0) { } @Override public void focusLost(FocusEvent arg0) { String apiCode = oerApiCodeTextField.getText(); if (apiCode != null && !(WhitespaceTrimmer.trim(apiCode).length() == 0) && !apiCode.equals( controller.getModel().getUserPreference(ExchangeModel.OPEN_EXCHANGE_RATES_API_CODE))) { // New API code. // Check its length if (!(apiCode.trim().length() == LENGTH_OF_OPEN_EXCHANGE_RATE_APP_ID) && !apiCode.equals(haveShownErrorMessageForApiCode)) { haveShownErrorMessageForApiCode = apiCode; // Give user a message that App ID is not in the correct format. JOptionPane.showMessageDialog(null, new String[] { controller .getLocaliser().getString("showPreferencesPanel.oerValidationError.text1"), " ", controller.getLocaliser() .getString("showPreferencesPanel.oerValidationError.text2"), controller.getLocaliser() .getString("showPreferencesPanel.oerValidationError.text3") }, controller.getLocaliser().getString( "showPreferencesPanel.oerValidationError.title"), JOptionPane.ERROR_MESSAGE, ImageLoader.createImageIcon(ImageLoader.EXCLAMATION_MARK_ICON_FILE)); return; } } updateApiCode(); } }); oerApiCodeTextField.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { String apiCode = oerApiCodeTextField.getText(); if (apiCode != null && !(WhitespaceTrimmer.trim(apiCode).length() == 0) && !apiCode.equals( controller.getModel().getUserPreference(ExchangeModel.OPEN_EXCHANGE_RATES_API_CODE))) { // New API code. // Check its length if (!(apiCode.trim().length() == LENGTH_OF_OPEN_EXCHANGE_RATE_APP_ID) && !apiCode.equals(haveShownErrorMessageForApiCode)) { haveShownErrorMessageForApiCode = apiCode; // Give user a message that App ID is not in the correct format. JOptionPane.showMessageDialog(null, new String[] { controller.getLocaliser() .getString("showPreferencesPanel.oerValidationError.text1"), controller.getLocaliser() .getString("showPreferencesPanel.oerValidationError.text2"), controller.getLocaliser() .getString("showPreferencesPanel.oerValidationError.text3") }, controller.getLocaliser().getString( "showPreferencesPanel.oerValidationError.title"), JOptionPane.ERROR_MESSAGE, ImageLoader.createImageIcon(ImageLoader.EXCLAMATION_MARK_ICON_FILE)); return; } } updateApiCode(); } }); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 1; constraints.gridy = 27; constraints.weightx = 0.3; constraints.weighty = 0.3; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_END; tickerPanel.add(oerApiCodeLabel, constraints); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 4; constraints.gridy = 27; constraints.weightx = 0.3; constraints.weighty = 0.3; constraints.gridwidth = 2; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(oerApiCodeTextField, constraints); if (isBrowserSupported()) { getOerAppIdButton = new MultiBitButton( controller.getLocaliser().getString("showPreferencesPanel.getAppId.text")); getOerAppIdButton .setToolTipText(controller.getLocaliser().getString("showPreferencesPanel.getAppId.tooltip")); getOerAppIdButton.setVisible(showOerSignup); getOerAppIdButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { try { openURI(new URI(OPEN_EXCHANGE_RATES_SIGN_UP_URI)); } catch (URISyntaxException e) { log.debug(e.getMessage()); } } }); constraints.fill = GridBagConstraints.NONE; constraints.gridx = 4; constraints.gridy = 28; constraints.weightx = 1; constraints.weighty = 1; constraints.gridwidth = 1; constraints.anchor = GridBagConstraints.LINE_START; tickerPanel.add(getOerAppIdButton, constraints); } return tickerPanel; }
From source file:edu.harvard.mcz.imagecapture.SpecimenDetailsViewPane.java
/** * This method initializes jPanel, laying out the UI components. * //w ww . j a v a2 s .co m * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { GridBagConstraints gridBagConstraintsImgCount = new GridBagConstraints(); gridBagConstraintsImgCount.fill = GridBagConstraints.BOTH; gridBagConstraintsImgCount.gridy = 6; gridBagConstraintsImgCount.weightx = 1.0; gridBagConstraintsImgCount.anchor = GridBagConstraints.WEST; gridBagConstraintsImgCount.gridwidth = 4; gridBagConstraintsImgCount.insets = new Insets(0, 3, 5, 0); gridBagConstraintsImgCount.ipadx = 3; gridBagConstraintsImgCount.gridx = 4; GridBagConstraints gridBagConstraints124 = new GridBagConstraints(); gridBagConstraints124.insets = new Insets(0, 0, 0, 5); gridBagConstraints124.gridx = 0; gridBagConstraints124.anchor = GridBagConstraints.EAST; gridBagConstraints124.gridy = 20; GridBagConstraints gridBagConstraints38 = new GridBagConstraints(); gridBagConstraints38.insets = new Insets(0, 0, 0, 5); gridBagConstraints38.gridx = 0; gridBagConstraints38.anchor = GridBagConstraints.EAST; gridBagConstraints38.gridy = 27; GridBagConstraints gridBagConstraints215 = new GridBagConstraints(); gridBagConstraints215.insets = new Insets(0, 0, 0, 5); gridBagConstraints215.gridx = 0; gridBagConstraints215.anchor = GridBagConstraints.EAST; gridBagConstraints215.gridy = 26; GridBagConstraints gridBagConstraints120 = new GridBagConstraints(); gridBagConstraints120.insets = new Insets(0, 0, 0, 5); gridBagConstraints120.gridx = 3; gridBagConstraints120.weightx = 1.0; gridBagConstraints120.gridy = 25; jLabel44 = new JLabel(); jLabel44.setText("yyyy/mm/dd"); GridBagConstraints gridBagConstraints49 = new GridBagConstraints(); gridBagConstraints49.insets = new Insets(0, 0, 0, 0); gridBagConstraints49.fill = GridBagConstraints.BOTH; gridBagConstraints49.weighty = 1.0; gridBagConstraints49.weightx = 1.0; gridBagConstraints49.gridx = 1; gridBagConstraints49.gridwidth = 7; gridBagConstraints49.gridy = 35; GridBagConstraints gridBagConstraints214 = new GridBagConstraints(); gridBagConstraints214.gridwidth = 3; gridBagConstraints214.insets = new Insets(0, 0, 0, 5); gridBagConstraints214.anchor = GridBagConstraints.EAST; gridBagConstraints214.gridx = 4; gridBagConstraints214.gridy = 42; gridBagConstraints214.weightx = 0.0; gridBagConstraints214.weighty = 0.0; gridBagConstraints214.fill = GridBagConstraints.NONE; GridBagConstraints gridBagConstraints119 = new GridBagConstraints(); gridBagConstraints119.insets = new Insets(0, 0, 0, 0); gridBagConstraints119.anchor = GridBagConstraints.WEST; gridBagConstraints119.gridx = 7; gridBagConstraints119.gridy = 42; gridBagConstraints119.weightx = 0.0; gridBagConstraints119.weighty = 0.0; gridBagConstraints119.fill = GridBagConstraints.NONE; GridBagConstraints gridBagConstraints213 = new GridBagConstraints(); gridBagConstraints213.insets = new Insets(0, 0, 0, 0); gridBagConstraints213.fill = GridBagConstraints.BOTH; gridBagConstraints213.gridy = 31; gridBagConstraints213.weightx = 0.0; gridBagConstraints213.gridwidth = 7; gridBagConstraints213.anchor = GridBagConstraints.WEST; gridBagConstraints213.gridx = 1; GridBagConstraints gridBagConstraints118 = new GridBagConstraints(); gridBagConstraints118.insets = new Insets(0, 0, 0, 5); gridBagConstraints118.gridx = 0; gridBagConstraints118.anchor = GridBagConstraints.EAST; gridBagConstraints118.gridwidth = 1; gridBagConstraints118.gridy = 31; jLabel31 = new JLabel(); jLabel31.setText("Publications"); GridBagConstraints gridBagConstraints212 = new GridBagConstraints(); gridBagConstraints212.insets = new Insets(0, 0, 0, 5); gridBagConstraints212.gridx = 3; gridBagConstraints212.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints212.gridwidth = 4; gridBagConstraints212.gridy = 15; GridBagConstraints gridBagConstraints117 = new GridBagConstraints(); gridBagConstraints117.insets = new Insets(0, 0, 0, 0); gridBagConstraints117.fill = GridBagConstraints.BOTH; gridBagConstraints117.gridy = 25; gridBagConstraints117.weightx = 0.0; gridBagConstraints117.gridwidth = 4; gridBagConstraints117.anchor = GridBagConstraints.WEST; gridBagConstraints117.gridx = 4; GridBagConstraints gridBagConstraints211 = new GridBagConstraints(); gridBagConstraints211.insets = new Insets(0, 0, 0, 5); gridBagConstraints211.gridx = 3; gridBagConstraints211.gridwidth = 4; gridBagConstraints211.weighty = 1.0; gridBagConstraints211.gridy = 44; GridBagConstraints gridBagConstraintsMS = new GridBagConstraints(); gridBagConstraintsMS.fill = GridBagConstraints.BOTH; gridBagConstraintsMS.gridx = 0; gridBagConstraintsMS.gridwidth = 8; gridBagConstraintsMS.weighty = 1.0; gridBagConstraintsMS.gridy = 45; gridBagConstraintsMS.gridx = 0; GridBagConstraints gridBagConstraints116 = new GridBagConstraints(); gridBagConstraints116.gridwidth = 3; gridBagConstraints116.insets = new Insets(0, 0, 0, 5); gridBagConstraints116.gridx = 4; gridBagConstraints116.anchor = GridBagConstraints.EAST; gridBagConstraints116.gridy = 41; GridBagConstraints gridBagConstraintsInfer = new GridBagConstraints(); gridBagConstraintsInfer.insets = new Insets(0, 0, 0, 0); gridBagConstraintsInfer.fill = GridBagConstraints.BOTH; gridBagConstraintsInfer.gridy = 36; gridBagConstraintsInfer.weightx = 1.0; gridBagConstraintsInfer.anchor = GridBagConstraints.WEST; gridBagConstraintsInfer.gridwidth = 7; gridBagConstraintsInfer.gridx = 1; GridBagConstraints gridBagConstraints56 = new GridBagConstraints(); gridBagConstraints56.insets = new Insets(0, 0, 0, 5); gridBagConstraints56.gridx = 0; gridBagConstraints56.anchor = GridBagConstraints.EAST; gridBagConstraints56.gridy = 36; jLabel43 = new JLabel(); jLabel43.setText("Inferences"); GridBagConstraints gridBagConstraints48 = new GridBagConstraints(); gridBagConstraints48.insets = new Insets(0, 0, 0, 0); gridBagConstraints48.fill = GridBagConstraints.VERTICAL; gridBagConstraints48.gridy = 0; gridBagConstraints48.weightx = 1.0; gridBagConstraints48.anchor = GridBagConstraints.WEST; gridBagConstraints48.gridwidth = 4; gridBagConstraints48.gridx = 4; GridBagConstraints gridBagConstraints37 = new GridBagConstraints(); gridBagConstraints37.insets = new Insets(0, 0, 0, 5); gridBagConstraints37.fill = GridBagConstraints.VERTICAL; gridBagConstraints37.gridx = 3; gridBagConstraints37.anchor = GridBagConstraints.EAST; gridBagConstraints37.gridy = 0; jLabel42 = new JLabel(); jLabel42.setText("Collection"); GridBagConstraints gridBagConstraints29 = new GridBagConstraints(); gridBagConstraints29.insets = new Insets(0, 0, 0, 5); gridBagConstraints29.fill = GridBagConstraints.BOTH; gridBagConstraints29.gridy = 41; gridBagConstraints29.weightx = 1.0; gridBagConstraints29.anchor = GridBagConstraints.WEST; gridBagConstraints29.gridwidth = 3; gridBagConstraints29.gridx = 1; GridBagConstraints gridBagConstraints115 = new GridBagConstraints(); gridBagConstraints115.insets = new Insets(0, 0, 0, 5); gridBagConstraints115.gridx = 0; gridBagConstraints115.gridy = 41; jLabel41 = new JLabel(); jLabel41.setText("Workflow Status"); GridBagConstraints gridBagConstraints172 = new GridBagConstraints(); gridBagConstraints172.insets = new Insets(0, 0, 0, 0); gridBagConstraints172.fill = GridBagConstraints.BOTH; gridBagConstraints172.gridy = 33; gridBagConstraints172.weightx = 1.0; gridBagConstraints172.anchor = GridBagConstraints.WEST; gridBagConstraints172.gridwidth = 4; gridBagConstraints172.gridx = 4; GridBagConstraints gridBagConstraints162 = new GridBagConstraints(); gridBagConstraints162.insets = new Insets(0, 0, 0, 5); gridBagConstraints162.fill = GridBagConstraints.BOTH; gridBagConstraints162.gridy = 33; gridBagConstraints162.weightx = 1.0; gridBagConstraints162.anchor = GridBagConstraints.WEST; gridBagConstraints162.gridwidth = 2; gridBagConstraints162.gridx = 1; GridBagConstraints gridBagConstraints142 = new GridBagConstraints(); gridBagConstraints142.insets = new Insets(0, 0, 0, 5); gridBagConstraints142.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints142.gridy = 42; gridBagConstraints142.weightx = 1.0; gridBagConstraints142.anchor = GridBagConstraints.NORTHWEST; gridBagConstraints142.gridwidth = 3; gridBagConstraints142.ipady = 2; gridBagConstraints142.gridx = 1; GridBagConstraints gridBagConstraints133 = new GridBagConstraints(); gridBagConstraints133.insets = new Insets(0, 0, 0, 5); gridBagConstraints133.gridx = 0; gridBagConstraints133.anchor = GridBagConstraints.NORTHEAST; gridBagConstraints133.gridy = 42; jLabel40 = new JLabel(); jLabel40.setText("Questions"); GridBagConstraints gridBagConstraints123 = new GridBagConstraints(); gridBagConstraints123.insets = new Insets(0, 0, 0, 5); gridBagConstraints123.gridx = 3; gridBagConstraints123.anchor = GridBagConstraints.EAST; gridBagConstraints123.gridy = 33; jLabel39 = new JLabel(); jLabel39.setText("Habitat"); GridBagConstraints gridBagConstraints114 = new GridBagConstraints(); gridBagConstraints114.insets = new Insets(0, 0, 0, 5); gridBagConstraints114.gridx = 0; gridBagConstraints114.anchor = GridBagConstraints.EAST; gridBagConstraints114.gridy = 33; jLabel38 = new JLabel(); jLabel38.setText("Associated Taxon"); GridBagConstraints gridBagConstraints94 = new GridBagConstraints(); gridBagConstraints94.gridwidth = 3; gridBagConstraints94.insets = new Insets(0, 0, 0, 5); gridBagConstraints94.gridx = 4; gridBagConstraints94.anchor = GridBagConstraints.WEST; gridBagConstraints94.gridy = 18; jLabel36 = new JLabel(); jLabel36.setText("Valid Dist."); GridBagConstraints gridBagConstraints83 = new GridBagConstraints(); gridBagConstraints83.gridx = 3; gridBagConstraints83.anchor = GridBagConstraints.EAST; gridBagConstraints83.insets = new Insets(0, 0, 0, 5); gridBagConstraints83.weightx = 1.0; gridBagConstraints83.gridy = 18; GridBagConstraints gridBagConstraints65 = new GridBagConstraints(); gridBagConstraints65.insets = new Insets(0, 0, 0, 5); gridBagConstraints65.gridx = 0; gridBagConstraints65.anchor = GridBagConstraints.NORTHEAST; gridBagConstraints65.gridy = 35; jLabel35 = new JLabel(); jLabel35.setText("Specimen Notes"); GridBagConstraints gridBagConstraints47 = new GridBagConstraints(); gridBagConstraints47.insets = new Insets(0, 0, 0, 5); gridBagConstraints47.gridx = 0; gridBagConstraints47.fill = GridBagConstraints.VERTICAL; gridBagConstraints47.ipady = 12; gridBagConstraints47.gridy = 5; jLabel34 = new JLabel(); jLabel34.setText(" "); GridBagConstraints gridBagConstraints19 = new GridBagConstraints(); gridBagConstraints19.insets = new Insets(0, 0, 0, 0); gridBagConstraints19.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints19.gridy = 23; gridBagConstraints19.weightx = 1.0; gridBagConstraints19.anchor = GridBagConstraints.NORTH; gridBagConstraints19.gridwidth = 5; gridBagConstraints19.gridx = 3; GridBagConstraints gridBagConstraints18 = new GridBagConstraints(); gridBagConstraints18.insets = new Insets(0, 0, 0, 5); gridBagConstraints18.fill = GridBagConstraints.BOTH; gridBagConstraints18.gridy = 19; gridBagConstraints18.weightx = 1.0; gridBagConstraints18.anchor = GridBagConstraints.WEST; gridBagConstraints18.gridx = 4; GridBagConstraints gbc_jLabelElevation = new GridBagConstraints(); gbc_jLabelElevation.insets = new Insets(0, 0, 0, 5); gbc_jLabelElevation.gridx = 3; gbc_jLabelElevation.anchor = GridBagConstraints.EAST; gbc_jLabelElevation.gridy = 19; jLabelElevation = new JLabel(); jLabelElevation.setText("Elevation"); jLabel25 = new JLabel(); jLabel25.setText("Text"); jLabel26 = new JLabel(); jLabel26.setText("Text"); jLabel28 = new JLabel(); jLabel28.setText("Rank"); GridBagConstraints gridBagConstraints161 = new GridBagConstraints(); gridBagConstraints161.gridx = 0; GridBagConstraints gridBagConstraints151 = new GridBagConstraints(); gridBagConstraints151.insets = new Insets(0, 0, 0, 5); gridBagConstraints151.fill = GridBagConstraints.BOTH; gridBagConstraints151.gridy = 27; gridBagConstraints151.weightx = 1.0; gridBagConstraints151.gridx = 1; GridBagConstraints gridBagConstraints141 = new GridBagConstraints(); gridBagConstraints141.insets = new Insets(0, 0, 0, 5); gridBagConstraints141.fill = GridBagConstraints.BOTH; gridBagConstraints141.gridy = 26; gridBagConstraints141.weightx = 1.0; gridBagConstraints141.gridx = 1; GridBagConstraints gridBagConstraints132 = new GridBagConstraints(); gridBagConstraints132.gridwidth = 3; gridBagConstraints132.insets = new Insets(0, 0, 0, 5); gridBagConstraints132.fill = GridBagConstraints.BOTH; gridBagConstraints132.gridy = 27; gridBagConstraints132.weightx = 1.0; gridBagConstraints132.gridx = 4; GridBagConstraints gridBagConstraints122 = new GridBagConstraints(); gridBagConstraints122.gridwidth = 3; gridBagConstraints122.insets = new Insets(0, 0, 0, 5); gridBagConstraints122.fill = GridBagConstraints.BOTH; gridBagConstraints122.gridy = 26; gridBagConstraints122.weightx = 1.0; gridBagConstraints122.gridx = 4; GridBagConstraints gridBagConstraints113 = new GridBagConstraints(); gridBagConstraints113.insets = new Insets(0, 0, 0, 5); gridBagConstraints113.gridx = 3; gridBagConstraints113.anchor = GridBagConstraints.EAST; gridBagConstraints113.gridy = 27; GridBagConstraints gridBagConstraints103 = new GridBagConstraints(); gridBagConstraints103.insets = new Insets(0, 0, 0, 5); gridBagConstraints103.gridx = 3; gridBagConstraints103.anchor = GridBagConstraints.EAST; gridBagConstraints103.gridy = 26; GridBagConstraints gridBagConstraints93 = new GridBagConstraints(); gridBagConstraints93.insets = new Insets(0, 0, 0, 5); gridBagConstraints93.fill = GridBagConstraints.BOTH; gridBagConstraints93.gridy = 12; gridBagConstraints93.weightx = 1.0; gridBagConstraints93.gridx = 1; GridBagConstraints gridBagConstraints84 = new GridBagConstraints(); gridBagConstraints84.gridwidth = 3; gridBagConstraints84.fill = GridBagConstraints.BOTH; gridBagConstraints84.gridy = 12; gridBagConstraints84.weightx = 1.0; gridBagConstraints84.anchor = GridBagConstraints.WEST; gridBagConstraints84.insets = new Insets(0, 0, 0, 5); gridBagConstraints84.gridx = 4; GridBagConstraints gridBagConstraints74 = new GridBagConstraints(); gridBagConstraints74.insets = new Insets(0, 0, 0, 5); gridBagConstraints74.gridx = 3; gridBagConstraints74.anchor = GridBagConstraints.EAST; gridBagConstraints74.weightx = 0.0; gridBagConstraints74.gridy = 12; // GridBagConstraints gridBagConstraints64 = new GridBagConstraints(); // gridBagConstraints64.fill = GridBagConstraints.BOTH; // gridBagConstraints64.gridy = 14; // gridBagConstraints64.weightx = 1.0; // gridBagConstraints64.gridx = 3; GridBagConstraints gridBagConstraints55 = new GridBagConstraints(); gridBagConstraints55.gridx = 2; gridBagConstraints55.gridy = 14; //jLabel31 = new JLabel(); //jLabel31.setText("Qual."); GridBagConstraints gridBagConstraints46 = new GridBagConstraints(); gridBagConstraints46.insets = new Insets(0, 0, 0, 5); gridBagConstraints46.fill = GridBagConstraints.BOTH; gridBagConstraints46.gridy = 14; gridBagConstraints46.weightx = 1.0; gridBagConstraints46.anchor = GridBagConstraints.WEST; gridBagConstraints46.gridx = 1; gridBagConstraints46.gridwidth = 2; GridBagConstraints gridBagConstraints36 = new GridBagConstraints(); gridBagConstraints36.insets = new Insets(0, 0, 0, 5); gridBagConstraints36.gridx = 0; gridBagConstraints36.anchor = GridBagConstraints.EAST; gridBagConstraints36.gridy = 14; jLabel30 = new JLabel(); jLabel30.setText("Unnamed Form"); GridBagConstraints gridBagConstraints210 = new GridBagConstraints(); gridBagConstraints210.insets = new Insets(0, 0, 0, 5); gridBagConstraints210.fill = GridBagConstraints.BOTH; gridBagConstraints210.gridy = 13; gridBagConstraints210.weightx = 1.0; gridBagConstraints210.anchor = GridBagConstraints.WEST; gridBagConstraints210.gridwidth = 2; gridBagConstraints210.gridx = 1; GridBagConstraints gridBagConstraints112 = new GridBagConstraints(); gridBagConstraints112.insets = new Insets(0, 0, 0, 5); gridBagConstraints112.gridx = 0; gridBagConstraints112.anchor = GridBagConstraints.EAST; gridBagConstraints112.gridy = 13; jLabel29 = new JLabel(); jLabel29.setText("Author"); GridBagConstraints gridBagConstraints110 = new GridBagConstraints(); gridBagConstraints110.insets = new Insets(0, 0, 0, 5); gridBagConstraints110.gridx = 0; gridBagConstraints110.gridy = 12; jLabel27 = new JLabel(); jLabel27.setText("Infrasubspecifc Name"); GridBagConstraints gridBagConstraints63 = new GridBagConstraints(); gridBagConstraints63.insets = new Insets(0, 0, 0, 5); gridBagConstraints63.fill = GridBagConstraints.BOTH; gridBagConstraints63.gridy = 25; gridBagConstraints63.weightx = 1.0; gridBagConstraints63.anchor = GridBagConstraints.WEST; gridBagConstraints63.gridx = 1; GridBagConstraints gridBagConstraints35 = new GridBagConstraints(); gridBagConstraints35.insets = new Insets(0, 0, 0, 5); gridBagConstraints35.gridx = 0; gridBagConstraints35.anchor = GridBagConstraints.EAST; gridBagConstraints35.gridy = 25; jLabel22 = new JLabel(); jLabel22.setText("Verbatim Date"); GridBagConstraints gridBagConstraints27 = new GridBagConstraints(); gridBagConstraints27.insets = new Insets(0, 0, 0, 5); gridBagConstraints27.fill = GridBagConstraints.BOTH; gridBagConstraints27.gridy = 30; gridBagConstraints27.weightx = 1.0; gridBagConstraints27.anchor = GridBagConstraints.WEST; gridBagConstraints27.gridx = 1; GridBagConstraints gridBagConstraints102 = new GridBagConstraints(); gridBagConstraints102.insets = new Insets(0, 0, 0, 0); gridBagConstraints102.fill = GridBagConstraints.VERTICAL; gridBagConstraints102.gridy = 30; gridBagConstraints102.weightx = 1.0; gridBagConstraints102.anchor = GridBagConstraints.WEST; gridBagConstraints102.gridwidth = 4; gridBagConstraints102.gridx = 4; GridBagConstraints gridBagConstraints92 = new GridBagConstraints(); gridBagConstraints92.insets = new Insets(0, 0, 0, 5); gridBagConstraints92.gridx = 3; gridBagConstraints92.anchor = GridBagConstraints.EAST; gridBagConstraints92.gridy = 30; jLabel21 = new JLabel(); jLabel21.setText("Sex"); GridBagConstraints gridBagConstraints82 = new GridBagConstraints(); gridBagConstraints82.insets = new Insets(0, 0, 0, 5); gridBagConstraints82.gridx = 0; gridBagConstraints82.anchor = GridBagConstraints.EAST; gridBagConstraints82.gridy = 30; jLabel20 = new JLabel(); jLabel20.setText("LifeStage"); GridBagConstraints gridBagConstraints62 = new GridBagConstraints(); gridBagConstraints62.insets = new Insets(0, 0, 0, 0); gridBagConstraints62.fill = GridBagConstraints.BOTH; gridBagConstraints62.gridy = 7; gridBagConstraints62.weightx = 1.0; gridBagConstraints62.anchor = GridBagConstraints.WEST; gridBagConstraints62.gridwidth = 4; gridBagConstraints62.gridx = 4; GridBagConstraints gridBagConstraints53 = new GridBagConstraints(); gridBagConstraints53.insets = new Insets(0, 0, 0, 5); gridBagConstraints53.fill = GridBagConstraints.BOTH; gridBagConstraints53.gridy = 7; gridBagConstraints53.weightx = 1.0; gridBagConstraints53.anchor = GridBagConstraints.WEST; gridBagConstraints53.gridwidth = 1; gridBagConstraints53.gridx = 1; GridBagConstraints gridBagConstraints44 = new GridBagConstraints(); gridBagConstraints44.insets = new Insets(0, 0, 0, 5); gridBagConstraints44.fill = GridBagConstraints.BOTH; gridBagConstraints44.gridy = 6; gridBagConstraints44.weightx = 1.0; gridBagConstraints44.anchor = GridBagConstraints.WEST; gridBagConstraints44.gridwidth = 3; gridBagConstraints44.gridx = 1; GridBagConstraints gbc_jLabelTribe = new GridBagConstraints(); gbc_jLabelTribe.insets = new Insets(0, 0, 0, 5); gbc_jLabelTribe.gridx = 3; gbc_jLabelTribe.anchor = GridBagConstraints.EAST; gbc_jLabelTribe.gridy = 7; jLabelTribe = new JLabel(); jLabelTribe.setText("Tribe"); GridBagConstraints gridBagConstraints26 = new GridBagConstraints(); gridBagConstraints26.insets = new Insets(0, 0, 0, 5); gridBagConstraints26.gridx = 0; gridBagConstraints26.anchor = GridBagConstraints.EAST; gridBagConstraints26.gridy = 7; jLabel17 = new JLabel(); jLabel17.setText("Subfamily"); GridBagConstraints gridBagConstraints16 = new GridBagConstraints(); gridBagConstraints16.insets = new Insets(0, 0, 0, 5); gridBagConstraints16.gridx = 0; gridBagConstraints16.anchor = GridBagConstraints.EAST; gridBagConstraints16.gridy = 6; jLabel16 = new JLabel(); jLabel16.setText("Family"); GridBagConstraints gridBagConstraints131 = new GridBagConstraints(); gridBagConstraints131.insets = new Insets(0, 0, 0, 5); gridBagConstraints131.fill = GridBagConstraints.BOTH; gridBagConstraints131.gridy = 19; gridBagConstraints131.weightx = 1.0; gridBagConstraints131.anchor = GridBagConstraints.WEST; gridBagConstraints131.gridwidth = 2; gridBagConstraints131.gridx = 1; GridBagConstraints gridBagConstraints121 = new GridBagConstraints(); gridBagConstraints121.insets = new Insets(0, 0, 0, 5); gridBagConstraints121.fill = GridBagConstraints.BOTH; gridBagConstraints121.gridy = 18; gridBagConstraints121.weightx = 1.0; gridBagConstraints121.anchor = GridBagConstraints.WEST; gridBagConstraints121.gridwidth = 1; gridBagConstraints121.gridx = 1; GridBagConstraints gridBagConstraints111 = new GridBagConstraints(); gridBagConstraints111.insets = new Insets(0, 0, 0, 0); gridBagConstraints111.fill = GridBagConstraints.BOTH; gridBagConstraints111.gridy = 16; gridBagConstraints111.weightx = 1.0; gridBagConstraints111.anchor = GridBagConstraints.WEST; gridBagConstraints111.gridwidth = 7; gridBagConstraints111.gridx = 1; GridBagConstraints gridBagConstraints101 = new GridBagConstraints(); gridBagConstraints101.insets = new Insets(0, 0, 0, 5); gridBagConstraints101.gridx = 0; gridBagConstraints101.anchor = GridBagConstraints.EAST; gridBagConstraints101.gridy = 19; jLabel15 = new JLabel(); jLabel15.setText("State/Province"); GridBagConstraints gridBagConstraints91 = new GridBagConstraints(); gridBagConstraints91.insets = new Insets(0, 0, 0, 5); gridBagConstraints91.gridx = 0; gridBagConstraints91.anchor = GridBagConstraints.EAST; gridBagConstraints91.gridy = 18; jLabel14 = new JLabel(); jLabel14.setText("Country"); GridBagConstraints gridBagConstraints81 = new GridBagConstraints(); gridBagConstraints81.insets = new Insets(0, 0, 0, 5); gridBagConstraints81.gridx = 0; gridBagConstraints81.anchor = GridBagConstraints.EAST; gridBagConstraints81.gridy = 16; jLabel13 = new JLabel(); jLabel13.setText("Verbatim Locality"); GridBagConstraints gridBagConstraints71 = new GridBagConstraints(); gridBagConstraints71.insets = new Insets(0, 0, 0, 5); gridBagConstraints71.fill = GridBagConstraints.BOTH; gridBagConstraints71.gridy = 15; gridBagConstraints71.weightx = 1.0; gridBagConstraints71.anchor = GridBagConstraints.WEST; gridBagConstraints71.gridx = 1; GridBagConstraints gridBagConstraints61 = new GridBagConstraints(); gridBagConstraints61.insets = new Insets(0, 0, 0, 5); gridBagConstraints61.gridx = 0; gridBagConstraints61.anchor = GridBagConstraints.EAST; gridBagConstraints61.gridy = 15; jLabel12 = new JLabel(); jLabel12.setText("DrawerNumber"); GridBagConstraints gridBagConstraints52 = new GridBagConstraints(); gridBagConstraints52.insets = new Insets(0, 0, 0, 0); gridBagConstraints52.fill = GridBagConstraints.BOTH; gridBagConstraints52.gridy = 43; gridBagConstraints52.weightx = 1.0; gridBagConstraints52.weighty = 1.0; gridBagConstraints52.gridwidth = 8; gridBagConstraints52.gridx = 0; GridBagConstraints gridBagConstraints43 = new GridBagConstraints(); gridBagConstraints43.gridheight = 2; gridBagConstraints43.gridx = 0; gridBagConstraints43.anchor = GridBagConstraints.NORTHEAST; gridBagConstraints43.ipady = 0; gridBagConstraints43.insets = new Insets(0, 0, 0, 5); gridBagConstraints43.gridy = 23; GridBagConstraints gridBagConstraints33 = new GridBagConstraints(); gridBagConstraints33.insets = new Insets(0, 0, 0, 5); gridBagConstraints33.gridx = 0; gridBagConstraints33.anchor = GridBagConstraints.NORTHEAST; gridBagConstraints33.gridy = 4; GridBagConstraints gridBagConstraints25 = new GridBagConstraints(); gridBagConstraints25.insets = new Insets(0, 0, 0, 5); gridBagConstraints25.fill = GridBagConstraints.BOTH; gridBagConstraints25.gridy = 3; gridBagConstraints25.weightx = 1.0; gridBagConstraints25.weighty = 0.0; gridBagConstraints25.gridheight = 3; gridBagConstraints25.gridwidth = 6; gridBagConstraints25.gridx = 1; GridBagConstraints gridBagConstraints15 = new GridBagConstraints(); gridBagConstraints15.insets = new Insets(0, 0, 0, 5); gridBagConstraints15.gridx = 0; gridBagConstraints15.anchor = GridBagConstraints.NORTHEAST; gridBagConstraints15.gridy = 3; jLabel11 = new JLabel(); jLabel11.setText("Numbers"); GridBagConstraints gridBagConstraints42 = new GridBagConstraints(); gridBagConstraints42.insets = new Insets(0, 0, 0, 5); gridBagConstraints42.gridx = 3; gridBagConstraints42.anchor = GridBagConstraints.EAST; gridBagConstraints42.gridy = 37; jLabel10 = new JLabel(); jLabel10.setText("Date Created"); GridBagConstraints gridBagConstraints32 = new GridBagConstraints(); gridBagConstraints32.insets = new Insets(0, 0, 0, 0); gridBagConstraints32.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints32.gridy = 37; gridBagConstraints32.weightx = 1.0; gridBagConstraints32.anchor = GridBagConstraints.WEST; gridBagConstraints32.gridwidth = 4; gridBagConstraints32.gridx = 4; GridBagConstraints gridBagConstraints24 = new GridBagConstraints(); gridBagConstraints24.insets = new Insets(0, 0, 0, 5); gridBagConstraints24.gridx = 0; gridBagConstraints24.anchor = GridBagConstraints.EAST; gridBagConstraints24.gridy = 37; jLabel9 = new JLabel(); jLabel9.setText("CreatedBy"); GridBagConstraints gridBagConstraints14 = new GridBagConstraints(); gridBagConstraints14.insets = new Insets(0, 0, 0, 5); gridBagConstraints14.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints14.gridy = 37; gridBagConstraints14.weightx = 1.0; gridBagConstraints14.anchor = GridBagConstraints.WEST; gridBagConstraints14.gridx = 1; GridBagConstraints gridBagConstraints23 = new GridBagConstraints(); gridBagConstraints23.insets = new Insets(0, 0, 0, 0); gridBagConstraints23.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints23.gridy = 39; gridBagConstraints23.weightx = 1.0; gridBagConstraints23.anchor = GridBagConstraints.WEST; gridBagConstraints23.gridwidth = 4; gridBagConstraints23.gridx = 4; GridBagConstraints gridBagConstraints13 = new GridBagConstraints(); gridBagConstraints13.insets = new Insets(0, 0, 0, 5); gridBagConstraints13.gridx = 3; gridBagConstraints13.anchor = GridBagConstraints.EAST; gridBagConstraints13.gridy = 39; jLabel8 = new JLabel(); jLabel8.setText("Last Updated"); GridBagConstraints gridBagConstraints22 = new GridBagConstraints(); gridBagConstraints22.insets = new Insets(0, 0, 0, 5); gridBagConstraints22.gridx = 0; gridBagConstraints22.anchor = GridBagConstraints.NORTHEAST; gridBagConstraints22.gridy = 22; jLabel7 = new JLabel(); jLabel7.setText("Collectors"); GridBagConstraints gridBagConstraints12 = new GridBagConstraints(); gridBagConstraints12.insets = new Insets(0, 0, 0, 5); gridBagConstraints12.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints12.gridy = 39; gridBagConstraints12.weightx = 1.0; gridBagConstraints12.anchor = GridBagConstraints.NORTHWEST; gridBagConstraints12.gridx = 1; GridBagConstraints gridBagConstraints51 = new GridBagConstraints(); gridBagConstraints51.insets = new Insets(0, 0, 0, 5); gridBagConstraints51.fill = GridBagConstraints.BOTH; gridBagConstraints51.gridy = 22; gridBagConstraints51.weightx = 1.0; gridBagConstraints51.anchor = GridBagConstraints.WEST; gridBagConstraints51.gridheight = 3; gridBagConstraints51.gridwidth = 2; gridBagConstraints51.gridx = 1; GridBagConstraints gridBagConstraints41 = new GridBagConstraints(); gridBagConstraints41.insets = new Insets(0, 0, 0, 5); gridBagConstraints41.gridx = 0; gridBagConstraints41.fill = GridBagConstraints.NONE; gridBagConstraints41.anchor = GridBagConstraints.NORTHEAST; gridBagConstraints41.gridy = 39; jLabel6 = new JLabel(); jLabel6.setText("LastUpdatedBy"); GridBagConstraints gridBagConstraints31 = new GridBagConstraints(); gridBagConstraints31.insets = new Insets(0, 0, 0, 5); gridBagConstraints31.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints31.gridy = 21; gridBagConstraints31.weightx = 1.0; gridBagConstraints31.anchor = GridBagConstraints.WEST; gridBagConstraints31.gridwidth = 6; gridBagConstraints31.gridx = 1; GridBagConstraints gridBagConstraints21 = new GridBagConstraints(); gridBagConstraints21.insets = new Insets(0, 0, 0, 5); gridBagConstraints21.gridx = 0; gridBagConstraints21.anchor = GridBagConstraints.SOUTHEAST; gridBagConstraints21.gridy = 21; jLabel5 = new JLabel(); jLabel5.setText("Collection"); GridBagConstraints gridBagConstraints10 = new GridBagConstraints(); gridBagConstraints10.insets = new Insets(0, 0, 0, 0); gridBagConstraints10.gridx = 7; gridBagConstraints10.anchor = GridBagConstraints.NORTHWEST; gridBagConstraints10.gridy = 41; gridBagConstraints10.weighty = 0.0; GridBagConstraints gridBagConstraints9 = new GridBagConstraints(); gridBagConstraints9.insets = new Insets(0, 0, 0, 5); gridBagConstraints9.gridx = 0; gridBagConstraints9.anchor = GridBagConstraints.EAST; gridBagConstraints9.gridy = 11; jLabel4 = new JLabel(); jLabel4.setText("Subspecies"); GridBagConstraints gridBagConstraints8 = new GridBagConstraints(); gridBagConstraints8.insets = new Insets(0, 0, 0, 5); gridBagConstraints8.gridx = 0; gridBagConstraints8.anchor = GridBagConstraints.EAST; gridBagConstraints8.gridy = 10; jLabel3 = new JLabel(); jLabel3.setText("Species"); GridBagConstraints gridBagConstraints7 = new GridBagConstraints(); gridBagConstraints7.insets = new Insets(0, 0, 0, 0); gridBagConstraints7.fill = GridBagConstraints.BOTH; gridBagConstraints7.gridy = 20; gridBagConstraints7.weightx = 1.0; gridBagConstraints7.anchor = GridBagConstraints.WEST; gridBagConstraints7.gridwidth = 7; gridBagConstraints7.gridx = 1; GridBagConstraints gridBagConstraints5 = new GridBagConstraints(); gridBagConstraints5.insets = new Insets(0, 0, 0, 5); gridBagConstraints5.fill = GridBagConstraints.BOTH; gridBagConstraints5.gridy = 11; gridBagConstraints5.weightx = 1.0; gridBagConstraints5.anchor = GridBagConstraints.WEST; gridBagConstraints5.gridwidth = 2; gridBagConstraints5.gridx = 1; GridBagConstraints gridBagConstraints4 = new GridBagConstraints(); gridBagConstraints4.insets = new Insets(0, 0, 0, 5); gridBagConstraints4.fill = GridBagConstraints.BOTH; gridBagConstraints4.gridy = 10; gridBagConstraints4.weightx = 1.0; gridBagConstraints4.anchor = GridBagConstraints.WEST; gridBagConstraints4.gridwidth = 2; gridBagConstraints4.gridx = 1; GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); gridBagConstraints3.insets = new Insets(0, 0, 0, 5); gridBagConstraints3.fill = GridBagConstraints.BOTH; gridBagConstraints3.gridy = 9; gridBagConstraints3.weightx = 1.0; gridBagConstraints3.anchor = GridBagConstraints.WEST; gridBagConstraints3.gridwidth = 2; gridBagConstraints3.gridx = 1; GridBagConstraints gridBagConstraints2 = new GridBagConstraints(); gridBagConstraints2.insets = new Insets(0, 0, 0, 5); gridBagConstraints2.gridx = 0; gridBagConstraints2.anchor = GridBagConstraints.EAST; gridBagConstraints2.gridy = 9; jLabel2 = new JLabel(); jLabel2.setText("Genus"); GridBagConstraints gridBagConstraints11 = new GridBagConstraints(); gridBagConstraints11.gridx = 0; gridBagConstraints11.gridy = 1; GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); gridBagConstraints1.insets = new Insets(0, 0, 0, 5); gridBagConstraints1.fill = GridBagConstraints.BOTH; gridBagConstraints1.gridy = 0; gridBagConstraints1.weightx = 1.0; gridBagConstraints1.anchor = GridBagConstraints.WEST; gridBagConstraints1.gridx = 1; GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.insets = new Insets(0, 0, 0, 5); gridBagConstraints.gridx = 0; gridBagConstraints.anchor = GridBagConstraints.EAST; gridBagConstraints.gridy = 0; jLabel = new JLabel(); jLabel.setText("Barcode"); jPanel = new JPanel(); GridBagLayout gbl_jPanel = new GridBagLayout(); gbl_jPanel.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; gbl_jPanel.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; gbl_jPanel.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; gbl_jPanel.columnWeights = new double[] { 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0 }; jPanel.setLayout(gbl_jPanel); jPanel.add(jLabel, gridBagConstraints); jPanel.add(getJTextFieldBarcode(), gridBagConstraints1); jPanel.add(jLabel2, gridBagConstraints2); jPanel.add(getJTextField1(), gridBagConstraints3); GridBagConstraints gbc_lblNatureofid = new GridBagConstraints(); gbc_lblNatureofid.anchor = GridBagConstraints.EAST; gbc_lblNatureofid.insets = new Insets(0, 0, 0, 5); gbc_lblNatureofid.gridx = 3; gbc_lblNatureofid.gridy = 9; jPanel.add(getLblNatureofid(), gbc_lblNatureofid); jComboBoxNatureOfId = getJComboBoxNatureOfId(); GridBagConstraints gbc_jTextFieldNatureOfID = new GridBagConstraints(); gbc_jTextFieldNatureOfID.gridwidth = 4; gbc_jTextFieldNatureOfID.insets = new Insets(0, 0, 0, 0); gbc_jTextFieldNatureOfID.fill = GridBagConstraints.HORIZONTAL; gbc_jTextFieldNatureOfID.gridx = 4; gbc_jTextFieldNatureOfID.gridy = 9; jPanel.add(jComboBoxNatureOfId, gbc_jTextFieldNatureOfID); jPanel.add(getJTextField12(), gridBagConstraints4); GridBagConstraints gbc_lblIdDate = new GridBagConstraints(); gbc_lblIdDate.anchor = GridBagConstraints.EAST; gbc_lblIdDate.insets = new Insets(0, 0, 0, 5); gbc_lblIdDate.gridx = 3; gbc_lblIdDate.gridy = 10; jPanel.add(getLblIdDate(), gbc_lblIdDate); jTextFieldDateDetermined = getJTextFieldDateDetermined(); GridBagConstraints gbc_jTextFieldDateDetermined = new GridBagConstraints(); gbc_jTextFieldDateDetermined.gridwidth = 4; gbc_jTextFieldDateDetermined.insets = new Insets(0, 0, 0, 0); gbc_jTextFieldDateDetermined.fill = GridBagConstraints.HORIZONTAL; gbc_jTextFieldDateDetermined.gridx = 4; gbc_jTextFieldDateDetermined.gridy = 10; jPanel.add(jTextFieldDateDetermined, gbc_jTextFieldDateDetermined); jTextFieldDateDetermined.setColumns(10); jPanel.add(getJTextField2(), gridBagConstraints5); JLabel lblIdBy = new JLabel("Id By"); GridBagConstraints gbc_lblIdBy = new GridBagConstraints(); gbc_lblIdBy.anchor = GridBagConstraints.EAST; gbc_lblIdBy.insets = new Insets(0, 0, 0, 5); gbc_lblIdBy.gridx = 3; gbc_lblIdBy.gridy = 11; jPanel.add(lblIdBy, gbc_lblIdBy); jCBDeterminer = getJCBDeterminer(); GridBagConstraints gbc_jTextFieldDeterminer = new GridBagConstraints(); gbc_jTextFieldDeterminer.gridwidth = 4; gbc_jTextFieldDeterminer.insets = new Insets(0, 0, 0, 0); gbc_jTextFieldDeterminer.fill = GridBagConstraints.HORIZONTAL; gbc_jTextFieldDeterminer.gridx = 4; gbc_jTextFieldDeterminer.gridy = 11; jPanel.add(jCBDeterminer, gbc_jTextFieldDeterminer); GridBagConstraints gbc_lblIdRemarks = new GridBagConstraints(); gbc_lblIdRemarks.anchor = GridBagConstraints.EAST; gbc_lblIdRemarks.insets = new Insets(0, 0, 0, 5); gbc_lblIdRemarks.gridx = 3; gbc_lblIdRemarks.gridy = 13; jPanel.add(getLblIdRemarks(), gbc_lblIdRemarks); jTextFieldIdRemarks = getJTextFieldIdRemarks(); GridBagConstraints gbc_jTextFieldIdRemarks = new GridBagConstraints(); gbc_jTextFieldIdRemarks.insets = new Insets(0, 0, 0, 0); gbc_jTextFieldIdRemarks.fill = GridBagConstraints.HORIZONTAL; gbc_jTextFieldIdRemarks.gridx = 4; gbc_jTextFieldIdRemarks.gridy = 13; gbc_jTextFieldIdRemarks.gridwidth = 4; jPanel.add(jTextFieldIdRemarks, gbc_jTextFieldIdRemarks); jTextFieldIdRemarks.setColumns(10); GridBagConstraints gbc_lblTypestatus = new GridBagConstraints(); gbc_lblTypestatus.anchor = GridBagConstraints.EAST; gbc_lblTypestatus.insets = new Insets(0, 0, 0, 5); gbc_lblTypestatus.gridx = 3; gbc_lblTypestatus.gridy = 14; jPanel.add(getLblTypestatus(), gbc_lblTypestatus); cbTypeStatus = getCbTypeStatus(); GridBagConstraints gbc_cbTypeStatus = new GridBagConstraints(); gbc_cbTypeStatus.gridwidth = 4; gbc_cbTypeStatus.insets = new Insets(0, 0, 0, 5); gbc_cbTypeStatus.fill = GridBagConstraints.HORIZONTAL; gbc_cbTypeStatus.gridx = 4; gbc_cbTypeStatus.gridy = 14; jPanel.add(cbTypeStatus, gbc_cbTypeStatus); GridBagConstraints gbc_lblHigherGeography = new GridBagConstraints(); gbc_lblHigherGeography.anchor = GridBagConstraints.EAST; gbc_lblHigherGeography.insets = new Insets(0, 0, 0, 5); gbc_lblHigherGeography.gridx = 0; gbc_lblHigherGeography.gridy = 17; jPanel.add(getLblHigherGeography(), gbc_lblHigherGeography); GridBagConstraints gbc_comboBoxElevUnits = new GridBagConstraints(); gbc_comboBoxElevUnits.insets = new Insets(0, 0, 0, 0); gbc_comboBoxElevUnits.gridwidth = 7; gbc_comboBoxElevUnits.fill = GridBagConstraints.HORIZONTAL; gbc_comboBoxElevUnits.gridx = 1; gbc_comboBoxElevUnits.gridy = 17; jPanel.add(getComboBoxHighGeog(), gbc_comboBoxElevUnits); GridBagConstraints gbc_lblTo = new GridBagConstraints(); gbc_lblTo.insets = new Insets(0, 0, 0, 5); gbc_lblTo.anchor = GridBagConstraints.EAST; gbc_lblTo.gridx = 5; gbc_lblTo.gridy = 19; jPanel.add(getLblTo(), gbc_lblTo); GridBagConstraints gbc_textFieldMaxElev = new GridBagConstraints(); gbc_textFieldMaxElev.insets = new Insets(0, 0, 0, 5); gbc_textFieldMaxElev.fill = GridBagConstraints.BOTH; gbc_textFieldMaxElev.gridx = 6; gbc_textFieldMaxElev.gridy = 19; jPanel.add(getTextFieldMaxElev(), gbc_textFieldMaxElev); GridBagConstraints gbc_comboBoxMaxElev = new GridBagConstraints(); gbc_comboBoxMaxElev.insets = new Insets(0, 0, 0, 0); gbc_comboBoxMaxElev.fill = GridBagConstraints.HORIZONTAL; gbc_comboBoxMaxElev.gridx = 7; gbc_comboBoxMaxElev.gridy = 19; jPanel.add(getComboBoxElevUnits(), gbc_comboBoxMaxElev); jPanel.add(getJTextField3(), gridBagConstraints7); jPanel.add(jLabel3, gridBagConstraints8); jPanel.add(jLabel4, gridBagConstraints9); GridBagConstraints gridBagConstraints28 = new GridBagConstraints(); gridBagConstraints28.gridwidth = 4; gridBagConstraints28.insets = new Insets(0, 0, 0, 5); gridBagConstraints28.gridx = 3; gridBagConstraints28.anchor = GridBagConstraints.WEST; gridBagConstraints28.fill = GridBagConstraints.NONE; gridBagConstraints28.gridy = 22; jLabel33 = new JLabel(); jLabel33.setText("Collecting Method"); jPanel.add(jLabel33, gridBagConstraints28); GridBagConstraints gbc_georef = new GridBagConstraints(); gbc_georef.insets = new Insets(0, 0, 0, 0); gbc_georef.gridwidth = 5; gbc_georef.fill = GridBagConstraints.HORIZONTAL; gbc_georef.gridx = 3; gbc_georef.gridy = 24; GridBagConstraints gridBagConstraints72 = new GridBagConstraints(); gridBagConstraints72.insets = new Insets(0, 0, 0, 5); gridBagConstraints72.gridx = 0; gridBagConstraints72.anchor = GridBagConstraints.EAST; gridBagConstraints72.gridy = 28; jLabel19 = new JLabel(); jLabel19.setText("Features"); jPanel.add(jLabel19, gridBagConstraints72); GridBagConstraints gridBagConstraints17 = new GridBagConstraints(); gridBagConstraints17.insets = new Insets(0, 0, 0, 5); gridBagConstraints17.fill = GridBagConstraints.VERTICAL; gridBagConstraints17.gridy = 28; gridBagConstraints17.weightx = 1.0; gridBagConstraints17.anchor = GridBagConstraints.WEST; gridBagConstraints17.gridx = 1; jPanel.add(getJComboBoxFeatures(), gridBagConstraints17); GridBagConstraints gridBagConstraints104 = new GridBagConstraints(); gridBagConstraints104.insets = new Insets(0, 0, 0, 5); gridBagConstraints104.gridx = 3; gridBagConstraints104.anchor = GridBagConstraints.EAST; gridBagConstraints104.gridy = 28; jLabel37 = new JLabel(); jLabel37.setText("Prep Type"); jPanel.add(jLabel37, gridBagConstraints104); GridBagConstraints gridBagConstraints152 = new GridBagConstraints(); gridBagConstraints152.insets = new Insets(0, 0, 0, 0); gridBagConstraints152.fill = GridBagConstraints.BOTH; gridBagConstraints152.gridy = 28; gridBagConstraints152.weightx = 1.0; gridBagConstraints152.anchor = GridBagConstraints.WEST; gridBagConstraints152.gridwidth = 4; gridBagConstraints152.gridx = 4; jPanel.add(getJTextFieldPrepType(), gridBagConstraints152); GridBagConstraints gridBagConstraintsPR = new GridBagConstraints(); gridBagConstraintsPR.insets = new Insets(0, 0, 0, 0); gridBagConstraintsPR.gridx = 0; gridBagConstraintsPR.fill = GridBagConstraints.BOTH; gridBagConstraintsPR.gridwidth = 8; gridBagConstraintsPR.weighty = 1.0; gridBagConstraintsPR.gridy = 29; jPanel.add(getJScrollPaneSpecimenParts(), gridBagConstraintsPR); GridBagConstraints gbc_lblMicrohabitat = new GridBagConstraints(); gbc_lblMicrohabitat.anchor = GridBagConstraints.EAST; gbc_lblMicrohabitat.insets = new Insets(0, 0, 0, 5); gbc_lblMicrohabitat.gridx = 0; gbc_lblMicrohabitat.gridy = 34; jPanel.add(getLblMicrohabitat(), gbc_lblMicrohabitat); GridBagConstraints gbc_textField = new GridBagConstraints(); gbc_textField.insets = new Insets(0, 0, 0, 5); gbc_textField.fill = GridBagConstraints.HORIZONTAL; gbc_textField.gridx = 1; gbc_textField.gridy = 34; jPanel.add(getTextField(), gbc_textField); jPanel.add(getJButton(), gridBagConstraints10); jPanel.add(jLabel5, gridBagConstraints21); jPanel.add(getJTextFieldCollection(), gridBagConstraints31); jPanel.add(jLabel6, gridBagConstraints41); jPanel.add(getJTextField14(), gridBagConstraints12); jPanel.add(getJScrollPaneCollectors(), gridBagConstraints51); jPanel.add(jLabel7, gridBagConstraints22); jPanel.add(jLabel8, gridBagConstraints13); jPanel.add(getJTextFieldDateUpdated(), gridBagConstraints23); jPanel.add(getJTextField22(), gridBagConstraints14); jPanel.add(jLabel9, gridBagConstraints24); jPanel.add(getJTextField32(), gridBagConstraints32); jPanel.add(jLabel10, gridBagConstraints42); jPanel.add(jLabel11, gridBagConstraints15); jPanel.add(getJScrollPaneNumbers(), gridBagConstraints25); jPanel.add(getJButtonNumbersAdd(), gridBagConstraints33); jPanel.add(getJButtonCollsAdd(), gridBagConstraints43); jPanel.add(getJScrollPaneWarn(), gridBagConstraints52); jPanel.add(jLabel12, gridBagConstraints61); jPanel.add(getJTextField(), gridBagConstraints71); jPanel.add(jLabel13, gridBagConstraints81); jPanel.add(jLabel14, gridBagConstraints91); jPanel.add(jLabel15, gridBagConstraints101); jPanel.add(getJTextField4(), gridBagConstraints111); jPanel.add(getJTextField13(), gridBagConstraints121); jPanel.add(getJTextField23(), gridBagConstraints131); jPanel.add(jLabel16, gridBagConstraints16); jPanel.add(jLabel17, gridBagConstraints26); jPanel.add(jLabelTribe, gbc_jLabelTribe); jPanel.add(getJTextField5(), gridBagConstraints44); jPanel.add(getJTextFieldSubfamily(), gridBagConstraints53); jPanel.add(getJTextFieldTribe(), gridBagConstraints62); jPanel.add(jLabel20, gridBagConstraints82); jPanel.add(jLabel21, gridBagConstraints92); jPanel.add(getJComboBoxSex(), gridBagConstraints102); jPanel.add(getJComboBoxLifeStage(), gridBagConstraints27); jPanel.add(jLabel22, gridBagConstraints35); jPanel.add(getJTextFieldVerbatimDate(), gridBagConstraints63); jPanel.add(jLabel27, gridBagConstraints110); jPanel.add(jLabel29, gridBagConstraints112); jPanel.add(getJTextFieldAuthorship(), gridBagConstraints210); jPanel.add(jLabel30, gridBagConstraints36); jPanel.add(getJTextFieldUnnamedForm(), gridBagConstraints46); jPanel.add(jLabel28, gridBagConstraints74); jPanel.add(getJTextFieldInfraspecificRank(), gridBagConstraints84); jPanel.add(getJTextFieldInfraspecificName(), gridBagConstraints93); jPanel.add(jLabel25, gridBagConstraints103); jPanel.add(jLabel26, gridBagConstraints113); jPanel.add(getJTextFieldDateEmergedIndicator(), gridBagConstraints122); jPanel.add(getJTextFieldDateCollectedIndicator(), gridBagConstraints132); jPanel.add(getJTextFieldDateEmerged(), gridBagConstraints141); jPanel.add(getJTextFieldDateCollected(), gridBagConstraints151); jPanel.add(jLabelElevation, gbc_jLabelElevation); jPanel.add(getJTextField11(), gridBagConstraints18); jPanel.add(getJTextFieldCollectingMethod(), gridBagConstraints19); jPanel.add(getJButtonGeoreference(), gbc_georef); jPanel.add(jLabel34, gridBagConstraints47); jPanel.add(jLabel35, gridBagConstraints65); jPanel.add(getJCheckBox(), gridBagConstraints83); jPanel.add(jLabel36, gridBagConstraints94); jPanel.add(jLabel38, gridBagConstraints114); jPanel.add(jLabel39, gridBagConstraints123); jPanel.add(jLabel40, gridBagConstraints133); jPanel.add(getJTextField20(), gridBagConstraints142); jPanel.add(getJTextField26(), gridBagConstraints162); jPanel.add(getJTextFieldHabitat(), gridBagConstraints172); jPanel.add(jLabel41, gridBagConstraints115); jPanel.add(getJComboBoxWorkflowStatus(), gridBagConstraints29); jPanel.add(jLabel42, gridBagConstraints37); jPanel.add(getJComboBox2(), gridBagConstraints48); jPanel.add(jLabel43, gridBagConstraints56); jPanel.add(getJTextFieldInferences(), gridBagConstraintsInfer); jPanel.add(getJButton1(), gridBagConstraints116); jPanel.add(getJPanel1(), gridBagConstraints211); jPanel.add(getJTextFieldISODate(), gridBagConstraints117); jPanel.add(getJButtonDets(), gridBagConstraints212); jPanel.add(jLabel31, gridBagConstraints118); jPanel.add(getJTextField9(), gridBagConstraints213); jPanel.add(getJButtonNext(), gridBagConstraints119); jPanel.add(getJButtonPrevious(), gridBagConstraints214); jPanel.add(getJScrollPaneNotes(), gridBagConstraints49); jPanel.add(jLabel44, gridBagConstraints120); jPanel.add(getJButton13(), gridBagConstraints215); jPanel.add(getJButton2(), gridBagConstraints38); jPanel.add(getJButtonSpecificLocality(), gridBagConstraints124); jPanel.add(getJTextFieldImgCount(), gridBagConstraintsImgCount); jPanel.add(getJLabelMigrationStatus(), gridBagConstraintsMS); } return jPanel; }
From source file:v800_trainer.JCicloTronic.java
/** This method is called from within the constructor to * initialize the form./*from ww w .j a v a2s. c om*/ * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the FormEditor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; buttonGroup_Karte = new javax.swing.ButtonGroup(); Hauptfenster = new javax.swing.JTabbedPane(); Datenliste_Panel = new javax.swing.JPanel(); Datenliste_scroll_Panel = new javax.swing.JScrollPane(); Datentabelle = new javax.swing.JTable(); Datenliste_Jahr = new javax.swing.JComboBox(); Datenliste_Monat = new javax.swing.JComboBox(); jLabel11 = new javax.swing.JLabel(); jLabel51 = new javax.swing.JLabel(); Datenliste_Zeitabschnitt = new javax.swing.JComboBox(); jLabel65 = new javax.swing.JLabel(); jLabel66 = new javax.swing.JLabel(); Datenliste_TourTyp = new javax.swing.JComboBox(); jLabel68 = new javax.swing.JLabel(); jLabel69_Selektiert = new javax.swing.JLabel(); Datenliste_search = new javax.swing.JTextField(); Datenliste_searchButton = new javax.swing.JButton(); jLabel_search = new javax.swing.JLabel(); Info_Panel = new javax.swing.JPanel(); Auswahl_Info = new javax.swing.JComboBox(); Info_Titel = new javax.swing.JTextField(); Info_Vorname = new javax.swing.JTextField(); Info_Name = new javax.swing.JTextField(); Info_GebTag = new javax.swing.JTextField(); Info_Gewicht = new javax.swing.JTextField(); Info_Verein = new javax.swing.JTextField(); Info_Material = new javax.swing.JTextField(); Info_Materialgewicht = new javax.swing.JTextField(); Info_Startort = new javax.swing.JTextField(); Info_Zielort = new javax.swing.JTextField(); jLabel24Uhrzeit = new javax.swing.JLabel(); jLabel24 = new javax.swing.JLabel(); jLabel52 = new javax.swing.JLabel(); jLabel53 = new javax.swing.JLabel(); jLabel54 = new javax.swing.JLabel(); jLabel55 = new javax.swing.JLabel(); jLabel56 = new javax.swing.JLabel(); jLabel57 = new javax.swing.JLabel(); jLabel58 = new javax.swing.JLabel(); jLabel59 = new javax.swing.JLabel(); jLabel60 = new javax.swing.JLabel(); jLabel61 = new javax.swing.JLabel(); Info_Button_kopieren = new javax.swing.JButton(); Info_Button_einfgen = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); Info_Notiz = new javax.swing.JTextArea(); Info_Button_speichern = new javax.swing.JButton(); jLabel63 = new javax.swing.JLabel(); jLabel64 = new javax.swing.JLabel(); jLabel65Typ = new javax.swing.JLabel(); jLabel69 = new javax.swing.JLabel(); Info_Button_Suche_TrackLog = new javax.swing.JButton(); Info_Track_Log = new javax.swing.JTextField(); Statistik_Panel = new javax.swing.JPanel(); Auswahl_Statistik = new javax.swing.JComboBox(); jPanel2 = new javax.swing.JPanel(); Statistik_Hhe = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); Statistik_Minimale_Hhe = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); Statistik_Maximale_Hhe = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); Statistik_Summe_Hm_Steigung = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); Statistik_Summe_Hm_Geflle = new javax.swing.JLabel(); jLabel17 = new javax.swing.JLabel(); Statistik_HM_pro_km = new javax.swing.JLabel(); Statistik_Geschwindigkeit = new javax.swing.JPanel(); jLabel5 = new javax.swing.JLabel(); Statistik_Max_Geschw = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); Statistik_av_Geschw = new javax.swing.JLabel(); Statistik_Herzfrequenz = new javax.swing.JPanel(); jLabel7 = new javax.swing.JLabel(); Statistik_max_HF = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); Statistik_av_HF = new javax.swing.JLabel(); Statistik_Steigung_m = new javax.swing.JPanel(); jLabel9 = new javax.swing.JLabel(); Statistik_max_Steigung_m = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); Statistik_av_Steigung_m = new javax.swing.JLabel(); Statistik_Geflle_m = new javax.swing.JPanel(); jLabel12 = new javax.swing.JLabel(); Statistik_max_Geflle_m = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); Statistik_av_Geflle_m = new javax.swing.JLabel(); Statistik_Temperatur = new javax.swing.JPanel(); jLabel14 = new javax.swing.JLabel(); Statistik_min_Temp = new javax.swing.JLabel(); jLabel15 = new javax.swing.JLabel(); Statistik_max_Temp = new javax.swing.JLabel(); jLabel16 = new javax.swing.JLabel(); Statistik_av_Temp = new javax.swing.JLabel(); Statistik_Cadence = new javax.swing.JPanel(); jLabel18 = new javax.swing.JLabel(); Statistik_max_Cadence = new javax.swing.JLabel(); jLabel19 = new javax.swing.JLabel(); Statistik_av_Cadence = new javax.swing.JLabel(); Statistik_Steigung_p = new javax.swing.JPanel(); jLabel20 = new javax.swing.JLabel(); Statistik_max_Steigung_p = new javax.swing.JLabel(); jLabel21 = new javax.swing.JLabel(); Statistik_av_Steigung_p = new javax.swing.JLabel(); Statistik_Geflle_p = new javax.swing.JPanel(); jLabel22 = new javax.swing.JLabel(); Statistik_max_Geflle_p = new javax.swing.JLabel(); jLabel23 = new javax.swing.JLabel(); Statistik_av_Geflle_p = new javax.swing.JLabel(); Statistik_Zeit = new javax.swing.JPanel(); jLabel47 = new javax.swing.JLabel(); Statistik_Zeit_absolut = new javax.swing.JLabel(); jLabel48 = new javax.swing.JLabel(); Statistik_Zeit_aktiv = new javax.swing.JLabel(); jPanel5 = new javax.swing.JPanel(); jLabel25 = new javax.swing.JLabel(); Statistik_Teilstrecke = new javax.swing.JLabel(); Statistik_Schrittlnge = new javax.swing.JPanel(); jLabel26 = new javax.swing.JLabel(); Statistik_max_Schrittlnge = new javax.swing.JLabel(); jLabel28 = new javax.swing.JLabel(); Statistik_av_Schrittlnge = new javax.swing.JLabel(); Statistik_Training = new javax.swing.JPanel(); jLabel29 = new javax.swing.JLabel(); Statistik_Belastung = new javax.swing.JLabel(); jLabel30 = new javax.swing.JLabel(); Statistik_Erholungszeit = new javax.swing.JLabel(); jLabel35 = new javax.swing.JLabel(); Statistik_Lauf_Index = new javax.swing.JLabel(); Statistik_Kalorien = new javax.swing.JPanel(); jLabel31 = new javax.swing.JLabel(); Statistik_Kalorien_absolut = new javax.swing.JLabel(); jLabel34 = new javax.swing.JLabel(); Statistik_Kalorien_h = new javax.swing.JLabel(); jLabel32 = new javax.swing.JLabel(); Statistik_Fett = new javax.swing.JLabel(); jLabel33 = new javax.swing.JLabel(); Statistik_Protein = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jPanel4 = new javax.swing.JPanel(); Statistik_Titel = new javax.swing.JLabel(); Graphik_Panel = new javax.swing.JPanel(); Auswahl_Graphik = new javax.swing.JComboBox(); Graphik_Sub_Panel = new javax.swing.JPanel(); Graphik_check_Geschwindigkeit = new javax.swing.JCheckBox(); Graphik_check_Hhe = new javax.swing.JCheckBox(); Graphik_check_HF = new javax.swing.JCheckBox(); Graphik_check_Temp = new javax.swing.JCheckBox(); Graphik_check_Steigung_p = new javax.swing.JCheckBox(); Graphik_check_Steigung_m = new javax.swing.JCheckBox(); Graphik_check_Cadence = new javax.swing.JCheckBox(); Graphik_Radio_Strecke = new javax.swing.JRadioButton(); Graphik_Radio_Zeit = new javax.swing.JRadioButton(); Graphik_check_Abstand = new javax.swing.JCheckBox(); Graphik_check_av_Geschw = new javax.swing.JCheckBox(); Graphik_check_Schrittlnge = new javax.swing.JCheckBox(); Histogramm_Panel = new javax.swing.JPanel(); Auswahl_Histogramm = new javax.swing.JComboBox(); Summenhistogramm_Check = new javax.swing.JCheckBox(); jPanel1 = new javax.swing.JPanel(); jPanel18_HistoSP = new javax.swing.JPanel(); jPanel17_HistoHM = new javax.swing.JPanel(); jPanel16_HistoHF = new javax.swing.JPanel(); jPanel19_HistoCd = new javax.swing.JPanel(); jLabel26_Histotitel = new javax.swing.JLabel(); Map_Panel = new javax.swing.JPanel(); Auswahl_Map = new javax.swing.JComboBox(); LoadGoogleEarth = new javax.swing.JButton(); Kein_kmz_text = new javax.swing.JLabel(); Map_internal_Panel = new javax.swing.JPanel(); jLabel_map_streckenlnge = new javax.swing.JLabel(); jLabel27 = new javax.swing.JLabel(); Map_Type = new javax.swing.JComboBox<>(); Jahresuebersicht_Panel = new javax.swing.JPanel(); Auswahl_bersicht = new javax.swing.JComboBox(); JahrVergleich = new javax.swing.JComboBox(); jLabel67 = new javax.swing.JLabel(); jLabel70 = new javax.swing.JLabel(); jRadioButton_jahresverlauf = new javax.swing.JRadioButton(); jRadioButton_monatsbersicht = new javax.swing.JRadioButton(); jPanel17bersichtchart = new javax.swing.JPanel(); jMenuHaupt = new javax.swing.JMenuBar(); jMenuDatei = new javax.swing.JMenu(); jMenuOpen = new javax.swing.JMenuItem(); jMenuOpenall = new javax.swing.JMenuItem(); jSeparator1 = new javax.swing.JSeparator(); jMenuLschen = new javax.swing.JMenuItem(); jMenuExit = new javax.swing.JMenuItem(); jMenu_V800_Laden = new javax.swing.JMenu(); jMenuTourEditor = new javax.swing.JMenu(); jMenuEinstellungen = new javax.swing.JMenu(); jMenuHilfe = new javax.swing.JMenu(); setTitle("HWCyclingData"); setPreferredSize(new java.awt.Dimension(800, 600)); addComponentListener(new java.awt.event.ComponentAdapter() { public void componentResized(java.awt.event.ComponentEvent evt) { formComponentResized(evt); } }); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { exitForm(evt); } }); java.awt.GridBagLayout layout = new java.awt.GridBagLayout(); layout.columnWidths = new int[] { 0 }; layout.rowHeights = new int[] { 0 }; getContentPane().setLayout(layout); Hauptfenster.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); Hauptfenster.setAlignmentX(0.0F); Hauptfenster.setAlignmentY(0.0F); Hauptfenster.setAutoscrolls(true); Hauptfenster.setPreferredSize(new java.awt.Dimension(10, 10)); java.awt.GridBagLayout Datenliste_PanelLayout = new java.awt.GridBagLayout(); Datenliste_PanelLayout.columnWidths = new int[] { 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0 }; Datenliste_PanelLayout.rowHeights = new int[] { 0, 5, 0, 5, 0 }; Datenliste_Panel.setLayout(Datenliste_PanelLayout); Datenliste_scroll_Panel.setAutoscrolls(true); Datentabelle.setAutoCreateColumnsFromModel(false); Datentabelle.setFont(Datentabelle.getFont()); Datentabelle.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_LAST_COLUMN); Datentabelle.setRowHeight(25); //ChangeModel(); Datentabelle.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { DatentabelleMouseDragged(evt); } }); Datentabelle.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { DatentabelleMouseClicked(evt); } }); Datenliste_scroll_Panel.setViewportView(Datentabelle); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 19; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.ipadx = 1; gridBagConstraints.ipady = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; Datenliste_Panel.add(Datenliste_scroll_Panel, gridBagConstraints); Datenliste_Jahr.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Datenliste_JahrActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 4; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Datenliste_Panel.add(Datenliste_Jahr, gridBagConstraints); Datenliste_Monat.setEnabled(false); InitComboMonat(); Datenliste_Monat.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Datenliste_MonatActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 12; gridBagConstraints.gridy = 4; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Datenliste_Panel.add(Datenliste_Monat, gridBagConstraints); jLabel11.setText("Jahr whlen"); jLabel11.setToolTipText("Selektier alle Daten des entsprechenden Jahres"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Datenliste_Panel.add(jLabel11, gridBagConstraints); jLabel51.setText("Monat whlen"); jLabel51.setToolTipText("Selektiert alle Daten des entsprechenden Monats"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 12; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Datenliste_Panel.add(jLabel51, gridBagConstraints); Datenliste_Zeitabschnitt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Datenliste_ZeitabschnittActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 4; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Datenliste_Panel.add(Datenliste_Zeitabschnitt, gridBagConstraints); jLabel65.setText("Zeitraum whlen"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Datenliste_Panel.add(jLabel65, gridBagConstraints); jLabel66.setText("Tour-Typ"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Datenliste_Panel.add(jLabel66, gridBagConstraints); Datenliste_TourTyp.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Datenliste_TourTypActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Datenliste_Panel.add(Datenliste_TourTyp, gridBagConstraints); jLabel68.setText("Selektierte Daten / von"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 14; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Datenliste_Panel.add(jLabel68, gridBagConstraints); jLabel69_Selektiert.setText("' '"); jLabel69_Selektiert.setMaximumSize(new java.awt.Dimension(300, 50)); jLabel69_Selektiert.setMinimumSize(new java.awt.Dimension(300, 50)); jLabel69_Selektiert.setVerticalTextPosition(javax.swing.SwingConstants.TOP); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 14; gridBagConstraints.gridy = 4; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; Datenliste_Panel.add(jLabel69_Selektiert, gridBagConstraints); Datenliste_search.setToolTipText("~ Vorstellen um zu Deselektieren"); Datenliste_search.setMaximumSize(new java.awt.Dimension(200, 23)); Datenliste_search.setMinimumSize(new java.awt.Dimension(200, 23)); Datenliste_search.setPreferredSize(new java.awt.Dimension(200, 23)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 16; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Datenliste_Panel.add(Datenliste_search, gridBagConstraints); Datenliste_searchButton.setText("Suchen"); Datenliste_searchButton.setMaximumSize(new java.awt.Dimension(200, 23)); Datenliste_searchButton.setMinimumSize(new java.awt.Dimension(200, 23)); Datenliste_searchButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Datenliste_searchButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 18; gridBagConstraints.gridy = 4; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Datenliste_Panel.add(Datenliste_searchButton, gridBagConstraints); jLabel_search.setText("Eintrag im Titel suchen"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 16; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Datenliste_Panel.add(jLabel_search, gridBagConstraints); Hauptfenster.addTab("Datenliste", null, Datenliste_Panel, ""); Info_Panel.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent evt) { Info_PanelComponentShown(evt); } }); java.awt.GridBagLayout Info_PanelLayout = new java.awt.GridBagLayout(); Info_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 }; Info_PanelLayout.rowHeights = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 }; Info_Panel.setLayout(Info_PanelLayout); Auswahl_Info.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Auswahl_InfoActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 5; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Info_Panel.add(Auswahl_Info, gridBagConstraints); Info_Titel.setText("jTextField1"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 6; gridBagConstraints.gridwidth = 19; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_Titel, gridBagConstraints); Info_Vorname.setText("jTextField4"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 10; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_Vorname, gridBagConstraints); Info_Name.setText("jTextField5"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 10; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_Name, gridBagConstraints); Info_GebTag.setText("jTextField6"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 14; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_GebTag, gridBagConstraints); Info_Gewicht.setText("jTextField7"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 14; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_Gewicht, gridBagConstraints); Info_Verein.setText("jTextField8"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 18; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_Verein, gridBagConstraints); Info_Material.setText("jTextField10"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 22; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_Material, gridBagConstraints); Info_Materialgewicht.setText("jTextField9"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 22; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_Materialgewicht, gridBagConstraints); Info_Startort.setText("jTextField2"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 26; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_Startort, gridBagConstraints); Info_Zielort.setText("jTextField3"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 26; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_Zielort, gridBagConstraints); jLabel24Uhrzeit.setText("jLabel24"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 2; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel24Uhrzeit, gridBagConstraints); jLabel24.setText("Titel"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.gridwidth = 3; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel24, gridBagConstraints); jLabel52.setText("Vorname"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 8; gridBagConstraints.gridwidth = 3; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel52, gridBagConstraints); jLabel53.setText("Name"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 8; gridBagConstraints.gridwidth = 3; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel53, gridBagConstraints); jLabel54.setText("Geburtsdatum"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 12; gridBagConstraints.gridwidth = 3; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel54, gridBagConstraints); jLabel55.setText("Gewicht"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 12; gridBagConstraints.gridwidth = 3; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel55, gridBagConstraints); jLabel56.setText("Verein / Mitfahrer"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 16; gridBagConstraints.gridwidth = 17; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel56, gridBagConstraints); jLabel57.setText("Material"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel57, gridBagConstraints); jLabel58.setText("Materialgewicht"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel58, gridBagConstraints); jLabel59.setText("Startort"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 24; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel59, gridBagConstraints); jLabel60.setText("Zielort"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 24; gridBagConstraints.gridwidth = 3; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel60, gridBagConstraints); jLabel61.setText("Notiz"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 34; gridBagConstraints.gridwidth = 9; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel61, gridBagConstraints); Info_Button_kopieren.setText("Kopieren"); Info_Button_kopieren.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Info_Button_kopierenActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 18; gridBagConstraints.gridy = 18; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_Button_kopieren, gridBagConstraints); Info_Button_einfgen.setText("Einfgen"); Info_Button_einfgen.setEnabled(false); Info_Button_einfgen.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Info_Button_einfgenActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 18; gridBagConstraints.gridy = 22; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_Button_einfgen, gridBagConstraints); Info_Notiz.setLineWrap(true); jScrollPane2.setViewportView(Info_Notiz); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 36; gridBagConstraints.gridwidth = 19; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; Info_Panel.add(jScrollPane2, gridBagConstraints); Info_Button_speichern.setText("Speichern"); Info_Button_speichern.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Info_Button_speichernActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 18; gridBagConstraints.gridy = 26; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_Button_speichern, gridBagConstraints); jLabel63.setText("Startzeit:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel63, gridBagConstraints); jLabel64.setText("Typ:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 10; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel64, gridBagConstraints); jLabel65Typ.setText("jLabel65"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 12; gridBagConstraints.gridy = 2; gridBagConstraints.gridwidth = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel65Typ, gridBagConstraints); jLabel69.setText("Track Log"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 30; gridBagConstraints.gridwidth = 7; gridBagConstraints.ipady = 6; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(jLabel69, gridBagConstraints); Info_Button_Suche_TrackLog.setText("..."); Info_Button_Suche_TrackLog.setToolTipText("Track Log ndern"); Info_Button_Suche_TrackLog.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Info_Button_Suche_TrackLogActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 18; gridBagConstraints.gridy = 32; gridBagConstraints.ipady = -3; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Info_Panel.add(Info_Button_Suche_TrackLog, gridBagConstraints); Info_Track_Log.setText("jTextField1"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 32; gridBagConstraints.gridwidth = 17; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; Info_Panel.add(Info_Track_Log, gridBagConstraints); Hauptfenster.addTab("Infos", null, Info_Panel, ""); Statistik_Panel.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent evt) { Statistik_PanelComponentShown_StatistikStarten(evt); } }); java.awt.GridBagLayout Statistik_PanelLayout1 = new java.awt.GridBagLayout(); Statistik_PanelLayout1.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 }; Statistik_PanelLayout1.rowHeights = new int[] { 0, 10, 0, 10, 0, 10, 0, 10, 0 }; Statistik_Panel.setLayout(Statistik_PanelLayout1); Auswahl_Statistik.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Auswahl_StatistikActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.BASELINE_LEADING; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Statistik_Panel.add(Auswahl_Statistik, gridBagConstraints); java.awt.GridBagLayout jPanel2Layout = new java.awt.GridBagLayout(); jPanel2Layout.columnWidths = new int[] { 0, 10, 0, 10, 0, 10, 0, 10, 0 }; jPanel2Layout.rowHeights = new int[] { 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0 }; jPanel2.setLayout(jPanel2Layout); Statistik_Hhe.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Hhe [m]", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); Statistik_Hhe.setLayout(new java.awt.GridLayout(5, 2, 5, 5)); jLabel1.setText("min.:"); Statistik_Hhe.add(jLabel1); Statistik_Minimale_Hhe.setText("---"); Statistik_Minimale_Hhe.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); Statistik_Hhe.add(Statistik_Minimale_Hhe); jLabel2.setText("max.:"); Statistik_Hhe.add(jLabel2); Statistik_Maximale_Hhe.setText("---"); Statistik_Hhe.add(Statistik_Maximale_Hhe); jLabel3.setText("Hm +:"); Statistik_Hhe.add(jLabel3); Statistik_Summe_Hm_Steigung.setText("---"); Statistik_Hhe.add(Statistik_Summe_Hm_Steigung); jLabel4.setText("Hm -:"); Statistik_Hhe.add(jLabel4); Statistik_Summe_Hm_Geflle.setText("---"); Statistik_Hhe.add(Statistik_Summe_Hm_Geflle); jLabel17.setText("Hm/km:"); Statistik_Hhe.add(jLabel17); Statistik_HM_pro_km.setText("---"); Statistik_Hhe.add(Statistik_HM_pro_km); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 6; gridBagConstraints.gridheight = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; jPanel2.add(Statistik_Hhe, gridBagConstraints); Statistik_Geschwindigkeit .setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Geschwindigkeit [km/h]", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); Statistik_Geschwindigkeit.setLayout(new java.awt.GridLayout(3, 2, 5, 5)); jLabel5.setText("max.:"); jLabel5.setToolTipText(""); Statistik_Geschwindigkeit.add(jLabel5); Statistik_Max_Geschw.setText("---"); Statistik_Geschwindigkeit.add(Statistik_Max_Geschw); jLabel6.setText("Durchschnitt:"); Statistik_Geschwindigkeit.add(jLabel6); Statistik_av_Geschw.setText("---"); Statistik_Geschwindigkeit.add(Statistik_av_Geschw); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; jPanel2.add(Statistik_Geschwindigkeit, gridBagConstraints); Statistik_Herzfrequenz.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Herzfrequenz [p/min]", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); Statistik_Herzfrequenz.setLayout(new java.awt.GridLayout(3, 2, 5, 5)); jLabel7.setText("max.:"); Statistik_Herzfrequenz.add(jLabel7); Statistik_max_HF.setText("---"); Statistik_Herzfrequenz.add(Statistik_max_HF); jLabel8.setText("Durchschnitt:"); Statistik_Herzfrequenz.add(jLabel8); Statistik_av_HF.setText("---"); Statistik_Herzfrequenz.add(Statistik_av_HF); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; jPanel2.add(Statistik_Herzfrequenz, gridBagConstraints); Statistik_Steigung_m.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Steigung [m/min]", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); Statistik_Steigung_m.setLayout(new java.awt.GridLayout(2, 2, 5, 5)); jLabel9.setText("max.:"); Statistik_Steigung_m.add(jLabel9); Statistik_max_Steigung_m.setText("---"); Statistik_Steigung_m.add(Statistik_max_Steigung_m); jLabel10.setText("Durchschnitt:"); Statistik_Steigung_m.add(jLabel10); Statistik_av_Steigung_m.setText("---"); Statistik_Steigung_m.add(Statistik_av_Steigung_m); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 8; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; jPanel2.add(Statistik_Steigung_m, gridBagConstraints); Statistik_Geflle_m.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Geflle [m/min]", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); Statistik_Geflle_m.setLayout(new java.awt.GridLayout(2, 2, 5, 5)); jLabel12.setText("max.:"); Statistik_Geflle_m.add(jLabel12); Statistik_max_Geflle_m.setText("---"); Statistik_Geflle_m.add(Statistik_max_Geflle_m); jLabel13.setText("Durchschnitt:"); Statistik_Geflle_m.add(jLabel13); Statistik_av_Geflle_m.setText("---"); Statistik_Geflle_m.add(Statistik_av_Geflle_m); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 8; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; jPanel2.add(Statistik_Geflle_m, gridBagConstraints); Statistik_Temperatur.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Temperatur [C]", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); Statistik_Temperatur.setLayout(new java.awt.GridLayout(3, 2, 5, 5)); jLabel14.setText("min.:"); Statistik_Temperatur.add(jLabel14); Statistik_min_Temp.setText("---"); Statistik_Temperatur.add(Statistik_min_Temp); jLabel15.setText("max.:"); Statistik_Temperatur.add(jLabel15); Statistik_max_Temp.setText("---"); Statistik_Temperatur.add(Statistik_max_Temp); jLabel16.setText("Durchschnitt:"); Statistik_Temperatur.add(jLabel16); Statistik_av_Temp.setText("---"); Statistik_Temperatur.add(Statistik_av_Temp); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; jPanel2.add(Statistik_Temperatur, gridBagConstraints); Statistik_Cadence.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cadence [n/min]", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); Statistik_Cadence.setLayout(new java.awt.GridLayout(2, 2, 5, 5)); jLabel18.setText("max.:"); Statistik_Cadence.add(jLabel18); Statistik_max_Cadence.setText("---"); Statistik_Cadence.add(Statistik_max_Cadence); jLabel19.setText("Durchschnitt:"); Statistik_Cadence.add(jLabel19); Statistik_av_Cadence.setText("---"); Statistik_Cadence.add(Statistik_av_Cadence); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 6; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; jPanel2.add(Statistik_Cadence, gridBagConstraints); Statistik_Steigung_p.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Steigung [%]", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); Statistik_Steigung_p.setLayout(new java.awt.GridLayout(2, 2, 5, 5)); jLabel20.setText("max.:"); Statistik_Steigung_p.add(jLabel20); Statistik_max_Steigung_p.setText("---"); Statistik_Steigung_p.add(Statistik_max_Steigung_p); jLabel21.setText("Durchschnitt:"); Statistik_Steigung_p.add(jLabel21); Statistik_av_Steigung_p.setText("---"); Statistik_Steigung_p.add(Statistik_av_Steigung_p); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 6; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; jPanel2.add(Statistik_Steigung_p, gridBagConstraints); Statistik_Geflle_p.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Geflle [%]", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); Statistik_Geflle_p.setLayout(new java.awt.GridLayout(2, 2, 5, 5)); jLabel22.setText("max.:"); Statistik_Geflle_p.add(jLabel22); Statistik_max_Geflle_p.setText("---"); Statistik_Geflle_p.add(Statistik_max_Geflle_p); jLabel23.setText("Durchschnitt:"); Statistik_Geflle_p.add(jLabel23); Statistik_av_Geflle_p.setText("---"); Statistik_Geflle_p.add(Statistik_av_Geflle_p); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 6; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; jPanel2.add(Statistik_Geflle_p, gridBagConstraints); Statistik_Zeit.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Zeit [hh:mm:ss]", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); Statistik_Zeit.setLayout(new java.awt.GridLayout(3, 2, 5, 5)); jLabel47.setText("absolut:"); Statistik_Zeit.add(jLabel47); Statistik_Zeit_absolut.setText("---"); Statistik_Zeit.add(Statistik_Zeit_absolut); jLabel48.setText("gefahren:"); Statistik_Zeit.add(jLabel48); Statistik_Zeit_aktiv.setText("---"); Statistik_Zeit.add(Statistik_Zeit_aktiv); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; jPanel2.add(Statistik_Zeit, gridBagConstraints); jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Zoom", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); jPanel5.setPreferredSize(new java.awt.Dimension(270, 65)); jPanel5.setLayout(new java.awt.GridLayout(1, 0)); jLabel25.setText("Teilstrecke: "); jLabel25.setMaximumSize(new java.awt.Dimension(200, 26)); jLabel25.setMinimumSize(new java.awt.Dimension(200, 26)); jLabel25.setPreferredSize(new java.awt.Dimension(200, 26)); jPanel5.add(jLabel25); Statistik_Teilstrecke.setText("jLabel26"); jPanel5.add(Statistik_Teilstrecke); Statistik_Teilstrecke.getAccessibleContext().setAccessibleName("jLabel26_Teilstrecke"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START; jPanel2.add(jPanel5, gridBagConstraints); Statistik_Schrittlnge.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Schrittlnge [cm]", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); Statistik_Schrittlnge.setLayout(new java.awt.GridLayout(2, 2, 5, 5)); jLabel26.setText("max.:"); Statistik_Schrittlnge.add(jLabel26); Statistik_max_Schrittlnge.setText("---"); Statistik_Schrittlnge.add(Statistik_max_Schrittlnge); jLabel28.setText("Durchschnitt:"); Statistik_Schrittlnge.add(jLabel28); Statistik_av_Schrittlnge.setText("---"); Statistik_Schrittlnge.add(Statistik_av_Schrittlnge); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 8; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; jPanel2.add(Statistik_Schrittlnge, gridBagConstraints); Statistik_Training.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Training", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); Statistik_Training.setLayout(new java.awt.GridLayout(4, 2, 5, 5)); jLabel29.setText("Belastung:"); Statistik_Training.add(jLabel29); Statistik_Belastung.setText("---"); Statistik_Training.add(Statistik_Belastung); jLabel30.setText("Erholungszeit:"); Statistik_Training.add(jLabel30); Statistik_Erholungszeit.setText("---"); Statistik_Training.add(Statistik_Erholungszeit); jLabel35.setText("Lauf-Index:"); Statistik_Training.add(jLabel35); Statistik_Lauf_Index.setText("---"); Statistik_Training.add(Statistik_Lauf_Index); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 10; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; jPanel2.add(Statistik_Training, gridBagConstraints); Statistik_Kalorien.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Kalorien", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION)); Statistik_Kalorien.setLayout(new java.awt.GridLayout(4, 2, 5, 5)); jLabel31.setText("kCal"); Statistik_Kalorien.add(jLabel31); Statistik_Kalorien_absolut.setText("---"); Statistik_Kalorien.add(Statistik_Kalorien_absolut); jLabel34.setText("kCal/h"); Statistik_Kalorien.add(jLabel34); Statistik_Kalorien_h.setText("---"); Statistik_Kalorien.add(Statistik_Kalorien_h); jLabel32.setText("Fett [%]"); Statistik_Kalorien.add(jLabel32); Statistik_Fett.setText("---"); Statistik_Kalorien.add(Statistik_Fett); jLabel33.setText("Protein [%]"); Statistik_Kalorien.add(jLabel33); Statistik_Protein.setText("---"); Statistik_Kalorien.add(Statistik_Protein); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 10; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; jPanel2.add(Statistik_Kalorien, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.gridwidth = 7; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; Statistik_Panel.add(jPanel2, gridBagConstraints); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 0, Short.MAX_VALUE)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 8; gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; gridBagConstraints.weighty = 100.0; Statistik_Panel.add(jPanel3, gridBagConstraints); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 0, Short.MAX_VALUE)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 10; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 100.0; Statistik_Panel.add(jPanel4, gridBagConstraints); Statistik_Titel.setText("jLabel26"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Statistik_Panel.add(Statistik_Titel, gridBagConstraints); Hauptfenster.addTab("Statistik", null, Statistik_Panel, ""); Graphik_Panel.setMinimumSize(new java.awt.Dimension(22, 22)); Graphik_Panel.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent evt) { Graphik_PanelComponentShown(evt); } public void componentHidden(java.awt.event.ComponentEvent evt) { Graphik_PanelComponentHidden(evt); } }); java.awt.GridBagLayout Graphik_PanelLayout = new java.awt.GridBagLayout(); Graphik_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 }; Graphik_PanelLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0 }; Graphik_Panel.setLayout(Graphik_PanelLayout); Auswahl_Graphik.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Auswahl_GraphikActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.ipadx = 1; gridBagConstraints.ipady = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Graphik_Panel.add(Auswahl_Graphik, gridBagConstraints); Graphik_Sub_Panel.setMinimumSize(new java.awt.Dimension(0, 0)); Graphik_Sub_Panel.setPreferredSize(new java.awt.Dimension(0, 0)); javax.swing.GroupLayout Graphik_Sub_PanelLayout = new javax.swing.GroupLayout(Graphik_Sub_Panel); Graphik_Sub_Panel.setLayout(Graphik_Sub_PanelLayout); Graphik_Sub_PanelLayout.setHorizontalGroup(Graphik_Sub_PanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); Graphik_Sub_PanelLayout.setVerticalGroup(Graphik_Sub_PanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.gridwidth = 15; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; Graphik_Panel.add(Graphik_Sub_Panel, gridBagConstraints); Graphik_check_Geschwindigkeit.setText("Geschwindigkeit"); Graphik_check_Geschwindigkeit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Graphik_check_GeschwindigkeitActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 0; gridBagConstraints.gridheight = java.awt.GridBagConstraints.RELATIVE; gridBagConstraints.ipadx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Graphik_Panel.add(Graphik_check_Geschwindigkeit, gridBagConstraints); Graphik_check_Hhe.setText("Hhe"); Graphik_check_Hhe.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Graphik_check_HheActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 0; gridBagConstraints.ipadx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Graphik_Panel.add(Graphik_check_Hhe, gridBagConstraints); Graphik_check_HF.setText("Herzfrequenz"); Graphik_check_HF.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Graphik_check_HFActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 2; gridBagConstraints.ipadx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Graphik_Panel.add(Graphik_check_HF, gridBagConstraints); Graphik_check_Temp.setText("Temperatur"); Graphik_check_Temp.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Graphik_check_TempActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 14; gridBagConstraints.gridy = 2; gridBagConstraints.ipadx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Graphik_Panel.add(Graphik_check_Temp, gridBagConstraints); Graphik_check_Steigung_p.setText("Steigung [%]"); Graphik_check_Steigung_p.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Graphik_check_Steigung_pActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 12; gridBagConstraints.gridy = 0; gridBagConstraints.ipadx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Graphik_Panel.add(Graphik_check_Steigung_p, gridBagConstraints); Graphik_check_Steigung_m.setText("Steigung [m/min]"); Graphik_check_Steigung_m.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Graphik_check_Steigung_mActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 12; gridBagConstraints.gridy = 2; gridBagConstraints.ipadx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Graphik_Panel.add(Graphik_check_Steigung_m, gridBagConstraints); Graphik_check_Cadence.setText("Cadence"); Graphik_check_Cadence.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Graphik_check_CadenceActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 10; gridBagConstraints.gridy = 0; gridBagConstraints.ipadx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Graphik_Panel.add(Graphik_check_Cadence, gridBagConstraints); Graphik_Radio_Strecke.setSelected(true); Graphik_Radio_Strecke.setText("ber Strecke"); Graphik_Radio_Strecke.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Graphik_Radio_StreckeActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 0; gridBagConstraints.ipadx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 0); Graphik_Panel.add(Graphik_Radio_Strecke, gridBagConstraints); Graphik_Radio_Zeit.setText("ber Zeit"); Graphik_Radio_Zeit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Graphik_Radio_ZeitActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 2; gridBagConstraints.ipadx = 1; gridBagConstraints.ipady = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 0); Graphik_Panel.add(Graphik_Radio_Zeit, gridBagConstraints); Graphik_check_Abstand.setText("Zeit- / Streckenabstand"); Graphik_check_Abstand.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Graphik_check_AbstandActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 14; gridBagConstraints.gridy = 0; gridBagConstraints.ipadx = 27; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Graphik_Panel.add(Graphik_check_Abstand, gridBagConstraints); Graphik_check_av_Geschw.setText("av-Geschw."); Graphik_check_av_Geschw.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Graphik_check_av_GeschwActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 2; gridBagConstraints.ipadx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Graphik_Panel.add(Graphik_check_av_Geschw, gridBagConstraints); Graphik_check_Schrittlnge.setText("Schrittlnge"); Graphik_check_Schrittlnge.setToolTipText(""); Graphik_check_Schrittlnge.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Graphik_check_SchrittlngeActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 10; gridBagConstraints.gridy = 2; gridBagConstraints.ipadx = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; Graphik_Panel.add(Graphik_check_Schrittlnge, gridBagConstraints); Hauptfenster.addTab("Graphik", null, Graphik_Panel, ""); Histogramm_Panel.setMinimumSize(new java.awt.Dimension(22, 22)); Histogramm_Panel.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent evt) { Histogramm_PanelComponentShown(evt); } }); java.awt.GridBagLayout Histogramm_PanelLayout = new java.awt.GridBagLayout(); Histogramm_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0 }; Histogramm_PanelLayout.rowHeights = new int[] { 0, 0, 0, 0, 0 }; Histogramm_Panel.setLayout(Histogramm_PanelLayout); Auswahl_Histogramm.setAlignmentX(0.0F); Auswahl_Histogramm.setAlignmentY(0.0F); Auswahl_Histogramm.setMinimumSize(new java.awt.Dimension(200, 20)); Auswahl_Histogramm.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Auswahl_HistogrammActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Histogramm_Panel.add(Auswahl_Histogramm, gridBagConstraints); Summenhistogramm_Check.setText("Summenhistogramme"); Summenhistogramm_Check.setAlignmentY(0.0F); Summenhistogramm_Check.setMaximumSize(new java.awt.Dimension(32767, 32767)); Summenhistogramm_Check.setMinimumSize(new java.awt.Dimension(300, 23)); Summenhistogramm_Check.setOpaque(false); Summenhistogramm_Check.setPreferredSize(new java.awt.Dimension(300, 23)); Summenhistogramm_Check.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Summenhistogramm_CheckActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Histogramm_Panel.add(Summenhistogramm_Check, gridBagConstraints); jPanel1.setLayout(new java.awt.GridBagLayout()); jPanel18_HistoSP.setAlignmentX(0.0F); jPanel18_HistoSP.setAlignmentY(0.0F); javax.swing.GroupLayout jPanel18_HistoSPLayout = new javax.swing.GroupLayout(jPanel18_HistoSP); jPanel18_HistoSP.setLayout(jPanel18_HistoSPLayout); jPanel18_HistoSPLayout.setHorizontalGroup(jPanel18_HistoSPLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jPanel18_HistoSPLayout.setVerticalGroup(jPanel18_HistoSPLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; gridBagConstraints.weightx = 0.5; gridBagConstraints.weighty = 0.5; jPanel1.add(jPanel18_HistoSP, gridBagConstraints); jPanel17_HistoHM.setAlignmentX(0.0F); jPanel17_HistoHM.setAlignmentY(0.0F); javax.swing.GroupLayout jPanel17_HistoHMLayout = new javax.swing.GroupLayout(jPanel17_HistoHM); jPanel17_HistoHM.setLayout(jPanel17_HistoHMLayout); jPanel17_HistoHMLayout.setHorizontalGroup(jPanel17_HistoHMLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jPanel17_HistoHMLayout.setVerticalGroup(jPanel17_HistoHMLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 0.5; gridBagConstraints.weighty = 0.5; jPanel1.add(jPanel17_HistoHM, gridBagConstraints); jPanel16_HistoHF.setAlignmentX(0.0F); jPanel16_HistoHF.setAlignmentY(0.0F); javax.swing.GroupLayout jPanel16_HistoHFLayout = new javax.swing.GroupLayout(jPanel16_HistoHF); jPanel16_HistoHF.setLayout(jPanel16_HistoHFLayout); jPanel16_HistoHFLayout.setHorizontalGroup(jPanel16_HistoHFLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jPanel16_HistoHFLayout.setVerticalGroup(jPanel16_HistoHFLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 0.5; gridBagConstraints.weighty = 0.5; jPanel1.add(jPanel16_HistoHF, gridBagConstraints); jPanel19_HistoCd.setAlignmentX(0.0F); jPanel19_HistoCd.setAlignmentY(0.0F); javax.swing.GroupLayout jPanel19_HistoCdLayout = new javax.swing.GroupLayout(jPanel19_HistoCd); jPanel19_HistoCd.setLayout(jPanel19_HistoCdLayout); jPanel19_HistoCdLayout.setHorizontalGroup(jPanel19_HistoCdLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jPanel19_HistoCdLayout.setVerticalGroup(jPanel19_HistoCdLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST; gridBagConstraints.weightx = 0.5; gridBagConstraints.weighty = 0.5; jPanel1.add(jPanel19_HistoCd, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.gridwidth = 5; gridBagConstraints.gridheight = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; Histogramm_Panel.add(jPanel1, gridBagConstraints); jLabel26_Histotitel.setText("jLabel26"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.weightx = 1.0; Histogramm_Panel.add(jLabel26_Histotitel, gridBagConstraints); Hauptfenster.addTab("Histogramme", null, Histogramm_Panel, ""); Map_Panel.setPreferredSize(new java.awt.Dimension(594, 400)); Map_Panel.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent evt) { Map_PanelComponentShown(evt); } }); java.awt.GridBagLayout Map_PanelLayout = new java.awt.GridBagLayout(); Map_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 }; Map_PanelLayout.rowHeights = new int[] { 0, 5, 0, 5, 0 }; Map_Panel.setLayout(Map_PanelLayout); Auswahl_Map.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Auswahl_MapActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Map_Panel.add(Auswahl_Map, gridBagConstraints); LoadGoogleEarth.setText("Google Earth"); LoadGoogleEarth.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { LoadGoogleEarthActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 10; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Map_Panel.add(LoadGoogleEarth, gridBagConstraints); Kein_kmz_text.setText("Kein Log File"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Map_Panel.add(Kein_kmz_text, gridBagConstraints); Map_internal_Panel.setLayout(null); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.gridwidth = 11; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; Map_Panel.add(Map_internal_Panel, gridBagConstraints); jLabel_map_streckenlnge.setText("jLabel26"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 0; Map_Panel.add(jLabel_map_streckenlnge, gridBagConstraints); jLabel27.setText("GPS Lnge:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 0; Map_Panel.add(jLabel27, gridBagConstraints); Map_Type.setModel( new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); Map_Type.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Map_TypeActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Map_Panel.add(Map_Type, gridBagConstraints); Hauptfenster.addTab("Landkarte", Map_Panel); Jahresuebersicht_Panel.setPreferredSize(new java.awt.Dimension(688, 400)); Jahresuebersicht_Panel.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent evt) { Jahresuebersicht_PanelComponentShown(evt); } }); java.awt.GridBagLayout Jahresuebersicht_PanelLayout = new java.awt.GridBagLayout(); Jahresuebersicht_PanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 }; Jahresuebersicht_PanelLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; Jahresuebersicht_Panel.setLayout(Jahresuebersicht_PanelLayout); Auswahl_bersicht.setMinimumSize(new java.awt.Dimension(200, 20)); Auswahl_bersicht.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Auswahl_bersichtActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Jahresuebersicht_Panel.add(Auswahl_bersicht, gridBagConstraints); JahrVergleich.setMinimumSize(new java.awt.Dimension(200, 20)); JahrVergleich.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { JahrVergleichActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Jahresuebersicht_Panel.add(JahrVergleich, gridBagConstraints); jLabel67.setText("Vergleich mit Jahr:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Jahresuebersicht_Panel.add(jLabel67, gridBagConstraints); jLabel70.setText(" Jahr:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Jahresuebersicht_Panel.add(jLabel70, gridBagConstraints); jRadioButton_jahresverlauf.setSelected(true); jRadioButton_jahresverlauf.setText("Jahresverlauf"); jRadioButton_jahresverlauf.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton_jahresverlaufActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 8; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Jahresuebersicht_Panel.add(jRadioButton_jahresverlauf, gridBagConstraints); jRadioButton_monatsbersicht.setText("Monatsbersicht"); jRadioButton_monatsbersicht.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton_monatsbersichtActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 10; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 0, 0, 0); Jahresuebersicht_Panel.add(jRadioButton_monatsbersicht, gridBagConstraints); jPanel17bersichtchart .setLayout(new javax.swing.BoxLayout(jPanel17bersichtchart, javax.swing.BoxLayout.LINE_AXIS)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.gridwidth = 11; gridBagConstraints.gridheight = 7; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; Jahresuebersicht_Panel.add(jPanel17bersichtchart, gridBagConstraints); Hauptfenster.addTab("Jahresbersicht", null, Jahresuebersicht_Panel, ""); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; getContentPane().add(Hauptfenster, gridBagConstraints); jMenuDatei.setLabel("Datei "); jMenuOpen.setText("Rohdaten Importieren"); jMenuOpen.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuOpenActionPerformed(evt); } }); jMenuDatei.add(jMenuOpen); jMenuOpenall.setText("Alle Rohdaten Importieren"); jMenuOpenall.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuOpenallActionPerformed(evt); } }); jMenuDatei.add(jMenuOpenall); jMenuDatei.add(jSeparator1); jMenuLschen.setText("Lschen"); jMenuLschen.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuLschenActionPerformed(evt); } }); jMenuDatei.add(jMenuLschen); jMenuExit.setText("Beenden"); jMenuExit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuExitActionPerformed(evt); } }); jMenuDatei.add(jMenuExit); jMenuHaupt.add(jMenuDatei); jMenu_V800_Laden.setText("Daten Empfangen "); jMenu_V800_Laden.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jMenu_V800_LadenMouseClicked(evt); } }); jMenuHaupt.add(jMenu_V800_Laden); jMenuTourEditor.setLabel("Tour Editor "); jMenuTourEditor.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jMenuTourEditorMouseClicked(evt); } }); jMenuHaupt.add(jMenuTourEditor); jMenuTourEditor.getAccessibleContext().setAccessibleName("Tour Editor"); jMenuEinstellungen.setLabel("Einstellungen "); jMenuEinstellungen.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jMenuEinstellungenMouseClicked(evt); } }); jMenuHaupt.add(jMenuEinstellungen); jMenuHilfe.setText("Hilfe"); jMenuHilfe.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jMenuHilfeMouseClicked(evt); } }); jMenuHaupt.add(jMenuHilfe); setJMenuBar(jMenuHaupt); pack(); }
From source file:org.esa.beam.visat.toolviews.stat.StatisticsPanel.java
private JPanel createStatPanel(Stx stx, final Mask regionalMask, final Mask qualityMask, int stxIdx, RasterDataNode raster) {//from ww w. ja va 2 s. c o m final Histogram histogram = stx.getHistogram(); final int row = stxIdx + 1; // account for header boolean includeFileMetaData = statisticsCriteriaPanel.isIncludeFileMetaData(); boolean includeMaskMetaData = statisticsCriteriaPanel.isIncludeMaskMetaData(); boolean includeBandMetaData = statisticsCriteriaPanel.isIncludeBandMetaData(); boolean includeBinningInfo = statisticsCriteriaPanel.isIncludeBinningInfo(); ; boolean includeTimeMetaData = statisticsCriteriaPanel.isIncludeTimeMetaData(); boolean isIncludeTimeSeriesMetaData = statisticsCriteriaPanel.isIncludeTimeSeriesMetaData(); boolean includeProjectionParameters = statisticsCriteriaPanel.isIncludeProjectionParameters(); boolean includeColumnBreaks = statisticsCriteriaPanel.isIncludeColBreaks(); // Initialize all spreadsheet table indices to -1 (default don't use value) if (stxIdx == 0 || metaDataFieldsHashMap == null || primaryStatisticsFieldsHashMap == null) { initHashMaps(); } XIntervalSeries histogramSeries = new XIntervalSeries("Histogram"); double histDomainBounds[] = { histogram.getLowValue(0), histogram.getHighValue(0) }; double histRangeBounds[] = { Double.NaN, Double.NaN }; if (!fixedHistDomainAllPlots || (fixedHistDomainAllPlots && !fixedHistDomainAllPlotsInitialized)) { if (!statisticsCriteriaPanel.isLogMode()) { if (statisticsCriteriaPanel.plotsThreshDomainSpan()) { if (statisticsCriteriaPanel.plotsThreshDomainLow() >= 0.1) { histDomainBounds[0] = histogram .getPTileThreshold((statisticsCriteriaPanel.plotsThreshDomainLow()) / 100)[0]; } if (statisticsCriteriaPanel.plotsThreshDomainHigh() <= 99.9) { histDomainBounds[1] = histogram .getPTileThreshold(statisticsCriteriaPanel.plotsThreshDomainHigh() / 100)[0]; } } else if (statisticsCriteriaPanel.plotsDomainSpan()) { if (!Double.isNaN(statisticsCriteriaPanel.plotsDomainLow())) { histDomainBounds[0] = statisticsCriteriaPanel.plotsDomainLow(); } if (!Double.isNaN(statisticsCriteriaPanel.plotsDomainHigh())) { histDomainBounds[1] = statisticsCriteriaPanel.plotsDomainHigh(); } } } else { histDomainBounds[0] = histogram.getBinLowValue(0, 0); histDomainBounds[1] = histogram.getHighValue(0); } // if (!LogMode && plotsThreshDomainSpan && plotsThreshDomainLow >= 0.1 && plotsThreshDomainHigh <= 99.9) { // histDomainBounds[0] = histogram.getPTileThreshold((plotsThreshDomainLow) / 100)[0]; // histDomainBounds[1] = histogram.getPTileThreshold(plotsThreshDomainHigh / 100)[0]; // // } else { // histDomainBounds[0] = histogram.getBinLowValue(0, 0); // histDomainBounds[1] = histogram.getHighValue(0); // } if (fixedHistDomainAllPlots && !fixedHistDomainAllPlotsInitialized) { histDomainBoundsAllPlots[0] = histDomainBounds[0]; histDomainBoundsAllPlots[1] = histDomainBounds[1]; fixedHistDomainAllPlotsInitialized = true; } } else { histDomainBounds[0] = histDomainBoundsAllPlots[0]; histDomainBounds[1] = histDomainBoundsAllPlots[1]; } int[] bins = histogram.getBins(0); for (int j = 0; j < bins.length; j++) { histogramSeries.add(histogram.getBinLowValue(0, j), histogram.getBinLowValue(0, j), j < bins.length - 1 ? histogram.getBinLowValue(0, j + 1) : histogram.getHighValue(0), bins[j]); } String logTitle = (statisticsCriteriaPanel.isLogMode()) ? "Log10 of " : ""; ChartPanel histogramPanel = createChartPanel(histogramSeries, logTitle + raster.getName() + " (" + raster.getUnit() + ")", "Frequency in #Pixels", new Color(0, 0, 127), histDomainBounds, histRangeBounds); // histogramPanel.setPreferredSize(new Dimension(300, 200)); if (statisticsCriteriaPanel.exactPlotSize()) { histogramPanel.setMinimumSize(new Dimension(statisticsCriteriaPanel.plotSizeWidth(), statisticsCriteriaPanel.plotSizeHeight())); histogramPanel.setPreferredSize(new Dimension(statisticsCriteriaPanel.plotSizeWidth(), statisticsCriteriaPanel.plotSizeHeight())); histogramPanel.setMaximumSize(new Dimension(statisticsCriteriaPanel.plotSizeWidth(), statisticsCriteriaPanel.plotSizeHeight())); } else { histogramPanel.setMinimumSize(new Dimension(plotMinWidth, plotMinHeight)); histogramPanel.setPreferredSize(new Dimension(plotMinWidth, plotMinHeight)); } XIntervalSeries percentileSeries = new XIntervalSeries("Percentile"); // if (1 == 2 && LogMode) { // percentileSeries.add(0, // 0, // 1, // Math.pow(10, histogram.getLowValue(0))); // for (int j = 1; j < 99; j++) { // percentileSeries.add(j, // j, // j + 1, // Math.pow(10, histogram.getPTileThreshold(j / 100.0)[0])); // } // percentileSeries.add(99, // 99, // 100, // Math.pow(10, histogram.getHighValue(0))); // // } else { // percentileSeries.add(0, // 0, // 0.25, // histogram.getLowValue(0)); // // for (double j = 0.25; j < 99.75; j += .25) { // percentileSeries.add(j, // j, // j + 1, // histogram.getPTileThreshold(j / 100.0)[0]); // } // percentileSeries.add(99.75, // 99.75, // 100, // histogram.getHighValue(0)); // } // // double fraction = 0; // for (int j = 0; j < bins.length; j++) { // // fraction = (1.0) * j / bins.length; // // if (fraction > 0 && fraction < 1) { // percentileSeries.add(histogram.getBinLowValue(0, j), // histogram.getBinLowValue(0, j), // j < bins.length - 1 ? histogram.getBinLowValue(0, j + 1) : histogram.getHighValue(0), // histogram.getPTileThreshold(fraction)[0]); // } // // // } // // double test = fraction; double[] percentileDomainBounds = { Double.NaN, Double.NaN }; double[] percentileRangeBounds = { Double.NaN, Double.NaN }; ChartPanel percentilePanel = null; if (invertPercentile) { double increment = .01; for (double j = 0; j < 100; j += increment) { double fraction = j / 100.0; double nextFraction = (j + increment) / 100.0; if (fraction > 0.0 && fraction < 1.0 && nextFraction > 0.0 && nextFraction < 1.0) { double thresh = histogram.getPTileThreshold(fraction)[0]; double nextThresh = histogram.getPTileThreshold(nextFraction)[0]; percentileSeries.add(thresh, thresh, nextThresh, j); } } if (!statisticsCriteriaPanel.isLogMode()) { percentileDomainBounds[0] = histDomainBounds[0]; percentileDomainBounds[1] = histDomainBounds[1]; } percentileRangeBounds[0] = 0; percentileRangeBounds[1] = 100; percentilePanel = createScatterChartPanel(percentileSeries, logTitle + raster.getName() + " (" + raster.getUnit() + ")", "Percent Threshold", new Color(0, 0, 0), percentileDomainBounds, percentileRangeBounds); } else { percentileSeries.add(0, 0, 0.25, histogram.getLowValue(0)); for (double j = 0.25; j < 99.75; j += .25) { percentileSeries.add(j, j, j + 1, histogram.getPTileThreshold(j / 100.0)[0]); } percentileSeries.add(99.75, 99.75, 100, histogram.getHighValue(0)); percentileDomainBounds[0] = 0; percentileDomainBounds[1] = 100; percentileRangeBounds[0] = histDomainBounds[0]; percentileRangeBounds[1] = histDomainBounds[1]; percentilePanel = createScatterChartPanel(percentileSeries, "Percent_Threshold", logTitle + raster.getName() + " (" + raster.getUnit() + ")", new Color(0, 0, 0), percentileDomainBounds, percentileRangeBounds); } // percentilePanel.setPreferredSize(new Dimension(300, 200)); if (statisticsCriteriaPanel.exactPlotSize()) { percentilePanel.setMinimumSize(new Dimension(statisticsCriteriaPanel.plotSizeWidth(), statisticsCriteriaPanel.plotSizeHeight())); percentilePanel.setPreferredSize(new Dimension(statisticsCriteriaPanel.plotSizeWidth(), statisticsCriteriaPanel.plotSizeHeight())); percentilePanel.setMaximumSize(new Dimension(statisticsCriteriaPanel.plotSizeWidth(), statisticsCriteriaPanel.plotSizeHeight())); } else { percentilePanel.setMinimumSize(new Dimension(plotMinWidth, plotMinHeight)); percentilePanel.setPreferredSize(new Dimension(plotMinWidth, plotMinHeight)); } int size = raster.getRasterHeight() * raster.getRasterWidth(); int validPixelCount = histogram.getTotals()[0]; int dataRows = 0; // new Object[]{"RasterSize(Pixels)", size}, // new Object[]{"SampleSize(Pixels)", histogram.getTotals()[0]}, Object[][] totalPixels = null; if (statisticsCriteriaPanel.includeTotalPixels()) { int totalPixelCount = stx.getRawTotal(); double percentFilled = (totalPixelCount > 0) ? (1.0 * validPixelCount / totalPixelCount) : 0; totalPixels = new Object[][] { new Object[] { "Regional_Pixels", stx.getRawTotal() }, new Object[] { "Valid_Pixels", validPixelCount }, new Object[] { "Fraction_Valid", percentFilled } }; } else { totalPixels = new Object[][] { new Object[] { "Valid_Pixels", validPixelCount } }; } dataRows += totalPixels.length; Object[][] firstData = new Object[][] { new Object[] { "Mean", stx.getMean() } }; dataRows += firstData.length; Object[][] minMaxData = null; if (statisticsCriteriaPanel.includeMinMax()) { minMaxData = new Object[][] { new Object[] { "Minimum", stx.getMinimum() }, new Object[] { "Maximum", stx.getMaximum() } }; dataRows += minMaxData.length; } Object[] medianObject = null; if (statisticsCriteriaPanel.includeMedian()) { medianObject = new Object[] { "Median", stx.getMedianRaster() }; dataRows++; } Object[][] secondData = new Object[][] { new Object[] { "Standard_Deviation", stx.getStandardDeviation() }, new Object[] { "Variance", getVariance(stx) }, new Object[] { "Coefficient_of_Variation", getCoefficientOfVariation(stx) } }; dataRows += secondData.length; Object[][] binningInfo = null; if (statisticsCriteriaPanel.isIncludeBinningInfo()) { binningInfo = new Object[][] { new Object[] { "Total_Bins", histogram.getNumBins()[0] }, new Object[] { "Bin_Width", getBinSize(histogram) }, new Object[] { "Bin_Min", histogram.getLowValue(0) }, new Object[] { "Bin_Max", histogram.getHighValue(0) } }; dataRows += binningInfo.length; } Object[][] histogramStats = null; if (statisticsCriteriaPanel.includeHistogramStats()) { if (statisticsCriteriaPanel.isLogMode()) { histogramStats = new Object[][] { new Object[] { "Mean(LogBinned)", Math.pow(10, histogram.getMean()[0]) }, new Object[] { "Median(LogBinned)", Math.pow(10, stx.getMedian()) }, new Object[] { "StandardDeviation(LogBinned)", Math.pow(10, histogram.getStandardDeviation()[0]) } }; } else { histogramStats = new Object[][] { new Object[] { "Mean(Binned)", histogram.getMean()[0] }, new Object[] { "Median(Binned)", stx.getMedian() }, new Object[] { "StandardDeviation(Binned)", histogram.getStandardDeviation()[0] } }; } dataRows += histogramStats.length; } Object[][] percentData = new Object[statisticsCriteriaPanel.getPercentThresholdsList().size()][]; for (int i = 0; i < statisticsCriteriaPanel.getPercentThresholdsList().size(); i++) { int value = statisticsCriteriaPanel.getPercentThresholdsList().get(i); double percent = value / 100.0; String percentString = Integer.toString(value); Object[] pTileThreshold; if (statisticsCriteriaPanel.isLogMode()) { pTileThreshold = new Object[] { percentString + "%Threshold(Log)", Math.pow(10, histogram.getPTileThreshold(percent)[0]) }; } else { pTileThreshold = new Object[] { percentString + "%Threshold", histogram.getPTileThreshold(percent)[0] }; } percentData[i] = pTileThreshold; } dataRows += percentData.length; Object[][] tableData = new Object[dataRows][]; int tableDataIdx = 0; if (totalPixels != null) { for (int i = 0; i < totalPixels.length; i++) { tableData[tableDataIdx] = totalPixels[i]; tableDataIdx++; } } if (firstData != null) { for (int i = 0; i < firstData.length; i++) { tableData[tableDataIdx] = firstData[i]; tableDataIdx++; } } if (medianObject != null) { tableData[tableDataIdx] = medianObject; tableDataIdx++; } if (minMaxData != null) { for (int i = 0; i < minMaxData.length; i++) { tableData[tableDataIdx] = minMaxData[i]; tableDataIdx++; } } if (secondData != null) { for (int i = 0; i < secondData.length; i++) { tableData[tableDataIdx] = secondData[i]; tableDataIdx++; } } if (binningInfo != null) { for (int i = 0; i < binningInfo.length; i++) { tableData[tableDataIdx] = binningInfo[i]; tableDataIdx++; } } if (histogramStats != null) { for (int i = 0; i < histogramStats.length; i++) { tableData[tableDataIdx] = histogramStats[i]; tableDataIdx++; } } if (percentData != null) { for (int i = 0; i < percentData.length; i++) { tableData[tableDataIdx] = percentData[i]; tableDataIdx++; } } numStxFields = tableData.length; int fieldIdx = 0; // Initialize indices if (stxIdx == 0) { primaryStatisticsFieldsHashMap.put(PrimaryStatisticsFields.FileRefNum, fieldIdx); fieldIdx++; primaryStatisticsFieldsHashMap.put(PrimaryStatisticsFields.BandName, fieldIdx); fieldIdx++; primaryStatisticsFieldsHashMap.put(PrimaryStatisticsFields.MaskName, fieldIdx); fieldIdx++; primaryStatisticsFieldsHashMap.put(PrimaryStatisticsFields.QualityMaskName, fieldIdx); fieldIdx++; stxFieldsStartIdx = fieldIdx; fieldIdx += numStxFields; stxFieldsEndIdx = fieldIdx - 1; if (includeBandMetaData) { if (includeColumnBreaks) { metaDataFieldsHashMap.put(MetaDataFields.BandMetaDataBreak, fieldIdx); fieldIdx++; } metaDataFieldsHashMap.put(MetaDataFields.BandName, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.BandUnit, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.BandValidExpression, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.BandDescription, fieldIdx); fieldIdx++; } if (includeMaskMetaData) { if (includeColumnBreaks) { metaDataFieldsHashMap.put(MetaDataFields.RegionalMaskMetaDataBreak, fieldIdx); fieldIdx++; } metaDataFieldsHashMap.put(MetaDataFields.RegionalMaskName, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.RegionalMaskDescription, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.RegionalMaskExpression, fieldIdx); fieldIdx++; if (includeColumnBreaks) { metaDataFieldsHashMap.put(MetaDataFields.QualityMaskMetaDataBreak, fieldIdx); fieldIdx++; } metaDataFieldsHashMap.put(MetaDataFields.QualityMaskName, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.QualityMaskDescription, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.QualityMaskExpression, fieldIdx); fieldIdx++; } if (includeTimeMetaData || isIncludeTimeSeriesMetaData) { if (includeColumnBreaks) { metaDataFieldsHashMap.put(MetaDataFields.TimeMetaDataBreak, fieldIdx); fieldIdx++; } if (includeTimeMetaData) { metaDataFieldsHashMap.put(MetaDataFields.StartDate, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.StartTime, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.EndDate, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.EndTime, fieldIdx); fieldIdx++; } if (isIncludeTimeSeriesMetaData) { metaDataFieldsHashMap.put(MetaDataFields.TimeSeriesDate, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.TimeSeriesTime, fieldIdx); fieldIdx++; } } if (includeFileMetaData) { if (includeColumnBreaks) { metaDataFieldsHashMap.put(MetaDataFields.FileMetaDataBreak, fieldIdx); fieldIdx++; } metaDataFieldsHashMap.put(MetaDataFields.FileName, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.FileType, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.FileFormat, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.FileWidth, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.FileHeight, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.Sensor, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.Platform, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.Resolution, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.DayNight, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.Orbit, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.ProcessingVersion, fieldIdx); fieldIdx++; metaDataFieldsHashMap.put(MetaDataFields.Projection, fieldIdx); fieldIdx++; } if (includeProjectionParameters) { metaDataFieldsHashMap.put(MetaDataFields.ProjectionParameters, fieldIdx); fieldIdx++; } } if (statsSpreadsheet == null) { statsSpreadsheet = new Object[numStxRegions + 2][fieldIdx]; // add 1 row to account for the header and 1 more empty row because JTable for some reason displays // only half of the last row when row count is large } String startDateString = ""; String startTimeString = ""; String endDateString = ""; String endTimeString = ""; if (includeTimeMetaData) { ProductData.UTC startDateTimeCorrected; ProductData.UTC endDateTimeCorrected; // correct time (invert start and end time if end time later than start time if (getProduct().getStartTime() != null && getProduct().getEndTime() != null) { if (getProduct().getStartTime().getMJD() <= getProduct().getEndTime().getMJD()) { startDateTimeCorrected = getProduct().getStartTime(); endDateTimeCorrected = getProduct().getEndTime(); } else { startDateTimeCorrected = getProduct().getEndTime(); endDateTimeCorrected = getProduct().getStartTime(); } if (startDateTimeCorrected != null) { String[] startDateTimeStringArray = startDateTimeCorrected.toString().split(" "); if (startDateTimeStringArray.length >= 2) { startDateString = startDateTimeStringArray[0].trim(); startTimeString = startDateTimeStringArray[1].trim(); } } if (endDateTimeCorrected != null) { String[] endDateTimeStringArray = endDateTimeCorrected.toString().split(" "); if (endDateTimeStringArray.length >= 2) { endDateString = endDateTimeStringArray[0].trim(); endTimeString = endDateTimeStringArray[1].trim(); } } } } String timeSeriesDate = ""; String timeSeriesTime = ""; if (isIncludeTimeSeriesMetaData) { String bandName = raster.getName(); String productDateTime = convertBandNameToProductTime(bandName); if (productDateTime != null) { String[] endDateTimeStringArray = productDateTime.split(" "); if (endDateTimeStringArray.length >= 2) { timeSeriesDate = endDateTimeStringArray[0].trim(); timeSeriesTime = endDateTimeStringArray[1].trim(); } } } String maskName = ""; String maskDescription = ""; String maskExpression = ""; if (regionalMask != null) { maskName = regionalMask.getName(); maskDescription = regionalMask.getDescription(); maskExpression = regionalMask.getImageConfig().getValue("expression"); } String qualityMaskName = ""; String qualityMaskDescription = ""; String qualityMaskExpression = ""; if (qualityMask != null) { qualityMaskName = qualityMask.getName(); qualityMaskDescription = qualityMask.getDescription(); qualityMaskExpression = qualityMask.getImageConfig().getValue("expression"); } addFieldToSpreadsheet(row, PrimaryStatisticsFields.FileRefNum, getProduct().getRefNo()); addFieldToSpreadsheet(row, PrimaryStatisticsFields.BandName, raster.getName()); addFieldToSpreadsheet(row, PrimaryStatisticsFields.MaskName, maskName); addFieldToSpreadsheet(row, PrimaryStatisticsFields.QualityMaskName, qualityMaskName); addFieldToSpreadsheet(row, MetaDataFields.TimeMetaDataBreak, COLUMN_BREAK); addFieldToSpreadsheet(row, MetaDataFields.StartDate, startDateString); addFieldToSpreadsheet(row, MetaDataFields.StartTime, startTimeString); addFieldToSpreadsheet(row, MetaDataFields.EndDate, endDateString); addFieldToSpreadsheet(row, MetaDataFields.EndTime, endTimeString); addFieldToSpreadsheet(row, MetaDataFields.TimeSeriesDate, timeSeriesDate); addFieldToSpreadsheet(row, MetaDataFields.TimeSeriesTime, timeSeriesTime); addFieldToSpreadsheet(row, MetaDataFields.FileMetaDataBreak, COLUMN_BREAK); addFieldToSpreadsheet(row, MetaDataFields.FileName, getProduct().getName()); addFieldToSpreadsheet(row, MetaDataFields.FileType, getProduct().getProductType()); addFieldToSpreadsheet(row, MetaDataFields.FileWidth, getProduct().getSceneRasterWidth()); addFieldToSpreadsheet(row, MetaDataFields.FileFormat, getProductFormatName(getProduct())); addFieldToSpreadsheet(row, MetaDataFields.FileHeight, getProduct().getSceneRasterHeight()); addFieldToSpreadsheet(row, MetaDataFields.Sensor, ProductUtils.getMetaData(getProduct(), ProductUtils.METADATA_POSSIBLE_SENSOR_KEYS)); addFieldToSpreadsheet(row, MetaDataFields.Platform, ProductUtils.getMetaData(getProduct(), ProductUtils.METADATA_POSSIBLE_PLATFORM_KEYS)); addFieldToSpreadsheet(row, MetaDataFields.Resolution, ProductUtils.getMetaData(getProduct(), ProductUtils.METADATA_POSSIBLE_RESOLUTION_KEYS)); addFieldToSpreadsheet(row, MetaDataFields.DayNight, ProductUtils.getMetaData(getProduct(), ProductUtils.METADATA_POSSIBLE_DAY_NIGHT_KEYS)); addFieldToSpreadsheet(row, MetaDataFields.Orbit, ProductUtils.getMetaDataOrbit(getProduct())); addFieldToSpreadsheet(row, MetaDataFields.ProcessingVersion, ProductUtils.getMetaData(getProduct(), ProductUtils.METADATA_POSSIBLE_PROCESSING_VERSION_KEYS)); // Determine projection String projection = ""; String projectionParameters = ""; GeoCoding geo = getProduct().getGeoCoding(); // determine if using class CrsGeoCoding otherwise display class if (geo != null) { if (geo instanceof CrsGeoCoding) { projection = geo.getMapCRS().getName().toString() + "(obtained from CrsGeoCoding)"; projectionParameters = geo.getMapCRS().toString().replaceAll("\n", " ").replaceAll(" ", ""); } else if (geo.toString() != null) { String projectionFromMetaData = ProductUtils.getMetaData(getProduct(), ProductUtils.METADATA_POSSIBLE_PROJECTION_KEYS); if (projectionFromMetaData != null && projectionFromMetaData.length() > 0) { projection = projectionFromMetaData + "(obtained from MetaData)"; } else { projection = "unknown (" + geo.getClass().toString() + ")"; } } } addFieldToSpreadsheet(row, MetaDataFields.Projection, projection); addFieldToSpreadsheet(row, MetaDataFields.ProjectionParameters, projectionParameters); addFieldToSpreadsheet(row, MetaDataFields.BandMetaDataBreak, COLUMN_BREAK); addFieldToSpreadsheet(row, MetaDataFields.BandName, raster.getName()); addFieldToSpreadsheet(row, MetaDataFields.BandUnit, raster.getUnit()); addFieldToSpreadsheet(row, MetaDataFields.BandValidExpression, raster.getValidPixelExpression()); addFieldToSpreadsheet(row, MetaDataFields.BandDescription, raster.getDescription()); addFieldToSpreadsheet(row, MetaDataFields.RegionalMaskMetaDataBreak, COLUMN_BREAK); addFieldToSpreadsheet(row, MetaDataFields.RegionalMaskName, maskName); addFieldToSpreadsheet(row, MetaDataFields.RegionalMaskDescription, maskDescription); addFieldToSpreadsheet(row, MetaDataFields.RegionalMaskExpression, maskExpression); addFieldToSpreadsheet(row, MetaDataFields.QualityMaskMetaDataBreak, COLUMN_BREAK); addFieldToSpreadsheet(row, MetaDataFields.QualityMaskName, qualityMaskName); addFieldToSpreadsheet(row, MetaDataFields.QualityMaskDescription, qualityMaskDescription); addFieldToSpreadsheet(row, MetaDataFields.QualityMaskExpression, qualityMaskExpression); // Add Header first time through if (row <= 1) { int k = stxFieldsStartIdx; for (int i = 0; i < tableData.length; i++) { Object value = tableData[i][0]; if (k < statsSpreadsheet[0].length && k <= stxFieldsEndIdx) { statsSpreadsheet[0][k] = value; k++; } } } // account for header as added row if (row < statsSpreadsheet.length) { int k = stxFieldsStartIdx; for (int i = 0; i < tableData.length; i++) { Object value = tableData[i][1]; if (k < statsSpreadsheet[row].length && k <= stxFieldsEndIdx) { statsSpreadsheet[row][k] = value; k++; } } } int numPlots = 0; if (statisticsCriteriaPanel.showPercentPlots()) { numPlots++; } if (statisticsCriteriaPanel.showHistogramPlots()) { numPlots++; } JPanel plotContainerPanel = null; if (numPlots > 0) { plotContainerPanel = new JPanel(new GridLayout(1, numPlots)); if (statisticsCriteriaPanel.showHistogramPlots()) { plotContainerPanel.add(histogramPanel); } if (statisticsCriteriaPanel.showPercentPlots()) { plotContainerPanel.add(percentilePanel); } } TableModel tableModel = new DefaultTableModel(tableData, new String[] { "Name", "Value" }) { @Override public Class<?> getColumnClass(int columnIndex) { return columnIndex == 0 ? String.class : Number.class; } @Override public boolean isCellEditable(int row, int column) { return false; } }; final JTable table = new JTable(tableModel); table.setDefaultRenderer(Number.class, new DefaultTableCellRenderer() { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { final Component label = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (value instanceof Float || value instanceof Double) { setHorizontalTextPosition(RIGHT); setText(getFormattedValue((Number) value)); } return label; } private String getFormattedValue(Number value) { if (value.doubleValue() < 0.001 && value.doubleValue() > -0.001 && value.doubleValue() != 0.0) { return new DecimalFormat("0.####E0").format(value.doubleValue()); } String format = "%." + Integer.toString(statisticsCriteriaPanel.decimalPlaces()) + "f"; return String.format(format, value.doubleValue()); } }); table.addMouseListener(popupHandler); // TEST CODE generically preferred size of each column based on longest expected entry // fails a bit because decimal formatting is not captured // stub of code commented out in case we want to make it work // meanwhile longest entry is being used SEE below // int column0Length = 0; // int column1Length = 0; // FontMetrics fm = table.getFontMetrics(table.getFont()); // for (int rowIndex = 0; rowIndex < table.getRowCount(); rowIndex++) { // String test = table.getValueAt(rowIndex,0).toString(); // int currColumn0Length = fm.stringWidth(table.getValueAt(rowIndex,0).toString()); // if (currColumn0Length > column0Length) { // column0Length = currColumn0Length; // } // // String test2 = table.getValueAt(rowIndex,1).toString(); // int currColumn1Length = fm.stringWidth(table.getValueAt(rowIndex,1).toString()); // if (currColumn1Length > column1Length) { // column1Length = currColumn1Length; // } // } // Set preferred size of each column based on longest expected entry FontMetrics fm = table.getFontMetrics(table.getFont()); TableColumn column = null; int col1PreferredWidth = -1; if (statisticsCriteriaPanel.isLogMode()) { col1PreferredWidth = fm.stringWidth("StandardDeviation(LogBinned):") + 10; } else { col1PreferredWidth = fm.stringWidth("StandardDeviation(Binned):") + 10; } // int col1PreferredWidth = fm.stringWidth("wwwwwwwwwwwwwwwwwwwwwwwwww"); int col2PreferredWidth = fm.stringWidth("1234567890") + 10; int tablePreferredWidth = col1PreferredWidth + col2PreferredWidth; for (int i = 0; i < 2; i++) { column = table.getColumnModel().getColumn(i); if (i == 0) { column.setPreferredWidth(col1PreferredWidth); column.setMaxWidth(col1PreferredWidth); } else { column.setPreferredWidth(col2PreferredWidth); } } JPanel textContainerPanel = new JPanel(new BorderLayout(2, 2)); // textContainerPanel.setBackground(Color.WHITE); textContainerPanel.add(table, BorderLayout.CENTER); textContainerPanel.addMouseListener(popupHandler); JPanel statsPane = GridBagUtils.createPanel(); GridBagConstraints gbc = GridBagUtils.createConstraints(""); gbc.gridy = 0; gbc.fill = GridBagConstraints.BOTH; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.weightx = 1; gbc.weighty = 1; Dimension dim = table.getPreferredSize(); table.setPreferredSize(new Dimension(tablePreferredWidth, dim.height)); statsPane.add(table, gbc); statsPane.setPreferredSize(new Dimension(tablePreferredWidth, dim.height)); JPanel plotsPane = null; if (plotContainerPanel != null) { plotsPane = GridBagUtils.createPanel(); plotsPane.setBackground(Color.WHITE); // plotsPane.setBorder(UIUtils.createGroupBorder(" ")); /*I18N*/ GridBagConstraints gbcPlots = GridBagUtils.createConstraints(""); gbcPlots.gridy = 0; if (statisticsCriteriaPanel.exactPlotSize()) { gbcPlots.fill = GridBagConstraints.NONE; } else { gbcPlots.fill = GridBagConstraints.BOTH; } gbcPlots.anchor = GridBagConstraints.NORTHWEST; gbcPlots.weightx = 0.5; gbcPlots.weighty = 1; plotsPane.add(plotContainerPanel, gbcPlots); } JPanel mainPane = GridBagUtils.createPanel(); mainPane.setBorder(UIUtils.createGroupBorder(getSubPanelTitle(regionalMask, qualityMask, raster))); /*I18N*/ GridBagConstraints gbcMain = GridBagUtils.createConstraints(""); gbcMain.gridx = 0; gbcMain.gridy = 0; gbcMain.anchor = GridBagConstraints.NORTHWEST; if (plotsPane != null) { gbcMain.fill = GridBagConstraints.VERTICAL; gbcMain.weightx = 0; } else { gbcMain.fill = GridBagConstraints.BOTH; gbcMain.weightx = 1; } if (statisticsCriteriaPanel.showStatsList()) { gbcMain.weighty = 1; mainPane.add(statsPane, gbcMain); gbcMain.gridx++; } gbcMain.weightx = 1; gbcMain.weighty = 1; gbcMain.fill = GridBagConstraints.BOTH; if (plotsPane != null) { mainPane.add(plotsPane, gbcMain); } return mainPane; }