本文整理汇总了Java中org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper类的典型用法代码示例。如果您正苦于以下问题:Java BeautyEyeLNFHelper类的具体用法?Java BeautyEyeLNFHelper怎么用?Java BeautyEyeLNFHelper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BeautyEyeLNFHelper类属于org.jb2011.lnf.beautyeye包,在下文中一共展示了BeautyEyeLNFHelper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: uiImpl
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的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
}
示例2: main
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的package包/类
/**
* SwingSet2 Main. Called only if we're an application, not an applet.
*
* @param args the arguments
* @throws Exception the exception
*/
public static void main(String[] args) throws Exception {
// Create SwingSet on the default monitor
// BeautyEyeLNFHelper.frameBorderStyle =
// BeautyEyeLNFHelper.FrameBorderStyle.osLookAndFeelDecorated;
//// UIManager.setLookAndFeel(BeautyEyeLNFHelper.getBeautyEyeLNFCrossPlatform());//new WindowsLookAndFeel());
// UIManager.put("RootPane.setupButtonVisible", false);
BeautyEyeLNFHelper.debug = true;
// BeautyEyeLNFHelper.translucencyAtFrameInactive = false;
BeautyEyeLNFHelper.launchBeautyEyeLNF();
// UIManager.put("ToolBar.border",new BorderUIResource(
// new org.jb2011.lnf.beautyeye.ch8_toolbar.BEToolBarUI.ToolBarBorder(UIManager.getColor("ToolBar.shadow"),
// UIManager.getColor("ToolBar.highlight"), new Insets(6, 0, 0, 0))));
// JFrame.setDefaultLookAndFeelDecorated(true);
// JDialog.setDefaultLookAndFeelDecorated(true);
// UIManager.setLookAndFeel(new MetalLookAndFeel());
// UIManager.setLookAndFeel(new WindowsLookAndFeel());
SwingSet2 swingset = new SwingSet2(null, GraphicsEnvironment.
getLocalGraphicsEnvironment().
getDefaultScreenDevice().
getDefaultConfiguration());
}
示例3: initialize
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的package包/类
@Override
protected void initialize(String args[]) {
try {
// TODO Use nimbus L&F by Oracle
// UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
// TODO Use Beauty L&F by Jack Jiang
BeautyEyeLNFHelper.launchBeautyEyeLNF();
UIManager.put("RootPane.setupButtonVisible", false);
} catch (Exception ex) {
// not catestrophic
}
resourceMap = getContext().getResourceMap();
title = resourceMap.getString("mainFrame.title");
runningDemoCache = new HashMap<String, DemoPanel>();
setDemoList(resourceMap.getString("demos.title"), getDemoClassNames(args));
IntroPanel intro = new IntroPanel();
setDemoPlaceholder(intro);
}
示例4: uiImpl
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的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);
}
示例5: invokeMethod
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的package包/类
/**
* 通过反射调用指定Class对象的指定方法(包括静态方法和实例方法).
*
* @param theClass 类
* @param theObject 要调用方法所对应的类对象,如果要调用的是静态方法则本参数与theClass是同一个Class对象哦
* @param methodName 要调用的方法名
* @param paramsType 要调用的方法参数类型,无参数则传null
* @param paramsValue 要调用的方法参数值,无参数值则传null
* @return 如果该方法有返回值且正常调用则返回该值,否则返回null
*/
public static Object invokeMethod(Class theClass, Object theObject, String methodName
, Class[] paramsType, Object[] paramsValue)
{
Object ret = null;
if(theClass != null)
{
try
{
Method m = theClass.getMethod(methodName, paramsType);
ret = m.invoke(theObject, paramsValue);
// System.out.println("@通过反射调用方法"+theClass.getName()+"."+methodName
// +"("+Arrays.toString(paramsType)+")成功.");
}
catch (Exception e)
{
if(BeautyEyeLNFHelper.debug)
e.printStackTrace();
LogHelper.error("通过反射调用方法"+theClass.getName()+"."+methodName
+"("+Arrays.toString(paramsType)+")失败,您的JRE版本可能需要更新,"+e.getMessage());
}
}
return ret;
}
示例6: uiImpl
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的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());
}
示例7: InitTheme
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的package包/类
/**
* 初始化主题配置
*/
public static void InitTheme() {
try {
switch (settings.getTheme()) {
case "BeautyEye":
BeautyEyeLNFHelper.launchBeautyEyeLNF();
UIManager.put("RootPane.setupButtonVisible", false);
break;
default:
UIManager.setLookAndFeel("com.bulenkov.darcula.DarculaLaf");
}
} catch (Exception e) {
logger.error(e.toString());
}
}
示例8: initTheme
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的package包/类
/**
* 初始化look and feel
*/
public static void initTheme() {
try {
switch (configer.getTheme()) {
case "BeautyEye":
BeautyEyeLNFHelper.launchBeautyEyeLNF();
UIManager.put("RootPane.setupButtonVisible", false);
break;
case "weblaf":
UIManager.setLookAndFeel(new WebLookAndFeel());
break;
case "系统默认":
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
break;
case "Windows":
UIManager.setLookAndFeel(WindowsLookAndFeel.class.getName());
break;
case "Nimbus":
UIManager.setLookAndFeel(NimbusLookAndFeel.class.getName());
break;
case "Metal":
UIManager.setLookAndFeel(MetalLookAndFeel.class.getName());
break;
case "Motif":
UIManager.setLookAndFeel(MotifLookAndFeel.class.getName());
break;
case "Darcula(推荐)":
default:
UIManager.setLookAndFeel("com.bulenkov.darcula.DarculaLaf");
}
} catch (Exception e) {
logger.error(e);
}
}
示例9: resetStyle
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的package包/类
public static void resetStyle() throws Exception {
BeautyEyeLNFHelper.frameBorderStyle = BeautyEyeLNFHelper.FrameBorderStyle.osLookAndFeelDecorated;
BeautyEyeLNFHelper.launchBeautyEyeLNF();
UIManager.put("RootPane.setupButtonVisible", false);
UIManager.put("ToolBar.isPaintPlainBackground", Boolean.TRUE);
initGlobalFontSetting(new Font("微软雅黑", Font.PLAIN, 14));
}
示例10: main
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的package包/类
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
// 设置本属性将改变窗口边框样式定义
System.setProperty("sun.java2d.noddraw", "true");
BeautyEyeLNFHelper.frameBorderStyle = BeautyEyeLNFHelper.FrameBorderStyle.translucencySmallShadow;
BeautyEyeLNFHelper.launchBeautyEyeLNF();
UIManager.put("RootPane.setupButtonVisible", false);
} catch (Exception e) {
}
JFrame frame = new JFrame();
frame.setTitle("代码工厂 v" + version);
frame.setResizable(false);
mainWindow = new MainWindow();
mainWindow.initComponents();
frame.setSize(width, height);
frame.add(mainWindow);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// frame.pack();
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension scmSize = toolkit.getScreenSize();
frame.setLocation(scmSize.width/2 - (width/2), scmSize.height/2 - (height/2));
frame.setVisible(true);
StartApp.getInstance().hide();
}
});
}
示例11: main
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的package包/类
/**
* The main method.
*
* @param args the arguments
* @throws Exception the exception
*/
public static void main(String[] args)throws Exception
{
// JFrame.setDefaultLookAndFeelDecorated(true);
// JDialog.setDefaultLookAndFeelDecorated(true);
// BeautyEyeLNFHelper.frameBorderStyle = FrameBorderStyle.generalNoTranslucencyShadow;
BeautyEyeLNFHelper.launchBeautyEyeLNF();
// UIManager.setLookAndFeel(new MetalLookAndFeel());
JFrame f = new JFrame();
// f.setDefaultLookAndFeelDecorated(false);
// com.sun.awt.AWTUtilities.setWindowOpacity(f, 0.5f);
// com.sun.awt.AWTUtilities.setWindowOpaque(f, true);
// f.pack();
f.setBounds(100,100,300,300);
JToolBar tb = new JToolBar();
tb.add(new JTextField("111111111111111111"));
f.getContentPane().setLayout(new BorderLayout());
f.getContentPane().add(tb, BorderLayout.NORTH);
f.getContentPane().add(new JButton("1111111111111111111111"), BorderLayout.CENTER);
// ((JComponent)f.getContentPane())
// .setBorder(BorderFactory.createEmptyBorder(30, 30, 30, 30));
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// f.getRootPane().setWindowDecorationStyle(JRootPane.NONE);
// f.setUndecorated(false);
f.setVisible(true);
// f.setExtendedState(JFrame.MAXIMIZED_BOTH);
}
示例12: init
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的package包/类
public void init() {
try
{
BeautyEyeLNFHelper.launchBeautyEyeLNF();
}
catch (Exception e)
{
System.err.println("BeautyEyeLNF运行失败,原因是:"+e.getMessage());
}
getContentPane().setLayout(new BorderLayout());
getContentPane().add(new SwingSet2(this), BorderLayout.CENTER);
}
示例13: addNotify
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的package包/类
public void addNotify()
{
try{
super.addNotify();
}
catch (Exception e){
}
uninstallListeners();
window = SwingUtilities.getWindowAncestor(this);
if (window != null)
{
if (window instanceof Frame)
{
setState(((Frame) window).getExtendedState());
//* 说明请见:BeautyEyeLNFHelper.setMaximizedBoundForFrame
if(BeautyEyeLNFHelper.setMaximizedBoundForFrame)
{
//* 此处设置窗口的最大边界是为了解决窗口最大化时覆盖
//* 操作系统的task bar 的问题,它是sun一直没有解决的问题
//* ,目前没有其它好方法,只能如此解决了
setFrameMaxBound((Frame) window);
}
}
else
{
setState(0);
}
setActive(window.isActive());
installListeners();
}
}
示例14: installClientDecorations
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的package包/类
/**
* Installs the necessary state onto the JRootPane to render client
* decorations. This is ONLY invoked if the <code>JRootPane</code>
* has a decoration style other than <code>JRootPane.NONE</code>.
*
* @param root the root
*/
private void installClientDecorations(JRootPane root)
{
installBorder(root);
JComponent titlePane = createTitlePane(root);
setTitlePane(root, titlePane);
installWindowListeners(root, root.getParent());
installLayout(root);
//只有在窗口边框是半透明的情况下,以下才需要设置窗口透明
//* 注意:本类中的此处代码的目的就是为了实现半透明边框窗口的
//* 正常显示,而且仅针对此目的。如果该边框不为透明,则此处也就不需要设置
//* 窗口透明了,那么如果你的程序其它地方需要窗口透明的话,自行.setWindowOpaque(..)
//* 就行了,由开发者自先决定,此处就不承载过多的要求了
if (!BeautyEyeLNFHelper.__isFrameBorderOpaque()
&& window != null)
{
//** 20111222 by jb2011,让窗口全透明(用以实现窗口的透明边框效果)
// AWTUtilities.setWindowOpaque(window, false);
// TODO BUG:1)目前可知,在jdk1.7.0_u6下,JDialog的半透明边框的透明度比原设计深一倍
// TODO BUG:2)目前可知,在jdk1.6.0_u33下+win7平台下,JFrame窗口被调置成透明后,
// 该窗口内所在文本都会被反走样(不管你要没有要求反走样),真悲具,这应该
// 是官方AWTUtilities.setWindowOpaque(..)bug导致的,1.7.0_u6同样存在该问题,
// 使用BeautyEye时,遇到这样的问题只能自行使用__isFrameBorderOpaque中指定的
// 不透明边框才行(这样此类的以下代码就不用执行,也就不用触发该bug了),但
// JDialog不受此bug影响,诡异!
WindowTranslucencyHelper.setWindowOpaque(window, false);
root.revalidate();
root.repaint();
}
}
示例15: uiImpl
import org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper; //导入依赖的package包/类
/**
* Ui impl.
*/
public static void uiImpl()
{
//~* @since 3.4, add by Jack Jiang 2012-11-05
//~* 【BeautyEye外观的特有定制属性】:true表示BEToolBarUI里,将使用其它典型外观
//~* 一样的默认纯色填充背景(颜色由ToolBar.background属性指定), 否则将使用BeautyEye
//~* 默认的渐变NinePatch图实现背景的填充。另外,还可以使用
//~* JToolBar.putClientProperty("ToolBar.isPaintPlainBackground", Boolean.TRUE);来进行
//~* 独立控制背景的填充方法,ClientProperty相比UIManager中的本方法拥有最高优先级
UIManager.put("ToolBar.isPaintPlainBackground", Boolean.FALSE);
//此属性目前用于ToolBar.border中表示触点的颜色
UIManager.put("ToolBar.shadow", new ColorUIResource(new Color(180,183,187)));
//此属性目前用于ToolBar.border中表示触点的立体阴影效果颜色
UIManager.put("ToolBar.highlight", new ColorUIResource(Color.white));
UIManager.put("ToolBar.dockingBackground",new ColorUIResource(BeautyEyeLNFHelper.commonBackgroundColor));
UIManager.put("ToolBar.floatingBackground",new ColorUIResource(BeautyEyeLNFHelper.commonBackgroundColor));
UIManager.put("ToolBar.background",new ColorUIResource(BeautyEyeLNFHelper.commonBackgroundColor));
UIManager.put("ToolBar.foreground",new ColorUIResource(BeautyEyeLNFHelper.commonForegroundColor));
//工具栏的border实现
UIManager.put("ToolBar.border",new BorderUIResource(
// com.sun.java.swing.plaf.windows.WindowsBorders.getToolBarBorder()));
new org.jb2011.lnf.beautyeye.ch8_toolbar.BEToolBarUI.ToolBarBorder(UIManager.getColor("ToolBar.shadow"),
UIManager.getColor("ToolBar.highlight"), new Insets(6, 0, 11, 0))));
// BorderFactory.createEmptyBorder(5, 0, 8, 0)));//5, 5, 8, 5)));
//分隔条ui实现
UIManager.put("ToolBarSeparatorUI"
, org.jb2011.lnf.beautyeye.ch8_toolbar.BEToolBarSeparatorUI.class.getName());
UIManager.put("ToolBarUI",org.jb2011.lnf.beautyeye.ch8_toolbar.BEToolBarUI.class.getName());
}