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


Java InsetsUIResource類代碼示例

本文整理匯總了Java中javax.swing.plaf.InsetsUIResource的典型用法代碼示例。如果您正苦於以下問題:Java InsetsUIResource類的具體用法?Java InsetsUIResource怎麽用?Java InsetsUIResource使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: register

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
public void register(ConverterRegistry registry) {
  registry.addConverter(Dimension.class, String.class, this);
  registry.addConverter(String.class, Dimension.class, this);
  registry.addConverter(DimensionUIResource.class, String.class, this);

  registry.addConverter(Insets.class, String.class, this);
  registry.addConverter(String.class, Insets.class, this);
  registry.addConverter(InsetsUIResource.class, String.class, this);

  registry.addConverter(Point.class, String.class, this);
  registry.addConverter(String.class, Point.class, this);
  
  registry.addConverter(Rectangle.class, String.class, this);
  registry.addConverter(String.class, Rectangle.class, this);
  
  registry.addConverter(Font.class, String.class, this);
  registry.addConverter(FontUIResource.class, String.class, this);
}
 
開發者ID:mstritt,項目名稱:orbit-image-analysis,代碼行數:19,代碼來源:AWTConverters.java

示例2: AdrManagerFrame

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
public AdrManagerFrame(AdrProfileDescriptor selectedProfile) {
    super();
    this.processingHideEvent = false;
    this.setTitle("MercuryTrade ADR");
    this.setFocusable(true);
    this.setFocusableWindowState(true);
    this.setAlwaysOnTop(false);
    this.selectedProfile = selectedProfile;
    this.exportDialog = new AdrExportDialog(this, new ArrayList<>());
    this.iconSelectDialog = new AdrIconSelectDialog();
    this.iconSelectDialog.setLocationRelativeTo(null);
    FrameDescriptor frameDescriptor = this.framesConfig.get(this.getClass().getSimpleName());
    this.setPreferredSize(frameDescriptor.getFrameSize());
    UIManager.put("MenuItem.background", AppThemeColor.ADR_BG);
    UIManager.put("MenuItem.selectionBackground", AppThemeColor.ADR_POPUP_BG);
    UIManager.put("Menu.contentMargins", new InsetsUIResource(2, 0, 2, 0));
    UIManager.put("MenuItem.opaque", true);
    UIManager.put("ComboBox.selectionBackground", AppThemeColor.HEADER);
    UIManager.put("ComboBox.selectionForeground", AppThemeColor.ADR_POPUP_BG);
    UIManager.put("ComboBox.disabledForeground", AppThemeColor.ADR_FOOTER_BG);
}
 
開發者ID:Exslims,項目名稱:MercuryTrade,代碼行數:22,代碼來源:AdrManagerFrame.java

示例3: initForVista

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
/**
	 * 因Windos LNF會在Vista及更新的操作係統(如win7)上對Windows LNF作附加設置,
	 * 以保證與Vista及更新平台的外觀的一致性(如讓菜單菜項高度更大等),請參見
	 * WindowsLookAndFeel.initVistaComponentDefaults(..)。
	 * <p>
	 * BeautyEye中因需要保證審美一致性(在所有win平台上)而不需要這些額外的設置,
	 * 但因該方法是private私有方法,無法進行覆蓋屏蔽,所以隻能在此單列方法,以便針對Vista
	 * 及更新的平台進行補救性重新設置以便與BeautyEye LNF的審核進行適配.
	 * 
	 * @see WindowsLookAndFeel.initVistaComponentDefaults(..)
	 */
	protected void initForVista()
	{
		if(WinUtils.isOnVista())
		{
			UIManager.put("CheckBoxMenuItem.margin",new InsetsUIResource(0,0,0,0));
			UIManager.put("RadioButtonMenuItem.margin",new InsetsUIResource(0,0,0,0));
			UIManager.put("Menu.margin",new InsetsUIResource(0,0,0,0));//windows lnf xp中默認是2,2,2,2
			UIManager.put("MenuItem.margin",new InsetsUIResource(0,0,0,0));//windows lnf中  xp默認是2,2,2,2
			
			UIManager.put("Menu.border",new BorderUIResource(BorderFactory.createEmptyBorder(1,3,2,3)));//javax.swing.plaf.basic.BasicBorders.MarginBorder;
			UIManager.put("MenuItem.border",new BorderUIResource(BorderFactory.createEmptyBorder(1,0,2,0)));//javax.swing.plaf.basic.BasicBorders.MarginBorder;
			UIManager.put("CheckBoxMenuItem.border",new BorderUIResource(BorderFactory.createEmptyBorder(4,2,4,2)));//javax.swing.plaf.basic.BasicBorders.MarginBorder;
			UIManager.put("RadioButtonMenuItem.border",new BorderUIResource(BorderFactory.createEmptyBorder(4,0,4,0)));//javax.swing.plaf.basic.BasicBorders.MarginBorder;		
//			UIManager.put("PopupMenu.border",new BorderUIResource(BorderFactory.createEmptyBorder(20,10,20,10)));//	
		
			UIManager.put("CheckBoxMenuItem.checkIcon"
					,new org.jb2011.lnf.beautyeye.ch9_menu.BECheckBoxMenuItemUI.CheckBoxMenuItemIcon().setUsedForVista(true));//javax.swing.plaf.basic.BasicIconFactory.CheckBoxMenuItemIcon);
			UIManager.put("RadioButtonMenuItem.checkIcon"
					,new org.jb2011.lnf.beautyeye.ch9_menu.BERadioButtonMenuItemUI.RadioButtonMenuItemIcon().setUsedForVista(true));
		}
	}
 
