com.bc.ceres.swing.binding.Binding.getComponents()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(145)

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

Binding.getComponents介绍

暂无

代码示例

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

private void updateEnabledState(boolean isEnvisatFormatSelected) {
  Binding binding = processingParamBindingContext.getBinding("doRadToRefl");
  for (JComponent component : binding.getComponents()) {
    component.setEnabled(!isEnvisatFormatSelected);
  }
}

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

private void toggleControls(OSFamily osFamily) {
  Bundle bundle = modified.get(osFamily);
  boolean canSelect = bundle.getBundleType() != BundleType.NONE;
  BundleLocation location = bundle.getLocation();
  boolean remoteCondition = canSelect && location == BundleLocation.REMOTE;
  boolean localCondition = canSelect && location == BundleLocation.LOCAL;
  for (JComponent component : controls.get(osFamily)) {
    if ("url".equals(component.getName())) {
      component.setEnabled(remoteCondition);
    } else {
      component.setEnabled(canSelect);
    }
  }
  BindingContext bindingContext = bindingContexts.get(osFamily);
  JComponent[] components = bindingContext.getBinding("source").getComponents();
  for (JComponent component : components) {
    component.setEnabled(localCondition);
  }
  for (Component jcomponent : components[0].getParent().getComponents()) {
    jcomponent.setEnabled(localCondition);
  }
  components = bindingContext.getBinding("targetLocation").getComponents();
  for (JComponent component : components) {
    component.setEnabled(canSelect);
  }
  repaint();
}

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

this.panel = parametersPane.createPanel();
for (Property property : propertyContainer.getProperties()) {
  Arrays.stream(parametersPane.getBindingContext().getBinding(property.getName()).getComponents())
      .forEach(c -> UIUtils.addPromptSupport(c, property));
  if (this.annotatedFields.containsKey(property.getName())) {
        .filter(a -> a.annotationType().equals(ReadOnly.class))
        .findFirst();
    annotation.ifPresent(annotation1 -> Arrays.stream(parametersPane.getBindingContext().getBinding(property.getName()).getComponents())
        .forEach(c -> c.setEnabled(false)));

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

@Test
public void testThatUIComponentsAreBoundToProperties() {
  final Binding useRoiMaskBinding = bindingContext.getBinding(RoiMaskSelector.PROPERTY_NAME_USE_ROI_MASK);
  assertSame(roiMaskSelector.useRoiMaskCheckBox, useRoiMaskBinding.getComponents()[0]);
  final Binding selectedRoiMaskBinding = bindingContext.getBinding(RoiMaskSelector.PROPERTY_NAME_ROI_MASK);
  assertSame(roiMaskSelector.roiMaskComboBox, selectedRoiMaskBinding.getComponents()[0]);
}

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

GridBagConstraints displayOptionsConstraints = GridBagUtils.createConstraints("anchor=SOUTH,fill=HORIZONTAL,weightx=1");
GridBagUtils.addToPanel(displayOptionsPanel, xAxisRangeControl.getPanel(), displayOptionsConstraints, "gridy=0");
GridBagUtils.addToPanel(displayOptionsPanel, xAxisRangeControl.getBindingContext().getBinding(PROPERTY_NAME_MARK_SEGMENTS).getComponents()[0], displayOptionsConstraints, "gridy=1");
GridBagUtils.addToPanel(displayOptionsPanel, yAxisRangeControl.getPanel(), displayOptionsConstraints, "gridy=2");
GridBagUtils.addToPanel(displayOptionsPanel, yAxisRangeControl.getBindingContext().getBinding(PROPERTY_NAME_LOG_SCALED).getComponents()[0], displayOptionsConstraints, "gridy=3");

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

GridBagConstraints displayOptionsConstraints = GridBagUtils.createConstraints("anchor=SOUTH,fill=HORIZONTAL,weightx=1");
GridBagUtils.addToPanel(displayOptionsPanel, xAxisRangeControl.getPanel(), displayOptionsConstraints, "gridy=0");
GridBagUtils.addToPanel(displayOptionsPanel, xAxisRangeControl.getBindingContext().getBinding(PROPERTY_NAME_MARK_SEGMENTS).getComponents()[0], displayOptionsConstraints, "gridy=1");
GridBagUtils.addToPanel(displayOptionsPanel, yAxisRangeControl.getPanel(), displayOptionsConstraints, "gridy=2");
GridBagUtils.addToPanel(displayOptionsPanel, yAxisRangeControl.getBindingContext().getBinding(PROPERTY_NAME_LOG_SCALED).getComponents()[0], displayOptionsConstraints, "gridy=3");

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

GridBagUtils.addToPanel(optionsPanel, new JPanel(), gbc, "gridy=3,fill=VERTICAL,weighty=1");
GridBagUtils.addToPanel(optionsPanel, xAxisRangeControl.getBindingContext().getBinding(
    PROPERTY_NAME_LOG_SCALED).getComponents()[0], gbc, "gridy=4");
return optionsPanel;

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

GridBagUtils.addToPanel(optionsPanel, new JPanel(), gbc, "gridy=3,fill=VERTICAL,weighty=1");
GridBagUtils.addToPanel(optionsPanel, xAxisRangeControl.getBindingContext().getBinding(
    PROPERTY_NAME_LOG_SCALED).getComponents()[0], gbc, "gridy=4");
return optionsPanel;

相关文章