com.bc.ceres.swing.TableLayout类的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(15.4k)|赞(0)|评价(0)|浏览(123)

本文整理了Java中com.bc.ceres.swing.TableLayout类的一些代码示例,展示了TableLayout类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableLayout类的具体详情如下:
包路径:com.bc.ceres.swing.TableLayout
类名称:TableLayout

TableLayout介绍

暂无

代码示例

代码示例来源:origin: senbox-org/s2tbx

private TableLayout getTableLayout( int columnCount) {
  final TableLayout layout = new TableLayout(columnCount);
  layout.setTableAnchor(TableLayout.Anchor.WEST);
  layout.setTableFill(TableLayout.Fill.BOTH);
  layout.setTableWeightX(1.0);
  layout.setTablePadding(3, 3);
  return layout;
}

代码示例来源:origin: senbox-org/snap-desktop

private JPanel createSubParametersPanel() {
    final TableLayout tableLayout = new TableLayout(2);
    tableLayout.setTablePadding(3, 3);
    tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
    tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
    tableLayout.setColumnWeightX(1, 1.0);
    tableLayout.setCellColspan(4, 0, 2);
    JPanel panel = new JPanel(tableLayout);

    panel.add(new JLabel("Abundance band name suffix: "));
    panel.add(abundanceBandNameSuffix);

    panel.add(new JLabel("Error band name suffix: "));
    panel.add(errorBandNameSuffix);

    panel.add(new JLabel("Spectral unmixing model: "));
    panel.add(unmixingModelName);

    panel.add(new JLabel("Minimum spectral bandwidth: "));
    panel.add(minBandwidth);

    panel.add(computeErrorBands);

    panel.add(tableLayout.createVerticalSpacer());
    return panel;
  }
}

代码示例来源:origin: bcdev/beam

private JPanel createParametersPanel() {
  final TableLayout tableLayout = new TableLayout(2);
  tableLayout.setTableAnchor(TableLayout.Anchor.CENTER);
  tableLayout.setTableFill(TableLayout.Fill.BOTH);
  tableLayout.setTablePadding(3, 3);
  tableLayout.setCellPadding(0, 0, new Insets(0, 0, 10, 10));
  tableLayout.setCellColspan(1, 0, 2);
  tableLayout.setCellColspan(2, 0, 2);
  tableLayout.setRowWeightY(0, 0.5);
  tableLayout.setRowWeightY(1, 0.0);
  tableLayout.setRowWeightY(2, 0.5);
  tableLayout.setColumnWeightX(0, 1.0);
  tableLayout.setColumnWeightX(1, 1.0);
  JPanel panel = new JPanel(tableLayout);
  panel.setBorder(BorderFactory.createTitledBorder("Parameters"));
  panel.add(createSourceBandsPanel());
  panel.add(createSubParametersPanel());
  panel.add(new JLabel("Endmembers:"));
  panel.add(endmemberForm);
  return panel;
}

代码示例来源:origin: bcdev/beam

private static TableLayout createLayout() {
    final TableLayout tableLayout = new TableLayout(1);
    tableLayout.setRowPadding(0, new Insets(4, 4, 4, 0));
    tableLayout.setColumnWeightX(0, 1.0);
    tableLayout.setRowWeightY(1, 1.0);
    tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
    tableLayout.setRowFill(1, TableLayout.Fill.BOTH);
    return tableLayout;
  }
}

代码示例来源:origin: bcdev/beam

private TableLayout createLayout() {
  final TableLayout layout = new TableLayout(4);
  layout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
  layout.setTablePadding(new Insets(4, 4, 4, 4));
  layout.setColumnFill(0, TableLayout.Fill.BOTH);
  layout.setColumnFill(1, TableLayout.Fill.VERTICAL);
  layout.setColumnFill(2, TableLayout.Fill.BOTH);
  layout.setColumnFill(3, TableLayout.Fill.BOTH);
  layout.setRowFill(0, TableLayout.Fill.NONE);
  layout.setRowAnchor(0, TableLayout.Anchor.SOUTHWEST);
  layout.setRowWeightY(1, 100.0);
  layout.setColumnWeightX(0, 100.0);
  layout.setColumnWeightX(2, 100.0);
  layout.setColumnWeightX(3, 100.0);
  layout.setCellFill(0, 0, TableLayout.Fill.NONE);
  layout.setCellFill(0, 1, TableLayout.Fill.NONE);
  layout.setCellFill(0, 2, TableLayout.Fill.NONE);
  layout.setCellFill(0, 3, TableLayout.Fill.NONE);
  return layout;
}

