javax.swing.JComboBox.setBorder()方法的使用及代码示例

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

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

JComboBox.setBorder介绍

暂无

代码示例

代码示例来源:origin: pentaho/mondrian

listRenderer.setBackground(Color.white);
listRenderer.setBorder(
  new EmptyBorder(
    0, 0, 0, 0)); //super.noFocusBorder);

代码示例来源:origin: pentaho/mondrian

listEditor.setFont(Font.decode("Dialog"));
listEditor.setBackground(Color.white);
listEditor.setBorder(
  new EmptyBorder(
    0, 0, 0, 0)); //super.noFocusBorder);

代码示例来源:origin: org.apache.cayenne/cayenne-nodeps

public ComboBoxEditor(JComboBox comboBox) {
  super(comboBox);
  comboBox.setBorder(editStateBorder);
 }
}

代码示例来源:origin: org.objectstyle.cayenne/cayenne

public ComboBoxEditor(JComboBox comboBox) {
  super(comboBox);
  comboBox.setBorder(editStateBorder);
 }
}

代码示例来源:origin: otros-systems/otroslogviewer

public MarkNoteFilter() {
 super(NAME, DESCRIPTION);
 noteComboBox.setBorder(BorderFactory.createTitledBorder("With note:"));
 noteComboBox.addActionListener(e -> listener.ifPresent(LogFilterValueChangeListener::valueChanged));
 markComboBox.setBorder(BorderFactory.createTitledBorder("Marked:"));
 markComboBox.addActionListener(e -> listener.ifPresent(LogFilterValueChangeListener::valueChanged));
 gui = new JPanel(new GridLayout(2, 1));
 gui.add(noteComboBox);
 gui.add(markComboBox);
}

代码示例来源:origin: uk.gov.nationalarchives/droid-ui

/**
 * FIXME: javadoc.
 */
public void clearRedBorderToMonthBox() {
  monthComboBox.setBorder(null);
  repaint();
}

代码示例来源:origin: uk.gov.nationalarchives/droid-ui

/**
 * FIXME: javadoc.
 */
public void setRedBorderToDayBox() {
  dayComboBox.setBorder(BorderFactory.createLineBorder(Color.red));
  repaint();
}

代码示例来源:origin: digital-preservation/droid

/**
 * FIXME: javadoc.
 */
public void setRedBorderToDayBox() {
  dayComboBox.setBorder(BorderFactory.createLineBorder(Color.red));
  repaint();
}

代码示例来源:origin: digital-preservation/droid

/**
 * FIXME: javadoc.
 */
public void clearRedBoxToComponents() {
  yearTextBox.setBorder(null);
  monthComboBox.setBorder(null);
  dayComboBox.setBorder(BorderFactory.createLineBorder(Color.red));
  repaint();
}

代码示例来源:origin: com.jtattoo/JTattoo

public void focusLost(FocusEvent e) {
    if (comboBox != null) {
      if (orgBorder instanceof UIResource) {
        comboBox.setBorder(orgBorder);
      }
      comboBox.setBackground(orgBackgroundColor);
    }
  }
};

代码示例来源:origin: uk.gov.nationalarchives/droid-ui

/**
 * FIXME: javadoc.
 */
public void setRedBorderToMonthBox() {
  monthComboBox.setBorder(BorderFactory.createLineBorder(Color.red));
  repaint();
}

代码示例来源:origin: uk.gov.nationalarchives/droid-ui

/**
 * FIXME: javadoc.
 */
public void clearRedBorderToDayBox() {
  dayComboBox.setBorder(null);
  repaint();
}

代码示例来源:origin: uk.gov.nationalarchives/droid-ui

/**
 * FIXME: javadoc.
 */
public void paintRedBoxToComponents() {
  yearTextBox.setBorder(BorderFactory.createLineBorder(Color.red));
  monthComboBox.setBorder(BorderFactory.createLineBorder(Color.red));
  dayComboBox.setBorder(BorderFactory.createLineBorder(Color.red));
  repaint();
}

代码示例来源:origin: uk.gov.nationalarchives/droid-ui

/**
 * FIXME: javadoc.
 */
public void clearRedBoxToComponents() {
  yearTextBox.setBorder(null);
  monthComboBox.setBorder(null);
  dayComboBox.setBorder(BorderFactory.createLineBorder(Color.red));
  repaint();
}

代码示例来源:origin: digital-preservation/droid

/**
 * FIXME: javadoc.
 */
public void setRedBorderToMonthBox() {
  monthComboBox.setBorder(BorderFactory.createLineBorder(Color.red));
  repaint();
}

代码示例来源:origin: digital-preservation/droid

/**
 * FIXME: javadoc.
 */
public void paintRedBoxToComponents() {
  yearTextBox.setBorder(BorderFactory.createLineBorder(Color.red));
  monthComboBox.setBorder(BorderFactory.createLineBorder(Color.red));
  dayComboBox.setBorder(BorderFactory.createLineBorder(Color.red));
  repaint();
}

代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-gui-minigui

/**
 * Constructor.
 *
 * @param comboBox Combo box we're going to use
 */
public DropdownEditor(JComboBox<String> comboBox) {
 super(comboBox);
 this.comboBox = comboBox;
 panel = new DispatchingPanel((JComponent) comboBox.getEditor().getEditorComponent());
 panel.setLayout(new BorderLayout());
 panel.add(comboBox, BorderLayout.CENTER);
 comboBox.setBorder(BorderFactory.createEmptyBorder(0, 3, 0, 3));
}

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

private void createCellDefaultValueComboBox(FocusListener focusListener) {
  this.cellDefaultValueComboBox = new JComboBox();
  this.cellDefaultValueComboBox.setOpaque(true);
  this.cellDefaultValueComboBox.setVisible(false);
  this.cellDefaultValueComboBox.setBorder(new EmptyBorder(0, 0, 0, 0));
  this.cellDefaultValueComboBox.addFocusListener(focusListener);
}

代码示例来源:origin: Exslims/MercuryTrade

public JComboBox getComboBox(String[] child) {
  JComboBox comboBox = new JComboBox<>(child);
  comboBox.setBackground(AppThemeColor.HEADER);
  comboBox.setForeground(AppThemeColor.TEXT_DEFAULT);
  comboBox.setFont(BOLD_FONT.deriveFont(scale * 16f));
  comboBox.setBorder(BorderFactory.createLineBorder(AppThemeColor.BORDER, 1));
  comboBox.setUI(MercuryComboBoxUI.createUI(comboBox));
  return comboBox;
}

代码示例来源:origin: atarw/material-ui-swing

@Override
public void installUI (JComponent c) {
  super.installUI (c);
  JComboBox<?> comboBox = (JComboBox<?>) c;
  comboBox.setFont (UIManager.getFont ("ComboBox.font"));
  comboBox.setBackground (UIManager.getColor ("ComboBox.background"));
  comboBox.setForeground (UIManager.getColor ("ComboBox.foreground"));
  comboBox.setBorder (UIManager.getBorder ("ComboBox.border"));
  comboBox.setLightWeightPopupEnabled (true);
  comboBox.setRenderer (new MaterialComboBoxRenderer ());
}

相关文章

JComboBox类方法