1 / 9

Change the Look & Feel Compiere Looks

Change the Look & Feel Compiere Looks. 凡操千曲而後曉聲 , 觀千劍而後識器 , 故圓照之象務先博觀 . 劉勰 文心雕龍. 井民全製作. 參考資料 : http://www.compiere.org/looks/index.html. Outline. Snapshoot Compiere Looks Overview Program Demo 一般背景 把圖當 JPanel 的背景 Resource. Snapshoot. Compiere Looks Overview.

byrd
Télécharger la présentation

Change the Look & Feel Compiere Looks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Change the Look & FeelCompiere Looks 凡操千曲而後曉聲,觀千劍而後識器,故圓照之象務先博觀. 劉勰 文心雕龍 井民全製作 參考資料: http://www.compiere.org/looks/index.html

  2. Outline • Snapshoot • Compiere Looks Overview • Program Demo • 一般背景 • 把圖當JPanel的背景 • Resource

  3. Snapshoot

  4. Compiere Looks Overview • Home: http://www.compiere.org/looks/index.html • 3D color extension of the Java Metal pluggable Look and Feel. • add color capabilities as well as texture backgrounds • Open Source (based on JDK 1.4.0)

  5. Program Demo import org.compiere.plaf.*; import org.compiere.swing.*; import org.compiere.util.*; public class MyFrame{ public MyFrame(){ setSize(300,300); Container c=getContentPane(); show(); } } public class Demo{ public static void main(String args[]){ MyFrame win=new MyFrame(); } } CompierePLAF.setPLAF(this); MyPanel=new CPanel(new CompiereColor(Color.green,Color.cyan)); c.add(MyPanel); MyPanel.add(new CButton(“test”)); MyPanel.add(new CButton(“test”));

  6. Program Demo把圖當JPanel的背景 public class Demo{ public static void main(String args[]){ MyFrame win=new MyFrame(); } } import org.compiere.plaf.*; import org.compiere.swing.*; import org.compiere.util.*; public class MyFrame{ public MyFrame(){ setSize(300,300); Container c=getContentPane(); } } CompiereColor MyBG=new CompiereColor(Color.green,false); CButton myButton=new CButton("Ok"); myButton.setBackgroundColor(MyBG); MyPanel.add(myButton); myButton=new CButton("Cancel"); myButton.setBackgroundColor(MyBG); MyPanel.add(myButton); MyPanel=new CPanel(new CompiereColor(new File ("c:/texture.jpg").toURL(),Color.blue,(float)0.3)); c.add(MyPanel); CompierePLAF.setPLAF(this); 重要程式片段 重要程式片段

  7. Resource • Download • http://www.compiere.org/looks/download.html • API Doc • http://compiere.sourceforge.net/doc/API_Looks/

  8. Other Available JFC/Swing PLAFs • http://www.javootoo.com • http://www.incors.org(Kuststoff) • http://www.jgoodies.com(jGoodies) • http://www.l2fprod.com(SkinLF) • http://www.themes.org(GTK Themes)

  9. Test Design Prototype End • “Facts” to remember • Users can’t remember • Users can’t read • Users can’t control the Mouse • Users do the unexpected

More Related