開發者ID:JackJiang2011,項目名稱:beautyeye,代碼行數:33,代碼來源:BeautyEyeLookAndFeelWin.java

示例4: uiImpl

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
/**
	 * Ui impl.
	 */
	public static void uiImpl()
	{
//		UIManager.put("CheckBox.border",new BorderUIResource(new BERoundBorder().setArcWidth(0)));
		
		UIManager.put("CheckBox.margin",new InsetsUIResource(4,3,4,3));
		UIManager.put("RadioButton.margin",new InsetsUIResource(4,3,4,3));//2, 2, 2, 2));
		
		UIManager.put("RadioButton.background",new ColorUIResource(BeautyEyeLNFHelper.commonBackgroundColor));
		UIManager.put("CheckBox.background",new ColorUIResource(BeautyEyeLNFHelper.commonBackgroundColor));
		
		UIManager.put("CheckBox.foreground",new ColorUIResource(BeautyEyeLNFHelper.commonForegroundColor));
		UIManager.put("RadioButton.foreground",new ColorUIResource(BeautyEyeLNFHelper.commonForegroundColor));
		
		UIManager.put("RadioButton.icon", new RadioButtonIcon());
		UIManager.put("CheckBox.icon", new CheckBoxIcon());

		//襯距設定
		UIManager.put("RadioButton.margin", new InsetsUIResource(1,1,1,1));//默認是2,2,2,2
		UIManager.put("CheckBox.margin", new InsetsUIResource(1,1,1,1));//默認是2,2,2,2
	}
 
開發者ID:JackJiang2011,項目名稱:beautyeye,代碼行數:24,代碼來源:__UI__.java

示例5: register

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
public void register(ConverterRegistry registry) {
  registry.addConverter(Dimension.class, String.class, this);
  registry.addConverter(String.class, Dimension.class, this);
  registry.addConverter(DimensionUIResource.class, String.class, this);

  registry.addConverter(Insets.class, String.class, this);
  registry.addConverter(String.class, Insets.class, this);
  registry.addConverter(InsetsUIResource.class, String.class, this);

  registry.addConverter(Point.class, String.class, this);
  registry.addConverter(String.class, Point.class, this);

  registry.addConverter(Rectangle.class, String.class, this);
  registry.addConverter(String.class, Rectangle.class, this);

  registry.addConverter(Font.class, String.class, this);
  registry.addConverter(FontUIResource.class, String.class, this);
}
 
開發者ID:calibre2opds,項目名稱:calibre2opds,代碼行數:19,代碼來源:AWTConverters.java

