本文整理匯總了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;
}