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

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

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

TableLayout.setColumnWeightX介绍

暂无

代码示例

代码示例来源: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 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: senbox-org/snap-desktop

/**
 * Creates a <code>JPanel</code> containing a label with the given text and a horizontal line.
 *
 * @param title The label text.
 *
 * @return A <code>JPanel</code> with the title label.
 */
public static JPanel createTitleLabel(String title) {
  TableLayout layout = new TableLayout(3);
  layout.setColumnWeightX(0, 0.0);
  layout.setColumnWeightX(1, 0.0);
  layout.setColumnWeightX(2, 1.0);
  layout.setColumnFill(0, TableLayout.Fill.NONE);
  layout.setColumnFill(1, TableLayout.Fill.NONE);
  layout.setColumnFill(2, TableLayout.Fill.HORIZONTAL);
  JPanel comp = new JPanel(layout);
  JLabel label = new JLabel(title);
  comp.add(label);
  comp.add(new JLabel("   "));
  comp.add(new JSeparator());
  return comp;
}

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

private JPanel createRenamingPanel() {
  final TableLayout layout = new TableLayout(2);
  layout.setTableAnchor(TableLayout.Anchor.WEST);
  layout.setTableFill(TableLayout.Fill.HORIZONTAL);
  layout.setColumnWeightX(0, 0.0);
  layout.setColumnWeightX(1, 1.0);
  layout.setCellPadding(0, 0, new Insets(3, 3, 3, 3));
  layout.setCellPadding(1, 0, new Insets(3, 3, 3, 3));
  final JPanel panel = new JPanel(layout);
  panel.setBorder(BorderFactory.createTitledBorder("Renaming of Source Product Components"));
  panel.add(renameMasterComponentsCheckBox);
  panel.add(masterComponentPatternField);
  panel.add(renameSlaveComponentsCheckBox);
  panel.add(slaveComponentPatternField);
  return panel;
}

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

private JPanel createRenamingPanel() {
  final TableLayout layout = new TableLayout(2);
  layout.setTableAnchor(TableLayout.Anchor.WEST);
  layout.setTableFill(TableLayout.Fill.HORIZONTAL);
  layout.setColumnWeightX(0, 0.0);
  layout.setColumnWeightX(1, 1.0);
  layout.setCellPadding(0, 0, new Insets(3, 3, 3, 3));
  layout.setCellPadding(1, 0, new Insets(3, 3, 3, 3));
  final JPanel panel = new JPanel(layout);
  panel.setBorder(BorderFactory.createTitledBorder("Renaming of Source Product Components"));
  panel.add(renameMasterComponentsCheckBox);
  panel.add(masterComponentPatternField);
  panel.add(renameSlaveComponentsCheckBox);
  panel.add(slaveComponentPatternField);
  return panel;
}

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

@Override
protected JComponent createControl() {
  final TableLayout tableLayout = new TableLayout(2);
  tableLayout.setTablePadding(4, 4);
  tableLayout.setTableFill(TableLayout.Fill.BOTH);
  tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
  tableLayout.setColumnWeightX(0, 0.0);
  tableLayout.setColumnWeightX(1, 1.0);
  tableLayout.setRowWeightY(1, 1.0);
  final JPanel panel = new JPanel(tableLayout);
  contextLabel = new JLabel(MSG_NO_SELECTION_CONTEXT);
  final JLabel label1 = new JLabel("Current Selection Context:");
  label1.setLabelFor(contextLabel);
  panel.add(label1);
  panel.add(contextLabel);
  selectionTextArea = new JTextArea(MSG_NO_SELECTION, 3, 40);
  selectionTextArea.setLineWrap(true);
  final JLabel label2 = new JLabel("Current Selection:");
  label2.setLabelFor(selectionTextArea);
  panel.add(label2);
  panel.add(new JScrollPane(selectionTextArea));
  return panel;
}

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

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: 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

@Override
protected Component createPageComponent() {
  final TableLayout tableLayout = new TableLayout(2);
  tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
  tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
  tableLayout.setTablePadding(4, 4);
  tableLayout.setTableWeightY(1.0);
  tableLayout.setColumnWeightX(0, 0.0);
  tableLayout.setColumnWeightX(1, 1.0);
  final JPanel panel = new JPanel(tableLayout);
  final JLabel label = new JLabel("Time Series Name:");
  field = new JTextField(getAssistantModel().getTimeSeriesName());
  panel.add(label);
  panel.add(field);
  return panel;
}

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

public TitledSeparator(String title) {
  final TableLayout tableLayout = new TableLayout(3);
  tableLayout.setTableAnchor(TableLayout.Anchor.CENTER);
  tableLayout.setTableWeightY(0.0);
  tableLayout.setTableFill(TableLayout.Fill.HORIZONTAL);
  tableLayout.setTablePadding(2, 0);
  tableLayout.setColumnWeightX(0, 1.0);
  tableLayout.setColumnWeightX(1, 0.0);
  tableLayout.setColumnWeightX(2, 1.0);
  setLayout(tableLayout);
  add(new JSeparator());
  labelComponent = new JLabel(title);
  add(labelComponent);
  add(new JSeparator());
}

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