代码示例来源:origin: senbox-org/s2tbx

private static JPanel createTargetProductSelectorPanel(final TargetProductSelector selector) {
  final JPanel subPanel1 = new JPanel(new BorderLayout(3, 3));
  subPanel1.add(selector.getProductNameLabel(), BorderLayout.NORTH);
  subPanel1.add(selector.getProductNameTextField(), BorderLayout.CENTER);
  final JPanel subPanel2 = new JPanel(new FlowLayout(FlowLayout.LEADING, 0, 0));
  subPanel2.add(selector.getSaveToFileCheckBox());
  subPanel2.add(selector.getFormatNameComboBox());
  final JPanel subPanel3 = new JPanel(new BorderLayout(3, 3));
  subPanel3.add(selector.getProductDirLabel(), BorderLayout.NORTH);
  subPanel3.add(selector.getProductDirTextField(), BorderLayout.CENTER);
  subPanel3.add(selector.getProductDirChooserButton(), BorderLayout.EAST);
  final TableLayout tableLayout = new TableLayout(1);
  tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
  tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
  tableLayout.setTableWeightX(1.0);
  tableLayout.setCellPadding(0, 0, new Insets(3, 3, 3, 3));
  tableLayout.setCellPadding(1, 0, new Insets(3, 0, 3, 3));
  tableLayout.setCellPadding(2, 0, new Insets(0, 21, 3, 3));
  final JPanel panel = new JPanel(tableLayout);
  panel.add(subPanel1);
  panel.add(subPanel2);
  panel.add(subPanel3);
  return panel;
}

代码示例来源:origin: senbox-org/s2tbx

private JPanel createUpdateProductSelectorPanel(final SourceProductSelector selector) {
  final JPanel subPanel = new JPanel(new BorderLayout(3, 3));
  subPanel.add(selector.getProductNameComboBox(), BorderLayout.CENTER);
  subPanel.add(selector.getProductFileChooserButton(), BorderLayout.EAST);
  final TableLayout tableLayout = new TableLayout(1);
  tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
  tableLayout.setTableWeightX(1.0);
  tableLayout.setRowFill(0, TableLayout.Fill.HORIZONTAL);
  tableLayout.setRowFill(1, TableLayout.Fill.HORIZONTAL);
  tableLayout.setTablePadding(3, 3);
  JPanel panel = new JPanel(tableLayout);
  panel.add(selector.getProductNameLabel());
  panel.add(subPanel);
  panel.add(tableLayout.createVerticalSpacer());
  return panel;
}

代码示例来源:origin: senbox-org/snap-desktop

