本文整理了Java中javax.swing.JButton.applyComponentOrientation()
方法的一些代码示例,展示了JButton.applyComponentOrientation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JButton.applyComponentOrientation()
方法的具体详情如下:
包路径:javax.swing.JButton
类名称:JButton
方法名:applyComponentOrientation
暂无
代码示例来源:origin: com.fifesoft.rtext/fife.common
/**
* Sets the orientation of this component. This is overridden to also
* update the orientation of the popup menu.
*
* @param o The new orientation.
*/
@Override
public void applyComponentOrientation(ComponentOrientation o) {
super.applyComponentOrientation(o);
if (popupMenu!=null) {
popupMenu.applyComponentOrientation(o);
}
}
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
@Override
public void applyComponentOrientation(ComponentOrientation o) {
super.applyComponentOrientation(o);
getColumnControlPopup().applyComponentOrientation(o);
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop
@Override
public void applyComponentOrientation(ComponentOrientation o) {
super.applyComponentOrientation(o);
getColumnControlPopup().applyComponentOrientation(o);
}
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
@Override
public void applyComponentOrientation(ComponentOrientation o) {
super.applyComponentOrientation(o);
getColumnControlPopup().applyComponentOrientation(o);
}
代码示例来源:origin: org.swinglabs.swingx/swingx-core
@Override
public void applyComponentOrientation(ComponentOrientation o) {
super.applyComponentOrientation(o);
getColumnControlPopup().applyComponentOrientation(o);
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
@Override
public void applyComponentOrientation(ComponentOrientation o) {
super.applyComponentOrientation(o);
getColumnControlPopup().applyComponentOrientation(o);
}
代码示例来源:origin: Multibit-Legacy/multibit-hd
/**
* @return A new JButton with default styling
*/
public static JButton newButton(Action action) {
// The action resets all text
JButton button = new JButton(action);
// Ensure borders render smoothly
button.setOpaque(false);
// Reinforce the idea of clicking
button.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
// Ensure we use the correct component orientation
button.applyComponentOrientation(Languages.currentComponentOrientation());
// Apply default theme (do not set foreground color)
NimbusDecorator.applyThemeColor(Themes.currentTheme.buttonBackground(), button);
return button;
}
代码示例来源:origin: Multibit-Legacy/multibit-hd
/**
* <p>Align the icon according to the locale (leading or trailing)</p>
*
* @param button The button (iconography will change will changes to the label color and font)
* @param leading True if the icon comes before the text in the reading direction (LTR and RTL is handled automatically)
*/
private static void align(JButton button, boolean leading) {
button.applyComponentOrientation(ComponentOrientation.getOrientation(Languages.currentLocale()));
if (leading) {
// Text trails the icon in LTR
button.setHorizontalTextPosition(SwingConstants.TRAILING);
} else {
button.setHorizontalTextPosition(SwingConstants.LEADING);
}
}
内容来源于网络,如有侵权,请联系作者删除!