当前位置: 首页>>代码示例>>Java>>正文


Java BorderUIResource类代码示例

本文整理汇总了Java中javax.swing.plaf.BorderUIResource的典型用法代码示例。如果您正苦于以下问题:Java BorderUIResource类的具体用法?Java BorderUIResource怎么用?Java BorderUIResource使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BorderUIResource类属于javax.swing.plaf包,在下文中一共展示了BorderUIResource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addCustomEntriesToTable

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
@Override
public void addCustomEntriesToTable(UIDefaults table) {

    Border blackLineBorder =
            new BorderUIResource(new LineBorder(getBlack()));
    Border whiteLineBorder =
            new BorderUIResource(new LineBorder(getWhite()));

    Object textBorder = new BorderUIResource(new CompoundBorder(
            blackLineBorder,
            new BasicBorders.MarginBorder()));

    table.put("ToolTip.border", blackLineBorder);
    table.put("TitledBorder.border", blackLineBorder);
    table.put("Table.focusCellHighlightBorder", whiteLineBorder);
    table.put("Table.focusCellForeground", getWhite());

    table.put("TextField.border", textBorder);
    table.put("PasswordField.border", textBorder);
    table.put("TextArea.border", textBorder);
    table.put("TextPane.font", textBorder);


}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:ContrastMetalTheme.java

示例2: addCustomEntriesToTable

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
@Override
public void addCustomEntriesToTable(final UIDefaults table) {

	final Border blackLineBorder = new BorderUIResource(new LineBorder(getBlack()));

	final Object textBorder = new BorderUIResource(new CompoundBorder(blackLineBorder, new BasicBorders.MarginBorder()));

	table.put("ToolTip.border", blackLineBorder);
	table.put("TitledBorder.border", blackLineBorder);

	table.put("TextField.border", textBorder);
	table.put("PasswordField.border", textBorder);
	table.put("TextArea.border", textBorder);
	table.put("TextPane.border", textBorder);
	table.put("EditorPane.border", textBorder);

}
 
开发者ID:marvertin,项目名称:geokuk,代码行数:18,代码来源:ContrastTheme.java

