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

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

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

JComboBox.getComponentOrientation介绍

暂无

代码示例

代码示例来源:origin: com.github.arnabk/pgslookandfeel

protected ComboPopup createPopup() {
  // we don't want the visual clutter of having two borders directly
  // below each other so we move the popup one pixel higher
  BasicComboPopup basiccombopopup = new BasicComboPopup(comboBox) {
    public void show(Component invoker, int x, int y) {
      super.show(invoker, x, y-1);
    }
  };
  basiccombopopup.setBorder(UIManager.getBorder("ComboBox.popup.border"));
  basiccombopopup.applyComponentOrientation(comboBox.getComponentOrientation());
  return basiccombopopup;
}

代码示例来源:origin: org.java.net.substance/substance

.getComponentOrientation();

代码示例来源:origin: org.java.net.substance/substance

/**
 * Configures the straight side of the arrow button.
 */
protected void configureArrowButtonStraightSide() {
  this.arrowButton.putClientProperty(
      SubstanceLookAndFeel.BUTTON_SIDE_PROPERTY, this.comboBox
          .getComponentOrientation().isLeftToRight() ? Side.LEFT
          : Side.RIGHT);
}

代码示例来源:origin: com.github.insubstantial/substance

.getComponentOrientation();

代码示例来源:origin: com.github.arnabk/pgslookandfeel

public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
    Component c = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
    c.setComponentOrientation(comboBox.getComponentOrientation());
    return c;
  }
};

代码示例来源:origin: com.github.insubstantial/substance

/**
 * Configures the straight side of the arrow button.
 */
protected void configureArrowButtonStraightSide() {
  this.arrowButton.putClientProperty(
      SubstanceLookAndFeel.BUTTON_SIDE_PROPERTY, this.comboBox
          .getComponentOrientation().isLeftToRight() ? Side.LEFT
          : Side.RIGHT);
}

代码示例来源:origin: org.java.net.substance/substance

@Override
protected Rectangle rectangleForCurrentValue() {
  int width = this.comboBox.getWidth();
  int height = this.comboBox.getHeight();
  Insets insets = this.layoutInsets;
  int buttonWidth = SubstanceSizeUtils
      .getScrollBarWidth(SubstanceSizeUtils
          .getComponentFontSize(comboBox));
  if (this.comboBox.getComponentOrientation().isLeftToRight()) {
    return new Rectangle(insets.left, insets.top, width - insets.left
        - insets.right - buttonWidth, height - insets.top
        - insets.bottom);
  } else {
    int startX = insets.left + buttonWidth;
    return new Rectangle(startX, insets.top, width - startX
        - insets.right, height - insets.top - insets.bottom);
  }
}

代码示例来源:origin: com.github.insubstantial/substance

@Override
protected Rectangle rectangleForCurrentValue() {
  int width = this.comboBox.getWidth();
  int height = this.comboBox.getHeight();
  Insets insets = this.layoutInsets;
  int buttonWidth = SubstanceSizeUtils
      .getScrollBarWidth(SubstanceSizeUtils
          .getComponentFontSize(comboBox));
  if (this.comboBox.getComponentOrientation().isLeftToRight()) {
    return new Rectangle(insets.left, insets.top, width - insets.left
        - insets.right - buttonWidth, height - insets.top
        - insets.bottom);
  } else {
    int startX = insets.left + buttonWidth;
    return new Rectangle(startX, insets.top, width - startX
        - insets.right, height - insets.top - insets.bottom);
  }
}

代码示例来源:origin: org.java.net.substance/substance

int origButtonWidth = SubstanceSizeUtils
    .getScrollBarWidth(componentFontSize);
if (this.comboBox.getComponentOrientation().isLeftToRight()) {
  int iconX = width - origButtonWidth - insets.right / 2
      + (origButtonWidth - iw) / 2;
if (this.comboBox.getComponentOrientation().isLeftToRight()) {
  this.currentValuePane.paintComponent(graphics,
      rendererComponent, this.comboBox, r.x, r.y, r.width,

代码示例来源:origin: com.github.insubstantial/substance

int origButtonWidth = SubstanceSizeUtils
    .getScrollBarWidth(componentFontSize);
if (this.comboBox.getComponentOrientation().isLeftToRight()) {
  int iconX = width - origButtonWidth - insets.right / 2
      + (origButtonWidth - iw) / 2;
if (this.comboBox.getComponentOrientation().isLeftToRight()) {
  this.currentValuePane.paintComponent(graphics,
      rendererComponent, this.comboBox, r.x, r.y, r.width,

代码示例来源:origin: khuxtable/seaglass

setComponentOrientation(comboBox.getComponentOrientation());

代码示例来源:origin: com.jidesoft/jide-oss

buttonInsets.right;
arrowButton.setBounds(
    comboBox.getComponentOrientation().isLeftToRight()
        ? (comboBox.getWidth() - insets.right - buttonWidth)
        : insets.left,

代码示例来源:origin: net.sf.nimrod/nimrod-laf

protected void paintLeches( Graphics g ) {
 boolean leftToRight = comboBox.getComponentOrientation().isLeftToRight();

代码示例来源:origin: com.github.insubstantial/substance

arrowButton.setBounds(0, 0, 0, 0);
} else {
  if (cb.getComponentOrientation().isLeftToRight()) {
    arrowButton.setBounds(width - buttonWidth
        - insets.right, 0, buttonWidth + insets.right,

代码示例来源:origin: org.java.net.substance/substance

arrowButton.setBounds(0, 0, 0, 0);
} else {
  if (cb.getComponentOrientation().isLeftToRight()) {
    arrowButton.setBounds(width - buttonWidth
        - insets.right, 0, buttonWidth + insets.right,

相关文章

JComboBox类方法