javax.swing.JButton.applyComponentOrientation()方法的使用及代码示例

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

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

JButton.applyComponentOrientation介绍

暂无

代码示例

代码示例来源:origin: com.fifesoft.rtext/fife.common

  1. /**
  2. * Sets the orientation of this component. This is overridden to also
  3. * update the orientation of the popup menu.
  4. *
  5. * @param o The new orientation.
  6. */
  7. @Override
  8. public void applyComponentOrientation(ComponentOrientation o) {
  9. super.applyComponentOrientation(o);
  10. if (popupMenu!=null) {
  11. popupMenu.applyComponentOrientation(o);
  12. }
  13. }

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

  1. @Override
  2. public void applyComponentOrientation(ComponentOrientation o) {
  3. super.applyComponentOrientation(o);
  4. getColumnControlPopup().applyComponentOrientation(o);
  5. }

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

  1. @Override
  2. public void applyComponentOrientation(ComponentOrientation o) {
  3. super.applyComponentOrientation(o);
  4. getColumnControlPopup().applyComponentOrientation(o);
  5. }

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

  1. @Override
  2. public void applyComponentOrientation(ComponentOrientation o) {
  3. super.applyComponentOrientation(o);
  4. getColumnControlPopup().applyComponentOrientation(o);
  5. }

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

  1. @Override
  2. public void applyComponentOrientation(ComponentOrientation o) {
  3. super.applyComponentOrientation(o);
  4. getColumnControlPopup().applyComponentOrientation(o);
  5. }

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

  1. @Override
  2. public void applyComponentOrientation(ComponentOrientation o) {
  3. super.applyComponentOrientation(o);
  4. getColumnControlPopup().applyComponentOrientation(o);
  5. }

代码示例来源:origin: Multibit-Legacy/multibit-hd

  1. /**
  2. * @return A new JButton with default styling
  3. */
  4. public static JButton newButton(Action action) {
  5. // The action resets all text
  6. JButton button = new JButton(action);
  7. // Ensure borders render smoothly
  8. button.setOpaque(false);
  9. // Reinforce the idea of clicking
  10. button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
  11. // Ensure we use the correct component orientation
  12. button.applyComponentOrientation(Languages.currentComponentOrientation());
  13. // Apply default theme (do not set foreground color)
  14. NimbusDecorator.applyThemeColor(Themes.currentTheme.buttonBackground(), button);
  15. return button;
  16. }

代码示例来源:origin: Multibit-Legacy/multibit-hd

  1. /**
  2. * <p>Align the icon according to the locale (leading or trailing)</p>
  3. *
  4. * @param button The button (iconography will change will changes to the label color and font)
  5. * @param leading True if the icon comes before the text in the reading direction (LTR and RTL is handled automatically)
  6. */
  7. private static void align(JButton button, boolean leading) {
  8. button.applyComponentOrientation(ComponentOrientation.getOrientation(Languages.currentLocale()));
  9. if (leading) {
  10. // Text trails the icon in LTR
  11. button.setHorizontalTextPosition(SwingConstants.TRAILING);
  12. } else {
  13. button.setHorizontalTextPosition(SwingConstants.LEADING);
  14. }
  15. }

相关文章

JButton类方法