javax.swing.JComponent.setComponentOrientation()方法的使用及代码示例

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

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

JComponent.setComponentOrientation介绍

暂无

代码示例

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

@Override
public void setComponentOrientation(ComponentOrientation orientation) {
  super.setComponentOrientation(orientation);
  _monthView.setComponentOrientation(orientation);
}

代码示例来源:origin: org.swinglabs.swingx/swingx-core

@Override
public void setComponentOrientation(ComponentOrientation orientation) {
  super.setComponentOrientation(orientation);
  _monthView.setComponentOrientation(orientation);
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

@Override
public void setComponentOrientation(ComponentOrientation orientation) {
  super.setComponentOrientation(orientation);
  _monthView.setComponentOrientation(orientation);
}

代码示例来源:origin: org.swinglabs.swingx/swingx-all

@Override
public void setComponentOrientation(ComponentOrientation orientation) {
  super.setComponentOrientation(orientation);
  _monthView.setComponentOrientation(orientation);
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

@Override
public void setComponentOrientation(ComponentOrientation orientation) {
  super.setComponentOrientation(orientation);
  _monthView.setComponentOrientation(orientation);
}

代码示例来源:origin: com.jalalkiswani/jk-desktop

private void init() {
  if (this.comp instanceof JComponent) {
    final JComponent com = (JComponent) this.comp;
    com.setComponentOrientation(SwingUtility.getDefaultComponentOrientation());
  }
  this.comp.addFocusListener(new FocusListener() {
    private Object oldValue;
    @Override
    public void focusGained(final FocusEvent e) {
      this.oldValue = FSAbstractComponent.this.comp.getValue();
    }
    @Override
    public void focusLost(final FocusEvent e) {
      final Object newValue = FSAbstractComponent.this.comp.getValue();
      fireValueChangeListener(this.oldValue, newValue);
      // }
    }
  });
}

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui

public static void updateListCellRenderer(final JComponent _target, final JList _list, final int _index,
  final boolean _isSelected, final boolean _cellHasFocus) {
 _target.setComponentOrientation(_list.getComponentOrientation());
 if (_isSelected) {
  _target.setBackground(_list.getSelectionBackground());
  _target.setForeground(_list.getSelectionForeground());
 } else {
  _target.setBackground(_list.getBackground());
  _target.setForeground(_list.getForeground());
 }
 _target.setEnabled(_list.isEnabled());
 _target.setFont(_list.getFont());
 _target.setBorder(_cellHasFocus ? UIManager.getBorder("List.focusCellHighlightBorder") : BORDER_NO_FOCUS);
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-editor

/**
 * {@inheritDoc}
 */
public void setComponentOrientation(ComponentOrientation o) {
  // Reuse the border to preserve its color.
  if (o.isLeftToRight()) {
    ((GutterBorder)getBorder()).setEdges(0, 0, 0, 1);
  }
  else {
    ((GutterBorder)getBorder()).setEdges(0, 1, 0, 0);
  }
  super.setComponentOrientation(o);
}

代码示例来源:origin: org.nuiton.thirdparty/rsyntaxtextarea

/**
 * {@inheritDoc}
 */
public void setComponentOrientation(ComponentOrientation o) {
  // Reuse the border to preserve its color.
  if (o.isLeftToRight()) {
    ((GutterBorder)getBorder()).setEdges(0, 0, 0, 1);
  }
  else {
    ((GutterBorder)getBorder()).setEdges(0, 1, 0, 0);
  }
  super.setComponentOrientation(o);
}

相关文章

JComponent类方法