javax.swing.JCheckBox.setVerticalTextPosition()方法的使用及代码示例

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

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

JCheckBox.setVerticalTextPosition介绍

暂无

代码示例

代码示例来源:origin: chewiebug/GCViewer

  1. public OpenFileView() {
  2. setDialogTitle(LocalisationHelper.getString("fileopen_dialog_title"));
  3. setMultiSelectionEnabled(true);
  4. for (ExtensionFileFilter filter: ExtensionFileFilter.EXT_FILE_FILTERS) {
  5. addChoosableFileFilter(filter);
  6. }
  7. addFileCheckBox = new JCheckBox(LocalisationHelper.getString("fileopen_dialog_add_checkbox"), false);
  8. addFileCheckBox.setVerticalTextPosition(SwingConstants.TOP);
  9. addFileCheckBox.setToolTipText(LocalisationHelper.getString("fileopen_dialog_hint_add_checkbox"));
  10. final JPanel panel = new JPanel(new GridBagLayout());
  11. final GridBagConstraints gridBagConstraints = new GridBagConstraints();
  12. gridBagConstraints.anchor = GridBagConstraints.NORTH;
  13. gridBagConstraints.weighty = 2;
  14. panel.add(addFileCheckBox, gridBagConstraints);
  15. setAccessory(panel);
  16. }

