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

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

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

TableLayout.cell介绍

暂无

代码示例

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

add(new JLabel("Operation:"), TableLayout.cell(row, 0));
add(operationComboBox, TableLayout.cell(row, 1));
row++;
add(new JLabel("Name:"), TableLayout.cell(row, 0));
add(nameField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Shorthand:"), TableLayout.cell(row, 0));
add(shorthandField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Tags:"), TableLayout.cell(row, 0));
add(tagsField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Kernel quotient:"), TableLayout.cell(row, 0));
add(kernelQuotientField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Kernel offset X:"), TableLayout.cell(row, 0));
add(kernelOffsetXField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Kernel offset Y:"), TableLayout.cell(row, 0));
add(kernelOffsetYField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Kernel width:"), TableLayout.cell(row, 0));
add(kernelWidthField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Kernel height:"), TableLayout.cell(row, 0));
add(kernelHeightField, TableLayout.cell(row, 1));

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

add(new JLabel("Operation:"), TableLayout.cell(row, 0));
add(operationComboBox, TableLayout.cell(row, 1));
row++;
add(new JLabel("Name:"), TableLayout.cell(row, 0));
add(nameField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Shorthand:"), TableLayout.cell(row, 0));
add(shorthandField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Tags:"), TableLayout.cell(row, 0));
add(tagsField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Kernel quotient:"), TableLayout.cell(row, 0));
add(kernelQuotientField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Kernel offset X:"), TableLayout.cell(row, 0));
add(kernelOffsetXField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Kernel offset Y:"), TableLayout.cell(row, 0));
add(kernelOffsetYField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Kernel width:"), TableLayout.cell(row, 0));
add(kernelWidthField, TableLayout.cell(row, 1));
row++;
add(new JLabel("Kernel height:"), TableLayout.cell(row, 0));
add(kernelHeightField, TableLayout.cell(row, 1));

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

private JComponent createUI() {
  final TableLayout layout = new TableLayout(5);
  layout.setTableFill(TableLayout.Fill.BOTH);
  layout.setTableAnchor(TableLayout.Anchor.WEST);
  layout.setTableWeightX(1.0);
  layout.setTableWeightY(0.0);
  layout.setTablePadding(3, 3);
  layout.setColumnPadding(1, new Insets(3, 6, 3, 6));
  layout.setColumnPadding(3, new Insets(3, 6, 3, 6));
  layout.setColumnWeightX(1, 0.0);
  layout.setColumnWeightX(3, 0.0);
  final JPanel panel = new JPanel(layout);
  panel.add(new JLabel("Min value:"), cell(0, 0));
  panel.add(new JLabel("Raster:"), cell(0, 2));
  panel.add(new JLabel("Max value:"), cell(0, 4));
  final DoubleFormatter formatter = new DoubleFormatter("###0.0###");
  final JFormattedTextField minValueField = new JFormattedTextField(formatter);
  final JFormattedTextField maxValueField = new JFormattedTextField(formatter);
  final JComboBox rasterNameComboBox = new JComboBox(rasterModel);
  panel.add(minValueField);
  panel.add(new JLabel("<html><b>&lt;=</b>"));
  panel.add(rasterNameComboBox);
  panel.add(new JLabel("<html><b>&lt;=</b>"));
  panel.add(maxValueField);
  final BindingContext context = new BindingContext(container);
  context.bind("rasterName", rasterNameComboBox);
  context.bind("minValue", minValueField);
  context.bind("maxValue", maxValueField);
  return panel;
}

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

private JComponent createUI() {
  final TableLayout layout = new TableLayout(5);
  layout.setTableFill(TableLayout.Fill.BOTH);
  layout.setTableAnchor(TableLayout.Anchor.WEST);
  layout.setTableWeightX(1.0);
  layout.setTableWeightY(0.0);
  layout.setTablePadding(3, 3);
  layout.setColumnPadding(1, new Insets(3, 6, 3, 6));
  layout.setColumnPadding(3, new Insets(3, 6, 3, 6));
  layout.setColumnWeightX(1, 0.0);
  layout.setColumnWeightX(3, 0.0);
  final JPanel panel = new JPanel(layout);
  panel.add(new JLabel("Min value:"), cell(0, 0));
  panel.add(new JLabel("Raster:"), cell(0, 2));
  panel.add(new JLabel("Max value:"), cell(0, 4));
  final DoubleFormatter formatter = new DoubleFormatter("###0.0###");
  final JFormattedTextField minValueField = new JFormattedTextField(formatter);
  final JFormattedTextField maxValueField = new JFormattedTextField(formatter);
  final JComboBox rasterNameComboBox = new JComboBox(rasterModel);
  panel.add(minValueField);
  panel.add(new JLabel("<html><b>&lt;=</b>"));
  panel.add(rasterNameComboBox);
  panel.add(new JLabel("<html><b>&lt;=</b>"));
  panel.add(maxValueField);
  final BindingContext context = new BindingContext(container);
  context.bind("rasterName", rasterNameComboBox);
  context.bind("minValue", minValueField);
  context.bind("maxValue", maxValueField);
  return panel;
}

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

subPanel.add(toleranceLabel, cell(0, 0));
subPanel.add(toleranceField, cell(0, 1));
subPanel.add(toleranceSliderPanel, cell(1, 0));
subPanel.add(stLabel, cell(2, 0));
subPanel.add(stButton1, cell(3, 0));
subPanel.add(stButton2, cell(4, 0));
subPanel.add(stButton3, cell(5, 0));
subPanel.add(ptLabel, cell(2, 1));
subPanel.add(ptButton1, cell(3, 1));
subPanel.add(ptButton2, cell(4, 1));
subPanel.add(ptButton3, cell(5, 1));
subPanel.add(normalizeCheckBox, cell(6, 0));
subPanel.add(infoLabel, cell(6, 1));

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

subPanel.add(toleranceLabel, cell(0, 0));
subPanel.add(toleranceField, cell(0, 1));
subPanel.add(toleranceSliderPanel, cell(1, 0));
subPanel.add(stLabel, cell(2, 0));
subPanel.add(stButton1, cell(3, 0));
subPanel.add(stButton2, cell(4, 0));
subPanel.add(stButton3, cell(5, 0));
subPanel.add(ptLabel, cell(2, 1));
subPanel.add(ptButton1, cell(3, 1));
subPanel.add(ptButton2, cell(4, 1));
subPanel.add(ptButton3, cell(5, 1));
subPanel.add(normalizeCheckBox, cell(6, 0));
subPanel.add(infoLabel, cell(6, 1));

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

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.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));
  add(label, cell(rowIndex, 2));

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

add(new JScrollPane(sourceList));
add(addButton);
add(removeButton, TableLayout.cell(1, 1));

相关文章