private void resetContentPanel() {
  contentPanel.removeAll();
  contentLayout = new TableLayout(6);
  contentLayout.setTablePadding(2, 2);
  contentLayout.setTableFill(TableLayout.Fill.BOTH);
  contentLayout.setColumnWeightX(0, 0.0);
  contentLayout.setTableWeightX(1.0);
  contentLayout.setTableWeightY(0.0);
  contentLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
  contentPanel.setLayout(contentLayout);
}

代码示例来源: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: senbox-org/snap-desktop

private JPanel createExportPanel(BindingContext bindingContext) {
  final TableLayout tableLayout = new TableLayout(4);
  tableLayout.setTablePadding(4, 0);
  tableLayout.setTableFill(TableLayout.Fill.VERTICAL);
  tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
  tableLayout.setColumnWeightX(3, 1.0);
  tableLayout.setTableWeightY(1.0);
  final JPanel exportPanel = new JPanel(tableLayout);
  exportPanel.add(createIncludeCheckbox(bindingContext, "Bands", "exportBands"));
  exportPanel.add(createIncludeCheckbox(bindingContext, "Tie-point grids", "exportTiePoints"));
  exportPanel.add(createIncludeCheckbox(bindingContext, "Masks", "exportMasks"));
  exportPanel.add(tableLayout.createHorizontalSpacer());
  return exportPanel;
}

代码示例来源: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 JPanel createExportPanel(BindingContext bindingContext) {
  final TableLayout tableLayout = new TableLayout(4);
  tableLayout.setTablePadding(4, 0);
  tableLayout.setTableFill(TableLayout.Fill.VERTICAL);
  tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
  tableLayout.setColumnWeightX(3, 1.0);
  tableLayout.setTableWeightY(1.0);
  final JPanel exportPanel = new JPanel(tableLayout);
  exportPanel.add(createIncludeCheckbox(bindingContext, "Bands", "exportBands"));
  exportPanel.add(createIncludeCheckbox(bindingContext, "Tie-point grids", "exportTiePoints"));
  exportPanel.add(createIncludeCheckbox(bindingContext, "Masks", "exportMasks"));
  exportPanel.add(tableLayout.createHorizontalSpacer());
  return exportPanel;
}

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

@Override
protected void updateComponents() {
  if (isVisible()) {
    currentRow = 0;
    updateContent();
    if (geoCoding == null) {
      contentLayout.setColumnWeightX(0, 1.0);
      showNoInformationAvailableMessage();
    }
    updateUI();
  }
}

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

@Override
  protected JPanel createPanel(BindingContext context) {
    TableLayout tableLayout = new TableLayout(1);
    tableLayout.setTableAnchor(TableLayout.Anchor.NORTHWEST);
    tableLayout.setTablePadding(new Insets(4, 10, 0, 0));
    tableLayout.setTableFill(TableLayout.Fill.BOTH);
    tableLayout.setColumnWeightX(0, 1.0);

    JPanel pageUI = new JPanel(tableLayout);
    PropertyEditorRegistry registry = PropertyEditorRegistry.getInstance();
    Property beepSound = context.getPropertySet().getProperty(GPF.BEEP_AFTER_PROCESSING_PROPERTY);
    JComponent[] beepSoundComponent = registry.findPropertyEditor(beepSound.getDescriptor()).createComponents(beepSound.getDescriptor(), context);

    pageUI.add(beepSoundComponent[0]);
    tableLayout.setTableFill(TableLayout.Fill.VERTICAL);
    pageUI.add(tableLayout.createVerticalSpacer());
    JPanel parent = new JPanel(new BorderLayout());
    parent.add(pageUI, BorderLayout.CENTER);
    parent.add(Box.createHorizontalStrut(100), BorderLayout.EAST);
    return parent;
  }
}

代码示例来源: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/snap-desktop

private void initComponents() {
  TableLayout layout = new TableLayout(2);
  this.setLayout(layout);
  layout.setTableAnchor(TableLayout.Anchor.WEST);
  layout.setTableWeightY(1.0);
  layout.setTableFill(TableLayout.Fill.BOTH);
  layout.setTablePadding(2, 2);
  layout.setColumnWeightX(0, 0.5);
  layout.setColumnWeightX(1, 0.5);
  add(createInfoPanel());
  add(createAttachDetachPanel());
  updateUIState();
}

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

private void initComponents() {
  TableLayout layout = new TableLayout(2);
  this.setLayout(layout);
  layout.setTableAnchor(TableLayout.Anchor.WEST);
  layout.setTableWeightY(1.0);
  layout.setTableFill(TableLayout.Fill.BOTH);
  layout.setTablePadding(2, 2);
  layout.setColumnWeightX(0, 0.5);
  layout.setColumnWeightX(1, 0.5);
  add(createInfoPanel());
  add(createAttachDetachPanel());
  updateUIState();
}

相关文章