本文整理了Java中com.bc.ceres.swing.TableLayout.setRowWeightY()
方法的一些代码示例,展示了TableLayout.setRowWeightY()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TableLayout.setRowWeightY()
方法的具体详情如下:
包路径:com.bc.ceres.swing.TableLayout
类名称:TableLayout
方法名:setRowWeightY
暂无
代码示例来源:origin: senbox-org/snap-desktop
private void toggleCollapsed(int index) {
final boolean isCollapsed = !collapsed[index];
collapsed[index] = isCollapsed;
int rowIndex = (index * 2) + 2;
if (isCollapsed) {
spectraPanelLayout.setRowFill(rowIndex, TableLayout.Fill.HORIZONTAL);
spectraPanelLayout.setRowWeightY(rowIndex, 0.0);
bandTablePanels[index].removeAll();
} else {
spectraPanelLayout.setRowFill(rowIndex, TableLayout.Fill.BOTH);
spectraPanelLayout.setRowWeightY(rowIndex, 1.0);
bandTablePanels[index].add(bandTables[index].getTableHeader(), BorderLayout.NORTH);
bandTablePanels[index].add(bandTables[index], BorderLayout.CENTER);
}
bandTablePanels[index].updateUI();
spectraPanel.updateUI();
}
代码示例来源:origin: senbox-org/s2tbx
private JPanel getModalDialogContent(String message, String information){
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.setTablePadding(3, 3);
JPanel content = new JPanel(layout);
content.setBorder(new EmptyBorder(4, 4, 4, 4));
content.add(new JLabel(message));
content.add(new JLabel(information));
return content;
}
代码示例来源: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: 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: senbox-org/snap-desktop
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 JPanel createProductsPanel() {
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("Product Sources"));
locationsPane = new ProductLocationsPane();
locationsPane.setPreferredSize(new Dimension(150, 80));
panel.add(locationsPane);
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: senbox-org/s2tbx
private Component createVariablesPanel() {
final String labelName = "Variables"; /*I18N*/
final TableLayout layout = new TableLayout(1);
layout.setTableAnchor(TableLayout.Anchor.WEST);
layout.setTableFill(TableLayout.Fill.BOTH);
layout.setTablePadding(3, 3);
layout.setTableWeightX(1.0);
layout.setTableWeightY(1.0);
layout.setRowWeightY(0, 0.0);
final JPanel panel = new JPanel(layout);
panel.setBorder(BorderFactory.createTitledBorder(labelName));
panel.setName(labelName);
panel.add(createVariablesButtonPanel(labelName));
panel.add(createVariablesTable(labelName));
return panel;
}
代码示例来源:origin: bcdev/beam
private Component createVariablesPanel() {
final String labelName = "Variables"; /*I18N*/
final TableLayout layout = new TableLayout(1);
layout.setTableAnchor(TableLayout.Anchor.WEST);
layout.setTableFill(TableLayout.Fill.BOTH);
layout.setTablePadding(3, 3);
layout.setTableWeightX(1.0);
layout.setTableWeightY(1.0);
layout.setRowWeightY(0, 0.0);
final JPanel panel = new JPanel(layout);
panel.setBorder(BorderFactory.createTitledBorder(labelName));
panel.setName(labelName);
panel.add(createVariablesButtonPanel(labelName));
panel.add(createVariablesTable(labelName));
return panel;
}
代码示例来源:origin: senbox-org/snap-desktop
private Component createVariablesPanel() {
final String labelName = "Variables"; /*I18N*/
final TableLayout layout = new TableLayout(1);
layout.setTableAnchor(TableLayout.Anchor.WEST);
layout.setTableFill(TableLayout.Fill.BOTH);
layout.setTablePadding(3, 3);
layout.setTableWeightX(1.0);
layout.setTableWeightY(1.0);
layout.setRowWeightY(0, 0.0);
final JPanel panel = new JPanel(layout);
panel.setBorder(BorderFactory.createTitledBorder(labelName));
panel.setName(labelName);
panel.add(createVariablesButtonPanel(labelName));
panel.add(createVariablesTable(labelName));
return panel;
}
代码示例来源:origin: senbox-org/snap-desktop
private Component createConditionsPanel() {
final String labelName = "Conditions";
final TableLayout layout = new TableLayout(1);
layout.setTableAnchor(TableLayout.Anchor.WEST);
layout.setTableFill(TableLayout.Fill.BOTH);
layout.setTablePadding(3, 3);
layout.setTableWeightX(1.0);
layout.setTableWeightY(0.0);
layout.setRowWeightY(1, 1.0);
final JPanel panel = new JPanel(layout);
panel.setName(labelName);
panel.setBorder(BorderFactory.createTitledBorder(labelName));
final JPanel conditionsButtonsPanel = createConditionsButtonPanel(labelName);
panel.add(conditionsButtonsPanel);
panel.add(createConditionsTable(labelName));
panel.add(createCombinePanel());
return panel;
}
代码示例来源:origin: bcdev/beam
private Component createConditionsPanel() {
final String labelName = "Conditions";
final TableLayout layout = new TableLayout(1);
layout.setTableAnchor(TableLayout.Anchor.WEST);
layout.setTableFill(TableLayout.Fill.BOTH);
layout.setTablePadding(3, 3);
layout.setTableWeightX(1.0);
layout.setTableWeightY(0.0);
layout.setRowWeightY(1, 1.0);
final JPanel panel = new JPanel(layout);
panel.setName(labelName);
panel.setBorder(BorderFactory.createTitledBorder(labelName));
final JPanel conditionsButtonsPanel = createConditionsButtonPanel(labelName);
panel.add(conditionsButtonsPanel);
panel.add(createConditionsTable(labelName));
panel.add(createCombinePanel());
return panel;
}
代码示例来源: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 void init() {
final TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
tableLayout.setTableFill(TableLayout.Fill.BOTH);
tableLayout.setTableWeightX(1.0);
tableLayout.setTableWeightY(0.0);
tableLayout.setTablePadding(3, 3);
setLayout(tableLayout);
tableLayout.setRowWeightY(0, 1.0);
add(createSourceProductsPanel());
targetProductSelector.getModel().setProductName("level-3");
add(targetProductSelector.createDefaultPanel());
}
代码示例来源:origin: senbox-org/snap-desktop
private void init() {
final TableLayout tableLayout = new TableLayout(1);
tableLayout.setTableAnchor(TableLayout.Anchor.WEST);
tableLayout.setTableFill(TableLayout.Fill.BOTH);
tableLayout.setTableWeightX(1.0);
tableLayout.setTableWeightY(0.0);
tableLayout.setTablePadding(3, 3);
setLayout(tableLayout);
tableLayout.setRowWeightY(0, 1.0);
add(createSourceProductsPanel());
targetProductSelector.getModel().setProductName("level-3");
add(targetProductSelector.createDefaultPanel());
}
代码示例来源: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 void createUI() {
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(2, 1.0);
layout.setTablePadding(3, 3);
setLayout(layout);
CrsForm customCrsUI = new CustomCrsForm(appContext);
CrsForm predefinedCrsUI = new PredefinedCrsForm(appContext);
crsSelectionPanel = new CrsSelectionPanel(customCrsUI, predefinedCrsUI);
crsSelectionPanel.addPropertyChangeListener(S2tbxMosaicFormModel.PROPERTY_CRS,
(PropertyChangeEvent evt)-> updateForCrsChanged());
add(crsSelectionPanel);
add(createOrthorectifyPanel());
add(createMosaicBoundsPanel());
}
代码示例来源:origin: bcdev/beam
private void createUI() {
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(2, 1.0);
layout.setTablePadding(3, 3);
setLayout(layout);
CrsForm customCrsUI = new CustomCrsForm(appContext);
CrsForm predefinedCrsUI = new PredefinedCrsForm(appContext);
crsSelectionPanel = new CrsSelectionPanel(customCrsUI, predefinedCrsUI);
crsSelectionPanel.addPropertyChangeListener(MosaicFormModel.PROPERTY_CRS, new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
updateForCrsChanged();
}
});
add(crsSelectionPanel);
add(createOrthorectifyPanel());
add(createMosaicBoundsPanel());
}
代码示例来源:origin: senbox-org/snap-desktop
private void createUI() {
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(2, 1.0);
layout.setTablePadding(3, 3);
setLayout(layout);
CrsForm customCrsUI = new CustomCrsForm(appContext);
CrsForm predefinedCrsUI = new PredefinedCrsForm(appContext);
crsSelectionPanel = new CrsSelectionPanel(customCrsUI, predefinedCrsUI);
crsSelectionPanel.addPropertyChangeListener(MosaicFormModel.PROPERTY_CRS, new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
updateForCrsChanged();
}
});
add(crsSelectionPanel);
add(createOrthorectifyPanel());
add(createMosaicBoundsPanel());
}
内容来源于网络,如有侵权,请联系作者删除!