Swing Pluggable Look - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Swing Pluggable Look

Description:

In $JAVA_HOME/jre/lib/swing.properties: swing.defaultlaf ... A widget toolkit that uses XML definition files to create the screens instead of Java code. ... – PowerPoint PPT presentation

Number of Views:31
Avg rating:3.0/5.0
Slides: 10
Provided by: Villa49
Category:
Tags: java | jre | look | pluggable | swing

less

Transcript and Presenter's Notes

Title: Swing Pluggable Look


1
Swing Pluggable Look Feel
  • Standard PLAFs
  • Metal The Java platform LF with Themes
  • Windows
  • Motif
  • Some PLAF Libraries
  • Kunststoff
  • jGoodies
  • SkinLF
  • Compiere Looks

Free
2
Swing PLAF Links (selection)
  • 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)
  • http//www.compiere.org/looks/ (Compiere)
  • Custom Look and Feel Example
  • http//java.sun.com/products/jfc/tsc/articles/sce
    (SAP)

3
Using Switching LFs
  • Change default PLAF
  • In JAVA_HOME/jre/lib/swing.propertiesswing.def
    aultlaf org.compiere.plaf.CompiereLookAndFeel
    swing.installedlaf.Compiere.class
    org.compiere.plaf.CompiereLookAndFeel
    swing.installedlaf.Compiere.nameCompiere

4
Using Switching LFs
  • Setting a specific LF (in main method)
  • UIManager.setLookAndFeel (new
    org.compiere.plaf.CompiereLookAndFeel())
  • or
  • CompierePLAF.setPLAF()
  • After switching in a running application
  • SwingUtilities.updateComponentTreeUI(comp)
  • Using your defined LF at startup
  • java -cp CompiereLooks.jarSwingSet2.jar
    org.compiere.plaf.CompierePLAF SwingSet2

5
Swing PLAF UI Delegates
JCheckBox
updateUI() setUI (UIManager.getUI(this))
setUI(ui) print()
Metal
Windows
6
Your own LookAndFeel class
public class MyLookAndFeel extends
MetalLookAndFeel void initClassDefaults
(UIDefaults table) table.put(CheckBoxU
I, MyCheckBoxUI) void
initSystemColorDefaults (UIDefaults table)
table.put("textHighlight", Color.yellow)

7
Compiere LF
8
JGoodies LF
9
Other GUI Java Options
  • SWT - Eclipse
  • http//www.eclipse.org
  • Alternative to Swing
  • Zaval - LwVCL
  • http//www.zaval.org
  • GUI for embedded, standalone and applets, small
    footprint
  • Thinlets
  • http//www.thinlets.com
  • A widget toolkit that uses XML definition files
    to create the screens instead of Java code.
  • SwiXML
  • http//www.swixml.org
  • A widget toolkit that uses XML definition files
    to create the screens instead of Java code.
Write a Comment
User Comments (0)
About PowerShow.com