示例3: addBasicDefaults

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
protected void addBasicDefaults(LookAndFeelAddons addon, List defaults) {
  defaults.add(JTipOfTheDay.uiClassID);
  defaults.add(BasicTipOfTheDayUI.class.getName());

  defaults.add("TipOfTheDay.font");
  defaults.add(UIManager.getFont("TextPane.font"));

  defaults.add("TipOfTheDay.tipFont");
  defaults.add(UIManager.getFont("Label.font").deriveFont(Font.BOLD, 13f));

  defaults.add("TipOfTheDay.background");
  defaults.add(new ColorUIResource(Color.white));

  defaults.add("TipOfTheDay.icon");
  defaults.add(LookAndFeel.makeIcon(BasicTipOfTheDayUI.class,
    "TipOfTheDay24.gif"));

  defaults.add("TipOfTheDay.border");
  defaults.add(new BorderUIResource(BorderFactory.createLineBorder(new Color(
    117, 117, 117))));

  addResource(defaults,
    "com.l2fprod.common.swing.plaf.basic.resources.TipOfTheDay");
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:25,代码来源:JTipOfTheDayAddon.java

示例4: addWindowsDefaults

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
protected void addWindowsDefaults(LookAndFeelAddons addon, List defaults) {
  super.addWindowsDefaults(addon, defaults);

  defaults.add(JTipOfTheDay.uiClassID);
  defaults.add(WindowsTipOfTheDayUI.class.getName());

  defaults.add("TipOfTheDay.background");
  defaults.add(new ColorUIResource(128, 128, 128));

  defaults.add("TipOfTheDay.font");
  defaults.add(UIManager.getFont("Label.font").deriveFont(13f));

  defaults.add("TipOfTheDay.icon");
  defaults.add(LookAndFeel.makeIcon(WindowsTipOfTheDayUI.class,
    "tipoftheday.png"));

  defaults.add("TipOfTheDay.border");
  defaults
    .add(new BorderUIResource(new WindowsTipOfTheDayUI.TipAreaBorder()));

  addResource(defaults,
    "com.l2fprod.common.swing.plaf.windows.resources.TipOfTheDay");
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:24,代码来源:JTipOfTheDayAddon.java

示例5: installDefaults

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
protected void installDefaults() {
  Border b = bar.getBorder();
  if (b == null || b instanceof UIResource) {
    bar.setBorder(
      new BorderUIResource(
        new CompoundBorder(
          BorderFactory.createLineBorder(
            UIManager.getColor("controlDkShadow")),
          BorderFactory.createEmptyBorder(1, 1, 1, 1))));
  }
  
  Color color = bar.getBackground();
  if (color == null || color instanceof ColorUIResource) {
    bar.setOpaque(true);
    bar.setBackground(new ColorUIResource(Color.white));
  }
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:18,代码来源:BlueishButtonBarUI.java

示例6: installDefaults

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
protected void installDefaults() {
  Border b = bar.getBorder();
  if (b == null || b instanceof UIResource) {
    bar.setBorder(
      new BorderUIResource(
        new CompoundBorder(
          BorderFactory.createEtchedBorder(),
          BorderFactory.createEmptyBorder(2, 2, 2, 2))));
  }

  if (bar.getBackground() == null
    || bar.getBackground() instanceof UIResource) {
    bar.setBackground(new ColorUIResource(128, 128, 128));
    bar.setOpaque(true);
  }
}
 
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:17,代码来源:IconPackagerButtonBarUI.java

示例7: addBasicDefaults

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
@Override
protected void addBasicDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
    super.addBasicDefaults(addon, defaults);
    
    Font font = UIManagerExt.getSafeFont("Label.font", new Font("Dialog", Font.PLAIN, 12));
    font = font.deriveFont(Font.BOLD, 13f);
    
    defaults.add(JXCategory.uiClassID, BasicCategoryUI.class.getName());
    defaults.add("Category.font", UIManagerExt.getSafeFont("TextPane.font",
              new FontUIResource("Serif", Font.PLAIN, 12)));
    defaults.add("Category.tipFont", new FontUIResource(font));
    defaults.add("Category.background", new ColorUIResource(Color.WHITE));
    defaults.add("Category.icon",
            LookAndFeel.makeIcon(BasicCategoryUI.class, "resources/dictionary_categories.png"));
    defaults.add("Category.border", new BorderUIResource(
            BorderFactory.createLineBorder(new Color(117, 117, 117))));

  UIManagerExt.addResourceBundle(
          "org.jdesktop.swingx.plaf.basic.resources.Category");
}
 
开发者ID:teddyted,项目名称:iSeleda,代码行数:21,代码来源:CategoryAddon.java

示例8: addWindowsDefaults

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void addWindowsDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
  super.addWindowsDefaults(addon, defaults);

  Font font = UIManagerExt.getSafeFont("Label.font",
          new Font("Dialog", Font.PLAIN, 12));
  font = font.deriveFont(13f);
  
  defaults.add(JXCategory.uiClassID, WindowsTipOfTheDayUI.class.getName());
  defaults.add("Category.background", new ColorUIResource(Color.GRAY));
  defaults.add("Category.font", new FontUIResource(font));
  defaults.add("Category.icon",
          LookAndFeel.makeIcon(WindowsTipOfTheDayUI.class, "resources/tipoftheday.png"));
  defaults.add("Category.border" ,new BorderUIResource(new WindowsTipOfTheDayUI.TipAreaBorder()));

  UIManagerExt.addResourceBundle(
      "org.jdesktop.swingx.plaf.windows.resources.TipOfTheDay");
}
 
开发者ID:teddyted,项目名称:iSeleda,代码行数:22,代码来源:CategoryAddon.java

示例9: addBasicDefaults

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
@Override
protected void addBasicDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
    super.addBasicDefaults(addon, defaults);
    
    Font font = UIManagerExt.getSafeFont("Label.font", new Font("Dialog", Font.PLAIN, 12));
    font = font.deriveFont(Font.BOLD, 13f);
    
    defaults.add(JXTipOfTheDay.uiClassID, BasicTipOfTheDayUI.class.getName());
    defaults.add("TipOfTheDay.font", UIManagerExt.getSafeFont("TextPane.font",
              new FontUIResource("Serif", Font.PLAIN, 12)));
    defaults.add("TipOfTheDay.tipFont", new FontUIResource(font));
    defaults.add("TipOfTheDay.background", new ColorUIResource(Color.WHITE));
    defaults.add("TipOfTheDay.icon",
            LookAndFeel.makeIcon(BasicTipOfTheDayUI.class, "resources/TipOfTheDay24.gif"));
    defaults.add("TipOfTheDay.border", new BorderUIResource(
            BorderFactory.createLineBorder(new Color(117, 117, 117))));

  UIManagerExt.addResourceBundle(
          "org.jdesktop.swingx.plaf.basic.resources.TipOfTheDay");
}
 
开发者ID:teddyted,项目名称:iSeleda,代码行数:21,代码来源:TipOfTheDayAddon.java

