com.bc.ceres.swing.TableLayout.setCellWeightX()方法的使用及代码示例

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

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

TableLayout.setCellWeightX介绍

暂无

代码示例

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

private JPanel createOrthorectifyPanel() {
  final TableLayout layout = new TableLayout(2);
  layout.setTableAnchor(TableLayout.Anchor.WEST);
  layout.setTableFill(TableLayout.Fill.HORIZONTAL);
  layout.setTableWeightX(1.0);
  layout.setTableWeightY(1.0);
  layout.setTablePadding(3, 3);
  final JPanel panel = new JPanel(layout);
  panel.setBorder(BorderFactory.createTitledBorder("Orthorectification"));
  final JCheckBox orthoCheckBox = new JCheckBox("Orthorectify input products");
  bindingCtx.bind(S2tbxMosaicFormModel.PROPERTY_ORTHORECTIFY, orthoCheckBox);
  bindingCtx.bindEnabledState(S2tbxMosaicFormModel.PROPERTY_ORTHORECTIFY, false, S2tbxMosaicFormModel.PROPERTY_UPDATE_MODE, true);
  final JComboBox<String> demComboBox = new JComboBox<>(new DefaultComboBoxModel<>(demValueSet));
  bindingCtx.bind(S2tbxMosaicFormModel.PROPERTY_ELEVATION_MODEL_NAME, demComboBox);
  bindingCtx.addPropertyChangeListener(
      (PropertyChangeEvent evt) ->{if (S2tbxMosaicFormModel.PROPERTY_ORTHORECTIFY.equals(evt.getPropertyName()) ||
          S2tbxMosaicFormModel.PROPERTY_UPDATE_MODE.equals(evt.getPropertyName())) {
        final PropertySet propertySet = bindingCtx.getPropertySet();
        boolean updateMode = Boolean.TRUE.equals(propertySet.getValue(S2tbxMosaicFormModel.PROPERTY_UPDATE_MODE));
        boolean orthorectify = Boolean.TRUE.equals(propertySet.getValue(S2tbxMosaicFormModel.PROPERTY_ORTHORECTIFY));
        demComboBox.setEnabled(orthorectify && !updateMode);
      }});
  layout.setCellColspan(0, 0, 2);
  panel.add(orthoCheckBox);
  layout.setCellWeightX(1, 0, 0.0);
  panel.add(new JLabel("Elevation model:"));
  layout.setCellWeightX(1, 1, 1.0);
  panel.add(demComboBox);
  return panel;
}

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

panel.add(orthoCheckBox);
layout.setCellWeightX(1, 0, 0.0);
panel.add(new JLabel("Elevation model:"));
layout.setCellWeightX(1, 1, 1.0);
panel.add(demComboBox);
return panel;

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

panel.add(orthoCheckBox);
layout.setCellWeightX(1, 0, 0.0);
panel.add(new JLabel("Elevation model:"));
layout.setCellWeightX(1, 1, 1.0);
panel.add(demComboBox);
return panel;

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

layout.setCellWeightX(0, 1, 1.0);
layout.setCellColspan(0, 1, 2);
plotSettingsPanel.add(datasetLabel);
plotSettingsPanel.add(datasetBox);
layout.setCellWeightX(1, 1, 0.2);
layout.setCellWeightX(1, 2, 0.8);
plotSettingsPanel.add(recordLabel);
plotSettingsPanel.add(recordValueField);
plotSettingsPanel.add(recordSlider);
layout.setCellWeightX(2, 1, 1.0);
layout.setCellColspan(2, 1, 2);
plotSettingsPanel.add(numRecordsLabel);
plotSettingsPanel.add(numRecordsSpinner);
layout.setCellWeightX(3, 1, 1.0);
layout.setCellColspan(3, 1, 2);
plotSettingsPanel.add(xFieldLabel);
plotSettingsPanel.add(xFieldBox);
layout.setCellWeightX(4, 1, 1.0);
layout.setCellColspan(4, 1, 2);
plotSettingsPanel.add(y1FieldLabel);
plotSettingsPanel.add(y1FieldBox);
layout.setCellWeightX(5, 1, 1.0);
layout.setCellColspan(5, 1, 2);
plotSettingsPanel.add(y2FieldLabel);

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