代码示例来源:origin: magefree/mage

  1. chkPennyDreadful.setFocusable(false);
  2. chkPennyDreadful.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
  3. chkPennyDreadful.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
  4. chkPennyDreadful.addActionListener(new java.awt.event.ActionListener() {
  5. public void actionPerformed(java.awt.event.ActionEvent evt) {
  6. chkPiles.setFocusable(false);
  7. chkPiles.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
  8. chkPiles.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
  9. chkPiles.addActionListener(new java.awt.event.ActionListener() {
  10. public void actionPerformed(java.awt.event.ActionEvent evt) {
  11. chkNames.setMinimumSize(new java.awt.Dimension(67, 16));
  12. chkNames.setPreferredSize(new java.awt.Dimension(67, 16));
  13. chkNames.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
  14. chkNames.addActionListener(new java.awt.event.ActionListener() {
  15. public void actionPerformed(java.awt.event.ActionEvent evt) {
  16. chkTypes.setMinimumSize(new java.awt.Dimension(63, 16));
  17. chkTypes.setPreferredSize(new java.awt.Dimension(63, 16));
  18. chkTypes.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
  19. chkTypes.addActionListener(new java.awt.event.ActionListener() {
  20. public void actionPerformed(java.awt.event.ActionEvent evt) {
  21. chkRules.setMinimumSize(new java.awt.Dimension(59, 16));
  22. chkRules.setPreferredSize(new java.awt.Dimension(59, 16));
  23. chkRules.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
  24. chkRules.addActionListener(new java.awt.event.ActionListener() {
  25. public void actionPerformed(java.awt.event.ActionEvent evt) {

代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime

  1. public BooleanCellRenderer(TableCellRenderer delegate, Icon icon) {
  2. //super(new BorderLayout());
  3. this(delegate, icon, DEFAULT_PREDICATE);
  4. checkBox.setVerticalTextPosition(JLabel.TOP);
  5. }

代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-runtime

  1. public BooleanCellRenderer(TableCellRenderer delegate, Icon icon) {
  2. //super(new BorderLayout());
  3. this(delegate, icon, DEFAULT_PREDICATE);
  4. checkBox.setVerticalTextPosition(JLabel.TOP);
  5. }

代码示例来源:origin: org.zaproxy/zap

  1. private JCheckBox getChkProcessImages() {
  2. if (chkProcessImages == null) {
  3. chkProcessImages = new JCheckBox();
  4. chkProcessImages.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  5. chkProcessImages.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
  6. }
  7. return chkProcessImages;
  8. }

代码示例来源:origin: org.zaproxy/zap

  1. private JCheckBox getChkWmUiHandling() {
  2. if (chkWmUiHandling == null) {
  3. chkWmUiHandling = new JCheckBox();
  4. chkWmUiHandling.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  5. chkWmUiHandling.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
  6. }
  7. return chkWmUiHandling;
  8. }

代码示例来源:origin: org.zaproxy/zap

  1. private JCheckBox getChkAdvancedView() {
  2. if (chkAdvancedView == null) {
  3. chkAdvancedView = new JCheckBox();
  4. chkAdvancedView.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  5. chkAdvancedView.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
  6. }
  7. return chkAdvancedView;
  8. }

代码示例来源:origin: org.zaproxy/zap

  1. private JCheckBox getShowTabNames() {
  2. if (chkShowTabNames == null) {
  3. chkShowTabNames = new JCheckBox();
  4. chkShowTabNames.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  5. chkShowTabNames.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
  6. }
  7. return chkShowTabNames;
  8. }

代码示例来源:origin: org.zaproxy/zap

  1. private JCheckBox getShowSplashScreen() {
  2. if (chkShowSplashScreen == null) {
  3. chkShowSplashScreen = new JCheckBox();
  4. chkShowSplashScreen.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  5. chkShowSplashScreen.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
  6. }
  7. return chkShowSplashScreen;
  8. }

代码示例来源:origin: org.zaproxy/zap

  1. private JCheckBox getEnableJSONP() {
  2. if (enableJSONP == null) {
  3. enableJSONP = new JCheckBox();
  4. enableJSONP.setText(Constant.messages.getString("api.options.enableJSONP"));
  5. enableJSONP.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  6. enableJSONP.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
  7. }
  8. return enableJSONP;
  9. }

代码示例来源:origin: org.zaproxy/zap

  1. private JCheckBox getIncErrorDetails() {
  2. if (incErrorDetails == null) {
  3. incErrorDetails = new JCheckBox();
  4. incErrorDetails.setText(Constant.messages.getString("api.options.incErrors"));
  5. incErrorDetails.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  6. incErrorDetails.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
  7. }
  8. return incErrorDetails;
  9. }

代码示例来源:origin: org.zaproxy/zap

  1. private JCheckBox getChkUiEnabled() {
  2. if (chkUiEnabled == null) {
  3. chkUiEnabled = new JCheckBox();
  4. chkUiEnabled.setText(Constant.messages.getString("api.options.uiEnabled"));
  5. chkUiEnabled.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  6. chkUiEnabled.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
  7. }
  8. return chkUiEnabled;
  9. }

代码示例来源:origin: org.zaproxy/zap

  1. private JCheckBox getChkSecureOnly() {
  2. if (chkSecureOnly == null) {
  3. chkSecureOnly = new JCheckBox();
  4. chkSecureOnly.setText(Constant.messages.getString("api.options.secure"));
  5. chkSecureOnly.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  6. chkSecureOnly.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
  7. }
  8. return chkSecureOnly;
  9. }

代码示例来源:origin: org.zaproxy/zap

  1. private JCheckBox getReportPermErrors() {
  2. if (reportPermErrors == null) {
  3. reportPermErrors = new JCheckBox();
  4. reportPermErrors.setText(Constant.messages.getString("api.options.reportPermErrors"));
  5. reportPermErrors.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  6. reportPermErrors.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
  7. }
  8. return reportPermErrors;
  9. }

代码示例来源:origin: org.zaproxy/zap

  1. private JCheckBox getChkInstallAddonUpdates() {
  2. if (chkInstallAddonUpdates == null) {
  3. chkInstallAddonUpdates = new JCheckBox();
  4. chkInstallAddonUpdates.setText(Constant.messages.getString("cfu.options.installAddonUpdates"));
  5. chkInstallAddonUpdates.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  6. chkInstallAddonUpdates.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
  7. }
  8. return chkInstallAddonUpdates;
  9. }
  10. private JCheckBox getChkInstallScannerRules() {

代码示例来源:origin: org.zaproxy/zap

  1. private JCheckBox getChkInstallScannerRules() {
  2. if (chkInstallScannerRules == null) {
  3. chkInstallScannerRules = new JCheckBox();
  4. chkInstallScannerRules.setText(Constant.messages.getString("cfu.options.installScannerRules"));
  5. chkInstallScannerRules.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  6. chkInstallScannerRules.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
  7. }
  8. return chkInstallScannerRules;
  9. }
  10. private JCheckBox getChkReportReleaseAddons() {

代码示例来源:origin: org.zaproxy/zap

  1. private JCheckBox getChkReportAlphaAddons() {
  2. if (chkReportAlphaAddons == null) {
  3. chkReportAlphaAddons = new JCheckBox();
  4. chkReportAlphaAddons.setText(Constant.messages.getString("cfu.options.reportAlphaAddons"));
  5. chkReportAlphaAddons.setVerticalAlignment(javax.swing.SwingConstants.TOP);
  6. chkReportAlphaAddons.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
  7. }
  8. return chkReportAlphaAddons;
  9. }

代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime

  1. @Override
  2. public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
  3. JComponent rendered = (JComponent) rendererDelegate.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
  4. if (rendered instanceof JCheckBox) {
  5. JCheckBox checkBox = (JCheckBox)rendered;
  6. checkBox.setHorizontalAlignment(JLabel.CENTER);
  7. checkBox.setVerticalTextPosition(JLabel.TOP);
  8. checkBox.setBorderPainted(true);
  9. checkBox.setIcon(icon);
  10. }
  11. return rendered;
  12. }

代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing

  1. public BooleanCellRenderer(TableCellRenderer delegate, Icon icon) {
  2. //super(new BorderLayout());
  3. this.checkBox = new JCheckBox(icon);
  4. add(checkBox, BorderLayout.NORTH);
  5. checkBox.setHorizontalAlignment(JLabel.CENTER);
  6. checkBox.setVerticalTextPosition(JLabel.TOP);
  7. checkBox.setBorderPainted(true);
  8. this.defaultDelegate = delegate;
  9. }

代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-runtime

  1. @Override
  2. public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
  3. JComponent rendered = (JComponent) rendererDelegate.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
  4. if (rendered instanceof JCheckBox) {
  5. JCheckBox checkBox = (JCheckBox) rendered;
  6. checkBox.setHorizontalAlignment(JLabel.CENTER);
  7. checkBox.setVerticalTextPosition(JLabel.TOP);
  8. checkBox.setBorderPainted(true);
  9. checkBox.setIcon(icon);
  10. }
  11. return rendered;
  12. }

相关文章

JCheckBox类方法