OYOAHA
LookAndFeel v3.0
Thank you for
using oyoaha lookandfeel, oyoaha lookandfeel will provide an amazing look to
your javaTM application, enjoy ;-)
Contact:
Home Page:
http://www.oyoaha.com/lookandfeel
oyoaha theme factory:
http://www.oyoaha.com/themes
E-mail:
email@oyoaha.com
Using OYOAHA LookAndFeel:
java.lang.Object | ||||
+ | javax.swing.LookAndFeel | |||
+ | javax.swing.plaf.basic.BasicLookAndFeel | |||
+ | javax.swing.plaf.metal.MetalLookAndFeel | |||
+ | com.oyoaha.swing.plaf.oyoaha.OyoahaLookAndFeel |
Constructor
public OyoahaLookAndFeel()
public OyoahaLookAndFeel(boolean enableRollover)
Methods to set a MetalTheme:
public void setCurrentTheme(javax.swing.plaf.metal.MetalTheme theme)
public void setCurrentTheme(java.io.File file)
public void setCurrentTheme(java.net.URL url)
public void setCurrentTheme(java.io.InputStream stream)
Methods to set a oyoaha theme:
public void setOyoahaTheme(java.io.File file)
public void setOyoahaTheme(java.net.URL url)
public void setOyoahaTheme(java.io.InputStream stream)
MetalTheme and OyoahaTheme can be used at same time.
By default rollover is enabled.
Some OyoahaTheme may use color and font information found in MetalTheme.
For more information about MetalTheme look:
import
com.oyoaha.swing.plaf.oyoaha.*; import javax.swing.*; try { |
|
OyoahaLookAndFeel lnf
= new OyoahaLookAndFeel(); UIManager.setLookAndFeel(lnf); |
|
} catch (Exception e) { } |
To use oyoaha lookandfeel with a oyoaha theme (*.otm) File:
import
com.oyoaha.swing.plaf.oyoaha.*; import javax.swing.*; import java.io.*; try { |
|
File file = new File(System.getProperty("user.dir"),
"gang.otm"); OyoahaLookAndFeel lnf = new OyoahaLookAndFeel(); if(file.exists()) lnf.setOyoahaTheme(file); UIManager.setLookAndFeel(lnf); |
|
} catch (Exception e) { } |
To use oyoaha lookandfeel with a oyoaha theme loaded from resource:
import
com.oyoaha.swing.plaf.oyoaha.*; import javax.swing.*; import java.net.*; try { |
|
OyoahaLookAndFeel
lnf = new OyoahaLookAndFeel(); URL url = getClass().getResource("gang.otm"); lnf.setOyoahaTheme(url); UIManager.setLookAndFeel(lnf); |
|
} catch (Exception e) { } |
To use oyoaha lookandfeel with a oyoaha theme and a MetalTheme loaded from resource:
import
com.oyoaha.swing.plaf.oyoaha.*; import javax.swing.*; import java.net.*; try { |
|
URL url = getClass().getResource("pink.theme"); OyoahaLookAndFeel.setCurrentTheme(url); OyoahaLookAndFeel lnf = new OyoahaLookAndFeel(); url = getClass().getResource("gang.otm"); lnf.setOyoahaTheme(url); UIManager.setLookAndFeel(lnf); |
|
} catch (Exception e) { } |
Here's a code snippets which
is provided by Bradlee bradleej@austin.rr.com,
thanks to him :-)
It's for use in an application environment, a properties file which allows changing
the runtime look without recompiling the application. Basically the properties
file looks like this:
tgang.otm
// Copy and paste one of the following values to use that theme
//Valid valudes for the first line are:
zipper.otm
slushy.otm
tgang.otm
flat1.otm
anidaisy.otm
At the top line, before the comment, tgang.otm is being specified as the current
look and feel. All that is required to change that is for the user to select
one of the other otm names listed and cut & paste that to the first line.
import
com.oyoaha.swing.plaf.oyoaha.*; import javax.swing.*; //---------------------------------------------------------------------- /** Main path * */ private static final String THEME= "com" + File.separator + "myapplication" + File.separator + "themes" + File.separator; //---------------------------------------------------------------------- //Set the look and feel of the frame. private void setLookAndFeel() { |
|||||||
|
|||||||
} //---------------------------------------------------------------------- /** Read the specified look and feel from the properties file... */ //---------------------------------------------------------------------- private String getLookAndFeel() { |
|||||||
|
|||||||
} |
License
Agreement for Oyoaha Lookandfeel:
Copyright (c) 2001-2003 OYOAHA. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. The names "OYOAHA" must not be used to endorse or promote products
derived from this software without prior written permission.
For written permission, please contact email@oyoaha.com.
3. Products derived from this software may not be called "OYOAHA",
nor may "OYOAHA" appear in their name, without prior written
permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL OYOAHA OR ITS CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License Agreement for Oyoaha Theme:
Copyright (c) 2001-2003 OYOAHA. All rights reserved.Legal stuff:
Copyright (c) 2001, 2003 oyoaha. All rights reserved.
Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
Some of the product names used are trademarks or registered trademarks of their respective holders and are used for identification purposes only.
This software use AElfred
(Microstar's Java-Based XML Parser).
Copyright (c) 1997, 1998 by Microstar Software Ltd.
Home Page: http://www.microstar.com/XML/