當前位置: 首頁>>代碼示例>>Java>>正文


Java UIManager.getInt方法代碼示例

本文整理匯總了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);
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:17,代碼來源:FileChooserUI.java

示例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);
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:22,代碼來源:FlatterCheckBoxUI.java

示例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");
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:33,代碼來源:WindowsInternalFrameTitlePane.java

示例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;
    }
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:31,代碼來源:bug8071705.java

示例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;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:7,代碼來源:BusyIcon.java


注:本文中的javax.swing.UIManager.getInt方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。