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


Java UIDefaults.putDefaults方法代碼示例

本文整理匯總了Java中javax.swing.UIDefaults.putDefaults方法的典型用法代碼示例。如果您正苦於以下問題:Java UIDefaults.putDefaults方法的具體用法?Java UIDefaults.putDefaults怎麽用?Java UIDefaults.putDefaults使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.swing.UIDefaults的用法示例。


在下文中一共展示了UIDefaults.putDefaults方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initBorderDefaults

import javax.swing.UIDefaults; //導入方法依賴的package包/類
private void initBorderDefaults(UIDefaults table) {
	Object[] borderDefaults = { "TextField.border", Borders.getTextFieldBorder(), "PasswordField.border",
			Borders.getTextFieldBorder(), "FilterTextField.border", Borders.getTextFieldBorder(),
			"FormattedTextField.border", Borders.getTextFieldBorder(), "TextArea.border", Borders.getTextFieldBorder(),
			"SplitPane.border", Borders.getSplitPaneBorder(), "ScrollPane.border", Borders.getScrollPaneBorder(),
			"InternalFrame.border", Borders.getInternalFrameBorder(), "Table.scrollPaneBorder", null,   // removed
			// table
			// border,
			// original:
			// Borders.getSplitPaneBorder()
			"Table.tabbedPaneBorder", null,   // remove double borders
			"ToolBar.border", Borders.getToolBarBorder(), "Spinner.border", Borders.getSpinnerBorder(),
			"ComboBox.border", Borders.getComboBoxBorder(), "Button.border", Borders.getEmptyButtonBorder(),
			"ToggleButton.border", Borders.getEmptyButtonBorder(), "ProgressBar.border", Borders.getProgressBarBorder(),
			"PopupMenu.border", Borders.getPopupMenuBorder(), "MenuBar.border", Borders.getMenuBarBorder(),
			"CheckBox.border", Borders.getCheckBoxBorder(), "RadioButton.border", Borders.getCheckBoxBorder(),
			"ToolTip.border", Borders.getToolTipBorder(), "CheckBox.icon", IconFactory.getCheckBoxIcon(),
			"RadioButton.icon", IconFactory.getRadioButtonIcon(), "ComboBox.focusCellHighlightBorder",
			Borders.getComboBoxListCellRendererFocusBorder(), };
	table.putDefaults(borderDefaults);
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:22,代碼來源:RapidLookAndFeel.java

示例2: initClassDefaults

import javax.swing.UIDefaults; //導入方法依賴的package包/類
@Override
protected void initClassDefaults(UIDefaults table)
{
	super.initClassDefaults(table);

	final String packageName = "com.dytech.gui.flatter.";
	final String buttonClass = packageName + "FlatterButtonUI";
	final String checkBoxClass = packageName + "FlatterCheckBoxUI";
	final String comboBoxClass = packageName + "FlatterComboBoxUI";
	final String radioButtonClass = packageName + "FlatterRadioButtonUI";
	final String scrollBarClass = packageName + "FlatterScrollBarUI";
	final String separatorClass = packageName + "FlatterSeparatorUI";
	final String tabbedPaneClass = packageName + "FlatterTabbedPaneUI";
	final String spinnerClass = packageName + "FlatterSpinnerUI";

	try
	{
		if( defaults == null )
		{
			defaults = new Object[]{"ButtonUI", buttonClass, buttonClass, Class.forName(buttonClass), "CheckBoxUI",
					checkBoxClass, checkBoxClass, Class.forName(checkBoxClass), "ComboBoxUI", comboBoxClass,
					comboBoxClass, Class.forName(comboBoxClass), "RadioButtonUI", radioButtonClass,
					radioButtonClass, Class.forName(radioButtonClass), "ScrollBarUI", scrollBarClass,
					scrollBarClass, Class.forName(scrollBarClass), "SeparatorUI", separatorClass, separatorClass,
					Class.forName(separatorClass), "PopupMenuSeparatorUI", separatorClass, separatorClass,
					Class.forName(separatorClass), "TabbedPaneUI", tabbedPaneClass, "SpinnerUI", spinnerClass,
					spinnerClass, Class.forName(spinnerClass), tabbedPaneClass, Class.forName(tabbedPaneClass),};
		}
		table.putDefaults(defaults);
	}
	catch( ClassNotFoundException ex )
	{
		ex.printStackTrace();
	}
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:36,代碼來源:FlatterLookAndFeel.java

示例3: initClassDefaults

import javax.swing.UIDefaults; //導入方法依賴的package包/類
@Override
public void initClassDefaults(UIDefaults table) {
	super.initClassDefaults(table);
	table.putDefaults(new Object[] { "ButtonUI",
			XDMButtonUI.class.getName(), "ScrollBarUI",
			XDMScrollBarUI.class.getName(), "MenuItemUI",
			XDMMenuItemUI.class.getName(), "MenuUI",
			XDMMenuUI.class.getName(), "CheckBoxMenuItemUI",
			XDMMenuItemUI.class.getName(), "TreeUI",
			XDMTreeUI.class.getName(), "SpinnerUI",
			XDMSpinnerUI.class.getName(), "ProgressBarUI",
			XDMProgressBarUI.class.getName(), "ComboBoxUI",
			XDMComboBoxUI.class.getName() // ,
			// "TabbedPaneUI",
			// BasicTabbedPaneUI.class.getName()
			});
	System.setProperty("xdm.defaulttheme", "true");
	UIManager.put("TabbedPane.selected", new Color(220, 220, 220));
	UIManager.put("TabbedPane.borderHightlightColor", Color.LIGHT_GRAY);
	UIManager.put("TabbedPane.contentAreaColor", Color.LIGHT_GRAY);
	UIManager.put("TabbedPane.contentOpaque", Boolean.FALSE);
	UIManager.put("Table.focusCellHighlightBorder", new EmptyBorder(1, 1,
			1, 1));
	UIManager.put("OptionPane.background", new ColorUIResource(Color.WHITE));
	UIManager.put("Panel.background", new ColorUIResource(Color.WHITE));
	UIManager.put("CheckBox.background", new ColorUIResource(Color.WHITE));
}
 
開發者ID:kmarius,項目名稱:xdman,代碼行數:28,代碼來源:XDMLookAndFeel.java

示例4: addCustomEntriesToTable

import javax.swing.UIDefaults; //導入方法依賴的package包/類
@Override
public void addCustomEntriesToTable(UIDefaults table) {
    super.addCustomEntriesToTable(table);
    Object[] buttonTable = getCustomButtonTable(table);
    Object[] gradientTable = getCustomGradientTable(table);
    Object[] iconTable = {};
    if (!DesktopApi.getOs().isMac()) {
        // FIXME: In OSX file/folder icons get corrupted and coloured close/min/max icons do not look right.
        iconTable = getCustomIconTable(table);
    }
    Object[] uiFullTable = mergeTables(buttonTable, gradientTable, iconTable);
    table.putDefaults(uiFullTable);

}
 
開發者ID:workcraft,項目名稱:workcraft,代碼行數:15,代碼來源:SilverOceanTheme.java

示例5: initClassDefaults

import javax.swing.UIDefaults; //導入方法依賴的package包/類
@Override protected void initClassDefaults(UIDefaults table) {
    super.initClassDefaults(table);
    
    Object[] uiDefaults = new Object[] { 
        	"CheckBoxUI", NewCheckUI.class.getName(),
        	"LabelUI", NewLabelUI.class.getName(),
        	"ComboBoxUI", NewComboUI.class.getName(),
		    "TableUI", NewTableUI.class.getName()            	
    };
    
    table.putDefaults(uiDefaults);
}
 
開發者ID:qerio,項目名稱:goib,代碼行數:13,代碼來源:NewLookAndFeel.java

示例6: initClassDefaults

import javax.swing.UIDefaults; //導入方法依賴的package包/類
public void initClassDefaults(UIDefaults table) {
   super.initClassDefaults(table);
   table.putDefaults(new Object[]{"ButtonUI", XDMButtonUI.class.getName(), "ScrollBarUI", XDMScrollBarUI.class.getName(), "MenuItemUI", XDMMenuItemUI.class.getName(), "MenuUI", XDMMenuUI.class.getName(), "CheckBoxMenuItemUI", XDMMenuItemUI.class.getName(), "TreeUI", XDMTreeUI.class.getName(), "SpinnerUI", XDMSpinnerUI.class.getName(), "ProgressBarUI", XDMProgressBarUI.class.getName(), "ComboBoxUI", XDMComboBoxUI.class.getName()});
   System.setProperty("xdm.defaulttheme", "true");
   UIManager.put("TabbedPane.selected", new Color(220, 220, 220));
   UIManager.put("TabbedPane.borderHightlightColor", Color.LIGHT_GRAY);
   UIManager.put("TabbedPane.contentAreaColor", Color.LIGHT_GRAY);
   UIManager.put("TabbedPane.contentOpaque", Boolean.FALSE);
   UIManager.put("Table.focusCellHighlightBorder", new EmptyBorder(1, 1, 1, 1));
   UIManager.put("OptionPane.background", new ColorUIResource(Color.WHITE));
   UIManager.put("Panel.background", new ColorUIResource(Color.WHITE));
   UIManager.put("CheckBox.background", new ColorUIResource(Color.WHITE));
}
 
開發者ID:Bolt-Thrower,項目名稱:xdm,代碼行數:14,代碼來源:XDMLookAndFeel.java

示例7: addCustomEntriesToTable

import javax.swing.UIDefaults; //導入方法依賴的package包/類
public void addCustomEntriesToTable(UIDefaults table) {
	Object[] values = new Object[] { "ToolTip.background", TOOLTIP_BACKGROUND, "ToolTip.foreground", TOOLTIP_FOREGROUND,
			"ToolTip.borderColor", TOOLTIP_BORDER };
	table.putDefaults(values);
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:6,代碼來源:Colors.java

示例8: initClassDefaults

import javax.swing.UIDefaults; //導入方法依賴的package包/類
@Override
protected void initClassDefaults(UIDefaults table) {
	super.initClassDefaults(table);
	table.putDefaults(getUIDefaults());
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:6,代碼來源:RapidLookAndFeel.java

示例9: initClassDefaults

import javax.swing.UIDefaults; //導入方法依賴的package包/類
/**
 * Populates {@code table} with mappings from {@code uiClassID} to the
 * fully qualified name of the ui class. The value for a
 * particular {@code uiClassID} is {@code
 * "javax.swing.plaf.basic.Basic + uiClassID"}. For example, the
 * value for the {@code uiClassID} {@code TreeUI} is {@code
 * "javax.swing.plaf.basic.BasicTreeUI"}.
 *
 * @param table the {@code UIDefaults} instance the entries are
 *        added to
 * @throws NullPointerException if {@code table} is {@code null}
 *
 * @see javax.swing.LookAndFeel
 * @see #getDefaults
 */
protected void initClassDefaults(UIDefaults table)
{
    final String basicPackageName = "javax.swing.plaf.basic.";
    Object[] uiDefaults = {
               "ButtonUI", basicPackageName + "BasicButtonUI",
             "CheckBoxUI", basicPackageName + "BasicCheckBoxUI",
         "ColorChooserUI", basicPackageName + "BasicColorChooserUI",
   "FormattedTextFieldUI", basicPackageName + "BasicFormattedTextFieldUI",
              "MenuBarUI", basicPackageName + "BasicMenuBarUI",
                 "MenuUI", basicPackageName + "BasicMenuUI",
             "MenuItemUI", basicPackageName + "BasicMenuItemUI",
     "CheckBoxMenuItemUI", basicPackageName + "BasicCheckBoxMenuItemUI",
  "RadioButtonMenuItemUI", basicPackageName + "BasicRadioButtonMenuItemUI",
          "RadioButtonUI", basicPackageName + "BasicRadioButtonUI",
         "ToggleButtonUI", basicPackageName + "BasicToggleButtonUI",
            "PopupMenuUI", basicPackageName + "BasicPopupMenuUI",
          "ProgressBarUI", basicPackageName + "BasicProgressBarUI",
            "ScrollBarUI", basicPackageName + "BasicScrollBarUI",
           "ScrollPaneUI", basicPackageName + "BasicScrollPaneUI",
            "SplitPaneUI", basicPackageName + "BasicSplitPaneUI",
               "SliderUI", basicPackageName + "BasicSliderUI",
            "SeparatorUI", basicPackageName + "BasicSeparatorUI",
              "SpinnerUI", basicPackageName + "BasicSpinnerUI",
     "ToolBarSeparatorUI", basicPackageName + "BasicToolBarSeparatorUI",
   "PopupMenuSeparatorUI", basicPackageName + "BasicPopupMenuSeparatorUI",
           "TabbedPaneUI", basicPackageName + "BasicTabbedPaneUI",
             "TextAreaUI", basicPackageName + "BasicTextAreaUI",
            "TextFieldUI", basicPackageName + "BasicTextFieldUI",
        "PasswordFieldUI", basicPackageName + "BasicPasswordFieldUI",
             "TextPaneUI", basicPackageName + "BasicTextPaneUI",
           "EditorPaneUI", basicPackageName + "BasicEditorPaneUI",
                 "TreeUI", basicPackageName + "BasicTreeUI",
                "LabelUI", basicPackageName + "BasicLabelUI",
                 "ListUI", basicPackageName + "BasicListUI",
              "ToolBarUI", basicPackageName + "BasicToolBarUI",
              "ToolTipUI", basicPackageName + "BasicToolTipUI",
             "ComboBoxUI", basicPackageName + "BasicComboBoxUI",
                "TableUI", basicPackageName + "BasicTableUI",
          "TableHeaderUI", basicPackageName + "BasicTableHeaderUI",
        "InternalFrameUI", basicPackageName + "BasicInternalFrameUI",
          "DesktopPaneUI", basicPackageName + "BasicDesktopPaneUI",
          "DesktopIconUI", basicPackageName + "BasicDesktopIconUI",
          "FileChooserUI", basicPackageName + "BasicFileChooserUI",
           "OptionPaneUI", basicPackageName + "BasicOptionPaneUI",
                "PanelUI", basicPackageName + "BasicPanelUI",
             "ViewportUI", basicPackageName + "BasicViewportUI",
             "RootPaneUI", basicPackageName + "BasicRootPaneUI",
    };

    table.putDefaults(uiDefaults);
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:67,代碼來源:BasicLookAndFeel.java

示例10: initComponentDefaults

import javax.swing.UIDefaults; //導入方法依賴的package包/類
protected void initComponentDefaults(UIDefaults table) {
	super.initComponentDefaults(table);
	table.putDefaults(new Object[] { "ComboBox.selectionBackground",
			Color.LIGHT_GRAY });
}
 
開發者ID:kmarius,項目名稱:xdman,代碼行數:6,代碼來源:XDMLookAndFeel.java

示例11: putDefaults

import javax.swing.UIDefaults; //導入方法依賴的package包/類
/**
 * Constructs the UIDefaults that correspond to this PhetLookAndFeel,
 * and installs them in the UIDefaults database.
 */
public void putDefaults( UIDefaults uiDefaults ) {
    Object[] keyValuePairs = constructDefaults();
    uiDefaults.putDefaults( keyValuePairs );
}
 
開發者ID:mleoking,項目名稱:PhET,代碼行數:9,代碼來源:PhetLookAndFeel.java

示例12: initClassDefaults

import javax.swing.UIDefaults; //導入方法依賴的package包/類
/**
 * Populates the <code>defaults</code> table with mappings between class IDs
 * and fully qualified class names for the UI delegates.
 *
 * @param defaults  the defaults table (<code>null</code> not permitted).
 */
protected void initClassDefaults(UIDefaults defaults)
{
  // Variables
  Object[] uiDefaults;
  // Initialize Class Defaults
  uiDefaults = new Object[] {
    "ButtonUI", "javax.swing.plaf.basic.BasicButtonUI",
    "CheckBoxMenuItemUI", "javax.swing.plaf.basic.BasicCheckBoxMenuItemUI",
    "CheckBoxUI", "javax.swing.plaf.basic.BasicCheckBoxUI",
    "ColorChooserUI", "javax.swing.plaf.basic.BasicColorChooserUI",
    "ComboBoxUI", "javax.swing.plaf.basic.BasicComboBoxUI",
    "DesktopIconUI", "javax.swing.plaf.basic.BasicDesktopIconUI",
    "DesktopPaneUI", "javax.swing.plaf.basic.BasicDesktopPaneUI",
    "EditorPaneUI", "javax.swing.plaf.basic.BasicEditorPaneUI",
    "FileChooserUI", "javax.swing.plaf.basic.BasicFileChooserUI",
    "FormattedTextFieldUI", "javax.swing.plaf.basic.BasicFormattedTextFieldUI",
    "InternalFrameUI", "javax.swing.plaf.basic.BasicInternalFrameUI",
    "LabelUI", "javax.swing.plaf.basic.BasicLabelUI",
    "ListUI", "javax.swing.plaf.basic.BasicListUI",
    "MenuBarUI", "javax.swing.plaf.basic.BasicMenuBarUI",
    "MenuItemUI", "javax.swing.plaf.basic.BasicMenuItemUI",
    "MenuUI", "javax.swing.plaf.basic.BasicMenuUI",
    "OptionPaneUI", "javax.swing.plaf.basic.BasicOptionPaneUI",
    "PanelUI", "javax.swing.plaf.basic.BasicPanelUI",
    "PasswordFieldUI", "javax.swing.plaf.basic.BasicPasswordFieldUI",
    "PopupMenuSeparatorUI", "javax.swing.plaf.basic.BasicPopupMenuSeparatorUI",
    "PopupMenuUI", "javax.swing.plaf.basic.BasicPopupMenuUI",
    "ProgressBarUI", "javax.swing.plaf.basic.BasicProgressBarUI",
    "RadioButtonMenuItemUI", "javax.swing.plaf.basic.BasicRadioButtonMenuItemUI",
    "RadioButtonUI", "javax.swing.plaf.basic.BasicRadioButtonUI",
    "RootPaneUI", "javax.swing.plaf.basic.BasicRootPaneUI",
    "ScrollBarUI", "javax.swing.plaf.basic.BasicScrollBarUI",
    "ScrollPaneUI", "javax.swing.plaf.basic.BasicScrollPaneUI",
    "SeparatorUI", "javax.swing.plaf.basic.BasicSeparatorUI",
    "SliderUI", "javax.swing.plaf.basic.BasicSliderUI",
    "SplitPaneUI", "javax.swing.plaf.basic.BasicSplitPaneUI",
    "SpinnerUI", "javax.swing.plaf.basic.BasicSpinnerUI",
    "StandardDialogUI", "javax.swing.plaf.basic.BasicStandardDialogUI",
    "TabbedPaneUI", "javax.swing.plaf.basic.BasicTabbedPaneUI",
    "TableHeaderUI", "javax.swing.plaf.basic.BasicTableHeaderUI",
    "TableUI", "javax.swing.plaf.basic.BasicTableUI",
    "TextPaneUI", "javax.swing.plaf.basic.BasicTextPaneUI",
    "TextAreaUI", "javax.swing.plaf.basic.BasicTextAreaUI",
    "TextFieldUI", "javax.swing.plaf.basic.BasicTextFieldUI",
    "ToggleButtonUI", "javax.swing.plaf.basic.BasicToggleButtonUI",
    "ToolBarSeparatorUI", "javax.swing.plaf.basic.BasicToolBarSeparatorUI",
    "ToolBarUI", "javax.swing.plaf.basic.BasicToolBarUI",
    "ToolTipUI", "javax.swing.plaf.basic.BasicToolTipUI",
    "TreeUI", "javax.swing.plaf.basic.BasicTreeUI",
    "ViewportUI", "javax.swing.plaf.basic.BasicViewportUI"
  };
  // Add Class Defaults to UI Defaults table
  defaults.putDefaults(uiDefaults);
}
 
開發者ID:vilie,項目名稱:javify,代碼行數:61,代碼來源:BasicLookAndFeel.java

示例13: initComponentDefaults

import javax.swing.UIDefaults; //導入方法依賴的package包/類
protected void initComponentDefaults(UIDefaults table) {
   super.initComponentDefaults(table);
   table.putDefaults(new Object[]{"ComboBox.selectionBackground", Color.LIGHT_GRAY});
}
 
開發者ID:Bolt-Thrower,項目名稱:xdm,代碼行數:5,代碼來源:XDMLookAndFeel.java

示例14: initSystemColorDefaults

import javax.swing.UIDefaults; //導入方法依賴的package包/類
/**
 * Initializes the system color defaults.
 *
 * In particular this sets the following keys:
 *
 * <table>
 * <tr>
 * <th>Key</th><th>Value</th><th>Description</th>
 * </tr><tr>
 * <td>control</td><td>0xcccccc</td><td>The default color for components</td>
 * </tr>
 * </table>
 */
protected void initSystemColorDefaults(UIDefaults defaults)
{
  super.initSystemColorDefaults(defaults);
  Object[] uiDefaults;
  uiDefaults = new Object[] {
    "control", new ColorUIResource(getControl()),
    "desktop", new ColorUIResource(getDesktopColor())
  };
  defaults.putDefaults(uiDefaults);
}
 
開發者ID:vilie,項目名稱:javify,代碼行數:24,代碼來源:MetalLookAndFeel.java


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