public static JPanel createPageUIContentPane(JPanel pane) { JPanel contentPane = GridBagUtils.createPanel(); final GridBagConstraints gbc = GridBagUtils.createConstraints("fill=HORIZONTAL,anchor=NORTHWEST"); gbc.insets.top = _PAGE_INSET_TOP; gbc.weightx = 1; gbc.weighty = 0; contentPane.add(pane, gbc); GridBagUtils.addVerticalFiller(contentPane, gbc); return contentPane; }
private JPanel createCheckersPane() { _checkBoxes = new JCheckBox[_allProducts.length]; final JPanel checkersPane = GridBagUtils.createPanel(); final GridBagConstraints gbc = GridBagUtils.createConstraints("insets.left=4,anchor=WEST,fill=HORIZONTAL"); final StringBuffer description = new StringBuffer(); addProductCheckers(description, checkersPane, gbc); return checkersPane; }
private JPanel createPageUI() { JPanel pageUI = GridBagUtils.createPanel(); box = new JComboBox(); box.setRenderer(new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { Component rendererComponent = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (value instanceof WorldMapLayerType && rendererComponent instanceof JLabel) { WorldMapLayerType worldMapLayerType = (WorldMapLayerType) value; JLabel label = (JLabel) rendererComponent; label.setText(worldMapLayerType.getLabel()); } return rendererComponent; } }); GridBagConstraints gbc = GridBagUtils.createConstraints("fill=HORIZONTAL,anchor=WEST"); gbc.gridy = 0; gbc.weightx = 0; pageUI.add(new JLabel("World Map Layer: "), gbc); gbc.weightx = 1; pageUI.add(box, gbc); gbc.insets.top = _LINE_INSET_TOP; return createPageUIContentPane(pageUI); }
@Override public JPanel createCheckersPane() { int length = 0; if (allBands != null) { length += allBands.length; } if (allTiePointGrids != null) { length += allTiePointGrids.length; } checkBoxes = new JCheckBox[length]; final JPanel checkersPane = GridBagUtils.createPanel(); final GridBagConstraints gbc = GridBagUtils.createConstraints("insets.left=4,anchor=NORTHWEST,fill=HORIZONTAL"); final ActionListener checkListener = createActionListener(); addBandCheckers(new StringBuffer(), checkersPane, gbc, checkListener); addTiePointCheckers(new StringBuffer(), checkersPane, gbc, checkListener); GridBagUtils.addVerticalFiller(checkersPane, gbc); return checkersPane; }
public JPanel createPanel() { final JPanel roiMaskPanel = GridBagUtils.createPanel(); GridBagConstraints roiMaskPanelConstraints = GridBagUtils.createConstraints("anchor=SOUTHWEST,fill=HORIZONTAL,insets.top=2"); GridBagUtils.addToPanel(roiMaskPanel, useRoiMaskCheckBox, roiMaskPanelConstraints, ",gridy=0,gridx=0,weightx=1"); GridBagUtils.addToPanel(roiMaskPanel, roiMaskComboBox, roiMaskPanelConstraints, "gridy=1,insets.left=4"); GridBagUtils.addToPanel(roiMaskPanel, showMaskManagerButton, roiMaskPanelConstraints, "gridheight=2,gridy=0,gridx=1,weightx=0,ipadx=5,insets.left=0"); return roiMaskPanel; }
final GridBagConstraints gbc = GridBagUtils.createConstraints(null); gbc.anchor = GridBagConstraints.WEST; gbc.weightx = 1;
GridBagConstraints gbc = GridBagUtils.createConstraints( "fill=HORIZONTAL,weightx=1,anchor=NORTHWEST,insets.left=7,insets.right=7,insets.bottom=4"); GridBagUtils.addToPanel(accessoryPane, _subsetButton, gbc, "gridy=0");
private JPanel createOptionsPanel() { toggleColorCheckBox = new JCheckBox("Invert plot colors"); toggleColorCheckBox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { toggleColor(); } }); toggleColorCheckBox.setEnabled(false); final JPanel optionsPanel = GridBagUtils.createPanel(); final GridBagConstraints gbc = GridBagUtils.createConstraints("anchor=NORTHWEST,fill=HORIZONTAL,insets.top=0,weightx=1,gridx=0"); GridBagUtils.addToPanel(optionsPanel, axisRangeControls[X_VAR].getPanel(), gbc, "gridy=0"); GridBagUtils.addToPanel(optionsPanel, xBandList, gbc, "gridy=1,insets.left=4,insets.right=2"); GridBagUtils.addToPanel(optionsPanel, axisRangeControls[Y_VAR].getPanel(), gbc, "gridy=2,insets.left=0,insets.right=0"); GridBagUtils.addToPanel(optionsPanel, yBandList, gbc, "gridy=3,insets.left=4,insets.right=2"); GridBagUtils.addToPanel(optionsPanel, new JPanel(), gbc, "gridy=4"); GridBagUtils.addToPanel(optionsPanel, new JSeparator(), gbc, "gridy=5,insets.left=4,insets.right=2"); GridBagUtils.addToPanel(optionsPanel, toggleColorCheckBox, gbc, "gridy=6,insets.left=0,insets.right=0"); return optionsPanel; }
private JPanel createPageUI() { Parameter param; GridBagConstraints gbc; final JPanel productCompatibility = GridBagUtils.createPanel(); productCompatibility.setBorder(UIUtils.createGroupBorder("Product Compatibility")); /*I18N*/ gbc = GridBagUtils.createConstraints("fill=HORIZONTAL, anchor=WEST, weightx=1, gridy=1"); param = getConfigParam(PROPERTY_KEY_GEOLOCATION_EPS); gbc.insets.bottom += 8; gbc.gridwidth = 3; productCompatibility.add(new JLabel("Consider products as spatially compatible:"), gbc); /*I18N*/ gbc.insets.bottom -= 8; gbc.gridy++; GridBagUtils.addToPanel(productCompatibility, param.getEditor().getLabelComponent(), gbc, "gridwidth=1"); GridBagUtils.addToPanel(productCompatibility, param.getEditor().getEditorComponent(), gbc, "weightx=1"); GridBagUtils.addToPanel(productCompatibility, param.getEditor().getPhysUnitLabelComponent(), gbc, "weightx=0"); // UI JPanel pageUI = GridBagUtils.createPanel(); gbc = GridBagUtils.createConstraints("fill=HORIZONTAL, anchor=WEST, weightx=1, gridy=1"); pageUI.add(productCompatibility, gbc); gbc.gridy++; return createPageUIContentPane(pageUI); } }
private JPanel createPageUI() { Parameter param; GridBagConstraints gbc; // UI JPanel pageUI = GridBagUtils.createPanel(); gbc = GridBagUtils.createConstraints("fill=HORIZONTAL, anchor=WEST, weightx=1"); gbc.gridy = 0; gbc.insets.bottom = 8; param = getConfigParam(ProductSceneView.PROPERTY_KEY_GRAPHICS_ANTIALIASING); pageUI.add(param.getEditor().getEditorComponent(), gbc); gbc.gridy++; final JLabel note = new JLabel("Note: For best performance turn anti-aliasing off."); configureNoteLabel(note); pageUI.add(note, gbc); gbc.gridy++; gbc.insets.top = _LINE_INSET_TOP; param = getConfigParam(ProductSceneView.PROPERTY_KEY_IMAGE_NAV_CONTROL_SHOWN); pageUI.add(param.getEditor().getEditorComponent(), gbc); gbc.gridy++; gbc.insets.top = _LINE_INSET_TOP; param = getConfigParam(ProductSceneView.PROPERTY_KEY_IMAGE_SCROLL_BARS_SHOWN); pageUI.add(param.getEditor().getEditorComponent(), gbc); gbc.gridy++; return createPageUIContentPane(pageUI); } }
private JPanel createPageUI() { Parameter param; JPanel pageUI = GridBagUtils.createPanel(); GridBagConstraints gbc = GridBagUtils.createConstraints("fill=HORIZONTAL,anchor=WEST"); gbc.gridy = 0; param = getConfigParam("noDataOverlay.color"); gbc.weightx = 0; pageUI.add(param.getEditor().getLabelComponent(), gbc); gbc.weightx = 1; pageUI.add(param.getEditor().getEditorComponent(), gbc); gbc.gridy++; gbc.insets.top = _LINE_INSET_TOP; param = getConfigParam("noDataOverlay.transparency"); gbc.weightx = 0; pageUI.add(param.getEditor().getLabelComponent(), gbc); gbc.weightx = 1; pageUI.add(param.getEditor().getEditorComponent(), gbc); gbc.gridy++; return createPageUIContentPane(pageUI); }
GridBagConstraints extendedOptionsPanelConstraints = GridBagUtils.createConstraints("insets.left=4,insets.right=2,anchor=NORTHWEST,fill=HORIZONTAL,insets.top=2,weightx=1"); GridBagUtils.addToPanel(extendedOptionsPanel, new JSeparator(), extendedOptionsPanelConstraints, "gridy=0"); GridBagUtils.addToPanel(extendedOptionsPanel, roiMaskSelector.createPanel(), extendedOptionsPanelConstraints, "gridy=1,insets.left=-4");
private JPanel createPageUI() { Parameter param; JPanel pageUI = GridBagUtils.createPanel(); //pageUI.setBorder(UIUtils.createGroupBorder("ROI Overlay")); /*I18N*/ GridBagConstraints gbc = GridBagUtils.createConstraints("fill=HORIZONTAL,anchor=WEST"); gbc.gridy = 0; param = getConfigParam(PARAMETER_NAME_MASK_COLOR); gbc.weightx = 0; pageUI.add(param.getEditor().getLabelComponent(), gbc); gbc.weightx = 1; pageUI.add(param.getEditor().getEditorComponent(), gbc); gbc.gridy++; gbc.insets.top = _LINE_INSET_TOP; param = getConfigParam(PARAMETER_NAME_MASK_TRANSPARENCY); gbc.weightx = 0; pageUI.add(param.getEditor().getLabelComponent(), gbc); gbc.weightx = 1; pageUI.add(param.getEditor().getEditorComponent(), gbc); gbc.gridy++; return createPageUIContentPane(pageUI); } }
private JPanel createPageUI() { Parameter param; GridBagConstraints gbc; JPanel beamDimap = GridBagUtils.createPanel(); //beamDimap.setBorder(UIUtils.createGroupBorder("Default Format")); /*I18N*/ gbc = GridBagUtils.createConstraints("fill=HORIZONTAL,anchor=WEST, weightx=1"); gbc.gridy = 0; param = getConfigParam(PROPERTY_KEY_SAVE_PRODUCT_HEADERS); beamDimap.add(param.getEditor().getEditorComponent(), gbc); gbc.gridy++; param = getConfigParam(PROPERTY_KEY_SAVE_PRODUCT_HISTORY); beamDimap.add(param.getEditor().getEditorComponent(), gbc); gbc.gridy++; param = getConfigParam(PROPERTY_KEY_SAVE_PRODUCT_ANNOTATIONS); GridBagUtils.addToPanel(beamDimap, param.getEditor().getEditorComponent(), gbc); gbc.gridy++; param = getConfigParam(PROPERTY_KEY_SAVE_INCREMENTAL); GridBagUtils.addToPanel(beamDimap, param.getEditor().getEditorComponent(), gbc); gbc.gridy++; JPanel pageUI = GridBagUtils.createPanel(); gbc = GridBagUtils.createConstraints("fill=HORIZONTAL,anchor=WEST, weightx=1"); pageUI.add(beamDimap, gbc); return createPageUIContentPane(pageUI); } }
GridBagConstraints helpPanelConstraints = GridBagUtils.createConstraints("anchor=NORTHWEST,fill=HORIZONTAL,insets.top=2,weightx=1,ipadx=0"); GridBagUtils.addToPanel(exportAndHelpPanel, new JSeparator(), helpPanelConstraints, "fill=HORIZONTAL,gridwidth=2,insets.left=5,insets.right=5"); GridBagUtils.addToPanel(exportAndHelpPanel, exportButton, helpPanelConstraints, "gridy=1,anchor=WEST,fill=NONE"); GridBagConstraints extendedOptionsPanelConstraints = GridBagUtils.createConstraints("anchor=NORTHWEST,fill=HORIZONTAL,insets.top=2,weightx=1,insets.right=-2"); GridBagUtils.addToPanel(rightPanel, computePanel, extendedOptionsPanelConstraints, "gridy=0,fill=BOTH,weighty=1"); GridBagUtils.addToPanel(rightPanel, createAccuracyPanel(), extendedOptionsPanelConstraints, "gridy=1,fill=BOTH,weighty=1");
private JPanel createPixelCoordinatesPane() { GridBagConstraints gbc = GridBagUtils.createConstraints( "insets.left=3,anchor=WEST,fill=HORIZONTAL, weightx=1.0"); JPanel pixelCoordinatesPane = GridBagUtils.createPanel(); setComponentName(pixelCoordinatesPane, "pixelCoordinatesPane"); GridBagUtils.setAttributes(gbc, "insets.top=4"); GridBagUtils.addToPanel(pixelCoordinatesPane, new JLabel("Scene start X:"), gbc, "gridx=0,gridy=0"); GridBagUtils.addToPanel(pixelCoordinatesPane, UIUtils.createSpinner(paramX1, 25, "#0"), gbc, "gridx=1,gridy=0"); GridBagUtils.setAttributes(gbc, "insets.top=1"); GridBagUtils.addToPanel(pixelCoordinatesPane, new JLabel("Scene start Y:"), gbc, "gridx=0,gridy=1"); GridBagUtils.addToPanel(pixelCoordinatesPane, UIUtils.createSpinner(paramY1, 25, "#0"), gbc, "gridx=1,gridy=1"); GridBagUtils.setAttributes(gbc, "insets.top=4"); GridBagUtils.addToPanel(pixelCoordinatesPane, new JLabel("Scene end X:"), gbc, "gridx=0,gridy=2"); GridBagUtils.addToPanel(pixelCoordinatesPane, UIUtils.createSpinner(paramX2, 25, "#0"), gbc, "gridx=1,gridy=2"); GridBagUtils.setAttributes(gbc, "insets.top=1"); GridBagUtils.addToPanel(pixelCoordinatesPane, new JLabel("Scene end Y:"), gbc, "gridx=0,gridy=3"); GridBagUtils.addToPanel(pixelCoordinatesPane, UIUtils.createSpinner(paramY2, 25, "#0"), gbc, "gridx=1,gridy=3"); return pixelCoordinatesPane; }
private JPanel createGeoCoordinatesPane() { JPanel geoCoordinatesPane = GridBagUtils.createPanel(); setComponentName(geoCoordinatesPane, "geoCoordinatesPane"); GridBagConstraints gbc = GridBagUtils.createConstraints( "insets.left=3,anchor=WEST,fill=HORIZONTAL, weightx=1.0"); GridBagUtils.setAttributes(gbc, "insets.top=4"); GridBagUtils.addToPanel(geoCoordinatesPane, new JLabel("North latitude bound:"), gbc, "gridx=0,gridy=0"); GridBagUtils.addToPanel(geoCoordinatesPane, UIUtils.createSpinner(paramNorthLat1, (double) 1, "#0.00#"), gbc, "gridx=1,gridy=0"); GridBagUtils.setAttributes(gbc, "insets.top=1"); GridBagUtils.addToPanel(geoCoordinatesPane, new JLabel("West longitude bound:"), gbc, "gridx=0,gridy=1"); GridBagUtils.addToPanel(geoCoordinatesPane, UIUtils.createSpinner(paramWestLon1, (double) 1, "#0.00#"), gbc, "gridx=1,gridy=1"); GridBagUtils.setAttributes(gbc, "insets.top=4"); GridBagUtils.addToPanel(geoCoordinatesPane, new JLabel("South latitude bound:"), gbc, "gridx=0,gridy=2"); GridBagUtils.addToPanel(geoCoordinatesPane, UIUtils.createSpinner(paramSouthLat2, (double) 1, "#0.00#"), gbc, "gridx=1,gridy=2"); GridBagUtils.setAttributes(gbc, "insets.top=1"); GridBagUtils.addToPanel(geoCoordinatesPane, new JLabel("East longitude bound:"), gbc, "gridx=0,gridy=3"); GridBagUtils.addToPanel(geoCoordinatesPane, UIUtils.createSpinner(paramEastLon2, (double) 1, "#0.00#"), gbc, "gridx=1,gridy=3"); return geoCoordinatesPane; }
GridBagConstraints gbc = GridBagUtils.createConstraints("fill=HORIZONTAL,anchor=WEST,weightx=1"); gbc.gridy = 0;
renderer.setTextSelectionColor(Color.BLACK); GridBagConstraints gbc2 = GridBagUtils.createConstraints("insets.left=4,anchor=WEST,fill=BOTH"); final JPanel checkersPane = GridBagUtils.createPanel(); GridBagUtils.addToPanel(checkersPane, checkBoxTree, gbc2, "weightx=1.0,weighty=1.0");
final GridBagConstraints gbc = GridBagUtils.createConstraints("anchor=WEST,fill=HORIZONTAL");