示例6: addBasicDefaults

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
@Override
    protected void addBasicDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
		super.addBasicDefaults(addon, defaults);
		defaults.add("SearchField.layoutStyle", LayoutStyle.MAC);
		defaults.add("SearchField.icon", getIcon("basic/resources/search.gif"));
		defaults.add("SearchField.rolloverIcon", getIcon("basic/resources/search_rollover.gif"));
		defaults.add("SearchField.pressedIcon", getIcon("basic/resources/search.gif"));
		defaults.add("SearchField.popupIcon", getIcon("basic/resources/search_popup.gif"));
		defaults.add("SearchField.popupRolloverIcon", getIcon("basic/resources/search_popup_rollover.gif"));
		defaults.add("SearchField.clearIcon", getIcon("basic/resources/clear.gif"));
		defaults.add("SearchField.clearRolloverIcon", getIcon("basic/resources/clear_rollover.gif"));
		defaults.add("SearchField.clearPressedIcon", getIcon("basic/resources/clear_pressed.gif"));
		defaults.add("SearchField.buttonMargin", new InsetsUIResource(1, 1, 1, 1));
		defaults.add("SearchField.popupSource", BUTTON_SOURCE);
		
		//webstart fix
		UIManagerExt.addResourceBundle("org.jdesktop.swingx.plaf.basic.resources.SearchField");
//		UIManager.getDefaults().addResourceBundle("org.jdesktop.swingx.plaf.basic.resources.SearchField");
	}
 
開發者ID:RockManJoe64,項目名稱:swingx,代碼行數:20,代碼來源:SearchFieldAddon.java

示例7: addMacDefaults

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
@Override
protected void addMacDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
    super.addMacDefaults(addon, defaults);
    
    defaults.add("SearchField.icon", getIcon("macosx/resources/search.png"));
    defaults.add("SearchField.rolloverIcon", getIcon("macosx/resources/search.png"));
    defaults.add("SearchField.pressedIcon", getIcon("macosx/resources/search.png"));
    defaults.add("SearchField.popupIcon", getIcon("macosx/resources/search_popup.png"));
    defaults.add("SearchField.popupRolloverIcon", getIcon("macosx/resources/search_popup.png"));
    defaults.add("SearchField.popupPressedIcon", getIcon("macosx/resources/search_popup.png"));
    defaults.add("SearchField.clearIcon", getIcon("macosx/resources/clear.png"));
    defaults.add("SearchField.clearRolloverIcon", getIcon("macosx/resources/clear_rollover.png"));
    defaults.add("SearchField.clearPressedIcon", getIcon("macosx/resources/clear_pressed.png"));
    defaults.add("SearchField.buttonMargin", new InsetsUIResource(0, 0, 0, 0));
    defaults.add("SearchField.popupSource", SEARCH_FIELD_SOURCE);
}
 
開發者ID:RockManJoe64,項目名稱:swingx,代碼行數:17,代碼來源:SearchFieldAddon.java

示例8: register

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
@Override
public void register(Registry registry) {
    registry.addConverter(Dimension.class, String.class, this);
    registry.addConverter(String.class, Dimension.class, this);
    registry.addConverter(DimensionUIResource.class, String.class, this);

    registry.addConverter(Insets.class, String.class, this);
    registry.addConverter(String.class, Insets.class, this);
    registry.addConverter(InsetsUIResource.class, String.class, this);

    registry.addConverter(Point.class, String.class, this);
    registry.addConverter(String.class, Point.class, this);

    registry.addConverter(Rectangle.class, String.class, this);
    registry.addConverter(String.class, Rectangle.class, this);

    registry.addConverter(Font.class, String.class, this);
    registry.addConverter(FontUIResource.class, String.class, this);
}
 
開發者ID:ZenHarbinger,項目名稱:l2fprod-properties-editor,代碼行數:20,代碼來源:AWTConverters.java

示例9: getUIDefaults

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
public static final Object[] getUIDefaults()
{
	return new Object[] {
			//
			// Notifications settings
			NOTIFICATIONS_MaxDisplayed, NOTIFICATIONS_MaxDisplayed_Default
			, NOTIFICATIONS_AutoFadeAwayTimeMillis, NOTIFICATIONS_AutoFadeAwayTimeMillis_Default
			, NOTIFICATIONS_BottomGap, NOTIFICATIONS_BottomGap_Default

			//
			// Item settings
			, ITEM_BackgroundColor, AdempierePLAF.createActiveValueProxy(AdempiereLookAndFeel.MANDATORY_BG_KEY, Color.WHITE) // same as mandatory background color
			, ITEM_Border, new BorderUIResource(BorderFactory.createLineBorder(Color.GRAY, 1))
			, ITEM_SummaryText_Font, new FontUIResource("Serif", Font.BOLD, 12)
			, ITEM_DetailText_Font, new FontUIResource("Serif", Font.PLAIN, 12)
			, ITEM_TextColor, null
			, ITEM_MinimumSize, new DimensionUIResource(230, 45)
			, ITEM_MaximumSize, null
			//
			// Button settings (i.e. the close button)
			, ITEM_Button_Insets, new InsetsUIResource(1, 4, 1, 4)
			, ITEM_Button_Size, 20
			, ITEM_Button_Border, new BorderUIResource(BorderFactory.createEmptyBorder())
	};
}
 