layout.setTableWeightX(0.0);
layout.setCellWeightX(0, 1, 1.0);
layout.setCellWeightX(1, 1, 1.0);
layout.setCellWeightX(3, 2, 1.0);
layout.setCellWeightX(4, 1, 1.0);
layout.setCellWeightX(6, 2, 1.0);

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

public void populate(List<JComponent[]> componentsList) {
  TableLayout layout = (TableLayout)getLayout();
  int rowIndex = 0;
  for (JComponent[] components : componentsList) {
    if (components.length == 2) {
      layout.setCellWeightX(rowIndex, 0, 0.0);
      add(components[1], cell(rowIndex, 0));
      layout.setCellWeightX(rowIndex, 1, 1.0);
      if(components[0] instanceof JScrollPane) {
        layout.setRowWeightY(rowIndex, 1.0);
        layout.setRowFill(rowIndex, TableLayout.Fill.BOTH);
      }
      add(components[0], cell(rowIndex, 1));
    } else {
      layout.setCellColspan(rowIndex, 0, 2);
      layout.setCellWeightX(rowIndex, 0, 1.0);
      add(components[0], cell(rowIndex, 0));
    }
    rowIndex++;
  }
  layout.setCellColspan(rowIndex, 0, 2);
  layout.setCellWeightX(rowIndex, 0, 1.0);
  layout.setCellWeightY(rowIndex, 0, 0.5);
}

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

layout.setTableWeightX(0.0);
layout.setCellWeightX(0, 1, 1.0);
layout.setCellWeightX(1, 1, 1.0);
layout.setCellWeightX(3, 2, 1.0);
layout.setCellWeightX(4, 1, 1.0);
layout.setCellWeightX(6, 2, 1.0);

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

layout.setCellColspan(0, 1, 2);
layout.setCellColspan(3, 1, 2);
layout.setCellWeightX(2, 1, 1.0);
layout.setCellWeightX(2, 2, 0.0);
layout.setColumnWeightX(1, 1.0);

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

tableLayout.setCellPadding(6, 0, new Insets(8, 4, 4, 4)); // expression label
tableLayout.setCellPadding(6, 1, new Insets(0, 0, 0, 0)); // expression panel
tableLayout.setCellWeightX(6, 1, 1.0);
tableLayout.setCellWeightY(6, 1, 3.0);
tableLayout.setCellFill(6, 1, TableLayout.Fill.BOTH);

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

@Override
protected void initPageUI() {
  visualizer = createOffsetVisualizer();
  visualizer.setPreferredSize(new Dimension(60, 60));
  visualizer.setOpaque(true);
  visualizer.setBorder(BorderFactory.createLoweredBevelBorder());
  final TableLayout tableLayout = new TableLayout(3);
  tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
  tableLayout.setTablePadding(4, 4);
  tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
  final JPanel pageUI = new JPanel(tableLayout);
  pageUI.add(paramOffsetX.getEditor().getLabelComponent());
  tableLayout.setCellWeightX(0, 1, 1.0);
  pageUI.add(paramOffsetX.getEditor().getEditorComponent());
  tableLayout.setCellRowspan(0, 2, 2);
  tableLayout.setCellWeightX(0, 2, 1.0);
  tableLayout.setCellAnchor(0, 2, TableLayout.Anchor.CENTER);
  tableLayout.setCellFill(0, 2, TableLayout.Fill.NONE);
  pageUI.add(visualizer);
  pageUI.add(paramOffsetY.getEditor().getLabelComponent());
  tableLayout.setCellWeightX(1, 1, 1.0);
  pageUI.add(paramOffsetY.getEditor().getEditorComponent());
  tableLayout.setRowPadding(2, new Insets(10, 0, 4, 4));
  pageUI.add(paramShowDecimals.getEditor().getEditorComponent(), cell(2, 0, 1, 3));
  tableLayout.setRowPadding(3, new Insets(10, 0, 4, 4));
  pageUI.add(paramGeolocationAsDecimal.getEditor().getEditorComponent(), cell(3, 0, 1, 3));
  setPageUI(createPageUIContentPane(pageUI));
}

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