示例10: addWindowsDefaults

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void addWindowsDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
  super.addWindowsDefaults(addon, defaults);

  Font font = UIManagerExt.getSafeFont("Label.font",
          new Font("Dialog", Font.PLAIN, 12));
  font = font.deriveFont(13f);
  
  defaults.add(JXTipOfTheDay.uiClassID, WindowsTipOfTheDayUI.class.getName());
  defaults.add("TipOfTheDay.background", new ColorUIResource(Color.GRAY));
  defaults.add("TipOfTheDay.font", new FontUIResource(font));
  defaults.add("TipOfTheDay.icon",
          LookAndFeel.makeIcon(WindowsTipOfTheDayUI.class, "resources/tipoftheday.png"));
  defaults.add("TipOfTheDay.border" ,new BorderUIResource(new WindowsTipOfTheDayUI.TipAreaBorder()));

  UIManagerExt.addResourceBundle(
      "org.jdesktop.swingx.plaf.windows.resources.TipOfTheDay");
}
 
开发者ID:teddyted,项目名称:iSeleda,代码行数:22,代码来源:TipOfTheDayAddon.java

示例11: getInternalFrameBorder

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
/**
 * Returns a border that is composed of a raised bevel border and a
 * one-pixel thick line border.
 *
 * <p><img src="doc-files/BasicBorders-2.png" width="300" height="200"
 * alt="[A screen shot of a border returned by this method]" />
 *
 * <p>The colors of the border are retrieved from the
 * <code>UIDefaults</code> of the currently active look and feel
 * using the keys <code>&#x201c;InternalFrame.borderShadow&#x201d;</code>,
 * <code>&#x201c;InternalFrame.borderDarkShadow&#x201d;</code>,
 * <code>&#x201c;InternalFrame.borderLight&#x201d;</code>,
 * <code>&#x201c;InternalFrame.borderHighlight&#x201d;</code>, and
 * (for the inner one-pixel thick line)
 * <code>&#x201c;InternalFrame.borderColor&#x201d;</code>.
 */
public static Border getInternalFrameBorder()
{
  Color shadow, darkShadow, highlight, lightHighlight, line;

  /* See comment in methods above for why this border is not shared. */
  shadow = UIManager.getColor("InternalFrame.borderShadow");
  darkShadow = UIManager.getColor("InternalFrame.borderDarkShadow");
  highlight = UIManager.getColor("InternalFrame.borderLight");
  lightHighlight = UIManager.getColor("InternalFrame.borderHighlight");
  line = UIManager.getColor("InternalFrame.borderColor");

  return new BorderUIResource.CompoundBorderUIResource(
    /* outer border */
    new BorderUIResource.BevelBorderUIResource(
      BevelBorder.RAISED,
      (highlight != null) ? highlight : Color.lightGray,
      (lightHighlight != null) ? lightHighlight : Color.white,
      (darkShadow != null) ? darkShadow : Color.black,
      (shadow != null) ? shadow : Color.gray),

    /* inner border */
    new BorderUIResource.LineBorderUIResource(
      (line != null) ? line : Color.lightGray));
}
 
开发者ID:vilie,项目名称:javify,代码行数:41,代码来源:BasicBorders.java

示例12: uiImpl

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
/**
	 * Ui impl.
	 */
	public static void uiImpl()
	{
		//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 视口的相关ui值设定
		UIManager.put("Viewport.background",new ColorUIResource(BeautyEyeLNFHelper.commonBackgroundColor));
		UIManager.put("Viewport.foreground",new ColorUIResource(BeautyEyeLNFHelper.commonForegroundColor));
		
		//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> JScrollPane的相关ui值设定
		UIManager.put("ScrollPane.border",new BorderUIResource(new org.jb2011.lnf.beautyeye.ch4_scroll.ScrollPaneBorder()));//BorderFactory.createEmptyBorder(0, 0, 0, 0)));
		// 不能设置alpha通道小于255的透明颜色,否则会出现无法重paint的问题
		UIManager.put("ScrollPane.background",new ColorUIResource(Color.white));//cc));
		UIManager.put("ScrollPane.foreground",new ColorUIResource(BeautyEyeLNFHelper.commonForegroundColor));
		UIManager.put("ScrollPaneUI",org.jb2011.lnf.beautyeye.ch4_scroll.BEScrollPaneUI.class.getName());
		
		//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> JScrollPane的滚动条相关ui值设定
		UIManager.put("ScrollBar.thumb",new ColorUIResource(BeautyEyeLNFHelper.commonBackgroundColor));
		UIManager.put("ScrollBar.foreground",new ColorUIResource(BeautyEyeLNFHelper.commonForegroundColor));
		UIManager.put("ScrollBar.background",new ColorUIResource(new Color(250,250,250)));
		UIManager.put("ScrollBar.trackForeground",new ColorUIResource(new Color(250,250,250)));
		UIManager.put("scrollbar",new ColorUIResource(new Color(250,250,250)));
		UIManager.put("ScrollBarUI",org.jb2011.lnf.beautyeye.ch4_scroll.BEScrollBarUI.class.getName());
		
//		/* ~~注:这个属性是jb2011自已加的,目的是控制滚动面板及其Viewport的透明性 */
//		//设置成透明是为了让BE LNF中它的N9图实现的border能展现出图片背景来,好看一点
//		UIManager.put("ScrollPane.opaque", false);
	}
 