開發者ID:metasfresh,項目名稱:metasfresh,代碼行數:26,代碼來源:SwingEventNotifierUI.java

示例10: defineOptionPane

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
private void defineOptionPane(UIDefaults d) {
    //Initialize OptionPane
    d.put("OptionPane.contentMargins", new InsetsUIResource(15, 15, 15, 15));
    d.put("OptionPane.opaque", Boolean.TRUE);
    d.put("OptionPane.background", getDerivedColor("control", 0, 0, 0, 0, true));
    d.put("OptionPane.buttonOrientation", new Integer(4));
    d.put("OptionPane.messageAnchor", new Integer(17));
    d.put("OptionPane.separatorPadding", new Integer(0));
    d.put("OptionPane.sameSizeButtons", Boolean.FALSE);
    d.put("OptionPane:\"OptionPane.separator\".contentMargins", new InsetsUIResource(1, 0, 0, 0));
    d.put("OptionPane:\"OptionPane.messageArea\".contentMargins", new InsetsUIResource(0, 0, 10, 0));
    d.put("OptionPane:\"OptionPane.messageArea\":\"OptionPane.label\".contentMargins", new InsetsUIResource(0, 10, 10, 10));

    d.put("OptionPane[Enabled].errorIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.OptionPanePainter", OptionPanePainter.Which.ERRORICON_ENABLED));
    d.put("OptionPane.errorIcon", new SeaGlassIcon("OptionPane", "errorIconPainter", 48, 48));
    d.put("OptionPane[Enabled].informationIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.OptionPanePainter", OptionPanePainter.Which.INFORMATIONICON_ENABLED));
    d.put("OptionPane.informationIcon", new SeaGlassIcon("OptionPane", "informationIconPainter", 48, 48));
    d.put("OptionPane[Enabled].questionIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.OptionPanePainter", OptionPanePainter.Which.QUESTIONICON_ENABLED));
    d.put("OptionPane.questionIcon", new SeaGlassIcon("OptionPane", "questionIconPainter", 48, 48));
    d.put("OptionPane[Enabled].warningIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.OptionPanePainter", OptionPanePainter.Which.WARNINGICON_ENABLED));
    d.put("OptionPane.warningIcon", new SeaGlassIcon("OptionPane", "warningIconPainter", 48, 48));
    
    // Color Chooser Dialog
    d.put("ColorChooser.swatchesDefaultRecentColor", getDerivedColor("control", 0, 0, 0, 0, true));
}
 
開發者ID:khuxtable,項目名稱:seaglass,代碼行數:26,代碼來源:SeaGlassLookAndFeel.java