layout.setCellColspan(0, 1, 2);
layout.setCellColspan(3, 1, 2);
layout.setCellWeightX(2, 1, 1.0);
layout.setCellWeightX(2, 2, 0.0);
layout.setColumnWeightX(1, 1.0);

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

tableLayout.setCellPadding(6, 0, new Insets(8, 4, 4, 4)); // expression label
tableLayout.setCellPadding(6, 1, new Insets(0, 0, 0, 0)); // expression panel
tableLayout.setCellWeightX(6, 1, 1.0);
tableLayout.setCellWeightY(6, 1, 3.0);
tableLayout.setCellFill(6, 1, TableLayout.Fill.BOTH);

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

tableLayout.setCellColspan(1, 0, 2);
tableLayout.setCellColspan(3, 0, 2);
tableLayout.setCellWeightX(0, 0, 1.0);
tableLayout.setRowWeightX(1, 1.0);
tableLayout.setCellWeightX(2, 1, 1.0);
tableLayout.setCellWeightX(4, 1, 1.0);
tableLayout.setCellWeightX(5, 1, 1.0);
tableLayout.setCellPadding(4, 0, new Insets(0, 24, 0, 4));
tableLayout.setCellPadding(5, 0, new Insets(0, 24, 0, 4));

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

tableLayout.setCellWeightX(0, 0, 0.0);    // filter label; no grow in X
tableLayout.setRowWeightY(1, 1.0);      // second row grow in Y
tableLayout.setCellColspan(1, 0, 2);    // CRS list; spans 2 cols

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

panel.add(performAtNativeResolution);
panel.add(new JLabel(OVERLAPPING_LABEL));
layout.setCellWeightX(1, 1, 1.0);
panel.add(overlappingComboBox);
panel.add(showSourceProductsCheckBox);

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

JComponent[] components = propertyEditor.createComponents(descriptor, bindingContext);
  if (components.length == 2) {
    layout.setCellWeightX(rowIndex, 0, 0.0);
    add(components[1], cell(rowIndex, 0));
    layout.setCellWeightX(rowIndex, 1, 1.0);
    if(components[0] instanceof JScrollPane) {
      layout.setRowWeightY(rowIndex, 1.0);
  } else {
    layout.setCellColspan(rowIndex, 0, 2);
    layout.setCellWeightX(rowIndex, 0, 1.0);
    add(components[0], cell(rowIndex, 0));
      label.setText(descriptor.getUnit());
    layout.setCellWeightX(rowIndex, 2, 0.0);
    add(label, cell(rowIndex, 2));
layout.setCellWeightX(rowIndex, 0, 1.0);
layout.setCellWeightY(rowIndex, 0, 0.5);

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

createThresholdsPanel.setMaximumSize(new Dimension(20, 40));
layout.setCellColspan(0, 0, 2);
layout.setCellWeightX(1, 1, 1.0);
layout.setTableAnchor(TableLayout.Anchor.EAST);
layout.setTableFill(TableLayout.Fill.NONE);

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

rowCount++;
} else {
  tableLayout.setCellWeightX(rowCount, 0, 0.0);
  rowCount++;

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

rowCount++;
} else {
  tableLayout.setCellWeightX(rowCount, 0, 0.0);
  rowCount++;

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

tableLayout.setCellWeightX(0, 0, 0.0);    // filter label; no grow in X
tableLayout.setRowWeightY(1, 1.0);      // second row grow in Y
tableLayout.setCellColspan(1, 0, 2);    // CRS list; spans 2 cols

相关文章