BeautyEye java look and feel

 BeautyEye is a Java Swing cross-platform look and feel. Thanks to NinePatch technology,
 BeautyEye is so different. BeautyEye is free, you can study, learn, even for commercial use. Enjoy it, thanks.





The first step: How to get started?

 First of beautyeye_lnf.jar file as lib into your project and reference it. 
Currently, beautyeye_lnf.jar package file is located all_in_one.zip position: all_in_one / dist /


Step Two: How to use BeautyEye L & F?

Add the following code to your Java program interface will replace Beauty Eye look:

 Public static void main ( String [] args )   
 {   
   TRY   
   {   
     ORG . jb2011 . LNF . beautyeye . BeautyEyeLNFHelper . launchBeautyEyeLNF ();   
   }   
   catch ( Exception e )   
   {   
     / / TODO Exception   
   }   
   ........... .......... your program code .........................   
   ........... .......... your program code .........................   
 }  



[Appendix 1]: How to define the window frame type?


 Public static void main ( String [] args )   
 {   
   TRY   
   {   
     / / set this attribute will change the window border style definitions   
     BeautyEyeLNFHelper . frameBorderStyle = BeautyEyeLNFHelper . FrameBorderStyle . osLookAndFeelDecorated ;   
     ORG . jb2011 . LNF . beautyeye . BeautyEyeLNFHelper . launchBeautyEyeLNF ();   
   }   
   catch ( Exception e )   
   {   
     / / TODO Exception   
   }   
   ..................... your program code ............... ..........   
   ..................... your program code ............... ..........   
 }  


[Appendix 2]: There are several types of window borders?

No.Pointed window bordersCodeBeautyEye in defaultRenderings
1System default borderFrameBorderStyle.osLookAndFeelDecorated
2Strong three-dimensional translucent borderFrameBorderStyle.translucencyAppleLikejava1.6.0_u10 and later,
3Weak three-dimensional translucent borderFrameBorderStyle.translucencySmallShadow
4Ordinary opaque borderFrameBorderStyle.generalNoTranslucencyShadowjava1.5 version

[Appendix 3]: How to use different colored buttons?

No.CodeBeautyEye defaultRenderings
1btnInstance.setUI (new BEButtonUI (). setNormalColor (BEButtonUI.NormalColor.normal));YES
2btnInstance.setUI (new BEButtonUI (). setNormalColor (BEButtonUI.NormalColor.green));
3btnInstance.setUI (new BEButtonUI (). setNormalColor (BEButtonUI.NormalColor.lightBlue));
4btnInstance.setUI (new BEButtonUI (). setNormalColor (BEButtonUI.NormalColor.blue));
5btnInstance.setUI (new BEButtonUI (). setNormalColor (BEButtonUI.NormalColor.red));

[Appendix 4]: How to hide the "Settings" button?

Note: This button is currently only as a demonstration window caption buttons with custom abilities, the future will open up custom features, now you can choose to hide it.
    UIManager . put ( "RootPane.setupButtonVisible" ,  false );

[Appendix 5]: How to turn on / off when inactive window translucent effect?

@ Since v3.2
/ / Set this switch to false means that the closure of, BeautyEye LNF default is true 
BeautyEyeLNFHelper . translucencyAtFrameInactive =  false ;

[Appendix 6]: How to make the ui JToolBar fading pictures and do not use a solid color fill using the traditional background?

@ Since v3.4
Method 1:
/ / Set the property to: true realization that the use of pure color ToolBar.background 
/ / Fill the background color, BeautyEye default for this attribute is false 
UIManager . put ( "ToolBar.isPaintPlainBackground" ,  Boolean . TRUE );
Method 2:
/ / Use ClientProperty set individually control each toolbar: true indication ToolBar.background 
/ / color to achieve a solid fill background, BeautyEye default for this attribute is false 
toolbarInstance . putClientProperty ( "ToolBar.isPaintPlainBackground" ,  Boolean . TRUE );
Note: Method 2 can be individually controlled for each JToolBar components, Method 1 is the global properties, methods, two higher priority than Method 1.

[Appendix 7]: How to customize JToolBar ui the border?

@ Since v3.4
Add the following code, using your own border:
/ / Custom JToolBar ui's border 
Border bd =  new ORG . jb2011 . LNF . beautyeye . ch8_toolbar . BEToolBarUI . ToolBarBorder ( 
        UIManager . getColor ( "ToolBar.shadow" )      / / floatable color of the contacts 
        ,  UIManager . getColor ( " ToolBar.highlight " ) / / floatable when the shadow color contacts 
        ,  new  Insets ( 6 ,  0 ,  11 ,  0 ));               / / default border insets 
UIManager . put ( "ToolBar.border" , new  BorderUIResource ( bd )) ;
Note: The above code must be " BeautyEyeLNFHelper.launchBeautyEyeLNF (); "can only be performed after the onset oh.

[Appendix 8]: How to set BeantuEye JTabbedPane under Appearance in the left indent?

See the following code:
/ / Change the value of the parameter can be realized InsetsUIResource 
UIManager . put ( "TabbedPane.tabAreaInsets" 
        ,  new javax . Swing . plaf . InsetsUIResource ( 3 , 20 , 2 , 20 ));
Note: The above code must be " BeautyEyeLNFHelper.launchBeautyEyeLNF (); "can only be performed after the onset oh.

[Appendix 9]: how to adjust the set form background transparent and completely hide a form's title bar?

In your form is setVisible (true) before calling the code below:
/ / Set frame full Transparent 
frame . setUndecorated ( true ); 
AWTUtilities . setWindowOpaque ( frame ,  false ); 
frame . getRootPane (). setWindowDecorationStyle ( JRootPane . NONE );
Note: The above code applies to all systems in a non-title bar of the form, including the official MetalLookAndFeel appearance.



Comments