示例11: defineFileChooser

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
private void defineFileChooser(UIDefaults d) {
    //Initialize FileChooser
    d.put("FileChooser.contentMargins", new InsetsUIResource(10, 10, 10, 10));
    d.put("FileChooser.opaque", Boolean.TRUE);
    d.put("FileChooser.usesSingleFilePane", Boolean.TRUE);
    d.put("FileChooser[Enabled].fileIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.FILEICON_ENABLED));
    d.put("FileChooser.fileIcon", new SeaGlassIcon("FileChooser", "fileIconPainter", 16, 16));
    d.put("FileChooser[Enabled].directoryIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.DIRECTORYICON_ENABLED));
    d.put("FileChooser.directoryIcon", new SeaGlassIcon("FileChooser", "directoryIconPainter", 16, 16));
    d.put("FileChooser[Enabled].upFolderIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.UPFOLDERICON_ENABLED));
    d.put("FileChooser.upFolderIcon", new SeaGlassIcon("FileChooser", "upFolderIconPainter", 16, 16));
    d.put("FileChooser[Enabled].newFolderIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.NEWFOLDERICON_ENABLED));
    d.put("FileChooser.newFolderIcon", new SeaGlassIcon("FileChooser", "newFolderIconPainter", 16, 16));
    d.put("FileChooser[Enabled].hardDriveIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.HARDDRIVEICON_ENABLED));
    d.put("FileChooser.hardDriveIcon", new SeaGlassIcon("FileChooser", "hardDriveIconPainter", 16, 16));
    d.put("FileChooser[Enabled].floppyDriveIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.FLOPPYDRIVEICON_ENABLED));
    d.put("FileChooser.floppyDriveIcon", new SeaGlassIcon("FileChooser", "floppyDriveIconPainter", 16, 16));
    d.put("FileChooser[Enabled].homeFolderIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.HOMEFOLDERICON_ENABLED));
    d.put("FileChooser.homeFolderIcon", new SeaGlassIcon("FileChooser", "homeFolderIconPainter", 16, 16));
    d.put("FileChooser[Enabled].detailsViewIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.DETAILSVIEWICON_ENABLED));
    d.put("FileChooser.detailsViewIcon", new SeaGlassIcon("FileChooser", "detailsViewIconPainter", 16, 16));
    d.put("FileChooser[Enabled].listViewIconPainter", new LazyPainter("com.seaglasslookandfeel.painter.FileChooserPainter", FileChooserPainter.Which.LISTVIEWICON_ENABLED));
    d.put("FileChooser.listViewIcon", new SeaGlassIcon("FileChooser", "listViewIconPainter", 16, 16));
}
 
開發者ID:khuxtable,項目名稱:seaglass,代碼行數:25,代碼來源:SeaGlassLookAndFeel.java

示例12: defineInternalFrameCloseButtons

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
/**
 * Initialize the internal frame close button settings.
 *
 * @param d the UI defaults map.
 */
private void defineInternalFrameCloseButtons(UIDefaults d) {
    String p = "InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.closeButton\"";
    String c = PAINTER_PREFIX + "TitlePaneCloseButtonPainter";

    // Set the multiplicity of states for the Close button.
    d.put(p + ".States", "Enabled,MouseOver,Pressed,Disabled,Focused,Selected,WindowNotFocused");
    d.put(p + ".WindowNotFocused", new TitlePaneCloseButtonWindowNotFocusedState());
    d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));

    d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_DISABLED));
    d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_ENABLED));
    d.put(p + "[MouseOver].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_MOUSEOVER));
    d.put(p + "[Pressed].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_PRESSED));
    d.put(p + "[Enabled+WindowNotFocused].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_ENABLED_WINDOWNOTFOCUSED));
    d.put(p + "[MouseOver+WindowNotFocused].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_MOUSEOVER));
    d.put(p + "[Pressed+WindowNotFocused].backgroundPainter", new LazyPainter(c, TitlePaneCloseButtonPainter.Which.BACKGROUND_PRESSED_WINDOWNOTFOCUSED));

    d.put(p + ".icon", new SeaGlassIcon(p, "iconPainter", 43, 18));
}
 
開發者ID:khuxtable,項目名稱:seaglass,代碼行數:25,代碼來源:SeaGlassLookAndFeel.java

示例13: defineInternalFrameMenuButtons

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
/**
 * Initialize the internal frame menu button settings.
 *
 * @param d the UI defaults map.
 */
private void defineInternalFrameMenuButtons(UIDefaults d) {
    String p = "InternalFrame:InternalFrameTitlePane:\"InternalFrameTitlePane.menuButton\"";
    String c = PAINTER_PREFIX + "TitlePaneMenuButtonPainter";

    d.put(p + ".WindowNotFocused", new TitlePaneMenuButtonWindowNotFocusedState());
    d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));

    // Set the states for the Menu button.
    d.put(p + "[Enabled].iconPainter", new LazyPainter(c, TitlePaneMenuButtonPainter.Which.ICON_ENABLED));
    d.put(p + "[Disabled].iconPainter", new LazyPainter(c, TitlePaneMenuButtonPainter.Which.ICON_DISABLED));
    d.put(p + "[MouseOver].iconPainter", new LazyPainter(c, TitlePaneMenuButtonPainter.Which.ICON_MOUSEOVER));
    d.put(p + "[Pressed].iconPainter", new LazyPainter(c, TitlePaneMenuButtonPainter.Which.ICON_PRESSED));
    d.put(p + "[Enabled+WindowNotFocused].iconPainter",
          new LazyPainter(c,
                          TitlePaneMenuButtonPainter.Which.ICON_ENABLED_WINDOWNOTFOCUSED));
    d.put(p + "[MouseOver+WindowNotFocused].iconPainter",
          new LazyPainter(c,
                          TitlePaneMenuButtonPainter.Which.ICON_MOUSEOVER_WINDOWNOTFOCUSED));
    d.put(p + "[Pressed+WindowNotFocused].iconPainter",
          new LazyPainter(c,
                          TitlePaneMenuButtonPainter.Which.ICON_PRESSED_WINDOWNOTFOCUSED));

    d.put(p + ".icon", new SeaGlassIcon(p, "iconPainter", 19, 18));
}
 
開發者ID:khuxtable,項目名稱:seaglass,代碼行數:30,代碼來源:SeaGlassLookAndFeel.java

示例14: definePopups

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
/**
     * Initialize the popup settings.
     *
     * @param d the UI defaults map.
     */
    private void definePopups(UIDefaults d) {
        d.put("seaGlassPopupBorder", new ColorUIResource(0xbbbbbb));

        d.put("popupMenuInteriorEnabled", Color.WHITE);
        // Rossi: Changed color of popup / submenus to get better contrast to bright backgrounds.
//        d.put("popupMenuBorderEnabled", new Color(0xdddddd));
        d.put("popupMenuBorderEnabled", new Color(0x5b7ea4));

        String c = PAINTER_PREFIX + "PopupMenuPainter";
        String p = "PopupMenu";

        d.put(p + ".contentMargins", new InsetsUIResource(6, 1, 6, 1));
        d.put(p + ".opaque", Boolean.TRUE);
        d.put(p + ".consumeEventOnClose", Boolean.TRUE);
        d.put(p + "[Disabled].backgroundPainter", new LazyPainter(c, PopupMenuPainter.Which.BACKGROUND_DISABLED));
        d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, PopupMenuPainter.Which.BACKGROUND_ENABLED));

        // Initialize PopupMenuSeparator
        c = PAINTER_PREFIX + "SeparatorPainter";
        p = "PopupMenuSeparator";
        d.put(p + ".contentMargins", new InsetsUIResource(1, 0, 2, 0));
        d.put(p + "[Enabled].backgroundPainter", new LazyPainter(c, SeparatorPainter.Which.BACKGROUND_ENABLED));
    }
 
開發者ID:khuxtable,項目名稱:seaglass,代碼行數:29,代碼來源:SeaGlassLookAndFeel.java

示例15: defineScrollPane

import javax.swing.plaf.InsetsUIResource; //導入依賴的package包/類
/**
 * Initialize the scroll pane UI
 * @param d
 */
private void defineScrollPane(UIDefaults d) {
    // Define ScrollPane border painters.
    String c = PAINTER_PREFIX + "ScrollPanePainter";
    String p = "ScrollPane";
    d.put(p + ".opaque", Boolean.FALSE);
    d.put(p + ".contentMargins", new InsetsUIResource(3, 3, 3, 3));
    // d.put(p + ".useChildTextComponentFocus", Boolean.TRUE);
    d.put(p + ".backgroundPainter", new LazyPainter(c, ScrollPanePainter.Which.BACKGROUND_ENABLED));
    d.put(p + "[Enabled+Focused].borderPainter", new LazyPainter(c, ScrollPanePainter.Which.BORDER_ENABLED_FOCUSED));
    d.put(p + "[Enabled].borderPainter", new LazyPainter(c, ScrollPanePainter.Which.BORDER_ENABLED));

    // Store ScrollPane Corner Component
    d.put(p + ".cornerPainter", new LazyPainter(c, ScrollPanePainter.Which.CORNER_ENABLED));
    
    //Initialize Viewport
    p = "Viewport";
    d.put(p + ".contentMargins", new InsetsUIResource(0, 0, 0, 0));
    d.put(p + ".opaque", Boolean.TRUE);
}
 
開發者ID:khuxtable,項目名稱:seaglass,代碼行數:24,代碼來源:SeaGlassLookAndFeel.java


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