private JPanel createOuputSettingsPanel() {
  final TableLayout tableLayout = new TableLayout(3);
  tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
  tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
  tableLayout.setColumnFill(0, TableLayout.Fill.NONE);
  tableLayout.setTablePadding(4, 4);
  tableLayout.setColumnPadding(0, new Insets(4, 4, 4, 20));
  tableLayout.setColumnWeightX(0, 0.0);
  tableLayout.setColumnWeightX(1, 0.0);
  tableLayout.setColumnWeightX(2, 1.0);
  tableLayout.setCellColspan(0, 1, 2);
  tableLayout.setCellPadding(1, 0, new Insets(4, 24, 4, 20));

代码示例来源:origin: bcdev/beam

private JPanel createMosaicBoundsPanel() {
  final TableLayout layout = new TableLayout(1);
  layout.setTableAnchor(TableLayout.Anchor.WEST);
  layout.setTableFill(TableLayout.Fill.BOTH);
  layout.setTableWeightX(1.0);
  layout.setTableWeightY(0.0);
  layout.setRowWeightY(1, 1.0);
  layout.setRowAnchor(2, TableLayout.Anchor.EAST);
  layout.setRowFill(2, TableLayout.Fill.NONE);
  layout.setTablePadding(3, 3);
  final JPanel panel = new JPanel(layout);
  panel.setBorder(BorderFactory.createTitledBorder("Mosaic Bounds"));
  final WorldMapPaneDataModel worldMapModel = mosaicModel.getWorldMapModel();
  setMapBoundary(worldMapModel);
  final JPanel worldMapPanel = new RegionSelectableWorldMapPane(worldMapModel, bindingCtx).createUI();
  bindingCtx.addPropertyChangeListener(new MapBoundsChangeListener());
  worldMapPanel.setMinimumSize(new Dimension(250, 125));
  worldMapPanel.setBorder(BorderFactory.createEtchedBorder());
  final JCheckBox showSourceProductsCheckBox = new JCheckBox("Display source products");
  bindingCtx.bind(MosaicFormModel.PROPERTY_SHOW_SOURCE_PRODUCTS, showSourceProductsCheckBox);
  boundsInputPanel = new BoundsInputPanel(bindingCtx, MosaicFormModel.PROPERTY_UPDATE_MODE);
  panel.add(boundsInputPanel.createBoundsInputPanel(true));
  panel.add(worldMapPanel);
  panel.add(showSourceProductsCheckBox);
  return panel;
}

代码示例来源:origin: senbox-org/snap-desktop

private JPanel createResamplingPanel() {
  final TableLayout layout = new TableLayout(3);
  layout.setTableAnchor(TableLayout.Anchor.LINE_START);
  layout.setTableFill(TableLayout.Fill.HORIZONTAL);
  layout.setColumnWeightX(0, 0.0);
  layout.setColumnWeightX(1, 0.0);
  layout.setColumnWeightX(2, 1.0);
  layout.setCellPadding(0, 0, new Insets(3, 3, 3, 3));
  final JPanel panel = new JPanel(layout);
  panel.setBorder(BorderFactory.createTitledBorder("Resampling"));
  panel.add(new JLabel("Method:"));
  panel.add(resamplingComboBox);
  panel.add(new JLabel());
  return panel;
}

代码示例来源:origin: bcdev/beam

private void createUI(JFreeChart chart, String helpID) {
  final TableLayout tableLayout = new TableLayout(2);
  tableLayout.setTablePadding(4, 4);
  tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
  tableLayout.setTableFill(TableLayout.Fill.BOTH);
  tableLayout.setTableWeightY(1.0);
  tableLayout.setColumnWeightX(0, 1.0);
  tableLayout.setColumnWeightX(1, 0.0);
  tableLayout.setRowWeightY(0, 1.0);
  tableLayout.setRowWeightY(1, 0.0);
  tableLayout.setCellRowspan(0, 1, 2);
  tableLayout.setCellFill(1, 0, TableLayout.Fill.HORIZONTAL);
  tableLayout.setCellPadding(1, 0, new Insets(5, 5, 5, 5));
  mainPanel = new JPanel(tableLayout);
  mainPanel.setPreferredSize(new Dimension(320, 200));
  ChartPanel chartPanel = new ChartPanel(chart);
  chartPanel.setBorder(BorderFactory.createCompoundBorder(
        BorderFactory.createBevelBorder(BevelBorder.LOWERED),
        BorderFactory.createEmptyBorder(2, 2, 2, 2)));
  mainPanel.add(chartPanel);
  mainPanel.add(createButtonPanel(helpID));
  mainPanel.add(validatorUI.createUI());
}

代码示例来源:origin: bcdev/beam

final TableLayout tableLayout = new TableLayout(2);
tableLayout.setTablePadding(4, 4);
tableLayout.setTableFill(TableLayout.Fill.BOTH);
tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
tableLayout.setTableWeightX(0.0);
tableLayout.setTableWeightY(0.0);
tableLayout.setColumnWeightX(0, 1.0);
tableLayout.setRowWeightY(1, 1.0);
tableLayout.setCellColspan(0, 0, 2);

代码示例来源:origin: bcdev/beam

private JComponent createControl() {
  final TableLayout layout = new TableLayout(4);
  layout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
  layout.setTablePadding(4, 4);
  layout.setTableFill(TableLayout.Fill.BOTH);
  layout.setColumnFill(3, TableLayout.Fill.BOTH);
  layout.setRowWeightY(0, 1.0);
  layout.setCellWeightY(0, 3, 1.0);
  layout.setColumnWeightX(0, 1.0);
  layout.setColumnWeightX(1, 2.0);
  layout.setColumnWeightX(2, 2.0);
  layout.setColumnWeightX(3, 0.0);
  layout.setRowWeightY(1, 2.0);
  layout.setCellFill(0, 0, TableLayout.Fill.HORIZONTAL);
  layout.setCellRowspan(0, 3, 2);
  layout.setCellColspan(1, 0, 3);

代码示例来源:origin: senbox-org/snap-desktop

private void initSpectraPanel() {
  spectraPanelLayout = new TableLayout(7);
  spectraPanelLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
  spectraPanelLayout.setTableWeightY(0.0);
  spectraPanelLayout.setTableWeightX(1.0);
  spectraPanelLayout.setColumnWeightX(0, 0.0);
  spectraPanelLayout.setColumnWeightX(1, 0.0);
  spectraPanelLayout.setTablePadding(3, 3);
  spectraPanel = new JPanel(spectraPanelLayout);
  spectraPanel.add(new JLabel(""));
  spectraPanel.add(new JLabel(""));
  spectraPanel.add(new JLabel("Spectrum Name"));
  spectraPanel.add(new JLabel("Unit"));
  spectraPanel.add(new JLabel("Line Style"));
  spectraPanel.add(new JLabel("Symbol"));
  spectraPanel.add(new JLabel("Symbol Size"));
  for (int i = 0; i < spectra.length; i++) {
    selectionAdmin.evaluateSpectrumSelections(spectra[i]);
    addSpectrumComponentsToSpectraPanel(i);
    spectraPanelLayout.setCellColspan((i * 2) + 2, 1, 6);
    spectraPanel.add(new JLabel());
    bandTablePanels[i] = new JPanel(new BorderLayout());
    bandTablePanels[i].setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
    spectraPanel.add(bandTablePanels[i]);
    bandTables[i] = createBandsTable(i);
  }
  spectraPanel.add(spectraPanelLayout.createVerticalSpacer());
  spectraPanel.updateUI();
}

代码示例来源:origin: senbox-org/snap-desktop

JComponent[] showPixelPosOffset1Components = registry.findPropertyEditor(showPixelPosAsDecimals.getDescriptor()).createComponents(showPixelPosOffset1.getDescriptor(), context);
TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableAnchor(Anchor.NORTHWEST);
tableLayout.setTablePadding(new Insets(4, 10, 0, 0));
tableLayout.setTableFill(Fill.BOTH);
tableLayout.setTableWeightX(1.0);
tableLayout.setTableWeightY(0.0);
tableLayout.setRowWeightY(8, 1.0);
pageUI.add(snapToExactGeolocationComponents[0]);
pageUI.add(pixelGeocodingfractionAccuracyComponents[0]);
tableLayout.createHorizontalSpacer();
pageUI.add(showPixelPosAsDecimalsComponents[0]);
pageUI.add(showPixelPosOffset1Components[0]);
pageUI.add(tableLayout.createVerticalSpacer());
return createPageUIContentPane(pageUI);

代码示例来源:origin: bcdev/beam

private JPanel createButtonPanel() {
  final TableLayout tableLayout = new TableLayout(1);
  tableLayout.setTablePadding(4, 4);
  tableLayout.setRowPadding(0, new Insets(0, 4, 4, 4));
  tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
  tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
  tableLayout.setTableWeightX(1.0);
  tableLayout.setTableWeightY(0.0);
  JPanel buttonPanel = new JPanel(tableLayout);
  AbstractButton helpButton = ToolButtonFactory.createButton(UIUtils.loadImageIcon("icons/Help22.png"), false);
  helpButton.setToolTipText("Help");
  buttonPanel.add(matrixSizeSpinner);
  buttonPanel.add(tableLayout.createVerticalSpacer());
  buttonPanel.add(helpButton);
  final PageComponentDescriptor descriptor = getDescriptor();
  if (descriptor.getHelpId() != null) {
    HelpSys.enableHelpOnButton(helpButton, descriptor.getHelpId());
    HelpSys.enableHelpKey(buttonPanel, descriptor.getHelpId());
  }
  return buttonPanel;
}

代码示例来源:origin: senbox-org/snap-desktop

@Override
protected JPanel createPanel(BindingContext context) {
  TableLayout tableLayout = new TableLayout(1);
  tableLayout.setTableAnchor(Anchor.NORTHWEST);
  tableLayout.setTablePadding(4, 10);
  tableLayout.setTableFill(Fill.BOTH);
  tableLayout.setTableWeightX(1.0);
  tableLayout.setRowWeightY(4, 1.0);
  JPanel pageUI = new JPanel(tableLayout);
  PropertyEditorRegistry registry = PropertyEditorRegistry.getInstance();
  Property showNavigationControl = context.getPropertySet().getProperty(ProductSceneView.PREFERENCE_KEY_IMAGE_NAV_CONTROL_SHOWN);
  Property showScrollBars = context.getPropertySet().getProperty(ProductSceneView.PREFERENCE_KEY_IMAGE_SCROLL_BARS_SHOWN);
  Property reverseZoom = context.getPropertySet().getProperty(ProductSceneView.PREFERENCE_KEY_INVERT_ZOOMING);
  JComponent[] showNavigationControlComponents = registry.findPropertyEditor(showNavigationControl.getDescriptor()).createComponents(showNavigationControl.getDescriptor(), context);
  JComponent[] showScrollBarsComponents = registry.findPropertyEditor(showScrollBars.getDescriptor()).createComponents(showScrollBars.getDescriptor(), context);
  JComponent[] reverseZoomComponents = registry.findPropertyEditor(showScrollBars.getDescriptor()).createComponents(reverseZoom.getDescriptor(), context);
  tableLayout.setRowPadding(0, new Insets(10, 80, 10, 4));
  pageUI.add(showNavigationControlComponents[0]);
  pageUI.add(showScrollBarsComponents[0]);
  pageUI.add(reverseZoomComponents[0]);
  pageUI.add(tableLayout.createVerticalSpacer());
  return pageUI;
}

代码示例来源:origin: bcdev/beam

private JPanel createIOPanel() {
  final TableLayout tableLayout = new TableLayout(1);
  tableLayout.setTableWeightX(1.0);
  tableLayout.setTableWeightY(0.0);
  tableLayout.setTableFill(TableLayout.Fill.BOTH);
  tableLayout.setTablePadding(3, 3);
  final JPanel ioPanel = new JPanel(tableLayout);
  ioPanel.add(createSourceProductPanel());
  ioPanel.add(targetProductSelector.createDefaultPanel());
  ioPanel.add(tableLayout.createVerticalSpacer());
  return ioPanel;
}

代码示例来源:origin: bcdev/beam

private JPanel createVariablePanel(String title, VariableSelectionPane variablePane) {
  final TableLayout layout = new TableLayout(1);
  layout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
  layout.setTableFill(TableLayout.Fill.HORIZONTAL);
  layout.setTableWeightX(1.0);
  layout.setRowWeightY(0, 0.0);
  layout.setRowWeightY(1, 1.0);
  layout.setRowFill(1, TableLayout.Fill.BOTH);
  final JPanel panel = new JPanel(layout);
  panel.add(new TitledSeparator(title));
  variablePane.setPreferredSize(new Dimension(150, 80));
  panel.add(variablePane);
  return panel;
}

代码示例来源:origin: senbox-org/snap-desktop

private void createUI() {
  final TableLayout tableLayout = new TableLayout(2);
  setLayout(tableLayout);
  tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
  tableLayout.setTablePadding(4, 4);
  tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
  tableLayout.setColumnWeightX(0, 0.0);
  tableLayout.setColumnWeightX(1, 1.0);
  tableLayout.setCellColspan(2, 0, 2);
  tableLayout.setCellAnchor(2, 0, TableLayout.Anchor.EAST);
  tableLayout.setCellFill(2, 0, TableLayout.Fill.NONE);

相关文章