本文整理汇总了Java中javax.swing.UIManager.getInt方法的典型用法代码示例。如果您正苦于以下问题:Java UIManager.getInt方法的具体用法?Java UIManager.getInt怎么用?Java UIManager.getInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.UIManager
的用法示例。
在下文中一共展示了UIManager.getInt方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: installStrings
import javax.swing.UIManager; //导入方法依赖的package包/类
@Override
protected void installStrings(JFileChooser fc) {
super.installStrings(fc);
Locale l = fc.getLocale();
this.lookInLabelMnemonic = UIManager.getInt("FileChooser.lookInLabelMnemonic");
this.lookInLabelText = UIManager.getString("FileChooser.lookInLabelText", l);
this.saveInLabelText = UIManager.getString("FileChooser.saveInLabelText", l);
this.fileNameLabelMnemonic = UIManager.getInt("FileChooser.fileNameLabelMnemonic");
this.fileNameLabelText = UIManager.getString("FileChooser.fileNameLabelText", l);
this.filesOfTypeLabelMnemonic = UIManager.getInt("FileChooser.filesOfTypeLabelMnemonic");
this.filesOfTypeLabelText = UIManager.getString("FileChooser.filesOfTypeLabelText", l);
}
示例2: installUI
import javax.swing.UIManager; //导入方法依赖的package包/类
@Override
public synchronized void installUI(JComponent c)
{
super.installUI(c);
mBackgroundNormal = UIManager.getColor("CheckBox.background");
mBackgroundPressed = UIManager.getColor("CheckBox.backgroundPressed");
mBackgroundActive = UIManager.getColor("CheckBox.backgroundActive");
mTextNormal = UIManager.getColor("CheckBox.textNormal");
mTextPressed = UIManager.getColor("CheckBox.textPressed");
mTextActive = UIManager.getColor("CheckBox.textActive");
mTextDisabled = UIManager.getColor("CheckBox.textDisabled");
mTextIconGap = UIManager.getInt("CheckBox.textIconGap");
mIconChecked = UIManager.getIcon("CheckBox.iconChecked");
mIconUnchecked = UIManager.getIcon("CheckBox.iconUnchecked");
mIconPressedChecked = UIManager.getIcon("CheckBox.iconPressedChecked");
mIconPressedUnchecked = UIManager.getIcon("CheckBox.iconPressedUnchecked");
c.setBackground(mBackgroundNormal);
c.addMouseListener(this);
}
示例3: installDefaults
import javax.swing.UIManager; //导入方法依赖的package包/类
protected void installDefaults() {
super.installDefaults();
titlePaneHeight = UIManager.getInt("InternalFrame.titlePaneHeight");
buttonWidth = UIManager.getInt("InternalFrame.titleButtonWidth") - 4;
buttonHeight = UIManager.getInt("InternalFrame.titleButtonHeight") - 4;
Object obj = UIManager.get("InternalFrame.titleButtonToolTipsOn");
hotTrackingOn = (obj instanceof Boolean) ? (Boolean)obj : true;
if (XPStyle.getXP() != null) {
// Fix for XP bug where sometimes these sizes aren't updated properly
// Assume for now that height is correct and derive width using the
// ratio from the uxtheme part
buttonWidth = buttonHeight;
Dimension d = XPStyle.getPartSize(Part.WP_CLOSEBUTTON, State.NORMAL);
if (d != null && d.width != 0 && d.height != 0) {
buttonWidth = (int) ((float) buttonWidth * d.width / d.height);
}
} else {
buttonWidth += 2;
Color activeBorderColor =
UIManager.getColor("InternalFrame.activeBorderColor");
setBorder(BorderFactory.createLineBorder(activeBorderColor, 1));
}
// JDK-8039383: initialize these colors because getXP() may return null when theme is changed
selectedTitleGradientColor =
UIManager.getColor("InternalFrame.activeTitleGradient");
notSelectedTitleGradientColor =
UIManager.getColor("InternalFrame.inactiveTitleGradient");
}
示例4: runActualTest
import javax.swing.UIManager; //导入方法依赖的package包/类
private static void runActualTest(GraphicsDevice device,
CountDownLatch latch,
JFrame frame,
boolean [] result)
{
Rectangle screenBounds = setLocation(frame, device);
JMenu menu = frame.getJMenuBar().getMenu(0);
menu.doClick();
Point location = menu.getLocationOnScreen();
JPopupMenu pm = menu.getPopupMenu();
Dimension pmSize = pm.getSize();
int yOffset = UIManager.getInt("Menu.submenuPopupOffsetY");
int height = location.y + yOffset + pmSize.height + menu.getHeight();
int available = screenBounds.y + screenBounds.height - height;
if (available > 0) {
Point origin = pm.getLocationOnScreen();
if (origin.y < location.y) {
// growing upward, wrong!
result[0] = false;
} else {
// growing downward, ok!
result[0] = true;
}
} else {
// there is no space, growing upward would be ok, so we pass
result[0] = true;
}
}
示例5: getBusyIconSize
import javax.swing.UIManager; //导入方法依赖的package包/类
private static int getBusyIconSize() {
int res = UIManager.getInt( "Nb.BusyIcon.Height" );
if( res < 1 )
res = 16;
return res;
}