javax.swing.JToggleButton.setAlignmentX()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(118)

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

JToggleButton.setAlignmentX介绍

暂无

代码示例

代码示例来源:origin: freeplane/freeplane

private JToggleButton createSetFoldingStateToggleButton() {
  JToggleButton tglbtnSetFilter = createToggleButtonWithIconAndLabel("SetFoldingSlideContent.icon", "slide.setfoldingstate");
  tglbtnSetFilter.setAlignmentX(Component.CENTER_ALIGNMENT);
  tglbtnSetFilter.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      if(! slide.foldsNodes())
        UndoableSlide.of(slide).setCurrentFoldedNodeIDs();
      else
        UndoableSlide.of(slide).unsetFoldsNodes();
    }
  });
  return tglbtnSetFilter;
}

代码示例来源:origin: freeplane/freeplane

private JToggleButton createSetFilterToggleButton() {
  final JToggleButton tglbtnSetFilter = createToggleButtonWithIconAndLabel("SetFilterSlideContent.icon", "slide.setfilter");
  tglbtnSetFilter.setAlignmentX(Component.CENTER_ALIGNMENT);
  tglbtnSetFilter.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      if( filterComposerDialog == null)
        filterComposerDialog = new FilterComposerDialog();
      ASelectableCondition oldCondition = slide.getFilterCondition();
      if(oldCondition != null) {
        filterComposerDialog.addCondition(oldCondition);
        filterComposerDialog.setSelectedItem(oldCondition);
        UndoableSlide.of(slide).setFilterCondition(null);
      } else {
        filterComposerDialog.show();
        List<ASelectableCondition> conditions = filterComposerDialog.getConditions();
        if(filterComposerDialog.isSuccess()) {
          ASelectableCondition newCondition = conditions.isEmpty() ? null : conditions.get(0);
          UndoableSlide.of(slide).setFilterCondition(newCondition);
        }
      }
      tglbtnSetFilter.setSelected(slide.getFilterCondition() != null);
    }
  });
  return tglbtnSetFilter;
}

代码示例来源:origin: freeplane/freeplane

private JToggleButton createPlacesSelectedNodeToggleButton() {
  final JToggleButton checkBoxOnlySpecificNodes = createToggleButtonWithIconAndLabel("PlaceSelectedNodeOnSlide.icon", "slide.placenode");
  checkBoxOnlySpecificNodes.setAlignmentX(Component.CENTER_ALIGNMENT);
  checkBoxOnlySpecificNodes.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
      final String centeredNodeId = slide.getPlacedNodeId();
      final IMapSelection selection = Controller.getCurrentController().getSelection();
      if(centeredNodeId == null) {
        final NodeModel selected = selection.getSelected();
        if(selected != null) {
          UndoableSlide.of(slide).setPlacedNodeId(selected.getID());
          setNodePlacementControlsEnabled(true, slide.getPlacedNodePosition());
        } else {
          UndoableSlide.of(slide).setPlacedNodeId(null);
          setNodePlacementControlsEnabled(false, slide.getPlacedNodePosition());
        }
      } else {
        UndoableSlide.of(slide).setPlacedNodeId(null);
        setNodePlacementControlsEnabled(false, slide.getPlacedNodePosition());
        final MapModel map = Controller.getCurrentController().getMap();
        final NodeModel node = map.getNodeForID(centeredNodeId);
        if(node != null)
          selection.selectAsTheOnlyOneSelected(node);
      }
      checkBoxOnlySpecificNodes.setSelected(slide.getPlacedNodeId() != null);
    }
  });
  return checkBoxOnlySpecificNodes;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-tools-comanalyzer

cluster.setAlignmentX(Component.LEFT_ALIGNMENT);
cluster.setSelected(panelcan.cluster);
cluster.addActionListener(this);

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-propertyeditors

shortCutPanelMyProjectButton.setAlignmentX(JComponent.CENTER_ALIGNMENT);
shortCutPanelMyProjectButton.setPreferredSize(buttonSize);

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-propertyeditors

shortCutPanelMyProjectButton.setAlignmentX(JComponent.CENTER_ALIGNMENT);
shortCutPanelMyProjectButton.setPreferredSize(buttonSize);

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

listViewButtonAccessibleName);
listViewButton.setSelected(true);
listViewButton.setAlignmentX(JComponent.LEFT_ALIGNMENT);
listViewButton.setAlignmentY(JComponent.CENTER_ALIGNMENT);
listViewButton.setMargin(shrinkwrap);
detailsViewButton.getAccessibleContext().setAccessibleName(
  detailsViewButtonAccessibleName);
detailsViewButton.setAlignmentX(JComponent.LEFT_ALIGNMENT);
detailsViewButton.setAlignmentY(JComponent.CENTER_ALIGNMENT);
detailsViewButton.setMargin(shrinkwrap);

代码示例来源:origin: com.googlecode.vfsjfilechooser2/vfsjfilechooser2

listViewButtonAccessibleName);
listViewButton.setSelected(true);
listViewButton.setAlignmentX(JComponent.LEFT_ALIGNMENT);
listViewButton.setAlignmentY(JComponent.CENTER_ALIGNMENT);
listViewButton.setMargin(shrinkwrap);
detailsViewButton.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY,
  detailsViewButtonAccessibleName);
detailsViewButton.setAlignmentX(JComponent.LEFT_ALIGNMENT);
detailsViewButton.setAlignmentY(JComponent.CENTER_ALIGNMENT);
detailsViewButton.setMargin(shrinkwrap);

相关文章

JToggleButton类方法