java locale.setdefault(_Java JComponent.setDefaultLocale方法代码示例

import javax.swing.JComponent; //导入方法依赖的package包/类

/**

* Method description

*

* @see

*/

final public void setLanguageJLabels(boolean bolPhideControlJFrame) {

final Rectangle objLcontrolJFrameRectangle = this.getBounds();

// Save the current configuration :

final PatternsManager objLsavedJugglePatternsManager = this.getPatternsManager();

final byte bytLsavedAnimationStatus = this.objGjuggleMasterPro.bytGanimationStatus;

final int intLsavedObjectIndex = this.objGjuggleMasterPro.intGobjectIndex;

// Set the special language pattern manager :

final PatternsManager objLlanguageJugglePatternsManager = new PatternsManager(Constants.bytS_MANAGER_NEW_ABSTRACT_LANGUAGE);

this.objGjuggleMasterPro.bytGanimationStatus = Constants.bytS_STATE_ANIMATION_PAUSED;

this.objGjuggleMasterPro.intGobjectIndex = objLlanguageJugglePatternsManager.getPatternsFileManager().intGstartObjectIndex;

this.setJugglePatternsManager(objLlanguageJugglePatternsManager);

// Set dialog language :

try {

final Locale objLlocale = new Locale(this.getLanguageString(Language.intS_LANGUAGE_ISO_639_1_CODE));

JComponent.setDefaultLocale(objLlocale);

} catch (final Throwable objPthrowable) {

Tools.err("Error while trying to apply ISO 639-1 language code");

}

// Place the widgets :

this.setWidgetsPreferredSizes(false);

this.setWidgetsControls();

if (bolPhideControlJFrame) {

this.setVisible(false);

this.getJuggleMasterPro().getFrame().setVisible(false);

}

this.validate();

this.pack();

this.setWidgetsPreferredSizes(true);

final int intLoldWidth = (int) objLcontrolJFrameRectangle.getWidth();

final int intLnewWidth = Math.max(this.getWidth(), intLoldWidth);

if (intLnewWidth > intLoldWidth) {

this.setBounds(Math.max(0, this.getX() - (intLnewWidth - intLoldWidth)),

this.getY(),

intLnewWidth,

(int) objLcontrolJFrameRectangle.getHeight());

} else {

this.setBounds(Math.max(0, (int) objLcontrolJFrameRectangle.getX()),

this.getY(),

intLoldWidth,

(int) objLcontrolJFrameRectangle.getHeight());

}

if (bolPhideControlJFrame) {

this.setVisible(true);

this.getJuggleMasterPro().getFrame().setVisible(true);

this.getJuggleMasterPro().getFrame().repaint();

}

// Restore the previous configuration :

this.setJugglePatternsManager(objLsavedJugglePatternsManager);

this.objGjuggleMasterPro.intGobjectIndex = intLsavedObjectIndex;

this.objGjuggleMasterPro.bytGanimationStatus = bytLsavedAnimationStatus;

this.setWidgetsControls();

this.setJButtonsEnabled(true);

this.repaint();

// Set the menus :

this.setMenusJLabels();

this.setMenusEnabled();

this.objGjuggleMasterPro.objGdataJFrame.setHeaders();

this.objGjuggleMasterPro.objGdataJFrame.setButtonsJLabels();

}

参与评论 您还未登录,请先 登录 后发表或查看评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:深蓝海洋 设计师:CSDN官方博客 返回首页

打赏作者

一直努力生活

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值