开发者ID:JackJiang2011,项目名称:beautyeye,代码行数:29,代码来源:__UI__.java

示例13: initForVista

import javax.swing.plaf.BorderUIResource; //导入依赖的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

示例14: uiImpl

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
/**
 * Ui impl.
 */
public static void uiImpl()
{
	//通过此border可以调整整个列表的上下左右的空白
	UIManager.put("List.border",new BorderUIResource(BorderFactory.createEmptyBorder(0,0,0,0)));
	//本属性将决定已被选中的列表单元显示文本的上下左右空白哦
	UIManager.put("List.focusCellHighlightBorder",new BorderUIResource(BorderFactory.createEmptyBorder(1, 8, 5, 3)));//new BorderUIResource(new BEDashedBorder(Color.red,true,false,true,false)));
	/* ~~注:这个属性是jb2011为了更好的ui效果自已加的属性 */
	UIManager.put("List.focusSelectedCellHighlightBorderColor", new ColorUIResource(new Color(252,87,84)));//220,0,0,255)));//Color.red
	/* ~~注:这个属性是jb2011为了更好的ui效果自已加的属性,目的是使List.focusSelectedCellHighlightBorderColor有点立体效果哦 */
	UIManager.put("List.focusSelectedCellHighlightBorderHighlightColor"
			, new ColorUIResource(new Color(255,255,255,70)));//注意:这个颜色是半透明的哦
	//列表单元获得焦点时的边框(windows主题下是一个距形虚线框)——之前老也想不通的与左边隔一个像素的白边问题就是没设置它造成的
	UIManager.put("List.focusSelectedCellHighlightBorder"
			,new BorderUIResource(new org.jb2011.lnf.beautyeye.ch19_list.__UI__.FocusSelectedCellHighlightBorder()));
	//将决定正状态下的列表单元显示文本的上下左右空白哦
	UIManager.put("List.cellNoFocusBorder",new BorderUIResource(BorderFactory.createEmptyBorder(1, 8, 5, 3)));
	
	UIManager.put("List.background",new ColorUIResource(Color.white));
	UIManager.put("List.foreground",new ColorUIResource(BeautyEyeLNFHelper.commonForegroundColor));
	UIManager.put("List.selectionForeground",Color.white);//fgColor);
	UIManager.put("List.selectionBackground",new ColorUIResource(BeautyEyeLNFHelper.commonSelectionBackgroundColor));
	
	UIManager.put("List.cellRenderer", new MyDefaultListCellRenderer.UIResource());
	UIManager.put("ListUI", org.jb2011.lnf.beautyeye.ch19_list.BEListUI.class.getName());
}
 
开发者ID:JackJiang2011,项目名称:beautyeye,代码行数:29,代码来源:__UI__.java

示例15: uiImpl

import javax.swing.plaf.BorderUIResource; //导入依赖的package包/类
/**
 * Ui impl.
 */
public static void uiImpl()
{
	UIManager.put("SplitPane.shadow",new ColorUIResource(new Color(200,200,200)));// 本属性在BE LNF中暂时没用到
	//JSplitePane的默认背景色
	UIManager.put("SplitPane.background",new ColorUIResource(new Color(250,250,250)));//238,241,243)));
	//JSplitePane的边框实现
	UIManager.put("SplitPane.border",new BorderUIResource(new org.jb2011.lnf.beautyeye.ch4_scroll.ScrollPaneBorder()));//BorderFactory.createEmptyBorder(0, 0, 0, 0)));
	UIManager.put("SplitPaneUI",org.jb2011.lnf.beautyeye.ch17_split.BESplitPaneUI.class.getName());
	
	//分隔条拖动时的颜色(说明:此值可以设置alpha通道以便达到半透明效果哦)
	UIManager.put("SplitPaneDivider.draggingColor",new ColorUIResource(new Color(0,0,0,50)));
	//触碰按钮的默认大小
	UIManager.put("SplitPane.oneTouchButtonSize",4);//drfault is 5
	//分隔条的默认大小
	UIManager.put("SplitPane.dividerSize",7);//drfault is 5
	//分隔条的边框实现
	UIManager.put("SplitPaneDivider.border",new SplitPaneDividerBorder());
}
 
开发者ID:JackJiang2011,项目名称:beautyeye,代码行数:22,代码来源:__UI__.java


注:本文中的javax.swing.plaf.BorderUIResource类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。