move branch adempire311 to trunk

This commit is contained in:
vpj-cd 2006-11-17 03:12:25 +00:00
parent c613157a20
commit 6c0c1618cf
193 changed files with 25866 additions and 0 deletions

7
looks/.classpath Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="/tools/lib/looks-2.0.4.jar"/>
<classpathentry kind="output" path="build"/>
</classpath>

17
looks/.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>looks</name>
<comment>Adempiere PLAF UI</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

10
looks/PLAF_Test.bat Normal file
View File

@ -0,0 +1,10 @@
@Title PLAF Test
@Rem $Id: PLAF_Test.bat,v 1.3 2002/03/16 06:00:11 jjanke Exp $
@Rem Put the swing.properties file in the \rje\lib directory
@set JAVA_HOME=D:\j2sdk1.4.0
@Rem
%JAVA_HOME%\jre\bin\java -cp D:\Adempiere\looks\CLooks.jar;%JAVA_HOME%\demo\jfc\SwingSet2\SwingSet2.jar org.compiere.plaf.AdempierePLAF SwingSet2
@Pause

2
looks/RUN.bat Normal file
View File

@ -0,0 +1,2 @@
java -jar CLooks.jar
@pause

25
looks/RUN_build.bat Normal file
View File

@ -0,0 +1,25 @@
@Title Build Looks
@Rem $Header: /cvsroot/adempiere/looks/RUN_build.bat,v 1.15 2005/09/16 00:50:55 jjanke Exp $
@CALL ..\utils_dev\myDevEnv.bat
@IF NOT %ADEMPIERE_ENV%==Y GOTO NOBUILD
@echo Cleanup ...
@"%JAVA_HOME%\bin\java" -Dant.home="." %ANT_PROPERTIES% org.apache.tools.ant.Main clean
@echo Building ...
@"%JAVA_HOME%\bin\java" -Dant.home="." %ANT_PROPERTIES% org.apache.tools.ant.Main looksDistribution
@echo Documentation ...
@"%JAVA_HOME%\bin\java" -Dant.home="." %ANT_PROPERTIES% org.apache.tools.ant.Main looksDocumentation
@echo Release ...
@"%JAVA_HOME%\bin\java" -Dant.home="." %ANT_PROPERTIES% org.apache.tools.ant.Main looksRelease
@Echo Done ...
@sleep 60
@exit
:NOBUILD
@Echo Check myDevEnv.bat (copy from myDevEnvTemplate.bat)
@Pause

18
looks/RUN_build.sh Normal file
View File

@ -0,0 +1,18 @@
# Module compiling script
# Ported from Windows script Marek Mosiewicz<marek.mosiewicz@jotel.com.pl>
SAVED_DIR=`pwd` #save current dir
cd `dirname $0`/../utils_dev #change dir to place where script resides - doesn not work with sym links
UTILS_DEV=`pwd` #this is adempiere source
cd $SAVED_DIR #back to the saved directory
. $UTILS_DEV/myDevEnv.sh #call environment
echo done
if [ ! $ADEMPIERE_ENV==Y ] ; then
echo "Can't set developemeent environemnt - check myDevEnv.sh"
exit 1
fi
echo running Ant
$JAVA_HOME/bin/java -Dant.home="." $ANT_PROPERTIES org.apache.tools.ant.Main

11
looks/Swingset.bat Normal file
View File

@ -0,0 +1,11 @@
@Title Swingset
@Rem $Id: Swingset.bat,v 1.1 2002/03/17 02:29:49 jjanke Exp $
@Rem Put the swing.properties file in the \rje\lib directory
@set JAVA_HOME=D:\j2sdk1.4.0
@Rem
%JAVA_HOME%\jre\bin\java -jar %JAVA_HOME%\demo\jfc\SwingSet2\SwingSet2.jar
@Echo done ...
@Sleep 10

26
looks/adempiereLooks.jnlp Normal file
View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+"
version="1.2.0"
codebase="http://osdn.dl.sourceforge.net/adempiere"
href="http://www.adempiere.org/looks/adempiereLooks.jnlp">
<information>
<title>Adempiere Looks</title>
<vendor>ComPiere, Inc.</vendor>
<homepage href="http://www.adempiere.org/looks/" />
<offline-allowed />
<description>Adempiere Looks - Pluggable Look and Feel for Java</description>
<description kind="short">Adempiere Looks</description>
<description kind="one-line">Adempiere Looks</description>
<description kind="tooltip">Adempiere Looks (Current Release from SorceForge)</description>
<icon href="http://www.adempiere.org/looks/CL32.gif" />
</information>
<resources>
<j2se version="1.4*" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="8m" max-heap-size="128m" />
<jar href="CLooks_120.jar" main="true" download="eager"/>
</resources>
<application-desc main-class="org.compiere.plaf.AdempierePLAF"/>
<security>
<all-permissions />
</security>
</jnlp>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+"
version="Local"
codebase="file:///D:/Adempiere/looks"
href="adempiereLooks_local.jnlp">
<information>
<title>Adempiere Looks Local</title>
<vendor>ComPiere, Inc.</vendor>
<homepage href="http://main/index.html" />
<offline-allowed />
<description>Adempiere Looks - Pluggable Look and Feel for Java (Local)</description>
<description kind="short">Adempiere Looks (Local)</description>
<description kind="one-line">Adempiere Looks (Local)</description>
<description kind="tooltip">Adempiere Looks (Local)</description>
<icon href="http://www.adempiere.org/looks/CL64.gif" />
</information>
<resources>
<j2se version="1.4*" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="8m" max-heap-size="128m" />
<jar href="CLooks.jar" main="true" download="eager"/>
</resources>
<application-desc main-class="org.compiere.plaf.AdempierePLAF"/>
<security>
<all-permissions />
</security>
</jnlp>

146
looks/build.xml Normal file
View File

@ -0,0 +1,146 @@
<!-- ============================================= -->
<!-- Looks -->
<!-- ============================================= -->
<!-- $Header: /cvs/adempiere/looks/build.xml,v 1.1 2006/04/21 18:02:25 jjanke Exp $-->
<project name="looks" default="looksDistribution" basedir=".">
<description>
Build the UI subproject within the Adempiere project.
</description>
<!-- set global properties for this build -->
<property name="src" value="src"/>
<property name="build.dir" value="build"/>
<property name="dist.dir" value="."/>
<property name="jar.path" value="../lib"/>
<property name="jar.name" value="CLooks"/>
<property name="version" value="_13"/>
<property environment="env"/>
<!-- set path to include the necessary jar files for javac -->
<path id="project.class.path">
<pathelement path="${classpath}"/>
<!-- Adempiere Look and Feel -->
<pathelement path="${jar.path}/CCTools.jar"/>
</path>
<target name="init" description="initialization target">
<echo message="=========== Build Looks"/>
<!-- create the time stamp -->
<tstamp/>
<!-- create the build directory structure used by compile -->
<mkdir dir="${build.dir}"/>
<!-- check for the distribution directory -->
<available file="${dist.dir}" type="dir" property="dist.dir.exists"/>
</target>
<target name="makedir" depends="init" unless="dist.dir.exists">
<!-- create the distribution directory if not available -->
<mkdir dir="${dist}/${dist.dir}"/>
</target>
<target name="looksCompile" depends="makedir">
<!-- compile the java code from ${src} into ${build.dir} -->
<javac srcdir="${src}" destdir="${build.dir}" deprecation="on" debug="on">
<classpath refid="project.class.path"/>
</javac>
<!-- copy all image & sound files from src to the build directory -->
<copy todir="${build.dir}">
<fileset dir="${src}">
<include name="**/images/*"/>
<include name="**/*.gif"/>
<include name="**/*.jpg"/>
<include name="**/*.wav"/>
<include name="**/*.htm"/>
<include name="**/*.html"/>
<include name="**/*.properties"/>
<exclude name="**/package.html"/>
</fileset>
</copy>
</target>
<!-- =========================================== -->
<!-- Distribution -->
<!-- =========================================== -->
<target name="looksDistribution" depends="looksCompile" description="Create CLooks.jar">
<!-- put everything from ${build.dir} into the ${jar.name}.jar file -->
<jar jarfile="${dist.dir}/${jar.name}.jar"
excludes="**/*.jbx"
index="yes">
<fileset dir="${build.dir}"/>
<manifest>
<attribute name="Specification-Title" value="Adempiere Swing UI"/>
<attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}${version}"/>
<attribute name="Specification-Vendor" value="Adempiere.org"/>
<attribute name="Implementation-Title" value="CLooks ${env.ADEMPIERE_VERSION}${version}"/>
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION}${version} ${DSTAMP}-${TSTAMP}"/>
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
<attribute name="Implementation-URL" value="http://www.adempiere.org"/>
<attribute name="Main-Class" value="org.adempiere.plaf.AdempierePLAF"/>
</manifest>
</jar>
</target>
<!-- =========================================== -->
<!-- Clean up -->
<!-- =========================================== -->
<target name="clean">
<!-- Delete the ${build.dir} directory trees -->
<delete dir="${build.dir}"/>
<!-- Delete the Doc/Source files -->
<delete file="${dist.dir}/${jar.name}.jar" failonerror="false"/>
<delete file="${dist.dir}/${jar.name}Doc.jar" failonerror="false"/>
<delete file="${dist.dir}/${jar.name}Source.jar" failonerror="false"/>
</target>
<!-- =========================================== -->
<!-- Documentation -->
<!-- =========================================== -->
<target name="looksDocumentation">
<javadoc packageList="packages.txt"
sourcepath="src"
excludepackagenames=""
defaultexcludes="yes"
destdir="doc"
author="true" version="true" use="true"
windowtitle="Adempiere Looks API Documentation"
overview="overview.html">
<doctitle><![CDATA[Adempiere<sup>TM</sup> Looks API Documentation]]></doctitle>
<header><![CDATA[<b>Adempiere Looks 1.3</b>]]></header>
<bottom><![CDATA[<i>Copyright (c) 1999-2005 ComPiere, Inc. - Author: Jorg Janke</i>]]></bottom>
<link href="http://java.sun.com/j2se/1.5/docs/api"/>
</javadoc>
</target>
<!-- =========================================== -->
<!-- Release -->
<!-- =========================================== -->
<target name="looksRelease">
<!-- Create Release Jar Files -->
<jar
jarfile="${dist.dir}/${jar.name}Doc${version}.jar"
basedir="doc"/>
<jar
jarfile="${dist.dir}/${jar.name}Source${version}.jar"
basedir="src"/>
<copy
file="${dist.dir}/${jar.name}.jar"
tofile="${dist.dir}/${jar.name}${version}.jar" />
<!-- Sign Jar -->
<signjar
jar="${dist.dir}/${jar.name}${version}.jar"
alias="adempiere"
storepass="${password}"
keystore="../keystore/myKeystore"/>
</target>
</project>

5
looks/documentation.bat Normal file
View File

@ -0,0 +1,5 @@
@Rem API Documentation for Base
call ..\doc\documentation.bat src doc -private
@pause

15
looks/javadoc.xml Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="Looks" default="javadoc">
<target name="javadoc">
<javadoc destdir="doc" access="package" source="1.4" use="true"
notree="false" nonavbar="false" noindex="false"
splitindex="true" author="true" version="true"
nodeprecatedlist="false" nodeprecated="false"
packagenames="org.compiere.swing,org.compiere.util,org.compiere.plaf"
sourcepath="src" classpath="lib"
overview="C:\Adempiere\adempiere-all2\looks\overview.html"
doctitle="Adempiere&lt;sup&gt;TM&lt;/sup&gt; Looks API Documentation" additionalparam="-windowtitle &quot;Adempiere Looks 1.2.2 API Documentation&quot; -header &quot;&lt;b&gt;CLooks 1.2.2 &lt;/b&gt;&quot; -bottom &quot;Copyright (c) 1999-2003 ComPiere, Inc. - Author: Jorg Janke&quot;">
<link href="http://java.sun.com/j2se/1.4.2/docs/api"/>
</javadoc>
</target>
</project>

50
looks/overview.html Normal file
View File

@ -0,0 +1,50 @@
<html>
<head>
<title>Adempiere Looks Overview</title>
</head>
<body>
<p> <a href="http://www.adempiere.org/looks/index.html"> <img align="right" src="http://www.adempiere.org/looks/AdempiereLooks120x60.gif" width="120" height="60" alt="Adempiere Looks" border="0">
</a> Adempiere Looks is a 3D extension of the Java Metal Look and Feel. </p>
<p>For updates
check <a href="http://www.adempiere.org/looks/index.html">http://www.adempiere.org/looks</a>.</p>
<h2>Overview</h2>
<p>Adempiere Looks was inspired by the <a href="http://www.incors.org" target="_blank">Kunststoff</a>
Look and Feel and adds color capabilities as well as texture backgrounds. Adempiere
Looks is free and Open Source.</p>
<p>Adempiere Looks are based on Java 1.4.0.</p>
<p>Adempiere Looks Utilities allow you to change the Look and Feel of your application
by the individual user. This is not restricted to the standard and Adempiere
Looks, but also <a href="http://www.incors.org" target="_blank">Kunststoff</a>.
You can also define your own Theme.</p>
<p><b><a href="constant-values.html">Constants</a></b></p>
<h2>Start Options</h2>
<h3>Change the default Look &amp; Feel</h3>
<p>You can change the default Look &amp; Feel by editing or adding the file <a href="/looks/swing.properties">swing.properties</a>
in the folder $JAVA_HOME/jre/lib</p>
<h3>Start via AdempierePLAF</h3>
<p>You can change the Look &amp; Feel to the one selected by starting via CompmierePLAF.
Example:</p>
<pre> java -cp AdempiereLooks.jar;SwingSet2.jar
org.compiere.plaf.AdempierePLAF SwingSet2</pre>
<p>This tries to invoke the <i>main</i> method of the class of if not found the
constructor without parameters.</p>
<h3>Modify <i>main</i> Method</h3>
<p>Just add the line:</p>
<pre> AdempierePLAF.setPLAF();</pre>
<h3>Change the Look &amp; Feel</h3>
<p>You set the Look &amp; Feel by invoking the Adempiere PLAF Editor:</p>
<p>Stand alone:</p>
<pre> java -jar AdempiereLooks.jar
java -cp AdempiereLooks.jar org.compiere.plaf.AdempierePLAF</pre>
<p>or within your program by</p>
<pre> new AdempierePLAFEditor ();</pre>
<p>and from a Dialog or Frame to change the Look and Feel of your current windows
via</p>
<pre> new AdempierePLAFEditor (this);
</pre>
<p>You can also set the Adempiere Look directly:</p>
<pre> UIManager.setLookAndFeel
(new org.compiere.plaf.AdempiereLookAndFeel());</pre>
<p>&nbsp;</p>
</body>
</html>

3
looks/packages.txt Normal file
View File

@ -0,0 +1,3 @@
org.compiere.plaf
org.compiere.swing
org.compiere.util

View File

@ -0,0 +1,96 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution. The Initial
* Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke
* are Copyright (C) 1999-2005 Jorg Janke.
* All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.adempiere.plaf;
import java.awt.event.*;
import java.beans.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
/**
* Button Listener
*
* @author Jorg Janke
* @version $Id: CompiereButtonListener.java,v 1.1 2005/12/05 02:38:28 jjanke Exp $
*/
public class AdempiereButtonListener extends BasicButtonListener
{
/**
* Compiere Button Listener
* @param b button
*/
public AdempiereButtonListener (AbstractButton b)
{
super (b);
} // CompiereButtonListener
/**
* Install Keyboard Actions
* @param c component
*/
public void installKeyboardActions (JComponent c)
{
super.installKeyboardActions (c);
updateMnemonicBindingX ((AbstractButton)c);
} // installKeyboardActions
/**
* Property Change
* @param e event
*/
public void propertyChange (PropertyChangeEvent e)
{
String prop = e.getPropertyName();
if (prop == AbstractButton.MNEMONIC_CHANGED_PROPERTY)
updateMnemonicBindingX ((AbstractButton)e.getSource());
else
super.propertyChange (e);
} // propertyChange
/**
* Update Mnemonic Binding
* @param b button
*/
void updateMnemonicBindingX (AbstractButton b)
{
int m = b.getMnemonic();
if (m != 0)
{
InputMap map = SwingUtilities.getUIInputMap(b, JComponent.WHEN_IN_FOCUSED_WINDOW);
if (map == null)
{
map = new ComponentInputMapUIResource(b);
SwingUtilities.replaceUIInputMap(b, JComponent.WHEN_IN_FOCUSED_WINDOW, map);
}
map.clear();
String className = b.getClass().getName();
int mask = InputEvent.ALT_MASK; // Default Buttons
if (b instanceof JCheckBox // In Tab
|| className.indexOf("VButton") != -1)
mask = InputEvent.SHIFT_MASK + InputEvent.CTRL_MASK;
map.put(KeyStroke.getKeyStroke(m, mask, false), "pressed");
map.put(KeyStroke.getKeyStroke(m, mask, true), "released");
map.put(KeyStroke.getKeyStroke(m, 0, true), "released");
}
else
{
InputMap map = SwingUtilities.getUIInputMap(b, JComponent.WHEN_IN_FOCUSED_WINDOW);
if (map != null)
map.clear();
}
} // updateMnemonicBindingX
} // CompiereButtonListener

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,286 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution. The Initial
* Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke
* are Copyright (C) 1999-2005 Jorg Janke.
* All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.adempiere.plaf;
import java.awt.Color;
import java.util.logging.*;
import javax.swing.plaf.ColorUIResource;
/**
* Color Blind Utilities.
* These utilities help to show how color blind/challenged see colors.
*
* Created by Thomas Wolfmaier.
* Copyright (C) 1999-2005 HCIRN.
* All rights reserved.
* @see <a href="http://www.hcirn.com">HCIRN</a>
*
* @author Thomas Wolfmaier
* @version $Id: ColorBlind.java,v 1.8 2005/10/14 00:42:52 jjanke Exp $
*/
public class AdempiereColorBlind
{
/** Color Blindness Type - 0=none */
public static final String[] COLORBLIND_TYPE =
{"", "Protanopia", "Deuteranopia", "Tritanopia"};
public static final int NORMAL = 0;
public static final int PROTANOPIA = 1;
public static final int DEUTERANOPIA = 2;
public static final int TRITANOPIA = 3;
/*************************************************************************/
private static final double[][] confusionPoints =
{ {0.735, 0.265},
{1.140, -0.140},
{0.171, -0.003}
};
private static final double[][][] colorAxes =
{ {{0.115807, 0.073581}, {0.471899, 0.527051}},
{{0.102776, 0.102864}, {0.505845, 0.493211}},
{{0.045391, 0.294976}, {0.665764, 0.334011}}
};
private static final double[][] RGBtoXYZMatrix =
{ {0.430574, 0.341550, 0.178325},
{0.222015, 0.706655, 0.071330},
{0.020183, 0.129553, 0.939180}
};
private static final double[][] XYZtoRGBMatrix =
{ { 3.063218, -1.393325, -0.475802},
{-0.969243, 1.875966, 0.041555},
{ 0.067871, -0.228834, 1.069251}
};
private static final double[] whitePoint =
{ 0.312713, 0.329016, 0.358271
};
private static final double gamma = 2.2;
/** Color Blind Type */
private static int s_colorType = NORMAL;
/** Logger */
private static Logger log = Logger.getLogger(AdempiereColorBlind.class.getName());
/**
* Set Color Type for Color Blind view
* @param colorType (0 = none)
*/
public static void setColorType (int colorType)
{
if (colorType > 0 && colorType < 4)
s_colorType = colorType;
else
s_colorType = 0;
if (s_colorType != 0)
log.config(COLORBLIND_TYPE[colorType]);
} // setColorType
/**
* Get Color Type for Color Blind view
* @return colorType (0 = none)
*/
public static int getColorType ()
{
return s_colorType;
} // getColorType
/**************************************************************************
* Convert "normal" color to Dichromat Color based on set color type
* @param color Java Color object containing values for RGB
* @return Dichromat Color
*/
public static ColorUIResource getDichromatColorUIResource (ColorUIResource color)
{
if (s_colorType == NORMAL)
return color;
return new ColorUIResource(getDichromatColorUIResource (color, s_colorType));
} // convertToDichromatColorUIResource
/**
* Convert "normal" color to Dichromat Color
* @param color Java Color object containing values for RGB
* @param colorType PROTANOPIA = 1, DEUTERANOPIA = 2 or TRITANOPIA = 3 as declared above
* @return Dichromat Color
*/
public static Color getDichromatColorUIResource (ColorUIResource color, int colorType)
{
if (s_colorType == NORMAL)
return color;
return new ColorUIResource(getDichromatColor (color, s_colorType));
} // convertToDichromatColorUIResource
/**
* Convert "normal" color to Dichromat Color based on set color type
* @param color Java Color object containing values for RGB
* @return Dichromat Color
*/
public static Color getDichromatColor (Color color)
{
if (s_colorType == NORMAL)
return color;
return getDichromatColor (color, s_colorType);
} // convertToDichromatColor
/**
* Convert "normal" color to Dichromat Color
* @param color Java Color object containing values for RGB
* @param colorType PROTANOPIA = 1, DEUTERANOPIA = 2 or TRITANOPIA = 3 as declared above
* @return Dichromat Color
*/
public static Color getDichromatColor (Color color, int colorType)
{
// check type & return if not valid
int type = 0;
if (colorType > 0 && colorType < 4)
type = colorType;
// No conversion or no color
if (type == 0 || color == null)
return color;
type--; // correct to zero based
// Return white & black - not converted
if (color.equals(Color.black) || color.equals(Color.white))
return color;
double red = color.getRed();
double green = color.getGreen();
double blue = color.getBlue();
// System.out.println("Red: " + red + " Green: " + green + " Blue: " + blue);
double X = RGBtoXYZMatrix[0][0] * Math.pow(red / 255.0, gamma) +
RGBtoXYZMatrix[0][1] * Math.pow(green / 255.0, gamma) +
RGBtoXYZMatrix[0][2] * Math.pow(blue / 255.0, gamma);
double Y = RGBtoXYZMatrix[1][0] * Math.pow(red / 255.0, gamma) +
RGBtoXYZMatrix[1][1] * Math.pow(green / 255.0, gamma) +
RGBtoXYZMatrix[1][2] * Math.pow(blue / 255.0, gamma);
double Z = RGBtoXYZMatrix[2][0] * Math.pow(red / 255.0, gamma) +
RGBtoXYZMatrix[2][1] * Math.pow(green / 255.0, gamma) +
RGBtoXYZMatrix[2][2] * Math.pow(blue / 255.0, gamma);
// System.out.println("X: " + X + " Y: " + Y + " Z: " + Z);
double x = 0.0;
double y = 0.0;
if ((X + Y + Z) != 0.0)
{
x = X / (X + Y + Z);
y = Y / (X + Y + Z);
}
// System.out.println("x: " + x + " y: " + y + " Y: " + Y);
double Yn = Y;
double Xn = (whitePoint[0] * Yn) / whitePoint[1];
double Zn = (whitePoint[2] * Yn) / whitePoint[1];
double xc = confusionPoints[type][0];
double yc = confusionPoints[type][1];
double x1 = colorAxes[type][0][0];
double y1 = colorAxes[type][0][1];
double x2 = colorAxes[type][1][0];
double y2 = colorAxes[type][1][1];
double ap = (y2 - y1) / (x2 - x1);
double bp = y1 - (x1 * ap);
// System.out.println("ap: " + ap + " bp: " + bp);
double a;
if (x < xc)
a = (yc - y) / (xc - x);
else
a = (y - yc) / (x - xc);
double b = y - (x * a);
// System.out.println("a: " + a + " b: " + b);
x = (bp - b) / (a - ap);
y = a * x + b;
// System.out.println("x: " + x + " y: " + y);
X = 0.0;
Z = 0.0;
if (y != 0)
{
X = x * (Y / y);
Z = (1 - x - y) * (Y / y);
}
// System.out.println("X: " + X + " Y: " + Y + " Z: " + Z);
red = XYZtoRGBMatrix[0][0] * X +
XYZtoRGBMatrix[0][1] * Y +
XYZtoRGBMatrix[0][2] * Z;
green = XYZtoRGBMatrix[1][0] * X +
XYZtoRGBMatrix[1][1] * Y +
XYZtoRGBMatrix[1][2] * Z;
blue = XYZtoRGBMatrix[2][0] * X +
XYZtoRGBMatrix[2][1] * Y +
XYZtoRGBMatrix[2][2] * Z;
// System.out.println("Red: " + red + " Green: " + green + " Blue: " + blue);
double reddiff = XYZtoRGBMatrix[0][0] * (Xn - X) +
XYZtoRGBMatrix[0][1] * (Yn - Y) +
XYZtoRGBMatrix[0][2] * (Zn - Z);
double greendiff = XYZtoRGBMatrix[1][0] * (Xn - X) +
XYZtoRGBMatrix[1][1] * (Yn - Y) +
XYZtoRGBMatrix[1][2] * (Zn - Z);
double bluediff = XYZtoRGBMatrix[2][0] * (Xn - X) +
XYZtoRGBMatrix[2][1] * (Yn - Y) +
XYZtoRGBMatrix[2][2] * (Zn - Z);
double cr = ((red < 0.0 ? 0.0 : 1.0) - red) / reddiff;
double cg = ((green < 0.0 ? 0.0 : 1.0) - green) / greendiff;
double cb = ((blue < 0.0 ? 0.0 : 1.0) - blue) / bluediff;
// System.out.println("cr: " + cr + " cg: " + cg + " cb: " + cb);
double c1 = (cr < 0 || cr > 1) ? 0 : cr;
double c2 = (cg < 0 || cg > 1) ? 0 : cg;
double c3 = (cb < 0 || cb > 1) ? 0 : cb;
double c = Math.max(c1, Math.max(c2, c3));
// System.out.println("c: " + c);
red = red + c * reddiff;
green = green + c * greendiff;
blue = blue + c * bluediff;
// System.out.println("Red: " + red + " Green: " + green + " Blue: " + blue);
red = Math.pow(red, 1.0 / gamma);
green = Math.pow(green, 1.0 / gamma);
blue = Math.pow(blue, 1.0 / gamma);
// System.out.println("Red: " + red + " Green: " + green + " Blue: " + blue);
// System.out.println("Red: " + red * 255.0 + " Green: " + green * 255.0 + " Blue: " + blue * 255.0);
Color retValue = new Color((float)red, (float)green, (float)blue);
log.fine("Color " + color.getRed() + "-" + color.getGreen() + "-" + color.getBlue()
+ " -> " + retValue.getRed() + "-" + retValue.getGreen() + "-" + retValue.getBlue() + " <- " + COLORBLIND_TYPE[colorType]);
return retValue;
} // convertToDichromatColor
} // ColorBlind

View File

@ -0,0 +1,109 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution. The Initial
* Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke
* are Copyright (C) 1999-2005 Jorg Janke.
* All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.adempiere.plaf;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
import javax.swing.plaf.metal.*;
import org.compiere.plaf.AdempiereComboPopup;
/**
* Compiere ComboBox UI.
* The ComboBox is opaque - with opaque arrow button and textfield background
*
* @author Jorg Janke
* @version $Id: CompiereComboBoxUI.java,v 1.10 2005/10/09 19:01:37 jjanke Exp $
*/
public class AdempiereComboBoxUI extends com.jgoodies.looks.plastic.PlasticComboBoxUI
{
/**
* Create UI
* @param c
* @return new instance of CompiereComboBoxUI
*/
public static ComponentUI createUI(JComponent c)
{
return new AdempiereComboBoxUI();
} // CreateUI
/*************************************************************************/
static int s_no = 0;
/**
* Install UI - Set ComboBox opaque.
* Bug in Metal: arrowButton gets Mouse Events, so add the JComboBox
* MouseListeners to the arrowButton
* @see org.compiere.swing.CComboBox#addMouseListener(MouseListener)
* @param c componrnt
*/
public void installUI (JComponent c)
{
MouseListener[] ml = c.getMouseListeners();
super.installUI(c);
c.setOpaque(false);
//
for (int i = 0; i < ml.length; i++)
{
// System.out.println("adding " + c.getClass().getName());
arrowButton.addMouseListener(ml[i]);
}
} // installUI
/*************************************************************************/
/**
* Create opaque button
* @return opaque button
*/
protected JButton createArrowButton()
{
JButton button = super.createArrowButton();
button.setContentAreaFilled(false);
button.setOpaque(false);
return button;
} // createArrowButton
public JButton getArrowButton()
{
return arrowButton;
}
/**
* Set Icon of arrow button
* @param defaultIcon
*/
public void setIcon(Icon defaultIcon)
{
((MetalComboBoxButton)arrowButton).setComboIcon(defaultIcon);
} // setIcon
/*************************************************************************/
/**
* Create Popup
* @return AdempiereComboPopup
*/
protected ComboPopup createPopup()
{
AdempiereComboPopup newPopup = new AdempiereComboPopup( comboBox );
newPopup.getAccessibleContext().setAccessibleParent(comboBox);
return newPopup;
} // createPopup
} // AdempiereComboBoxUI

View File

@ -0,0 +1,153 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution. The Initial
* Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke
* are Copyright (C) 1999-2005 Jorg Janke.
* All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.adempiere.plaf;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
import sun.swing.*;
/**
* Compiere Label UI
*
* @author Jorg Janke
* @version $Id: CompiereLabelUI.java,v 1.2 2005/12/05 02:38:28 jjanke Exp $
*/
public class AdempiereLabelUI extends MetalLabelUI
{
/** Singleton */
protected static AdempiereLabelUI compiereLabelUI = new AdempiereLabelUI();
/**
* Create UI
* @param c component
* @return singleton
*/
public static AdempiereLabelUI createUI(JComponent c)
{
return compiereLabelUI;
} // createUI
/**
* Install Keyboard Actions
* @param l label
*/
protected void installKeyboardActions (JLabel l)
{
// super.installKeyboardActions(l);
int dka = l.getDisplayedMnemonic();
if (dka != 0)
{
Component lf = l.getLabelFor();
if (lf != null)
{
ActionMap actionMap = l.getActionMap();
actionMap.put(PRESS, ACTION_PRESS);
InputMap inputMap = SwingUtilities.getUIInputMap (l, JComponent.WHEN_IN_FOCUSED_WINDOW);
if (inputMap == null)
{
inputMap = new ComponentInputMapUIResource (l);
SwingUtilities.replaceUIInputMap (l, JComponent.WHEN_IN_FOCUSED_WINDOW, inputMap);
}
inputMap.clear ();
inputMap.put (KeyStroke.getKeyStroke (dka,
ActionEvent.SHIFT_MASK+ActionEvent.CTRL_MASK, false), PRESS);
}
}
} // installKeyboardActions
/** Action Name */
private static final String PRESS = "press";
/** Press Action */
private static PressAction ACTION_PRESS = new PressAction();
/**
* Compiere Label UI Actions
*/
private static class PressAction extends UIAction
{
PressAction ()
{
super (PRESS);
}
public void actionPerformed (ActionEvent e)
{
JLabel label = (JLabel)e.getSource ();
String key = getName ();
if (key == PRESS)
{
doPress (label);
}
} // actionPerformed
/**
* Do Press - Focus the Field
* @param label label
*/
private void doPress (JLabel label)
{
Component labelFor = label.getLabelFor ();
if (labelFor != null && labelFor.isEnabled ())
{
Component owner = label.getLabelFor ();
if (owner instanceof Container
&& ((Container)owner).isFocusCycleRoot ())
{
owner.requestFocus ();
}
else
{
if (owner instanceof Container)
{
Container container = (Container)owner;
if (container.isFocusCycleRoot())
{
FocusTraversalPolicy policy = container.getFocusTraversalPolicy();
Component comp = policy.getDefaultComponent(container);
if (comp != null)
{
comp.requestFocus();
return;
}
}
Container rootAncestor = container.getFocusCycleRootAncestor();
if (rootAncestor != null)
{
FocusTraversalPolicy policy = rootAncestor.getFocusTraversalPolicy();
Component comp = policy.getComponentAfter(rootAncestor, container);
if (comp != null && SwingUtilities.isDescendingFrom(comp, container))
{
comp.requestFocus();
return;
}
}
}
if (owner.isFocusable())
{
owner.requestFocus();
return;
}
// No Forcus
}
}
} // doPress
} // PressAction
} // CompiereLabelUI

View File

@ -0,0 +1,247 @@
/******************************************************************************
* The contents of this file are subject to the Compiere License Version 1.1
* ("License"); You may not use this file except in compliance with the License
* You may obtain a copy of the License at http://www.compiere.org/license.html
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
* The Original Code is Compiere ERP & CRM Smart Business Solution. The Initial
* Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke
* are Copyright (C) 1999-2005 Jorg Janke.
* All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved.
* Contributor(s): ______________________________________.
*****************************************************************************/
package org.adempiere.plaf;
import java.awt.*;
import javax.swing.*;
import javax.swing.plaf.metal.*;
/**
* Compiere Look & Feel.
* We wanted a nice UI not the battleship gray based stuff.
* I guess a matter of taste.
* <code>
* :
* UIManager.setLookAndFeel(new com.compiere.plaf.CompiereLookAndFeel());
* // or UIManager.setLookAndFeel("com.compiere.plaf.CompiereLookAndFeel");
* </code>
*
* @author Jorg Janke
* @version $Id: CompiereLookAndFeel.java,v 1.19 2005/12/05 02:38:28 jjanke Exp $
*/
public class AdempiereLookAndFeel extends com.jgoodies.looks.plastic.PlasticLookAndFeel
{
/**
* Constructor
*/
public AdempiereLookAndFeel()
{
super();
// System.setProperty("awt.visualbell", "true");
} // CompiereLookAndFeel
/** The name */
public static final String NAME = "Adempiere";
/** The Theme */
private static AdempiereTheme s_adempiereTheme = new org.adempiere.plaf.AdempiereTheme();
private static AdempiereTheme s_theme = s_adempiereTheme;
/** Paint Round Corners */
protected static boolean ROUND = false;
/**
* The Name
* @return Name
*/
public String getName()
{
return NAME;
} // getName
/**
* The ID
* @return Name
*/
public String getID()
{
return NAME;
} // getID
/**
* The Description
* @return description
*/
public String getDescription()
{
return "Adempiere Look & Feel - (c) 2001-2005 Victor Perez";
} // getDescription
/**************************************************************************
* Get/Create Defaults
* @return UI Defaults
*/
public UIDefaults getDefaults()
{
// System.out.println("CompiereLookAndFeel.getDefaults");
// Theme already created/set
//MetalLookAndFeel.setCurrentTheme(s_theme);
com.jgoodies.looks.plastic.PlasticLookAndFeel.setCurrentTheme(s_theme);
UIDefaults defaults = super.getDefaults(); // calls init..Defaults
return defaults;
} // getDefaults
/**
* Creates the mapping from UI class IDs to <code>ComponentUI</code> classes,
* putting the ID-<code>ComponentUI</code> pairs in the passed-in defaults table.
* Each <code>JComponent</code> class specifies its own UI class ID string.
*
* @param table UI Defaults
*/
protected void initClassDefaults(UIDefaults table)
{
//System.out.println("AdempiereLookAndFeel.initClassDefaults");
super.initClassDefaults( table);
// Overwrite
/*putDefault (table, "PanelUI");
putDefault (table, "ButtonUI");
putDefault (table, "ToggleButtonUI");
putDefault (table, "TabbedPaneUI");
putDefault (table, "TableHeaderUI");
putDefault (table, "RadioButtonUI");*/
//putDefault (table, "CheckBoxUI");
putDefault (table, "ComboBoxUI");
/*putDefault (table, "MenuUI");
putDefault (table, "MenuBarUI");
putDefault (table, "MenuItemUI");
putDefault (table, "CheckBoxMenuItemUI");
putDefault (table, "ToolBarUI");
putDefault (table, "RootPaneUI");
putDefault (table, "ViewportUI");
putDefault (table, "SplitPaneUI");
putDefault (table, "ScrollPaneUI");*/
putDefault (table, "LabelUI");
/*putDefault (table, "ToolTipUI");
putDefault (table, "TextAreaUI");*/
} // initClassDefaults
/**
* Put "uiKey - ClassName" pair in UIDefaults
* @param table
* @param uiKey
*/
private void putDefault (UIDefaults table, String uiKey)
{
try
{
String className = "org.adempiere.plaf.Adempiere" + uiKey;
table.put(uiKey, className);
}
catch (Exception ex)
{
ex.printStackTrace();
}
} // putDefault
/**
* For overwriting Component defaults
* @param table
*/
protected void initSystemColorDefaults (UIDefaults table)
{
// System.out.println("CompiereLookAndFeel.initSystemColorDefaults");
super.initSystemColorDefaults( table);
// we made the color a bit darker
// table.put("textHighlight", CompiereUtils.getTranslucentColor(getTextHighlightColor(), 128));
} // initSystemColorDefaults
/**
* For overwriting Component defaults
* @param table
*/
protected void initComponentDefaults (UIDefaults table)
{
// System.out.println("CompiereLookAndFeel.initComponentDefaults");
super.initComponentDefaults( table);
// ComboBox defaults
Color c = table.getColor("TextField.background");
table.put("ComboBox.background", c);
table.put("ComboBox.listBackground", c);
// globalqss
Class lf = com.jgoodies.looks.plastic.PlasticLookAndFeel.class;
table.put("Tree.openIcon", makeIcon(lf, "icons/TreeOpen.gif"));
table.put("Tree.closedIcon", makeIcon(lf, "icons/TreeClosed.gif"));
table.put("Tree.leafIcon", makeIcon(lf, "icons/TreeLeaf.gif"));
} // initComponentDefaults
/**************************************************************************
* Create Default Thems
*/
protected void createDefaultTheme()
{
setCurrentTheme(s_theme);
} // createDefaultTheme
/**
* Set Current Theme
* @param theme metal theme
*/
public static void setCurrentTheme (org.adempiere.plaf.AdempiereTheme theme)
{
if (theme != null)
s_theme = theme;
MetalLookAndFeel.setCurrentTheme(s_theme);
} // setCurrentTheme
/**
* Get Current Theme
* @return Metal Theme
*/
public static AdempiereTheme getCurrentTheme()
{
return s_theme;
} // getCurrentTheme
/**
* Get Compiere Theme
* @return Metal Theme
*/
public static AdempiereTheme getAdempiereTheme()
{
return s_adempiereTheme;
} // getCurrentTheme
/**
* Error Feedback.
* <p>
* Invoked when the user attempts an invalid operation,
* such as pasting into an uneditable <code>JTextField</code>
* that has focus.
* </p>
* <p>
* If the user has enabled visual error indication on
* the desktop, this method will flash the caption bar
* of the active window. The user can also set the
* property awt.visualbell=true to achieve the same
* results.
* </p>
* @param component Component the error occured in, may be
* null indicating the error condition is
* not directly associated with a
* <code>Component</code>.
*/
public void provideErrorFeedback (Component component)
{
super.provideErrorFeedback (component);
} // provideErrorFeedback
} // CompiereLookAndFeel

View File

@ -0,0 +1,638 @@
package org.adempiere.plaf;
import java.awt.Color;
import java.awt.Font;
import java.awt.SystemColor;
import java.util.logging.Logger;
import javax.swing.UIDefaults;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.FontUIResource;
//import org.compiere.plaf.ColorBlind;
import org.compiere.util.Ini;
import com.jgoodies.looks.plastic.PlasticScrollBarUI;
import com.jgoodies.looks.plastic.theme.*;
/**
* A theme based on GTK2-Gilouche and tango project iconset.
* It has been optimized to work with Suse SLED 10 default desktop settings.
*
*
* @author vpj-cd
* @version $Revision: 1.0 $
*/
public class AdempiereTheme extends com.jgoodies.looks.plastic.theme.DesertBluer {
/**
* Return Theme Name
* @return Theme Name
*/
public String getName()
{
return s_name;
} // getName
/**
* String Representation
* @return info
*/
public String toString ()
{
return getName();
} // toString
/** Static Initializer */
static
{
s_theme = new org.adempiere.plaf.AdempiereTheme();
}
/**
* Set Theme to current Metal Theme and copy it
*/
public static void setTheme ()
{
log.fine("");
org.adempiere.plaf.AdempiereTheme copyFrom = new org.adempiere.plaf.AdempiereTheme();
boolean flat = Ini.isPropertyBool(Ini.P_UI_FLAT);
setTheme (copyFrom, flat);
} // setTheme
/**
* Set Theme to current Metal Theme and copy it
* @param copyFrom theme
* @param flat flat colors
*/
public static void setTheme (org.adempiere.plaf.AdempiereTheme copyFrom, boolean flat)
{
if (copyFrom == null || copyFrom instanceof org.adempiere.plaf.AdempiereTheme)
return;
log.fine(copyFrom.getName() + " - Flat=" + flat);
// May not be correct, if Themes overwrites default methods
primary1 = copyFrom.getPrimaryControlDarkShadow();
primary2 = copyFrom.getPrimaryControlShadow();
primary3 = copyFrom.getPrimaryControl();
secondary1 = copyFrom.getControlDarkShadow();
secondary2 = copyFrom.getControlShadow();
secondary3 = copyFrom.getControl();
org.compiere.plaf.AdempierePanelUI.setDefaultBackground(new org.compiere.plaf.AdempiereColor(secondary3, flat));
white = copyFrom.getPrimaryControlHighlight();
black = copyFrom.getPrimaryControlInfo();
//
controlFont = copyFrom.getControlTextFont();
systemFont = copyFrom.getSystemTextFont();
userFont = copyFrom.getUserTextFont();
smallFont = copyFrom.getSubTextFont();
menuFont = copyFrom.getMenuTextFont();
windowFont = copyFrom.getWindowTitleFont();
} // setTheme
//-------------------------------------------------
/** Theme Name */
protected static String s_name = "Adempiere Theme";
public static final String NAME = s_name;
/** Logger */
protected static Logger log = Logger.getLogger(org.adempiere.plaf.AdempiereTheme.class.getName());
/** Active Theme */
protected static AdempiereTheme s_theme = null;
/** Blue 51,51,102 */
public static ColorUIResource primary0 = new ColorUIResource(103, 152, 203);
/** Blue 102, 102, 153 */
//protected static ColorUIResource primary1;
public static ColorUIResource primary1 = new ColorUIResource( 101, 138, 187);
/** Blue 153, 153, 204 */
public static ColorUIResource primary2 = new ColorUIResource(103, 152, 203);
/** Blue 204, 204, 255 */
public static ColorUIResource primary3= new ColorUIResource(233, 238, 245); //
/** Black */
public final ColorUIResource secondary0 = new ColorUIResource(0, 0, 0);
/** Gray 102, 102, 102 */
//protected static ColorUIResource secondary1;
public static ColorUIResource secondary1= new ColorUIResource(190, 179, 153);
/** Gray 153, 153, 153 */
//protected static ColorUIResource secondary2;
public static ColorUIResource secondary2= new ColorUIResource(246, 239, 224);
/** BlueGray 214, 224, 234 - background */
//protected static ColorUIResource secondary3;
public static ColorUIResource secondary3= new ColorUIResource(251, 248, 241);
/** White */
public final ColorUIResource secondary4 = new ColorUIResource(255, 255, 255);
/** Black */
public static ColorUIResource black = BLACK;
/** White */
public static ColorUIResource white = WHITE;
/** Background for mandatory fields */
public static ColorUIResource mandatory = new ColorUIResource(233, 238, 245); // blueish
/** Background for fields in error 180,220,143 */
public static ColorUIResource error = new ColorUIResource(220, 241, 203); // green ;
/** Background for inactive fields */
public static ColorUIResource inactive = new ColorUIResource(241,239,222); //234, 234, 234);
/** Background for info fields */
public static ColorUIResource info = new ColorUIResource(251, 248, 251); // somewhat white
/** Foreground Text OK */
public static ColorUIResource txt_ok =new ColorUIResource(0, 153, 255); // blue ;
/** Foreground Text Error */
public static ColorUIResource txt_error = new ColorUIResource(255, 0, 51); // red ;
/** Control font */
public static FontUIResource controlFont;
/** System font */
public static FontUIResource systemFont;
/** User font */
public static FontUIResource userFont;
/** Small font */
public static FontUIResource smallFont;
/** Window Title font */
public static FontUIResource windowFont;
/** Menu font */
public static FontUIResource menuFont;
/** Default Font */
public static final String FONT_DEFAULT = "Dialog";
/** Default Font Size */
public static final int FONT_SIZE = 12;
/**************************************************************************
* Get Primary 1 (blue in default Metal Theme)
* @return color
*/
public ColorUIResource getPrimary1()
{
return AdempiereColorBlind.getDichromatColorUIResource(primary1);
}
public ColorUIResource getPrimary2()
{
return AdempiereColorBlind.getDichromatColorUIResource(primary2);
}
public ColorUIResource getPrimary3()
{
return AdempiereColorBlind.getDichromatColorUIResource(primary3);
}
/**
* Get Seconary 1 (gray in default Metal Theme)
* @return color
*/
public ColorUIResource getSecondary0()
{
return AdempiereColorBlind.getDichromatColorUIResource(secondary0);
}
public ColorUIResource getSecondary1()
{
return AdempiereColorBlind.getDichromatColorUIResource(secondary1);
}
public ColorUIResource getSecondary2()
{
return AdempiereColorBlind.getDichromatColorUIResource(secondary2);
}
public ColorUIResource getSecondary3()
{
return AdempiereColorBlind.getDichromatColorUIResource(secondary3);
}
public ColorUIResource getSecondary4()
{
return AdempiereColorBlind.getDichromatColorUIResource(secondary4);
}
public ColorUIResource getBlack()
{
return AdempiereColorBlind.getDichromatColorUIResource(black);
}
public ColorUIResource getWhite()
{
return AdempiereColorBlind.getDichromatColorUIResource(white);
}
/**
* Control Font (plain)
* @return font
*/
protected static FontUIResource _getControlTextFont()
{
if (controlFont == null)
{
try
{
controlFont = new FontUIResource(Font.getFont("swing.plaf.metal.controlFont",
new Font(FONT_DEFAULT, Font.PLAIN, FONT_SIZE)));
}
catch (Exception e)
{
controlFont = new FontUIResource(FONT_DEFAULT, Font.PLAIN, FONT_SIZE);
}
}
return controlFont;
}
public FontUIResource getControlTextFont() {return _getControlTextFont();}
/**
* System Font
* @return font
*/
protected static FontUIResource _getSystemTextFont()
{
if (systemFont == null)
{
try
{
systemFont = new FontUIResource(Font.getFont("swing.plaf.metal.systemFont",
new Font(FONT_DEFAULT, Font.PLAIN, FONT_SIZE)));
}
catch (Exception e)
{
systemFont = new FontUIResource(FONT_DEFAULT, Font.PLAIN, FONT_SIZE);
}
}
return systemFont;
}
public FontUIResource getSystemTextFont() {return _getSystemTextFont();}
/**
* User Font
* @return font
*/
protected static FontUIResource _getUserTextFont()
{
if (userFont == null)
{
try
{
userFont = new FontUIResource(Font.getFont("swing.plaf.metal.userFont",
new Font(FONT_DEFAULT, Font.PLAIN, FONT_SIZE)));
}
catch (Exception e)
{
userFont = new FontUIResource(FONT_DEFAULT, Font.PLAIN, FONT_SIZE);
}
}
return userFont;
}
public FontUIResource getUserTextFont() {return _getUserTextFont();}
/**
* Menu
* @return font
*/
protected static FontUIResource _getMenuTextFont()
{
if (menuFont == null)
{
try
{
menuFont = new FontUIResource(Font.getFont("swing.plaf.metal.menuFont",
new Font(FONT_DEFAULT, Font.PLAIN, FONT_SIZE)));
}
catch (Exception e)
{
menuFont = new FontUIResource(FONT_DEFAULT, Font.PLAIN, FONT_SIZE);
}
}
return menuFont;
}
public FontUIResource getMenuTextFont() {return _getMenuTextFont();}
/**
* Window Title
* @return font
*/
protected static FontUIResource _getWindowTitleFont()
{
if (windowFont == null)
{
try
{
windowFont = new FontUIResource(Font.getFont("swing.plaf.metal.windowFont",
new Font(FONT_DEFAULT, Font.BOLD, FONT_SIZE+2)));
}
catch (Exception e)
{
windowFont = new FontUIResource(FONT_DEFAULT, Font.BOLD, FONT_SIZE+2);
}
}
return windowFont;
}
public FontUIResource getWindowTitleFont() {return _getWindowTitleFont();}
/**
* Sub Text
* @return font
*/
protected static FontUIResource _getSubTextFont()
{
if (smallFont == null)
{
try
{
smallFont = new FontUIResource(Font.getFont("swing.plaf.metal.smallFont",
new Font(FONT_DEFAULT, Font.PLAIN, FONT_SIZE-2)));
}
catch (Exception e)
{
smallFont = new FontUIResource(FONT_DEFAULT, Font.PLAIN, FONT_SIZE-2);
}
}
return smallFont;
}
public FontUIResource getSubTextFont() {return _getSubTextFont();}
// Static property info
private static final String P_Primary1 = "#ColorPrimary1";
private static final String P_Primary2 = "#ColorPrimary2";
private static final String P_Primary3 = "#ColorPrimary3";
private static final String P_Secondary1 = "#ColorSecondary1";
private static final String P_Secondary2 = "#ColorSecondary2";
private static final String P_Secondary3 = "#ColorSecondary3";
private static final String P_Black = "#ColorBlack";
private static final String P_White = "#ColorWhite";
private static final String P_Error = "#ColorError";
private static final String P_Info = "#ColorInfo";
private static final String P_Mandatory = "#ColorMandatory";
private static final String P_Inactive = "#ColorInactive";
private static final String P_Txt_OK = "#ColorTextOK";
private static final String P_Txt_Error = "#ColorTextError";
//
private static final String P_Control = "#FontControl";
private static final String P_System = "#FontSystem";
private static final String P_User = "#FontUser";
private static final String P_Small = "#FontSmall";
private static final String P_Window = "#FontWindow";
private static final String P_Menu = "#FontMenu";
/** Background Color */
protected static final String P_AdempiereColor = "#AdempiereColor";
/**
* Save information in Properties
*/
public static void save ()
{
//log.config(AdempiereColor.getDefaultBackground().toString());
//
Ini.setProperty(P_Primary1, getColorAsString(primary1));
Ini.setProperty(P_Primary2, getColorAsString(primary2));
Ini.setProperty(P_Primary3, getColorAsString(primary3));
Ini.setProperty(P_Secondary1, getColorAsString(secondary1));
Ini.setProperty(P_Secondary2, getColorAsString(secondary2));
Ini.setProperty(P_Secondary3, getColorAsString(secondary3));
Ini.setProperty(P_Error, getColorAsString(error));
Ini.setProperty(P_Info, getColorAsString(info));
Ini.setProperty(P_Mandatory, getColorAsString(mandatory));
Ini.setProperty(P_Inactive, getColorAsString(inactive));
Ini.setProperty(P_White, getColorAsString(white));
Ini.setProperty(P_Black, getColorAsString(black));
Ini.setProperty(P_Txt_OK, getColorAsString(txt_ok));
Ini.setProperty(P_Txt_Error, getColorAsString(txt_error));
//
Ini.setProperty(P_Control, ((Font)controlFont).toString());
Ini.setProperty(P_System, ((Font)systemFont).toString());
Ini.setProperty(P_User, ((Font)userFont).toString());
Ini.setProperty(P_Small, ((Font)smallFont).toString());
Ini.setProperty(P_Window, ((Font)windowFont).toString());
Ini.setProperty(P_Menu, ((Font)menuFont).toString());
//
//AdempiereColor cc = org.adempiere.plaf.AdempiereColor.getDefaultBackground();
//Ini.setProperty(P_CompiereColor, cc.toString());
} // save
/**
* Parses Color into String representation.
* Required as SystemColors and Alpha Colors have different formats
* @param c Color
* @return [r=102,g=102,b=153,a=255]
* @see #parseColor
*/
public static String getColorAsString (Color c)
{
if (c == null)
c = SystemColor.control;
StringBuffer sb = new StringBuffer("[r=").append(c.getRed())
.append(",g=").append(c.getGreen())
.append(",b=").append(c.getBlue())
.append(",a=").append(c.getAlpha())
.append("]");
// System.out.println(sb.toString());
return sb.toString();
} // getColorAsString
/**
* Load Properties from Ini
*/
public static void load ()
{
primary1 = parseColor (Ini.getProperty(P_Primary1), primary1);
primary2 = parseColor (Ini.getProperty(P_Primary2), primary2);
primary3 = parseColor (Ini.getProperty(P_Primary3), primary3);
secondary1 = parseColor (Ini.getProperty(P_Secondary1), secondary1);
secondary2 = parseColor (Ini.getProperty(P_Secondary2), secondary2);
secondary3 = parseColor (Ini.getProperty(P_Secondary3), secondary3);
error = parseColor(Ini.getProperty(P_Error), error);
info = parseColor(Ini.getProperty(P_Info), info);
mandatory = parseColor(Ini.getProperty(P_Mandatory), mandatory);
inactive = parseColor(Ini.getProperty(P_Inactive), inactive);
white = parseColor(Ini.getProperty(P_White), white);
black = parseColor(Ini.getProperty(P_Black), black);
txt_ok = parseColor(Ini.getProperty(P_Txt_OK), txt_ok);
txt_error = parseColor(Ini.getProperty(P_Txt_Error), txt_error);
//
controlFont = parseFont(Ini.getProperty(P_Control), controlFont);
systemFont = parseFont(Ini.getProperty(P_System), systemFont);
userFont = parseFont(Ini.getProperty(P_User), userFont);
smallFont = parseFont(Ini.getProperty(P_Small), smallFont);
windowFont = parseFont(Ini.getProperty(P_Window), windowFont);
menuFont = parseFont(Ini.getProperty(P_Menu), menuFont);
//
//AdempiereColor cc = AdempiereColor.parse(Ini.getProperty(P_AdempiereColor));
//AdempiereColor.setDefaultBackground(cc);
} // load
/**
* Set Default Colors
*/
public void setDefault()
{
} // setDefault
/**
* Reset Info in Properties
*/
public static void reset ()
{
/**
Ini.remove (P_Primary1);
Ini.remove (P_Primary2);
Ini.remove (P_Primary3);
Ini.remove (P_Secondary1);
Ini.remove (P_Secondary2);
Ini.remove (P_Secondary3);
Ini.remove (P_Error);
Ini.remove (P_Info);
Ini.remove (P_Mandatory);
Ini.remove (P_Inactive);
Ini.remove (P_White);
Ini.remove (P_Black);
Ini.remove (P_Txt_OK);
Ini.remove (P_Txt_Error);
//
Ini.remove (P_Control);
Ini.remove (P_System);
Ini.remove (P_User);
Ini.remove (P_Small);
Ini.remove (P_Window);
Ini.remove (P_Menu);
// CompiereColor
Ini.remove(P_CompiereColor);
**/
// Initialize
Ini.setProperty(Ini.P_UI_LOOK, org.adempiere.plaf.AdempiereLookAndFeel.NAME);
Ini.setProperty(Ini.P_UI_THEME, s_name);
//
if (s_theme != null)
s_theme.setDefault();
// Background
// CompiereColor cc = new CompiereColor(SystemColor.control); // flat Windows 212-208-200
// CompiereColor cc = new CompiereColor(secondary3); // flat Metal 204-204-204
//AdempiereColor cc = new AdempiereColor(secondary3, false);
//AdempiereColor.setDefaultBackground (cc);
//
save(); // save properties
} // reset
/**
* Parse Color.
* <p>
* Color - [r=102,g=102,b=153,a=0]
*
* @param information string information to be parsed
* @param stdColor color used if info cannot parsed
* @return color
* @see #getColorAsString
*/
protected static ColorUIResource parseColor (String information, ColorUIResource stdColor)
{
if (information == null
|| information.length() == 0
|| information.trim().length() == 0)
return stdColor;
// System.out.print("ParseColor=" + info);
try
{
int r = Integer.parseInt(information.substring(information.indexOf("r=")+2, information.indexOf(",g=")));
int g = Integer.parseInt(information.substring(information.indexOf("g=")+2, information.indexOf(",b=")));
int b = 0;
int a = 255;
if (information.indexOf("a=") == -1)
b = Integer.parseInt(information.substring(information.indexOf("b=")+2, information.indexOf("]")));
else
{
b = Integer.parseInt(information.substring(information.indexOf("b=")+2, information.indexOf(",a=")));
a = Integer.parseInt(information.substring(information.indexOf("a=")+2, information.indexOf("]")));
}
ColorUIResource retValue = new ColorUIResource(new Color(r, g, b, a));
// System.out.println(" - " + retValue.toString());
return retValue;
}
catch (Exception e)
{
log.config(information + " - cannot parse: " + e.toString());
}
return stdColor;
} // parseColor
/**
* Parse Font
* <p>
* javax.swing.plaf.FontUIResource[family=dialog.bold,name=Dialog,style=bold,size=12]
*
* @param information string information to be parsed
* @param stdFont font used if info cannot be parsed
* @return font
*/
private static FontUIResource parseFont(String information, FontUIResource stdFont)
{
if (information == null
|| information.length() == 0
|| information.trim().length() == 0)
return stdFont;
// System.out.print("ParseFont=" + info);
try
{
String name = information.substring(information.indexOf("name=")+5, information.indexOf(",style="));
String s = information.substring(information.indexOf("style=")+6, information.indexOf(",size="));
int style = Font.PLAIN;
if (s.equals("bold"))
style = Font.BOLD;
else if (s.equals("italic"))
style = Font.ITALIC;
else if (s.equals("bolditalic"))
style = Font.BOLD | Font.ITALIC;
int size = Integer.parseInt(information.substring(information.indexOf(",size=")+6, information.lastIndexOf("]")));
FontUIResource retValue = new FontUIResource(name,style,size);
// System.out.println(" - " + retValue.toString());
return retValue;
}
catch (Exception e)
{
log.config(information + " - cannot parse: " + e.toString());
}
return stdFont;
} // parseFont
//-----------------------------------------------------
public ColorUIResource getFocusColor() {
return getPrimary2();
}
public ColorUIResource getPrimaryControlShadow() {
return getPrimary3();
}
public ColorUIResource getMenuSelectedBackground() {
return getPrimary1();
}
public ColorUIResource getMenuSelectedForeground() {
return WHITE;
}
public ColorUIResource getMenuItemBackground() {
return WHITE;
}
public ColorUIResource getToggleButtonCheckColor() {
return new ColorUIResource( 220, 241, 203);
}
public void addCustomEntriesToTable(UIDefaults table) {
super.addCustomEntriesToTable(table);
Object[] uiDefaults =
{
"ScrollBar.thumbHighlight",
getPrimaryControlHighlight(),
PlasticScrollBarUI.MAX_BUMPS_WIDTH_KEY,
new Integer(22),
PlasticScrollBarUI.MAX_BUMPS_WIDTH_KEY, new Integer(30),
//"TabbedPane.selected", getWhite(),
"TabbedPane.selectHighlight", new ColorUIResource(231, 218, 188),
};
table.putDefaults(uiDefaults);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,81 @@
<html>
<head>
<title>Adempiere Public License</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<center>
<h1>ADEMPIERE PUBLIC LICENSE</h1>
<b>Version 1.2</b>
<p>Contact <a href="mailto:info@adempiere.org">info@adempiere.org</a> for licensing alternatives. </p>
<H1>GNU General Public License</H1>
<P>Version 2, June 1991 </P>
<PRE>Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
</PRE>
</center>
<H2 align="center">Preamble</H2>
<P>The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. </P>
<P>When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. </P>
<P>To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. </P>
<P>For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. </P>
<P>We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. </P>
<P>Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. </P>
<P>Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. </P>
<P>The precise terms and conditions for copying, distribution and modification follow. </P>
<H2 align="center">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</H2>
<P><STRONG>0.</STRONG> This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
<P>Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
<P><STRONG>1.</STRONG> You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
<P>You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
<P><STRONG>2.</STRONG> You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
<P>
<div>
<UL>
<LI><STRONG>a)</STRONG> You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
<LI>
<STRONG>b)</STRONG> You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
<LI>
<STRONG>c)</STRONG> If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
</UL>
</div>
<div>These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. </div>
<P>Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
<P>In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
<P><STRONG>3.</STRONG> You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
<div>
<UL>
<LI><STRONG>a)</STRONG> Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
<LI> <STRONG>b)</STRONG> Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
<LI>
<div><STRONG>c)</STRONG> Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) </div>
</LI>
</UL>
</div>
<div>The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. </div>
<P>If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
<P><STRONG>4.</STRONG> You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
<P><STRONG>5.</STRONG> You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
<P><STRONG>6.</STRONG> Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
<P><STRONG>7.</STRONG> If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
<P>If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
<P>It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
<P>This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
<P><STRONG>8.</STRONG> If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
<P><STRONG>9.</STRONG> The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
<P>Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
<P><STRONG>10.</STRONG> If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
<P><STRONG>NO WARRANTY</STRONG></P>
<P><STRONG>11.</STRONG> BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
<P><STRONG>12.</STRONG> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
<P>
<H2 align="center">END OF TERMS AND CONDITION</H2>
<p>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -0,0 +1,99 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.event.*;
import java.beans.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
/**
* Button Listener
*
* @author Jorg Janke
* @version $Id: AdempiereButtonListener.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereButtonListener extends BasicButtonListener
{
/**
* Adempiere Button Listener
* @param b button
*/
public AdempiereButtonListener (AbstractButton b)
{
super (b);
} // AdempiereButtonListener
/**
* Install Keyboard Actions
* @param c component
*/
public void installKeyboardActions (JComponent c)
{
super.installKeyboardActions (c);
updateMnemonicBindingX ((AbstractButton)c);
} // installKeyboardActions
/**
* Property Change
* @param e event
*/
public void propertyChange (PropertyChangeEvent e)
{
String prop = e.getPropertyName();
if (prop == AbstractButton.MNEMONIC_CHANGED_PROPERTY)
updateMnemonicBindingX ((AbstractButton)e.getSource());
else
super.propertyChange (e);
} // propertyChange
/**
* Update Mnemonic Binding
* @param b button
*/
void updateMnemonicBindingX (AbstractButton b)
{
int m = b.getMnemonic();
if (m != 0)
{
InputMap map = SwingUtilities.getUIInputMap(b, JComponent.WHEN_IN_FOCUSED_WINDOW);
if (map == null)
{
map = new ComponentInputMapUIResource(b);
SwingUtilities.replaceUIInputMap(b, JComponent.WHEN_IN_FOCUSED_WINDOW, map);
}
map.clear();
String className = b.getClass().getName();
int mask = InputEvent.ALT_MASK; // Default Buttons
if (b instanceof JCheckBox // In Tab
|| className.indexOf("VButton") != -1)
mask = InputEvent.SHIFT_MASK + InputEvent.CTRL_MASK;
map.put(KeyStroke.getKeyStroke(m, mask, false), "pressed");
map.put(KeyStroke.getKeyStroke(m, mask, true), "released");
map.put(KeyStroke.getKeyStroke(m, 0, true), "released");
}
else
{
InputMap map = SwingUtilities.getUIInputMap(b, JComponent.WHEN_IN_FOCUSED_WINDOW);
if (map != null)
map.clear();
}
} // updateMnemonicBindingX
} // AdempiereButtonListener

View File

@ -0,0 +1,132 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
import javax.swing.plaf.metal.*;
/**
* Button UI
*
* @author Jorg Janke
* @version $Id: AdempiereButtonUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereButtonUI extends MetalButtonUI
{
/**
* Static Create UI
* @param c
* @return Adempiere Button UI
*/
public static ComponentUI createUI (JComponent c)
{
return s_buttonUI;
} // createUI
/** UI shared */
private static AdempiereButtonUI s_buttonUI = new AdempiereButtonUI();
/**************************************************************************
* Install Defaults
* @param b
*/
public void installDefaults(AbstractButton b)
{
super.installDefaults(b);
b.setOpaque(false);
} // installDefaults
/**
* Update.
* This method is invoked by <code>JComponent</code> when the specified
* component is being painted.
*
* By default this method will fill the specified component with
* its background color (if its <code>opaque</code> property is
* <code>true</code>) and then immediately call <code>paint</code>.
*
* @param g the <code>Graphics</code> context in which to paint
* @param c the component being painted
*
* @see #paint
* @see javax.swing.JComponent#paintComponent
*/
public void update(Graphics g, JComponent c)
{
// System.out.println(c.getClass() + " ** " + ((JButton)c).getText() + " ** " + c.isOpaque());
if (c.isOpaque())
AdempiereUtils.fillRectange((Graphics2D)g, c, CompiereLookAndFeel.ROUND);
paint (g, c);
} // update
/**
* Paint 3D boxes
* @param g
* @param c
*/
public void paint (Graphics g, JComponent c)
{
super.paint( g, c);
AbstractButton b = (AbstractButton) c;
ButtonModel model = b.getModel();
boolean in = model.isPressed() || model.isSelected();
//
if (b.isBorderPainted())
AdempiereUtils.paint3Deffect((Graphics2D)g, c, CompiereLookAndFeel.ROUND, !in);
} // paint
/**
* Don't get selected Color - use default (otherwise the pressed button is gray)
* @param g
* @param b
*/
protected void paintButtonPressed(Graphics g, AbstractButton b)
{
// if (b.isContentAreaFilled())
// {
// Dimension size = b.getSize();
// g.setColor(getSelectColor());
// g.fillRect(0, 0, size.width, size.height);
// }
} // paintButtonPressed
/**
* Is Tool Bar Button
* @param c
* @return true if toolbar
*/
boolean isToolBarButton(JComponent c)
{
return (c.getParent() instanceof JToolBar);
} // isToolBarButton
/**
* Create Button Listener
* @param b button
* @return listener
*/
protected BasicButtonListener createButtonListener (AbstractButton b)
{
return new AdempiereButtonListener(b);
} // createButtonListener
} // AdempiereButtonUI

View File

@ -0,0 +1,51 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
/**
* Menu Check Box UI
*
* @author Jorg Janke
* @version $Id: AdempiereCheckBoxMenuItemUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereCheckBoxMenuItemUI extends BasicCheckBoxMenuItemUI
{
/**
* Create own instance
* @param c compoment
* @return AdempiereMenuBarUI
*/
public static ComponentUI createUI(JComponent c)
{
return new AdempiereMenuItemUI();
} // createUI
/**
* Install UI
* @param c
*/
public void installUI (JComponent c)
{
super.installUI(c);
c.setOpaque(false); // use MenuBarUI background
} // installUI
} // AdempiereCheckBoxMenuItemUI

View File

@ -0,0 +1,67 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import javax.swing.AbstractButton;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.*;
import javax.swing.plaf.metal.MetalCheckBoxUI;
/**
* Check Box UI
*
* @author Jorg Janke
* @version $Id: AdempiereCheckBoxUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereCheckBoxUI extends MetalCheckBoxUI
{
/**
* Create UI
* @param b
* @return ComponentUI
*/
public static ComponentUI createUI (JComponent b)
{
return s_checkBoxUI;
} // createUI
/** UI shared */
private static AdempiereCheckBoxUI s_checkBoxUI = new AdempiereCheckBoxUI();
/**************************************************************************
* Install Defaults
* @param b
*/
public void installDefaults (AbstractButton b)
{
super.installDefaults(b);
b.setOpaque(false);
} // installDefaults
/**
* Create Button Listener
* @param b button
* @return listener
*/
protected BasicButtonListener createButtonListener (AbstractButton b)
{
return new AdempiereButtonListener(b);
} // createButtonListener
} // AdempiereCheckBoxUI

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,660 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import java.awt.event.*;
import java.beans.*;
import java.util.*;
import javax.swing.*;
import org.compiere.swing.*;
import org.compiere.util.*;
/**
* Adempiere Color Editor
*
* @author Jorg Janke
* @version $Id: AdempiereColorEditor.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereColorEditor extends CDialog
implements ActionListener, PropertyEditor
{
/**
* Get Background AdempiereColor
* @param owner owner
* @param color optional initial color
* @return AdempiereColor
*/
public static AdempiereColor showDialog (Frame owner, AdempiereColor color)
{
AdempiereColorEditor cce = new AdempiereColorEditor (owner, color);
if (cce.isSaved())
return cce.getColor();
return color;
} // showDialog
/**
* Get Background AdempiereColor
* @param owner owner
* @param color optional initial color
* @return AdempiereColor
*/
public static AdempiereColor showDialog (Dialog owner, AdempiereColor color)
{
AdempiereColorEditor cce = new AdempiereColorEditor (owner, color);
if (cce.isSaved())
return cce.getColor();
return color;
} // showIt
/*************************************************************************/
/**
* Create AdempiereColor Dialog with color
* @param owner owner
* @param color Start Color
*/
public AdempiereColorEditor (Frame owner, AdempiereColor color)
{
super(owner, "", true);
init (color);
} // AdempiereColorEditor
/**
* Create AdempiereColor Dialog with color
* @param owner owner
* @param color Start Color
*/
public AdempiereColorEditor (Dialog owner, AdempiereColor color)
{
super(owner, "", true);
init (color);
} // AdempiereColorEditor
/**
* Init Dialog
* @param color Start Color
*/
private void init (AdempiereColor color)
{
try
{
jbInit();
}
catch(Exception e)
{
e.printStackTrace();
}
bOK.addActionListener(this);
bCancel.addActionListener(this);
typeField.addActionListener(this);
flatField.addActionListener(this);
gradientUpper.addActionListener(this);
gradientLower.addActionListener(this);
urlField.addActionListener(this);
alphaField.addActionListener(this);
taintColor.addActionListener(this);
lineColor.addActionListener(this);
backColor.addActionListener(this);
widthField.addActionListener(this);
distanceField.addActionListener(this);
gradientStartField.addActionListener(this);
gradientDistanceField.addActionListener(this);
if (color == null)
setColor (m_cc);
else
setColor (new AdempiereColor(color));
AdempierePLAF.showCenterScreen(this);
} // init
private static ResourceBundle res = ResourceBundle.getBundle("org.compiere.plaf.PlafRes");
private AdempiereColor m_cc = null;
private boolean m_saved = false;
private boolean m_setting = false;
//
private CPanel northPanel = new CPanel();
private CPanel southPanel = new CPanel();
private CButton bOK = AdempierePLAF.getOKButton();
private CButton bCancel = AdempierePLAF.getCancelButton();
private FlowLayout southLayout = new FlowLayout();
private GridBagLayout northLayout = new GridBagLayout();
private CLabel typeLabel = new CLabel();
private CComboBox typeField = new CComboBox(AdempiereColor.TYPES);
private CButton gradientUpper = new CButton();
private CButton gradientLower = new CButton();
private CLabel urlLabel = new CLabel();
private CTextField urlField = new CTextField(30);
private CLabel alphaLabel = new CLabel();
private CTextField alphaField = new CTextField(10);
private CButton taintColor = new CButton();
private CButton lineColor = new CButton();
private CButton backColor = new CButton();
private CLabel widthLabel = new CLabel();
private CTextField widthField = new CTextField(10);
private CLabel distanceLabel = new CLabel();
private CTextField distanceField = new CTextField(10);
private CPanel centerPanel = new CPanel();
private CButton flatField = new CButton();
private CComboBox gradientStartField = new CComboBox(AdempiereColor.GRADIENT_SP);
private CTextField gradientDistanceField = new CTextField(10);
private CLabel gradientStartLabel = new CLabel();
private CLabel gradientDistanceLabel = new CLabel();
/**
* Static Layout.
* <pre>
* - northPanel
* - labels & fields
* - centerPanel
* - southPanel
* </pre>
* @throws Exception
*/
private void jbInit() throws Exception
{
this.setTitle(res.getString("AdempiereColorEditor"));
southPanel.setLayout(southLayout);
southLayout.setAlignment(FlowLayout.RIGHT);
northPanel.setLayout(northLayout);
typeLabel.setText(res.getString("AdempiereType"));
gradientUpper.setText(res.getString("GradientUpperColor"));
gradientLower.setText(res.getString("GradientLowerColor"));
gradientStartLabel.setText(res.getString("GradientStart"));
gradientDistanceLabel.setText(res.getString("GradientDistance"));
urlLabel.setText(res.getString("TextureURL"));
alphaLabel.setText(res.getString("TextureAlpha"));
taintColor.setText(res.getString("TextureTaintColor"));
lineColor.setText(res.getString("LineColor"));
backColor.setText(res.getString("LineBackColor"));
widthLabel.setText(res.getString("LineWidth"));
distanceLabel.setText(res.getString("LineDistance"));
flatField.setText(res.getString("FlatColor"));
centerPanel.setBorder(BorderFactory.createRaisedBevelBorder());
centerPanel.setPreferredSize(new Dimension(400, 200));
centerPanel.setOpaque(true);
northPanel.setPreferredSize(new Dimension(400, 150));
southPanel.add(bCancel, null);
this.getContentPane().add(northPanel, BorderLayout.NORTH);
southPanel.add(bOK, null);
this.getContentPane().add(southPanel, BorderLayout.SOUTH);
this.getContentPane().add(centerPanel, BorderLayout.CENTER);
northPanel.add(typeLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(typeField, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 0, 5), 0, 0));
northPanel.add(gradientLower, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(urlField, new GridBagConstraints(1, 5, 2, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(alphaLabel, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(alphaField, new GridBagConstraints(1, 6, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(taintColor, new GridBagConstraints(1, 7, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(backColor, new GridBagConstraints(1, 8, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(widthLabel, new GridBagConstraints(0, 9, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(widthField, new GridBagConstraints(1, 9, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(distanceLabel, new GridBagConstraints(0, 10, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(distanceField, new GridBagConstraints(1, 10, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(flatField, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(gradientStartField, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(gradientDistanceField, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(urlLabel, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(gradientStartLabel, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(gradientDistanceLabel, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(gradientUpper, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
northPanel.add(lineColor, new GridBagConstraints(0, 8, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
} // jbInit
/**
* Action Listener
* @param e event
*/
public void actionPerformed(ActionEvent e)
{
if (m_setting)
return;
if (e.getSource() == bOK)
{
m_saved = true;
dispose();
return;
}
else if (e.getSource() == bCancel)
{
dispose();
return;
}
/**** Field Changes ****/
try
{
// Type
if (e.getSource() == typeField)
cmd_type();
// Flat
else if (e.getSource() == flatField)
m_cc.setFlatColor(JColorChooser.showDialog
(this, flatField.getText(), m_cc.getFlatColor()));
// Gradient
else if (e.getSource() == gradientUpper)
m_cc.setGradientUpperColor(JColorChooser.showDialog
(this, gradientUpper.getText(), m_cc.getGradientUpperColor()));
else if (e.getSource() == gradientLower)
m_cc.setGradientLowerColor(JColorChooser.showDialog
(this, gradientLower.getText(), m_cc.getGradientLowerColor()));
else if (e.getSource() == gradientStartField)
m_cc.setGradientStartPoint
(((KeyNamePair)gradientStartField.getSelectedItem()).getKey());
else if (e.getSource() == gradientDistanceField)
m_cc.setGradientRepeatDistance(gradientDistanceField.getText());
// Texture
else if (e.getSource() == urlField)
m_cc.setTextureURL(urlField.getText());
else if (e.getSource() == alphaField)
m_cc.setTextureCompositeAlpha(alphaField.getText());
else if (e.getSource() == taintColor)
m_cc.setTextureTaintColor(JColorChooser.showDialog
(this, taintColor.getText(), m_cc.getTextureTaintColor()));
// Lines
else if (e.getSource() == lineColor)
m_cc.setLineColor(JColorChooser.showDialog
(this, lineColor.getText(), m_cc.getLineColor()));
else if (e.getSource() == backColor)
m_cc.setLineBackColor(JColorChooser.showDialog
(this, backColor.getText(), m_cc.getLineBackColor()));
else if (e.getSource() == widthField)
m_cc.setLineWidth(widthField.getText());
else if (e.getSource() == distanceField)
m_cc.setLineDistance(distanceField.getText());
}
catch (Exception ee)
{
}
setColor (m_cc);
} // actionPerformed
/**
* Set Type with default values
*/
private void cmd_type()
{
ValueNamePair vp = (ValueNamePair)typeField.getSelectedItem();
if (vp.getValue().equals(AdempiereColor.TYPE_FLAT))
m_cc = new AdempiereColor(AdempiereColor.TYPE_FLAT);
else if (vp.getValue().equals(AdempiereColor.TYPE_GRADIENT))
m_cc = new AdempiereColor(AdempiereColor.TYPE_GRADIENT);
else if (vp.getValue().equals(AdempiereColor.TYPE_TEXTURE))
m_cc = new AdempiereColor(AdempiereColor.TYPE_TEXTURE);
else if (vp.getValue().equals(AdempiereColor.TYPE_LINES))
m_cc = new AdempiereColor(AdempiereColor.TYPE_LINES);
setColor (m_cc);
} // cmd_type
/**
* Set Color and update UI
* @param color color
*/
public void setColor (AdempiereColor color)
{
if (color == null && m_cc != null)
return;
//
// System.out.println("AdempiereColorEditor.setColor " + color);
m_cc = color;
if (m_cc == null)
m_cc = AdempierePanelUI.getDefaultBackground();
// update display
updateFields();
centerPanel.setBackgroundColor(m_cc);
centerPanel.repaint();
} // setColor
/**
* UpdateField from AdempiereColor
*/
private void updateFields()
{
m_setting = true;
// Type
for (int i = 0; i < AdempiereColor.TYPES.length; i++)
{
if (m_cc.getType().equals(AdempiereColor.TYPE_VALUES[i]))
{
typeField.setSelectedItem(AdempiereColor.TYPES[i]);
break;
}
}
//
if (m_cc.isFlat())
{
flatField.setVisible(true);
gradientUpper.setVisible(false);
gradientLower.setVisible(false);
gradientStartLabel.setVisible(false);
gradientDistanceLabel.setVisible(false);
gradientStartField.setVisible(false);
gradientDistanceField.setVisible(false);
urlLabel.setVisible(false);
urlField.setVisible(false);
alphaLabel.setVisible(false);
alphaField.setVisible(false);
taintColor.setVisible(false);
lineColor.setVisible(false);
backColor.setVisible(false);
widthLabel.setVisible(false);
widthField.setVisible(false);
distanceLabel.setVisible(false);
distanceField.setVisible(false);
//
flatField.setBackground(m_cc.getFlatColor());
}
else if (m_cc.isGradient())
{
flatField.setVisible(false);
gradientUpper.setVisible(true);
gradientLower.setVisible(true);
gradientStartLabel.setVisible(true);
gradientDistanceLabel.setVisible(true);
gradientStartField.setVisible(true);
gradientDistanceField.setVisible(true);
urlLabel.setVisible(false);
urlField.setVisible(false);
alphaLabel.setVisible(false);
alphaField.setVisible(false);
taintColor.setVisible(false);
lineColor.setVisible(false);
backColor.setVisible(false);
widthLabel.setVisible(false);
widthField.setVisible(false);
distanceLabel.setVisible(false);
distanceField.setVisible(false);
//
gradientUpper.setBackground(m_cc.getGradientUpperColor());
gradientLower.setBackground(m_cc.getGradientLowerColor());
gradientDistanceField.setText(String.valueOf(m_cc.getGradientRepeatDistance()));
for (int i = 0; i < AdempiereColor.GRADIENT_SP.length; i++)
{
if (m_cc.getGradientStartPoint() == AdempiereColor.GRADIENT_SP_VALUES[i])
{
gradientStartField.setSelectedItem(AdempiereColor.GRADIENT_SP[i]);
break;
}
}
}
else if (m_cc.isTexture())
{
flatField.setVisible(false);
gradientUpper.setVisible(false);
gradientLower.setVisible(false);
gradientStartLabel.setVisible(false);
gradientDistanceLabel.setVisible(false);
gradientStartField.setVisible(false);
gradientDistanceField.setVisible(false);
urlLabel.setVisible(true);
urlField.setVisible(true);
alphaLabel.setVisible(true);
alphaField.setVisible(true);
taintColor.setVisible(true);
lineColor.setVisible(false);
backColor.setVisible(false);
widthLabel.setVisible(false);
widthField.setVisible(false);
distanceLabel.setVisible(false);
distanceField.setVisible(false);
//
urlField.setText(m_cc.getTextureURL().toString());
alphaField.setText(String.valueOf(m_cc.getTextureCompositeAlpha()));
taintColor.setBackground(m_cc.getTextureTaintColor());
}
else if (m_cc.isLine())
{
flatField.setVisible(false);
gradientUpper.setVisible(false);
gradientLower.setVisible(false);
gradientStartLabel.setVisible(false);
gradientDistanceLabel.setVisible(false);
gradientStartField.setVisible(false);
gradientDistanceField.setVisible(false);
urlLabel.setVisible(false);
urlField.setVisible(false);
alphaLabel.setVisible(false);
alphaField.setVisible(false);
taintColor.setVisible(false);
lineColor.setVisible(true);
backColor.setVisible(true);
widthLabel.setVisible(true);
widthField.setVisible(true);
distanceLabel.setVisible(true);
distanceField.setVisible(true);
//
lineColor.setBackground(m_cc.getLineColor());
backColor.setBackground(m_cc.getLineBackColor());
widthField.setText(String.valueOf(m_cc.getLineWidth()));
distanceField.setText(String.valueOf(m_cc.getLineDistance()));
}
m_setting = false;
} // updateFields
/**
* Get Color
* @return Color, when saved - else null
*/
public AdempiereColor getColor()
{
return m_cc;
} // getColor
/**
* Was the selection saved
* @return true if saved
*/
public boolean isSaved()
{
return m_saved;
} // m_saved
/*************************************************************************/
/**
* Set (or change) the object that is to be edited. Primitive types such
* as "int" must be wrapped as the corresponding object type such as
* "java.lang.Integer".
*
* @param value The new target object to be edited. Note that this
* object should not be modified by the PropertyEditor, rather
* the PropertyEditor should create a new object to hold any
* modified value.
*/
public void setValue(Object value)
{
if (value != null && value instanceof AdempiereColor)
setColor (new AdempiereColor((AdempiereColor)value));
else
throw new IllegalArgumentException("AdempiereColorEditor.setValue requires AdempiereColor");
} // setValue
/**
* Gets the property value.
*
* @return The value of the property. Primitive types such as "int" will
* be wrapped as the corresponding object type such as "java.lang.Integer".
*/
public Object getValue()
{
return getColor();
} // getColor
/**
* Determines whether this property editor is paintable.
* @return True if the class will honor the paintValue method.
*/
public boolean isPaintable()
{
return false;
}
/**
* Paint a representation of the value into a given area of screen
* real estate. Note that the propertyEditor is responsible for doing
* its own clipping so that it fits into the given rectangle.
* <p>
* If the PropertyEditor doesn't honor paint requests (see isPaintable)
* this method should be a silent noop.
* <p>
* The given Graphics object will have the default font, color, etc of
* the parent container. The PropertyEditor may change graphics attributes
* such as font and color and doesn't need to restore the old values.
*
* @param gfx Graphics object to paint into.
* @param box Rectangle within graphics object into which we should paint.
*/
public void paintValue(Graphics gfx, Rectangle box)
{
/**@todo: Implement this java.beans.PropertyEditor method*/
throw new java.lang.UnsupportedOperationException("Method paintValue() not yet implemented.");
} // paintValue
/**
* This method is intended for use when generating Java code to set
* the value of the property. It should return a fragment of Java code
* that can be used to initialize a variable with the current property
* value.
* <p>
* Example results are "2", "new Color(127,127,34)", "Color.orange", etc.
*
* @return A fragment of Java code representing an initializer for the
* current value.
*/
public String getJavaInitializationString()
{
return "new AdempiereColor()";
} // String getJavaInitializationString
/**
* Gets the property value as text.
*
* @return The property value as a human editable string.
* <p> Returns null if the value can't be expressed as an editable string.
* <p> If a non-null value is returned, then the PropertyEditor should
* be prepared to parse that string back in setAsText().
*/
public String getAsText()
{
return m_cc.toString();
} // getAsText
/**
* Set the property value by parsing a given String. May raise
* java.lang.IllegalArgumentException if either the String is
* badly formatted or if this kind of property can't be expressed
* as text.
* @param text The string to be parsed.
* @throws IllegalArgumentException
*/
public void setAsText(String text) throws java.lang.IllegalArgumentException
{
throw new java.lang.IllegalArgumentException("AdempiereColorEditor.setAsText not supported");
} // setAsText
/**
* If the property value must be one of a set of known tagged values,
* then this method should return an array of the tags. This can
* be used to represent (for example) enum values. If a PropertyEditor
* supports tags, then it should support the use of setAsText with
* a tag value as a way of setting the value and the use of getAsText
* to identify the current value.
*
* @return The tag values for this property. May be null if this
* property cannot be represented as a tagged value.
*/
public String[] getTags()
{
return null;
} // getTags
/**
* A PropertyEditor may choose to make available a full custom Component
* that edits its property value. It is the responsibility of the
* PropertyEditor to hook itself up to its editor Component itself and
* to report property value changes by firing a PropertyChange event.
* <P>
* The higher-level code that calls getCustomEditor may either embed
* the Component in some larger property sheet, or it may put it in
* its own individual dialog, or ...
*
* @return A java.awt.Component that will allow a human to directly
* edit the current property value. May be null if this is
* not supported.
*/
public Component getCustomEditor()
{
return this;
} // getCustomEditor
/**
* Determines whether this property editor supports a custom editor.
* @return True if the propertyEditor can provide a custom editor.
*/
public boolean supportsCustomEditor()
{
return true;
} // supportsCustomEditor
/**
* Register a listener for the PropertyChange event. When a
* PropertyEditor changes its value it should fire a PropertyChange
* event on all registered PropertyChangeListeners, specifying the
* null value for the property name and itself as the source.
*
* @param listener An object to be invoked when a PropertyChange
* event is fired.
*/
public void addPropertyChangeListener(PropertyChangeListener listener)
{
super.addPropertyChangeListener(listener);
} // addPropertyChangeListener
/**
* Remove a listener for the PropertyChange event.
* @param listener The PropertyChange listener to be removed.
*/
public void removePropertyChangeListener(PropertyChangeListener listener)
{
super.removePropertyChangeListener(listener);
} // removePropertyChangeListener
} // AdempiereColorEditor

View File

@ -0,0 +1,110 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
import javax.swing.plaf.metal.*;
/**
* Adempiere ComboBox UI.
* The ComboBox is opaque - with opaque arrow button and textfield background
*
* @author Jorg Janke
* @version $Id: AdempiereComboBoxUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereComboBoxUI extends MetalComboBoxUI
{
/**
* Create UI
* @param c
* @return new instance of AdempiereComboBoxUI
*/
public static ComponentUI createUI(JComponent c)
{
return new AdempiereComboBoxUI();
} // CreateUI
/*************************************************************************/
static int s_no = 0;
/**
* Install UI - Set ComboBox opaque.
* Bug in Metal: arrowButton gets Mouse Events, so add the JComboBox
* MouseListeners to the arrowButton
* @see org.compiere.swing.CComboBox#addMouseListener(MouseListener)
* @param c componrnt
*/
public void installUI (JComponent c)
{
MouseListener[] ml = c.getMouseListeners();
super.installUI(c);
c.setOpaque(false);
//
for (int i = 0; i < ml.length; i++)
{
// System.out.println("adding " + c.getClass().getName());
arrowButton.addMouseListener(ml[i]);
}
} // installUI
/*************************************************************************/
/**
* Create opaque button
* @return opaque button
*/
protected JButton createArrowButton()
{
JButton button = super.createArrowButton();
button.setContentAreaFilled(false);
button.setOpaque(false);
return button;
} // createArrowButton
public JButton getArrowButton()
{
return arrowButton;
}
/**
* Set Icon of arrow button
* @param defaultIcon
*/
public void setIcon(Icon defaultIcon)
{
((MetalComboBoxButton)arrowButton).setComboIcon(defaultIcon);
} // setIcon
/*************************************************************************/
/**
* Create Popup
* @return AdempiereComboPopup
*/
protected ComboPopup createPopup()
{
AdempiereComboPopup newPopup = new AdempiereComboPopup( comboBox );
newPopup.getAccessibleContext().setAccessibleParent(comboBox);
return newPopup;
} // createPopup
} // AdempiereComboBoxUI

View File

@ -0,0 +1,74 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import javax.swing.*;
import javax.swing.plaf.basic.*;
import org.compiere.swing.*;
/**
* Adempiere Combo Popup - allows to prevent the display of the popup
*
* @author Jorg Janke
* @version $Id: AdempiereComboPopup.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereComboPopup extends BasicComboPopup
{
/**
* Constructor
* @param combo
*/
public AdempiereComboPopup(JComboBox combo)
{
super(combo);
} // AdempiereComboPopup
/**
* Conditionally show the Popup.
* If the combo is a CComboBox/CField, the return value of the
* method displayPopup determines if the popup is actually displayed
* @see CComboBox#displayPopup()
* @see CField#displayPopup()
*/
public void show()
{
// Check ComboBox if popup should be displayed
if (comboBox instanceof CComboBox && !((CComboBox)comboBox).displayPopup())
return;
// Check Field if popup should be displayed
if (comboBox instanceof CField && !((CField)comboBox).displayPopup())
return;
super.show();
} // show
/**
* Inform CComboBox and CField that Popup was hidden
* @see CComboBox.hidingPopup
* @see CField.hidingPopup
*
public void hide()
{
super.hide();
// Inform ComboBox that popup was hidden
if (comboBox instanceof CComboBox)
(CComboBox)comboBox).hidingPopup();
else if (comboBox instanceof CComboBox)
(CComboBox)comboBox).hidingPopup();
} // hided
/**/
} // AdempiereComboPopup

View File

@ -0,0 +1,156 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
import sun.swing.*;
/**
* Adempiere Label UI
*
* @author Jorg Janke
* @version $Id: AdempiereLabelUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereLabelUI extends MetalLabelUI
{
/** Singleton */
protected static AdempiereLabelUI adempiereLabelUI = new AdempiereLabelUI();
/**
* Create UI
* @param c component
* @return singleton
*/
public static AdempiereLabelUI createUI(JComponent c)
{
return adempiereLabelUI;
} // createUI
/**
* Install Keyboard Actions
* @param l label
*/
protected void installKeyboardActions (JLabel l)
{
// super.installKeyboardActions(l);
int dka = l.getDisplayedMnemonic();
if (dka != 0)
{
Component lf = l.getLabelFor();
if (lf != null)
{
ActionMap actionMap = l.getActionMap();
actionMap.put(PRESS, ACTION_PRESS);
InputMap inputMap = SwingUtilities.getUIInputMap (l, JComponent.WHEN_IN_FOCUSED_WINDOW);
if (inputMap == null)
{
inputMap = new ComponentInputMapUIResource (l);
SwingUtilities.replaceUIInputMap (l, JComponent.WHEN_IN_FOCUSED_WINDOW, inputMap);
}
inputMap.clear ();
inputMap.put (KeyStroke.getKeyStroke (dka,
ActionEvent.SHIFT_MASK+ActionEvent.CTRL_MASK, false), PRESS);
}
}
} // installKeyboardActions
/** Action Name */
private static final String PRESS = "press";
/** Press Action */
private static PressAction ACTION_PRESS = new PressAction();
/**
* Adempiere Label UI Actions
*/
private static class PressAction extends UIAction
{
PressAction ()
{
super (PRESS);
}
public void actionPerformed (ActionEvent e)
{
JLabel label = (JLabel)e.getSource ();
String key = getName ();
if (key == PRESS)
{
doPress (label);
}
} // actionPerformed
/**
* Do Press - Focus the Field
* @param label label
*/
private void doPress (JLabel label)
{
Component labelFor = label.getLabelFor ();
if (labelFor != null && labelFor.isEnabled ())
{
Component owner = label.getLabelFor ();
if (owner instanceof Container
&& ((Container)owner).isFocusCycleRoot ())
{
owner.requestFocus ();
}
else
{
if (owner instanceof Container)
{
Container container = (Container)owner;
if (container.isFocusCycleRoot())
{
FocusTraversalPolicy policy = container.getFocusTraversalPolicy();
Component comp = policy.getDefaultComponent(container);
if (comp != null)
{
comp.requestFocus();
return;
}
}
Container rootAncestor = container.getFocusCycleRootAncestor();
if (rootAncestor != null)
{
FocusTraversalPolicy policy = rootAncestor.getFocusTraversalPolicy();
Component comp = policy.getComponentAfter(rootAncestor, container);
if (comp != null && SwingUtilities.isDescendingFrom(comp, container))
{
comp.requestFocus();
return;
}
}
}
if (owner.isFocusable())
{
owner.requestFocus();
return;
}
// No Forcus
}
}
} // doPress
} // PressAction
} // AdempiereLabelUI

View File

@ -0,0 +1,74 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
/**
* Adempiere Menu Bar UI.
* Main Menu background
*
* @author Jorg Janke
* @version $Id: AdempiereMenuBarUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereMenuBarUI extends MetalMenuBarUI
{
/**
* Create own instance
* @param x
* @return AdempiereMenuBarUI
*/
public static ComponentUI createUI (JComponent x)
{
return new AdempiereMenuBarUI();
} // createUI
/**
* Install UI
* @param c
*/
public void installUI (JComponent c)
{
super.installUI(c);
c.setOpaque(true);
} // installUI
/**
* Update UI
* @param g graphics
* @param c component
*/
public void update (Graphics g, JComponent c)
{
if (c.isOpaque())
{
// Get AdempiereColor
AdempiereColor bg = AdempiereColor.getDefaultBackground();
bg.paint (g, c);
}
else
{
g.setColor(c.getBackground());
g.fillRect(0,0, c.getWidth(), c.getHeight());
}
paint(g,c);
} // update
} // AdempiereMenuBarUI

View File

@ -0,0 +1,88 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
/**
* Menu Item UI
*
* @author Jorg Janke
* @version $Id: AdempiereMenuItemUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereMenuItemUI extends BasicMenuItemUI
{
/**
* Create own instance
* @param c compoment
* @return AdempiereMenuBarUI
*/
public static ComponentUI createUI(JComponent c)
{
return new AdempiereMenuItemUI();
} // createUI
/**
* Install UI
* @param c
*/
public void installUI (JComponent c)
{
super.installUI(c);
c.setOpaque(false); // use MenuBarUI background
} // installUI
/**
* Update UI
* @param g graphics
* @param c component
*/
public void update (Graphics g, JComponent c)
{
if (c.isOpaque())
{
AdempiereColor bg = AdempiereColor.getDefaultBackground();
bg.paint (g, c);
//
// g.setColor(c.getBackground());
// g.fillRect(0,0, c.getWidth(), c.getHeight());
}
paint(g,c);
} // update
/**
* Paint Background
* @param g graphics
* @param menuItem menu
* @param bgColor bg color
*/
protected void paintBackground (Graphics g, JMenuItem menuItem, Color bgColor)
{
ButtonModel model = menuItem.getModel();
if (model.isArmed())
super.paintBackground (g, menuItem, bgColor);
else
{
AdempiereColor bg = AdempiereColor.getDefaultBackground();
bg.paint (g, menuItem);
}
} // paintBackground
} // AdempiereMenuItemUI

View File

@ -0,0 +1,52 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicMenuUI;
/**
* Adempiere Menu UI.
* The main menu.
*
* @author Jorg Janke
* @version $Id: AdempiereMenuUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereMenuUI extends BasicMenuUI
{
/**
* Create own instance
* @param x
* @return AdempiereMenuBarUI
*/
public static ComponentUI createUI(JComponent x)
{
return new AdempiereMenuUI();
} // createUI
/**
* Install UI
* @param c
*/
public void installUI (JComponent c)
{
super.installUI(c);
c.setOpaque(false); // use MenuBarUI background
} // installUI
} // AdempiereMenuUI

View File

@ -0,0 +1,696 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import java.awt.event.*;
import java.lang.reflect.*;
import java.util.*;
import java.util.logging.*;
import javax.swing.*;
import javax.swing.plaf.metal.*;
//import org.compiere.process.OrgOwnership;
import org.compiere.swing.*;
import org.compiere.util.*;
/**
* Variable Pluggable Look And Feel.
* Provides an easy access to the required currently active PLAF information
*
* @author Jorg Janke
* @version $Id: AdempierePLAF.java,v 1.3 2006/07/30 00:52:23 jjanke Exp $
*/
public final class AdempierePLAF
{
/** Version tag */
public static final String VERSION = "R1.4.0";
/** Key of Client Property to paint in AdempiereColor */
public static final String BACKGROUND = "AdempiereBackground";
/** Key of Client Property for Rectangle Items - if exists, the standard background is used */
public static final String BACKGROUND_FILL = "AdempiereBackgroundFill";
/** Key of Client Property for CPanel */
public static final String TABLEVEL = "AdempiereTabLevel";
/** Logger */
private static Logger log = Logger.getLogger(AdempierePLAF.class.getName());
/****** Background *******************************************************/
/**
* Return Normal field background color "text".
* Windows = white
* @return Color
*/
public static Color getFieldBackground_Normal()
{
// window => white
return ColorBlind.getDichromatColor(UIManager.getColor("text"));
} // getFieldBackground_Normal
/**
* Return Error field background (AdempiereTheme)
* @return Color
*/
public static Color getFieldBackground_Error()
{
return ColorBlind.getDichromatColor(AdempiereThemeInnova.error);
} // getFieldBackground_Error
/**
* Return Mandatory field background color (AdempiereTheme)
* @return Color
*/
public static Color getFieldBackground_Mandatory()
{
return ColorBlind.getDichromatColor(AdempiereThemeInnova.mandatory);
} // getFieldBackground_Mandatory
/**
* Return Inactive field background color (AdempiereTheme)
* @return Color
*/
public static Color getFieldBackground_Inactive()
{
return ColorBlind.getDichromatColor(AdempiereThemeInnova.inactive);
} // getFieldBackground_Inactive
/**
* Return form background color "control".
* Windows = lightGray
* @return Color
*/
public static Color getFormBackground()
{
return ColorBlind.getDichromatColor(UIManager.getColor("control"));
} // getFormBackground
/**
* Info Background Color "info"
* Windows = info (light yellow)
* @return Color
*/
public static Color getInfoBackground()
{
return ColorBlind.getDichromatColor(AdempiereThemeInnova.info);
} // getInfoBackground
/****** Text *************************************************************/
/**
* Normal field text foreground color "textText"
* Windows = black
* @return Color
*/
public static Color getTextColor_Normal()
{
return ColorBlind.getDichromatColor(UIManager.getColor("textText"));
} // getText_Normal
/**
* OK Text Foreground Color (Theme)
* @return Color
*/
public static Color getTextColor_OK()
{
return ColorBlind.getDichromatColor(AdempiereThemeInnova.txt_ok);
} // getText_OK
/**
* Issue Text Foreground Color (Theme)
* @return Color
*/
public static Color getTextColor_Issue()
{
return ColorBlind.getDichromatColor(AdempiereThemeInnova.txt_error);
} // getText_Issue
/**
* Label Text foreground Color "controlText"
* Windows = black
* @return Color
*/
public static Color getTextColor_Label()
{
return ColorBlind.getDichromatColor(UIManager.getColor("controlText"));
} // getTextColor_Label
/**
* Get Primary1
* @return primary 1
*/
public static Color getPrimary1()
{
return ColorBlind.getDichromatColor(AdempiereThemeInnova.primary1);
}
/**
* Get Primary2
* @return primary 2
*/
public static Color getPrimary2()
{
return ColorBlind.getDichromatColor(AdempiereThemeInnova.primary2);
}
/**
* Get Primary3
* @return primary 3
*/
public static Color getPrimary3()
{
return ColorBlind.getDichromatColor(AdempiereThemeInnova.primary3);
}
/**
* Get Secondary 1
* @return secondary 1
*/
public static Color getSecondary1()
{
return ColorBlind.getDichromatColor(AdempiereThemeInnova.secondary1);
}
/**
* Get Secondary 2
* @return secondary 2
*/
public static Color getSecondary2()
{
return ColorBlind.getDichromatColor(AdempiereThemeInnova.secondary2);
}
/**
* Get Secondary 3
* @return secondary 3
*/
public static Color getSecondary3()
{
return ColorBlind.getDichromatColor(AdempiereThemeInnova.secondary3);
}
/****** Fonts ************************************************************/
/**
* Get Header Font (window/label font)
* @return font
*/
public static Font getFont_Header()
{
return CompiereTheme.windowFont;
// return UIManager.getFont("Label.font");
} // getFont_Header
/**
* Get Field Font
* @return font
*/
public static Font getFont_Field()
{
return CompiereTheme.userFont;
// return UIManager.getFont("TextField.font");
} // getFont_Field
/**
* Get Label Font
* @return font
*/
public static Font getFont_Label()
{
return CompiereTheme.controlFont;
// return UIManager.getFont("Label.font");
} // setFont_Label
/**
* Get Small (report) Font
* @return font
*/
public static Font getFont_Small()
{
return CompiereTheme.smallFont;
} // setFont_Small
/****** Available L&F ****************************************************/
/** Availablle Looks */
private static ValueNamePair[] s_looks = null;
/** Default PLAF */
private static ValueNamePair s_defaultPLAF = null;
/** Availablle Themes */
private static ValueNamePair[] s_themes = null;
private static ValueNamePair s_vp_adempiereTheme = null;
private static ValueNamePair s_vp_metalTheme = null;
private static ValueNamePair s_vp_kunststoffTheme = null;
//e-evolution vpj-cd 19102006
private static ValueNamePair s_vp_jgoodiesTheme = null;
//e-evolution vpj-cd 1910200sky
/** PLAF class list
com.sun.java.swing.plaf.windows.WindowsLookAndFeel
com.sun.java.swing.plaf.motif.MotifLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
/**
* Static Initializer.
* - Fill available PLAFs and Themes
*/
static
{
ArrayList<ValueNamePair> plafList = new ArrayList<ValueNamePair>();
//e-evolution vpj-cd 19102006
ValueNamePair vp = null;
ArrayList<ValueNamePair> themeList = new ArrayList<ValueNamePair>();
try
{
Class c = Class.forName("com.jgoodies.looks.plastic.PlasticLookAndFeel");
vp = new ValueNamePair("org.adempiere.plaf.AdempiereLookAndFeel", org.adempiere.plaf.AdempiereLookAndFeel.NAME);
plafList.add(vp);
s_vp_jgoodiesTheme = new ValueNamePair("org.compiere.plaf.AdempiereTheme", AdempiereThemeInnova.NAME);
themeList.add (s_vp_jgoodiesTheme);
}
catch (Exception e)
{
// log.severe("Kuststoff not found");
}
//e-evolution vpj-cd 19102006
//vpj-cd ValueNamePair vp = new ValueNamePair("org.compiere.plaf.CompiereLookAndFeel", CompiereLookAndFeel.NAME);
vp = new ValueNamePair("org.compiere.plaf.CompiereLookAndFeel", CompiereLookAndFeel.NAME);
plafList.add (vp);
// Themes
//vpj-cd ArrayList<ValueNamePair> themeList = new ArrayList<ValueNamePair>();
s_vp_adempiereTheme = new ValueNamePair("org.compiere.plaf.CompiereThemeBlueMetal", CompiereThemeBlueMetal.NAME);
themeList.add (s_vp_adempiereTheme);
themeList.add (new ValueNamePair("org.compiere.plaf.CompiereThemeIce", CompiereThemeIce.NAME));
// Metal
s_vp_metalTheme = new ValueNamePair("javax.swing.plaf.metal.DefaultMetalTheme", "Steel");
themeList.add (s_vp_metalTheme);
themeList.add (new ValueNamePair("javax.swing.plaf.metal.OceanTheme", "Ocean"));
// themeList.add (new ValueNamePair("javax.swing.plaf.metal.MetalHighContrastTheme", "Java High Contrast"));
//
themeList.add (new ValueNamePair("org.compiere.plaf.AquaTheme", "Aqua"));
themeList.add (new ValueNamePair("org.compiere.plaf.CharcoalTheme", "Charcoal"));
themeList.add (new ValueNamePair("org.compiere.plaf.ContrastTheme", "Contrast"));
themeList.add (new ValueNamePair("org.compiere.plaf.EmeraldTheme", "Emerald"));
themeList.add (new ValueNamePair("org.compiere.plaf.RubyTheme", "Ruby"));
// Discover and Install - Kuststoff
try
{
Class c = Class.forName("com.incors.plaf.kunststoff.KunststoffLookAndFeel");
vp = new ValueNamePair("com.incors.plaf.kunststoff.KunststoffLookAndFeel", "Kunststoff");
plafList.add(vp);
vp = new ValueNamePair("com.incors.plaf.kunststoff.KunststoffTheme", "Kuststoff");
themeList.add(vp);
s_vp_kunststoffTheme = vp;
}
catch (Exception e)
{
// log.severe("Kuststoff not found");
}
// Install discovered PLAFs
for (int i = 0; i < plafList.size(); i++)
{
vp = (ValueNamePair)plafList.get(i);
UIManager.installLookAndFeel(vp.getName(), vp.getValue());
}
// Fill Available PLAFs
plafList = new ArrayList<ValueNamePair>();
UIManager.LookAndFeelInfo[] lfInfo = UIManager.getInstalledLookAndFeels();
for (int i = 0; i < lfInfo.length; i++)
{
vp = new ValueNamePair (lfInfo[i].getClassName(), lfInfo[i].getName());
plafList.add(vp);
//begin vpj-cd e-evolution 26 oct 2006
//if (lfInfo[i].getName().equals(CompiereLookAndFeel.NAME))
if (lfInfo[i].getName().equals(org.adempiere.plaf.AdempiereLookAndFeel.NAME))
//end vpj-cd e-evolution 26 oct 2006
{
s_defaultPLAF = vp;
log.finest(vp.getName() + " (default)");
}
else
log.finest(vp.getName());
}
s_looks = new ValueNamePair[plafList.size()];
plafList.toArray(s_looks);
// Fill Available Themes
s_themes = new ValueNamePair[themeList.size()];
themeList.toArray(s_themes);
//
// printPLAFDefaults();
} // static Initializer
/**
* Get available Look And Feels
* @return Array of ValueNamePair with name and class of Look and Feel
*/
public static ValueNamePair[] getPLAFs()
{
return s_looks;
} // getPLAFs
/**
* Get the list of available Metal Themes if the current L&F is a Metal L&F
* @return Array of Strings with Names of Metal Themes
*/
public static ValueNamePair[] getThemes ()
{
if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel)
return s_themes;
return new ValueNamePair[0];
} // getThemes
/**************************************************************************
* Set PLAF based on Ini Properties
* @param win Optional Window
*/
public static void setPLAF (Window win)
{
String look = Ini.getProperty(Ini.P_UI_LOOK);
String lookTheme = Ini.getProperty(Ini.P_UI_THEME);
// Search for PLAF
ValueNamePair plaf = null;
for (int i = 0; i < s_looks.length; i++)
{
if (s_looks[i].getName().equals(look))
{
plaf = s_looks[i];
break;
}
}
// Search for Theme
ValueNamePair theme = null;
for (int i = 0; i < s_themes.length; i++)
{
if (s_themes[i].getName().equals(lookTheme))
{
theme = s_themes[i];
break;
}
}
// Set PLAF
setPLAF (plaf == null ? s_defaultPLAF : plaf, theme, win);
} // setPLAF
/**
* Set PLAF and update Ini
*
* @param plaf ValueNamePair of the PLAF to be set
* @param theme Optional Theme name
* @param win Optional Window
*/
public static void setPLAF (ValueNamePair plaf, ValueNamePair theme, Window win)
{
if (plaf == null)
return;
log.config(plaf + (theme == null ? "" : (" - " + theme)));
// Look & Feel
try
{
UIManager.setLookAndFeel(plaf.getValue());
}
catch (Exception e)
{
log.severe(e.getMessage());
}
LookAndFeel laf = UIManager.getLookAndFeel();
Ini.setProperty(Ini.P_UI_LOOK, plaf.getName());
// Optional Theme
Ini.setProperty(Ini.P_UI_THEME, "");
// Default Theme
if (theme == null && laf instanceof MetalLookAndFeel)
{
String className = laf.getClass().getName();
if (className.equals("javax.swing.plaf.metal.MetalLookAndFeel"))
theme = s_vp_metalTheme;
else if (className.equals("org.compiere.plaf.CompiereLookAndFeel"))
theme = s_vp_adempiereTheme;
else if (className.equals("com.incors.plaf.kunststoff.KunststoffLookAndFeel"))
theme = s_vp_kunststoffTheme;
//e-evolution vpj-cd
else if (className.equals("org.adempiere.plaf.AdempiereLookAndFeel"))
theme = s_vp_jgoodiesTheme;
//e-evolution vpj-cd
}
if (theme != null && laf instanceof MetalLookAndFeel && theme.getValue().length() > 0)
{
try
{
Class c = Class.forName(theme.getValue());
MetalTheme t = (MetalTheme)c.newInstance();
if (t instanceof CompiereTheme)
AdempiereThemeInnova.load();
if (laf instanceof CompiereLookAndFeel)
CompiereLookAndFeel.setCurrentTheme(t);
else
MetalLookAndFeel.setCurrentTheme(t);
//
boolean flat = Ini.isPropertyBool(Ini.P_UI_FLAT);
CompiereTheme.setTheme(t, flat); // copies it if not AdempiereTheme
Ini.setProperty(Ini.P_UI_THEME, theme.getName());
}
catch (Exception e)
{
log.severe("Theme - " + e.getMessage());
}
}
updateUI (win);
log.config(plaf + " - " + theme);
// printPLAFDefaults();
} // setPLAF
/**
* Update UI of this and parent Windows
* @param win window
*/
public static void updateUI (Window win)
{
if (win == null)
return;
Window c = win;
do
{
SwingUtilities.updateComponentTreeUI(c);
c.invalidate();
c.pack();
c.validate();
c.repaint();
c = c.getOwner();
}
while (c != null);
} // updateUI
/**
* Reset PLAF Settings
* @param win Window to be reset
*/
public static void reset (Window win)
{
// Clean Theme Properties
AdempiereThemeInnova.reset (); // sets properties
AdempierePLAF.setPLAF (win);
} // reset
/**
* Print current UIDefaults
*/
public static void printPLAFDefaults ()
{
System.out.println(UIManager.getLookAndFeel());
Object[] keys = UIManager.getLookAndFeelDefaults().keySet().toArray();
Arrays.sort(keys);
char lastStart = ' ';
for (int i = 0; i < keys.length; i++)
{
StringBuffer sb = new StringBuffer();
sb.append(keys[i]).append(" = ").append(UIManager.get(keys[i]));
if (keys[i].toString().charAt(0) != lastStart)
{
System.out.println();
lastStart = keys[i].toString().charAt(0);
}
System.out.println(sb);
}
} // printPLAFDefaults
/**
* Is AdempiereL&F the active L&F
* @return true if L&F is Adempiere
*/
public static boolean isActive()
{
return UIManager.getLookAndFeel() instanceof CompiereLookAndFeel;
} // isActive
/*************************************************************************/
static ResourceBundle s_res = ResourceBundle.getBundle("org.compiere.plaf.PlafRes");
/**
* Create OK Button
* @return OK button
*/
public static CButton getOKButton()
{
CButton b = new CButton();
b.setIcon(new ImageIcon(AdempierePLAF.class.getResource("icons/Ok24.gif")));
b.setMargin(new Insets(0,10,0,10));
b.setToolTipText (s_res.getString("OK"));
return b;
} // getOKButton
/**
* Create Cancel Button
* @return Cancel button
*/
public static CButton getCancelButton()
{
CButton b = new CButton();
b.setIcon(new ImageIcon(AdempierePLAF.class.getResource("icons/Cancel24.gif")));
b.setMargin(new Insets(0,10,0,10));
b.setToolTipText (s_res.getString("Cancel"));
return b;
} // getCancelButton
/**
* Center Window on Screen and show it
* @param window window
*/
public static void showCenterScreen (Window window)
{
window.pack();
Dimension sSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension wSize = window.getSize();
window.setLocation(((sSize.width-wSize.width)/2), ((sSize.height-wSize.height)/2));
window.toFront();
window.setVisible(true);
} // showCenterScreen
/**************************************************************************
* Start Class With Adempiere Look or Adempiere PLAF Editor
* @param args first parameter is class to start, if none start PLAF Editor
*/
public static void main (String[] args)
{
String jVersion = System.getProperty("java.version");
if (!(jVersion.startsWith("1.5")))
{
JOptionPane.showMessageDialog (null,
"Require Java Version 1.5 or up - Not " + jVersion,
"AdempierePLAF - Version Conflict",
JOptionPane.ERROR_MESSAGE);
System.exit(1);
}
// set the defined PLAF
Ini.loadProperties (true);
AdempiereThemeInnova.load ();
setPLAF (null);
//
if (args.length == 0)
{
AdempierePLAFFrame frame = new AdempierePLAFFrame();
return;
}
String className = args[0];
// find class
Class startClass = null;
try
{
startClass = Class.forName(className);
}
catch (Exception e)
{
log.severe("Did not find: " + className);
e.printStackTrace();
System.exit(1);
}
// try static main method
try
{
Method[] methods = startClass.getMethods();
for (int i = 0; i < methods.length; i++)
{
if (Modifier.isStatic(methods[i].getModifiers()) && methods[i].getName().equals("main"))
{
String[] startArgs = new String[args.length-1];
for (int ii = 1; ii < args.length; ii++)
startArgs[ii-i] = args[ii];
methods[i].invoke(null, new Object[] {startArgs});
}
return;
}
}
catch (Exception ee)
{
log.severe("Problems invoking main");
ee.printStackTrace();
}
// start the class
try
{
startClass.newInstance();
}
catch (Exception e)
{
log.severe("Cannot start: " + className);
e.printStackTrace();
System.exit(1);
}
} // main
} // AdempierePLAF
/**
* Frame to display Editor
*/
class AdempierePLAFFrame extends CFrame
{
/**
* Frame to display Editor
*/
public AdempierePLAFFrame()
{
super("AdempierePLAF");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setIconImage(Toolkit.getDefaultToolkit().getImage(AdempierePLAF.class.getResource("icons/CL16.gif")));
AdempierePLAF.showCenterScreen(this);
} // AdempierePLAFFrame
/**
* Show Editor
* @param e event
*/
protected void processWindowEvent (WindowEvent e)
{
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_OPENED)
{
AdempierePLAFEditor ed = new AdempierePLAFEditor(this, true);
dispose();
}
} // processWindowEvents
} // AdempierePLAFFrame

View File

@ -0,0 +1,628 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.util.logging.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.plaf.metal.*;
import org.compiere.swing.*;
import org.compiere.util.*;
import sun.awt.*;
/**
* Adempiere PLAF Editor.
* <p>
* start with <code>new AdempierePLAFEditor()</code>
*
* @author Jorg Janke
* @version $Id: AdempierePLAFEditor.java,v 1.3 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempierePLAFEditor extends JDialog
implements ActionListener
{
/**
* Default Constructor
* Don't Show Example
*/
public AdempierePLAFEditor()
{
super();
init(false);
} // AdempierePLAFEditor
/**
* Constructor
* @param showExample if true, show Example
*/
public AdempierePLAFEditor (boolean showExample)
{
super();
init(showExample);
} // AdempierePLAFEditor
/**
* Modal Dialog Constructor
* @param owner
* @param showExample if true, show Example
*/
public AdempierePLAFEditor(Dialog owner, boolean showExample)
{
super(owner, "", true);
init(showExample);
} // AdempierePLAFEditor
/**
* Modal Frame Constructor
* @param owner
* @param showExample if true, show Example
*/
public AdempierePLAFEditor(Frame owner, boolean showExample)
{
super(owner, "", true);
init(showExample);
} // AdempierePLAFEditor
/** Logger */
private static Logger log = Logger.getLogger(AdempierePLAFEditor.class.getName());
/**************************************************************************
* Init Editor
* @param showExample if true, show Example
*/
private void init (boolean showExample)
{
try
{
jbInit();
dynInit();
// Display
example.setVisible(showExample);
blindLabel.setVisible(showExample);
blindField.setVisible(showExample);
AdempierePLAF.showCenterScreen(this);
}
catch(Exception e)
{
log.log(Level.SEVERE, "", e);
}
// AdempiereUtils.setNotBuffered(this);
} // PLAFEditor
/** Diable Theme Field */
private boolean m_setting = false;
/** We did test for true color */
private boolean m_colorTest = false;
static ResourceBundle s_res = ResourceBundle.getBundle("org.compiere.plaf.PlafRes");
static Object[] s_columns = new Object[] {"-0-", "-1-", "-2-", "-3-", "-O-", "-l-"};
static Object[][] s_data = new Object[][] {
{"-00-", "-01-", "-02-", "-03-", "-0O-", "-0l-"},
{"-10-", "-11-", "-12-", "-13-", "-1O-", "-1l-"},
{"-20-", "-21-", "-22-", "-23-", "-2O-", "-2l-"},
{"-30-", "-31-", "-32-", "-33-", "-3O-", "-3l-"},
{"-O0-", "-O1-", "-O2-", "-O3-", "-OO-", "-Ol-"},
{"-l0-", "-l1-", "-l2-", "-l3-", "-lO-", "-ll-"}};
static Object[] s_pos = new Object[] {"Top", "Left", "Bottom", "Right"};
private CPanel mainPanel = new CPanel(new BorderLayout());
private CPanel northPanel = new CPanel();
private CPanel southPanel = new CPanel();
private CButton bOK = AdempierePLAF.getOKButton();
private CButton bCancel = AdempierePLAF.getCancelButton();
private CButton bHelp = new CButton(); /** @todo Help Button */
private GridBagLayout northLayout = new GridBagLayout();
private CLabel lfLabel = new CLabel();
private CComboBox lfField = new CComboBox(AdempierePLAF.getPLAFs());
private CLabel themeLabel = new CLabel();
private CComboBox themeField = new CComboBox(AdempierePLAF.getThemes());
private CButton cButton = new CButton();
private FlowLayout southLayout = new FlowLayout();
private CButton rButton = new CButton();
private CButton bSetColor = new CButton();
private CCheckBox cDefault = new CCheckBox();
private CComboBox blindField = new CComboBox(ColorBlind.COLORBLIND_TYPE);
private CCheckBox flatField = new CCheckBox();
private CLabel blindLabel = new CLabel();
private BorderLayout mainLayout = new BorderLayout();
//
private CTabbedPane example = new CTabbedPane();
private CPanel jPanel1 = new CPanel();
private TitledBorder exampleBorder;
private CPanel jPanel2 = new CPanel();
private JLabel jLabel1 = new JLabel();
private JTextField jTextField1 = new JTextField();
private JCheckBox jCheckBox1 = new JCheckBox();
private JRadioButton jRadioButton1 = new JRadioButton();
private CButton jButton1 = new CButton();
private CToggleButton jToggleButton1 = new CToggleButton();
private CComboBox jComboBox1 = new CComboBox(s_columns);
private JTextArea jTextArea1 = new JTextArea();
private JTextPane jTextPane1 = new JTextPane();
private JEditorPane jEditorPane1 = new JEditorPane();
private JPasswordField jPasswordField1 = new JPasswordField();
private JList jList1 = new JList(s_columns);
private JSplitPane jSplitPane1 = new JSplitPane();
private BorderLayout borderLayout1 = new BorderLayout();
private JScrollPane jScrollPane1 = new JScrollPane();
private JTree jTree1 = new JTree();
private JScrollPane jScrollPane2 = new JScrollPane();
private JTable jTable1 = new JTable(s_data, s_columns);
private GridBagLayout gridBagLayout1 = new GridBagLayout();
private CPanel jPanelFlat = new CPanel(new AdempiereColor(new Color(255,205,255), true));
private CPanel jPanelGradient = new CPanel(new AdempiereColor(new Color(233,210,210), new Color(217,210,233)));
private CPanel jPanelTexture = new CPanel(new AdempiereColor(AdempiereColor.class.getResource("vincent.jpg"), Color.lightGray, 0.7f));
private CPanel jPanelLines = new CPanel(new AdempiereColor(new Color(178,181,205), new Color(193,193,205), 1.0f, 5));
private JButton jButtonFlat = new JButton();
private CButton jButtonGardient = new CButton();
private JButton jButtonTexture = new JButton();
private CButton jButtonLines = new CButton();
private JComboBox jComboBoxFlat = new JComboBox(s_pos);
private JTextField jTextFieldFlat = new JTextField();
private JLabel jLabelFlat = new JLabel();
private CComboBox jComboBoxGradient = new CComboBox(s_pos);
private CTextField jTextFieldGradient = new CTextField();
private CLabel jLabelGradient = new CLabel();
private JComboBox jComboBoxTexture = new JComboBox(s_pos);
private JTextField jTextFieldTexture = new JTextField();
private JLabel jLabelTexture = new JLabel();
private CComboBox jComboBoxLines = new CComboBox(s_pos);
private CTextField jTextFieldLines = new CTextField();
private CLabel jLabelLines = new CLabel();
private CCheckBox jCheckBoxLines = new CCheckBox();
private JCheckBox jCheckBoxTexture = new JCheckBox();
private CCheckBox jCheckBoxGradient = new CCheckBox();
private JCheckBox jCheckBoxFlat = new JCheckBox();
/**
* Static Layout
* @throws Exception
*/
private void jbInit() throws Exception
{
this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
this.setTitle(s_res.getString("LookAndFeelEditor") + " " + AdempierePLAF.VERSION);
mainPanel.setLayout(mainLayout);
mainLayout.setHgap(5);
mainLayout.setVgap(5);
jTextFieldFlat.setColumns(10);
jTextFieldGradient.setColumns(10);
jTextFieldTexture.setColumns(10);
jTextFieldLines.setColumns(10);
jCheckBoxLines.setText("jCheckBox");
jCheckBoxTexture.setText("jCheckBox");
jCheckBoxGradient.setText("jCheckBox");
jCheckBoxFlat.setText("jCheckBox");
jPanelGradient.setToolTipText("Indented Level 1");
jPanelTexture.setToolTipText("Indented Level 2");
jPanelLines.setToolTipText("Indented Level 1");
this.getContentPane().add(mainPanel, BorderLayout.CENTER);
AdempiereColor.setBackground(this);
//
lfLabel.setText(s_res.getString("LookAndFeel"));
lfField.addActionListener(this);
themeLabel.setText(s_res.getString("Theme"));
themeField.addActionListener(this);
cButton.setText(s_res.getString("EditAdempiereTheme"));
cButton.addActionListener(this);
rButton.setText(s_res.getString("Reset"));
rButton.addActionListener(this);
cDefault.setText(s_res.getString("SetDefault"));
cDefault.addActionListener(this);
bSetColor.setText(s_res.getString("SetDefaultColor"));
bSetColor.addActionListener(this);
blindLabel.setText(s_res.getString("ColorBlind"));
blindField.addActionListener(this);
flatField.setText(s_res.getString("FlatColor"));
flatField.setSelected(Ini.isPropertyBool(Ini.P_UI_FLAT));
flatField.addActionListener(this);
//
bOK.addActionListener(this);
bCancel.addActionListener(this);
bHelp.addActionListener(this);
//
northPanel.setLayout(northLayout);
southPanel.setLayout(southLayout);
southLayout.setAlignment(FlowLayout.RIGHT);
//
exampleBorder = new TitledBorder(s_res.getString("Example"));
example.setBorder(exampleBorder);
jLabel1.setText("jLabel");
jTextField1.setText("jTextField");
jCheckBox1.setText("jCheckBox");
jRadioButton1.setText("jRadioButton");
jButton1.setText("jButton");
jToggleButton1.setText("jToggleButton");
jTextArea1.setText("jTextArea");
jTextPane1.setText("jTextPane");
jEditorPane1.setText("jEditorPane");
jPasswordField1.setText("jPasswordField");
jPanel2.setLayout(borderLayout1);
jPanel1.setLayout(gridBagLayout1);
jScrollPane1.setPreferredSize(new Dimension(100, 200));
jScrollPane2.setPreferredSize(new Dimension(100, 200));
jButtonFlat.setText("Confirm");
jButtonGardient.setText("Input");
jButtonTexture.setText("Message");
jButtonLines.setText("Error");
jTextFieldFlat.setText("jTextField");
jLabelFlat.setText("jLabel");
jTextFieldGradient.setText("jTextField");
jLabelGradient.setText("jLabel");
jTextFieldTexture.setText("jTextField");
jLabelTexture.setText("jLabel");
jTextFieldLines.setText("jTextField");
jLabelLines.setText("jLabel");
mainPanel.add(northPanel, BorderLayout.NORTH);
northPanel.add(lfLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(12, 12, 5, 5), 0, 0));
northPanel.add(lfField, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(12, 0, 5, 12), 0, 0));
northPanel.add(themeLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 12, 5, 5), 0, 0));
northPanel.add(themeField, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 5, 12), 0, 0));
northPanel.add(cButton, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 12), 0, 0));
northPanel.add(rButton, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 12, 5, 5), 0, 0));
northPanel.add(bSetColor, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 12), 0, 0));
northPanel.add(cDefault, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 12, 5, 5), 0, 0));
northPanel.add(flatField, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 12), 0, 0));
northPanel.add(blindLabel, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 12, 5, 5), 0, 0));
northPanel.add(blindField, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 5, 12), 0, 0));
mainPanel.add(southPanel, BorderLayout.SOUTH);
southPanel.add(bCancel, null);
southPanel.add(bOK, null);
mainPanel.add(example, BorderLayout.CENTER);
example.add(jPanel1, "JPanel");
jPanel1.add(jTextPane1, new GridBagConstraints(2, 3, 1, 1, 0.0, 0.2
,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0));
jPanel1.add(jEditorPane1, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.2
,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0));
jPanel1.add(jList1, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.2
,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0));
jPanel1.add(jLabel1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
jPanel1.add(jTextField1, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
jPanel1.add(jCheckBox1, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(1, 1, 1, 1), 0, 0));
jPanel1.add(jRadioButton1, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
jPanel1.add(jButton1, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.1
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
jPanel1.add(jToggleButton1, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.1
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
jPanel1.add(jTextArea1, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.2
,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0));
jPanel1.add(jComboBox1, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
jPanel1.add(jPasswordField1, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
example.add(jPanel2, "JPanel");
jPanel2.add(jSplitPane1, BorderLayout.CENTER);
jSplitPane1.add(jScrollPane1, JSplitPane.LEFT);
jSplitPane1.add(jScrollPane2, JSplitPane.RIGHT);
jPanelFlat.setName("FlatP");
jPanelGradient.setName("GradientP");
jPanelTexture.setName("TextureP");
jPanelLines.setName("LineP");
example.add(jPanelFlat, "jPanel Flat");
jPanelFlat.add(jButtonFlat, null);
jPanelFlat.add(jComboBoxFlat, null);
example.add(jPanelGradient, "jPanel Gradient 1");
jPanelGradient.add(jButtonGardient, null);
jPanelGradient.add(jComboBoxGradient, null);
jPanelGradient.add(jLabelGradient, null);
jPanelGradient.add(jTextFieldGradient, null);
example.add(jPanelTexture, "jPanel Texture 2");
jPanelTexture.add(jButtonTexture, null);
jPanelTexture.add(jComboBoxTexture, null);
jPanelTexture.add(jLabelTexture, null);
jPanelTexture.add(jTextFieldTexture, null);
example.add(jPanelLines, "jPanel Lines 1");
jPanelLines.add(jButtonLines, null);
jPanelLines.add(jComboBoxLines, null);
jPanelLines.add(jLabelLines, null);
jPanelLines.add(jTextFieldLines, null);
jScrollPane2.getViewport().add(jTable1, null);
jScrollPane1.getViewport().add(jTree1, null);
jPanelFlat.add(jLabelFlat, null);
jPanelFlat.add(jTextFieldFlat, null);
jPanelLines.add(jCheckBoxLines, null);
jPanelTexture.add(jCheckBoxTexture, null);
jPanelGradient.add(jCheckBoxGradient, null);
jPanelFlat.add(jCheckBoxFlat, null);
} // jbInit
/**
* Dynamic Init
*/
private void dynInit()
{
// setLFSelection();
//
jPanelGradient.setTabLevel(1);
jPanelTexture.setTabLevel(2);
jPanelLines.setTabLevel(1);
//
jComboBoxFlat.addActionListener(this);
jComboBoxGradient.addActionListener(this);
jComboBoxTexture.addActionListener(this);
jComboBoxLines.addActionListener(this);
//
jButton1.addActionListener(this);
jButtonFlat.addActionListener(this);
jButtonGardient.addActionListener(this);
jButtonTexture.addActionListener(this);
jButtonLines.addActionListener(this);
//
AdempierePLAF.setPLAF(this);
} // dynInit
/**
* Set Picks From Environment
*/
private void setLFSelection()
{
m_setting = true;
// Search for PLAF
ValueNamePair plaf = null;
LookAndFeel lookFeel = UIManager.getLookAndFeel();
String look = lookFeel.getClass().getName();
for (int i = 0; i < AdempierePLAF.getPLAFs().length; i++)
{
ValueNamePair vp = AdempierePLAF.getPLAFs()[i];
if (vp.getValue().equals(look))
{
plaf = vp;
break;
}
}
if (plaf != null)
lfField.setSelectedItem(plaf);
// Search for Theme
MetalTheme metalTheme = null;
ValueNamePair theme = null;
boolean metal = UIManager.getLookAndFeel() instanceof MetalLookAndFeel;
themeField.setModel(new DefaultComboBoxModel(AdempierePLAF.getThemes()));
if (metal)
{
theme = null;
AppContext context = AppContext.getAppContext();
metalTheme = (MetalTheme)context.get("currentMetalTheme");
if (metalTheme != null)
{
String lookTheme = metalTheme.getName();
for (int i = 0; i < AdempierePLAF.getThemes().length; i++)
{
ValueNamePair vp = AdempierePLAF.getThemes()[i];
if (vp.getName().equals(lookTheme))
{
theme = vp;
break;
}
}
}
if (theme != null)
themeField.setSelectedItem(theme);
}
m_setting = false;
log.info(lookFeel + " - " + metalTheme);
} // setLFSelection
/**************************************************************************
* ActionListener
* @param e
*/
public void actionPerformed(ActionEvent e)
{
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
// OK - Save & Finish
if (e.getSource() == bOK)
{
CompiereTheme.save();
Ini.saveProperties(true);
dispose();
}
// Cancel - Finish
else if (e.getSource() == bCancel)
{
dispose();
}
else if (e.getSource() == bHelp)
{
new MiniBrowser("http://www.adempiere.org/looks/help.html");
}
// Look & Feel changed
else if (e.getSource() == lfField && !m_setting)
{
m_setting = true; // disable Theme setting
// set new theme
AdempierePLAF.setPLAF((ValueNamePair)lfField.getSelectedItem(), null, this);
setLFSelection();
setBackgroundToTheme();
AdempierePLAF.setPLAF(this); // twice ??
m_setting = false; // enable Theme setting
}
// Theme Field Changed
else if (e.getSource() == themeField && !m_setting)
{
Ini.setProperty(Ini.P_UI_THEME, themeField.getSelectedItem().toString());
AdempierePLAF.setPLAF((ValueNamePair)lfField.getSelectedItem(), (ValueNamePair)themeField.getSelectedItem(), this);
CompiereTheme.setTheme(); // copy Theme
setBackgroundToTheme();
AdempierePLAF.setPLAF(this); // twice (??)
}
// Start Adempiere Theme Editor
else if (e.getSource() == cButton)
{
new AdempiereThemeEditor(this);
setBackgroundToTheme();
}
// Reset PLAFs
else if (e.getSource() == rButton)
{
AdempierePLAF.reset(this);
setLFSelection();
ColorBlind.setColorType(ColorBlind.NORMAL);
AdempierePLAF.setPLAF(this); // twice ??
}
// Set Default Background Color
else if (e.getSource() == bSetColor)
{
AdempiereColor cc = AdempiereColorEditor.showDialog(this, AdempierePanelUI.getDefaultBackground());
AdempierePanelUI.setDefaultBackground(cc);
AdempierePLAF.updateUI(this);
Ini.setProperty(CompiereTheme.P_AdempiereColor, cc.toString());
}
// Set Background as Default
else if (e.getSource() == cDefault)
{
AdempierePanelUI.setSetDefault(cDefault.isSelected());
AdempierePLAF.updateUI(this);
}
// Flat
else if (e.getSource() == flatField)
{
Ini.setProperty(Ini.P_UI_FLAT, flatField.isSelected());
setBackgroundToTheme();
}
// ColorBlind
else if (e.getSource() == blindField)
{
int sel = blindField.getSelectedIndex();
if (sel != ColorBlind.getColorType())
{
// Test for True color
if (!m_colorTest)
{
m_colorTest = true;
int size = Toolkit.getDefaultToolkit().getColorModel().getPixelSize();
if (size < 24)
JOptionPane.showMessageDialog(this,
"Your environment has only a pixel size of " + size
+ ".\nTo see the effect, you need to have a pixel size of 24 (true color)",
"Insufficient Color Capabilities",
JOptionPane.ERROR_MESSAGE);
}
ColorBlind.setColorType(sel);
AdempierePLAF.updateUI(this);
AdempierePLAF.setPLAF(this); // twice (??)
}
}
// Change Tab Pacement
else if (e.getSource() == jComboBoxFlat || e.getSource() == jComboBoxGradient
|| e.getSource() == jComboBoxTexture || e.getSource() == jComboBoxLines)
{
if (!m_setting)
{
m_setting = true;
int index = ((JComboBox)e.getSource()).getSelectedIndex();
example.setTabPlacement(index+1);
jComboBoxFlat.setSelectedIndex(index);
jComboBoxGradient.setSelectedIndex(index);
jComboBoxTexture.setSelectedIndex(index);
jComboBoxLines.setSelectedIndex(index);
m_setting = false;
}
}
// Display Options
else if (e.getSource() == jButtonFlat)
JOptionPane.showConfirmDialog(this, "Confirm Dialog");
else if (e.getSource() == jButtonGardient)
JOptionPane.showInputDialog(this, "Input Dialog");
else if (e.getSource() == jButtonTexture)
JOptionPane.showMessageDialog(this, "Message Dialog");
else if (e.getSource() == jButtonLines)
JOptionPane.showMessageDialog(this, "Message Dialog - Error", "Error", JOptionPane.ERROR_MESSAGE);
// Test
else if (e.getSource() == jButton1)
{
}
/********************/
// Metal
boolean metal = UIManager.getLookAndFeel() instanceof MetalLookAndFeel;
themeField.setEnabled(metal);
themeLabel.setEnabled(metal);
boolean adempiere = UIManager.getLookAndFeel() instanceof CompiereLookAndFeel;
flatField.setEnabled(adempiere);
// ColorBlind - only with Adempiere L&F & Theme
boolean enableBlind = adempiere
&& themeField.getSelectedItem() != null
&& themeField.getSelectedItem().toString().indexOf("Adempiere") != -1;
blindField.setEnabled(enableBlind);
blindLabel.setEnabled(enableBlind);
if (e.getSource() != blindField && !enableBlind)
blindField.setSelectedIndex(0);
// done
setCursor(Cursor.getDefaultCursor());
} // actionPerformed
/**
* Set AdempiereColor Background to Theme Background
*/
private void setBackgroundToTheme()
{
// Not flat for Adempiere L&F
boolean flat = Ini.isPropertyBool(Ini.P_UI_FLAT);
AdempiereColor cc = new AdempiereColor(CompiereTheme.secondary3, flat);
AdempierePanelUI.setDefaultBackground(cc);
Ini.setProperty(CompiereTheme.P_AdempiereColor, cc.toString());
AdempierePLAF.updateUI(this);
} // setBackgroundToTheme
/**
* Dispose
* Exit, if there is no real owning parent (not modal) - shortcut
*/
public void dispose()
{
super.dispose();
if (!isModal())
System.exit(0);
} // dispose
} // AdempierePLAFEditor

View File

@ -0,0 +1,177 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
/**
* Panel UI.
* The default properties can be set via
* <pre>
* AdempierePanelUI.setDefaultBackground (new AdempiereColor());
* </pre>
* The individual Panel can set the background type by setting the
* parameter via
* <pre>
* putClientProperty(AdempierePanelUI.BACKGROUND, new AdempiereColor());
* </pre>
* @see org.compiere.swing.CPanel
*
* @author Jorg Janke
* @version $Id: AdempierePanelUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempierePanelUI extends BasicPanelUI
{
/**
* Static Create UI
* @param c Vomponent
* @return Adempiere Panel UI
*/
public static ComponentUI createUI (JComponent c)
{
// return new AdempierePanelUI();
return s_panelUI;
} // createUI
/** UI */
private static AdempierePanelUI s_panelUI = new AdempierePanelUI();
/**************************************************************************
* Install Defaults
* @param p Panel
*/
protected void installDefaults (JPanel p)
{
super.installDefaults(p);
/** If enabled, all windows are with Adempiere Background,
* but Sun dialogs (print ..) are "patchy" as they are opaque **
// System.out.println ("BG=" + p.getClientProperty(AdempierePLAF.BACKGROUND));
if (s_setDefault || p.getClientProperty(AdempierePLAF.BACKGROUND) == null)
p.putClientProperty (AdempierePLAF.BACKGROUND, s_default);
/** **/
} // installDefaults
/**************************************************************************
* Update.
* This method is invoked by <code>JComponent</code> when the specified
* component is being painted.
*
* By default this method will fill the specified component with
* its background color (if its <code>opaque</code> property is
* <code>true</code>) and then immediately call <code>paint</code>.
*
* @param g the <code>Graphics</code> context in which to paint
* @param c the component being painted
*
* @see javax.swing.JComponent#paintComponent
*/
public void update (Graphics g, JComponent c)
{
// AdempiereUtils.printParents (c);
if (c.isOpaque())
updateIt (g, c);
paint (g, c); // does nothing
} // update
/**
* Print background based on AdempiereColor or flat background if not found
* @param g
* @param c
*/
static void updateIt (Graphics g, JComponent c)
{
// System.out.print("Panel " + c.getName());
// System.out.print(" Bounds=" + c.getBounds().toString());
// System.out.print(" - Background: ");
// Get AdempiereColor
AdempiereColor bg = null;
try
{
bg = (AdempiereColor)c.getClientProperty(AdempierePLAF.BACKGROUND);
}
catch (Exception e)
{
System.err.println("AdempierePanelUI - ClientProperty: " + e.getMessage());
}
// paint adempiere background
if (bg != null)
{
// System.out.print(bg);
bg.paint (g, c);
}
else
{
// System.out.print(c.getBackground());
g.setColor(c.getBackground());
g.fillRect(0,0, c.getWidth(), c.getHeight());
}
// System.out.println();
} // updateIt
/*************************************************************************/
/** Default Background */
private static AdempiereColor s_default = new AdempiereColor();
/** Set Background to default setting */
private static boolean s_setDefault = false;
/**
* Set Default Background
* @param bg Background Color
*/
public static void setDefaultBackground (AdempiereColor bg)
{
if (bg == null)
return;
s_default.setColor(bg);
} // setBackground
/**
* Get Default Background
* @return Background
*/
public static AdempiereColor getDefaultBackground()
{
return s_default;
} // getBackground
/**
* Set Default Background
* @param setDefault if true, the background will be set to the default color
*/
public static void setSetDefault (boolean setDefault)
{
s_setDefault = setDefault;
} // setSetDefault
/**
* Is the Default Background set by default
* @return true if default background is set
*/
public static boolean isSetDefault()
{
return s_setDefault;
} // isSetDefault
} // AdempierePanel

View File

@ -0,0 +1,55 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
/**
* Adempiere Radio Button UI
*
* @author Jorg Janke
* @version $Id: AdempiereRadioButtonUI.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
*/
public class AdempiereRadioButtonUI extends MetalRadioButtonUI
{
/**
* Create UI
* @param c component
* @return ComponentUI
*/
public static ComponentUI createUI (JComponent c)
{
return s_radioButtonUI;
} // createUI
/** UI */
private static final AdempiereRadioButtonUI s_radioButtonUI = new AdempiereRadioButtonUI();
/**************************************************************************
* Install Defaults
* @param b Button
*/
public void installDefaults (AbstractButton b)
{
super.installDefaults(b);
b.setOpaque(false);
} // installDefaults
} // AdempiereRadioButtonUI

View File

@ -0,0 +1,33 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import javax.swing.plaf.metal.MetalRootPaneUI;
/**
* Root Pane UI
*
* @author Jorg Janke
* @version $Id: AdempiereRootPaneUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereRootPaneUI extends MetalRootPaneUI
{
/**
* MetalTitlePane does the Layout & Painting of the Window including System MenuBar
* The titlePane is private in MetalRootPaneUI
*/
} // AdempiereRootPaneUI

View File

@ -0,0 +1,53 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
/**
* Adempiere Scroll Pane UI
*
* @author Jorg Janke
* @version $Id: AdempiereScrollPaneUI.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
*/
public class AdempiereScrollPaneUI extends MetalScrollPaneUI
{
/**
* Create UI (not shared)
* @param x
* @return UI
*/
public static ComponentUI createUI(JComponent x)
{
return new AdempiereScrollPaneUI();
} // createUI
/**
* Install UI
* @param c
*/
public void installUI (JComponent c)
{
super.installUI(c);
c.setOpaque(false);
// was ignored as set in constructor after updateUI - Sun bug: 138828
((JScrollPane)c).getViewport().setOpaque(false);
} // installUI
} // AdempiereScrollPaneUI

View File

@ -0,0 +1,54 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import javax.swing.plaf.basic.*;
/**
* Split Pane Divider
*
* @author Jorg Janke
* @version $Id: AdempiereSplitPaneDivider.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
class AdempiereSplitPaneDivider extends BasicSplitPaneDivider
{
/**
* Constructor
* @param ui
*/
public AdempiereSplitPaneDivider (BasicSplitPaneUI ui)
{
super (ui);
// BasicBorders$SplitPaneDividerBorder - ignored set after constructor
setBorder(null);
} // AdempiereSplitPaneDivider
/**
* Paints the divider.
* If the border is painted, it creates a light gray bar on top/button.
* Still, a light gray 1 pt shaddow border is painted on top/button
* @param g
*/
public void paint (Graphics g)
{
// BasicBorders$SplitPaneDividerBorder
setBorder(null);
super.paint(g);
} // paint
} // AdempiereSplitPaneDivider

View File

@ -0,0 +1,68 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
/**
* Adempiere Split Pane UI.
* When moving, the divider is painted in darkGray.
*
* @author Jorg Janke
* @version $Id: AdempiereSplitPaneUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereSplitPaneUI extends BasicSplitPaneUI
{
/**
* Creates a new MetalSplitPaneUI instance
* @param x
* @return ComponentUI
*/
public static ComponentUI createUI (JComponent x)
{
return new AdempiereSplitPaneUI();
} // createUI
/**
* Creates the default divider.
* @return SplitPaneDivider
*/
public BasicSplitPaneDivider createDefaultDivider()
{
return new AdempiereSplitPaneDivider (this);
}
/**
* Installs the UI.
* @param c
*/
public void installUI (JComponent c)
{
super.installUI(c);
c.setOpaque(false);
// BasicBorders$SplitPaneBorder paints gray border
// resulting in a 2pt border for the left/right components
// but results in 1pt gray line on top/button of divider.
// Still, a 1 pt shaddow light gay line is painted
c.setBorder(null);
} // installUI
} // AdempiereSplitPaneUI

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,95 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicTableHeaderUI;
/**
* Table Header UI
* 3D effect
*
* @author Jorg Janke
* @version $Id: AdempiereTableHeaderUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereTableHeaderUI extends BasicTableHeaderUI
{
/**
* Static Create UI
* @param c Component
* @return Adempiere TableHeader UI
*/
public static ComponentUI createUI(JComponent c)
{
return new AdempiereTableHeaderUI();
} // createUI
/**
* Install UI - set not Opaque
* @param c
*/
public void installUI(JComponent c)
{
super.installUI(c);
// TableHeader is in JViewpoiunt, which is Opaque
// When UI created, TableHeader not added to viewpoint
c.setOpaque(true);
c.putClientProperty(AdempierePLAF.BACKGROUND_FILL, "Y");
} // installUI
/**************************************************************************
* Update -
* This method is invoked by <code>JComponent</code> when the specified
* component is being painted.
*
* By default this method will fill the specified component with
* its background color (if its <code>opaque</code> property is
* <code>true</code>) and then immediately call <code>paint</code>.
*
* @param g the <code>Graphics</code> context in which to paint
* @param c the component being painted
*
* @see #paint
* @see javax.swing.JComponent#paintComponent
*/
public void update(Graphics g, JComponent c)
{
// AdempiereUtils.printParents (c); // Parent is JViewpoint
if (c.isOpaque()) // flat
AdempiereUtils.fillRectange((Graphics2D)g, c, CompiereLookAndFeel.ROUND);
//
paint (g, c);
} // update
/**
* Paint 3D box
* @param g
* @param c
*/
public void paint(Graphics g, JComponent c)
{
super.paint( g, c);
AdempiereUtils.paint3Deffect((Graphics2D)g, c, CompiereLookAndFeel.ROUND, true);
} // paint
} // AdempiereTableHeader

View File

@ -0,0 +1,109 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import java.awt.event.*;
import java.beans.*;
import java.util.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
import javax.swing.text.*;
public class AdempiereTextAreaUI extends BasicTextAreaUI
{
/**
* Creates a UI for a JTextArea.
* Tab is the normal focus traversal key - to enter Tab enter Ctrl-Tab
*
* @param ta a text area
* @return the UI
*/
public static ComponentUI createUI(JComponent ta)
{
return new AdempiereTextAreaUI(ta);
}
/**
* Constructor
* @param ta text area
*/
public AdempiereTextAreaUI (JComponent ta)
{
if (ta instanceof JTextComponent)
m_editor = (JTextComponent)ta;
} // AdempiereTextAreaUI
/** The Editor */
private JTextComponent m_editor = null;
/** Tab Stroke */
private static KeyStroke s_stroke = KeyStroke.getKeyStroke (KeyEvent.VK_TAB, InputEvent.CTRL_MASK);
/** Tab Action */
private static Action s_action = new DefaultEditorKit.InsertTabAction();
/**
* Create Keymap
* @return key Map
*/
protected Keymap createKeymap ()
{
Keymap map = super.createKeymap ();
map.addActionForKeyStroke(s_stroke, s_action);
return map;
} // createKeyMap
/**
* Property Change
* @param evt event
*/
protected void propertyChange (PropertyChangeEvent evt)
{
String name = evt.getPropertyName();
if ("editable".equals(name))
updateFocusTraversalKeysX();
else
super.propertyChange (evt);
} // propertyChange
/**
* UpdateFocusTraversalKeysX
*/
void updateFocusTraversalKeysX ()
{
if (m_editor == null)
return;
//
EditorKit editorKit = getEditorKit (m_editor);
if (editorKit != null && editorKit instanceof DefaultEditorKit)
{
Set<AWTKeyStroke> storedForwardTraversalKeys = m_editor.getFocusTraversalKeys (KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS);
Set<AWTKeyStroke> storedBackwardTraversalKeys = m_editor.getFocusTraversalKeys (KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS);
Set<AWTKeyStroke> forwardTraversalKeys = new HashSet<AWTKeyStroke>(storedForwardTraversalKeys);
Set<AWTKeyStroke> backwardTraversalKeys = new HashSet<AWTKeyStroke>(storedBackwardTraversalKeys);
//
forwardTraversalKeys.add (KeyStroke.getKeyStroke (KeyEvent.VK_TAB, 0));
forwardTraversalKeys.remove(s_stroke);
backwardTraversalKeys.add (KeyStroke.getKeyStroke (KeyEvent.VK_TAB, InputEvent.SHIFT_MASK));
//
LookAndFeel.installProperty (m_editor, "focusTraversalKeysForward", forwardTraversalKeys);
LookAndFeel.installProperty (m_editor, "focusTraversalKeysBackward", backwardTraversalKeys);
}
} // updateFocusTraversalKeysX
} // AdempiereTextAreaUI

View File

@ -0,0 +1,416 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
import org.compiere.swing.*;
/**
* Java Theme Editor.
* Edit the attributes and save them in Ini.properties.
* Does not set background of AdempiereColorUI.
*
* @author Jorg Janke
* @version $Id: AdempiereThemeEditor.java,v 1.3 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereThemeEditor extends CDialog
implements ActionListener
{
/**
* Constructor
* @param owner Frame owner
*/
public AdempiereThemeEditor (JDialog owner)
{
super(owner, s_res.getString("AdempiereThemeEditor"), true);
try
{
jbInit();
loadTheme();
dynInit();
AdempierePLAF.showCenterScreen(this);
}
catch(Exception e)
{
System.err.println("AdempiereThemeEditor");
e.printStackTrace();
}
} // AdempiereThemeEditor
static ResourceBundle s_res = ResourceBundle.getBundle("org.compiere.plaf.PlafRes");
private CButton primary1 = new CButton();
private CButton primary2 = new CButton();
private CButton primary3 = new CButton();
private CButton secondary1 = new CButton();
private CButton secondary2 = new CButton();
private CButton secondary3 = new CButton();
private CButton controlFont = new CButton();
private CButton systemFont = new CButton();
private CButton userFont = new CButton();
private CButton smallFont = new CButton();
private CButton mandatory = new CButton();
private CButton error = new CButton();
private CButton windowFont = new CButton();
private CButton menuFont = new CButton();
private CButton white = new CButton();
private CButton black = new CButton();
private CPanel confirmPanel = new CPanel();
private CButton inactive = new CButton();
private CButton txt_ok = new CButton();
private CButton txt_error = new CButton();
private CButton bCancel = AdempierePLAF.getCancelButton();
private CButton bOK = AdempierePLAF.getOKButton();
private FlowLayout confirmLayout = new FlowLayout();
private CPanel centerPanel = new CPanel();
private CPanel metalColorPanel = new CPanel();
private BorderLayout centerLayout = new BorderLayout();
private CPanel adempiereColorPanel = new CPanel();
private TitledBorder metalColorBorder;
private TitledBorder adempiereColorBorder;
private GridLayout metalColorLayout = new GridLayout();
private GridLayout adempiereColorLayout = new GridLayout();
private CPanel fontPanel = new CPanel();
private GridLayout fontLayout = new GridLayout();
private TitledBorder fontBorder;
private CButton info = new CButton();
/**
* Static Init
* @throws Exception
*/
private void jbInit() throws Exception
{
metalColorBorder = new TitledBorder(s_res.getString("MetalColors"));
adempiereColorBorder = new TitledBorder(s_res.getString("AdempiereColors"));
fontBorder = new TitledBorder(s_res.getString("AdempiereFonts"));
fontPanel.setBorder(fontBorder);
fontPanel.setOpaque(false);
this.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
//
primary1.setToolTipText(s_res.getString("Primary1Info"));
primary1.setText(s_res.getString("Primary1"));
primary1.addActionListener(this);
primary2.setToolTipText(s_res.getString("Primary2Info"));
primary2.setText(s_res.getString("Primary2"));
primary2.addActionListener(this);
primary3.setToolTipText(s_res.getString("Primary3Info"));
primary3.setText(s_res.getString("Primary3"));
primary3.addActionListener(this);
secondary1.setToolTipText(s_res.getString("Secondary1Info"));
secondary1.setText(s_res.getString("Secondary1"));
secondary1.addActionListener(this);
secondary2.setToolTipText(s_res.getString("Secondary2Info"));
secondary2.setText(s_res.getString("Secondary2"));
secondary2.addActionListener(this);
secondary3.setToolTipText(s_res.getString("Secondary3Info"));
secondary3.setText(s_res.getString("Secondary3"));
secondary3.addActionListener(this);
controlFont.setToolTipText(s_res.getString("ControlFontInfo"));
controlFont.setText(s_res.getString("ControlFont"));
controlFont.addActionListener(this);
systemFont.setToolTipText(s_res.getString("SystemFontInfo"));
systemFont.setText(s_res.getString("SystemFont"));
systemFont.addActionListener(this);
userFont.setToolTipText(s_res.getString("UserFontInfo"));
userFont.setText(s_res.getString("UserFont"));
userFont.addActionListener(this);
smallFont.setText(s_res.getString("SmallFont"));
smallFont.addActionListener(this);
mandatory.setToolTipText(s_res.getString("MandatoryInfo"));
mandatory.setText(s_res.getString("Mandatory"));
mandatory.addActionListener(this);
error.setToolTipText(s_res.getString("ErrorInfo"));
error.setText(s_res.getString("Error"));
error.addActionListener(this);
info.setToolTipText(s_res.getString("InfoInfo"));
info.setText(s_res.getString("Info"));
info.addActionListener(this);
windowFont.setText(s_res.getString("WindowTitleFont"));
windowFont.addActionListener(this);
menuFont.setText(s_res.getString("MenuFont"));
menuFont.addActionListener(this);
white.setToolTipText(s_res.getString("WhiteInfo"));
white.setText(s_res.getString("White"));
white.addActionListener(this);
black.setToolTipText(s_res.getString("BlackInfo"));
black.setText(s_res.getString("Black"));
black.addActionListener(this);
inactive.setToolTipText(s_res.getString("InactiveInfo"));
inactive.setText(s_res.getString("Inactive"));
inactive.addActionListener(this);
txt_ok.setToolTipText(s_res.getString("TextOKInfo"));
txt_ok.setText(s_res.getString("TextOK"));
txt_ok.addActionListener(this);
txt_error.setToolTipText(s_res.getString("TextIssueInfo"));
txt_error.setText(s_res.getString("TextIssue"));
txt_error.addActionListener(this);
//
confirmPanel.setLayout(confirmLayout);
confirmLayout.setAlignment(FlowLayout.RIGHT);
centerPanel.setLayout(centerLayout);
metalColorPanel.setBorder(metalColorBorder);
metalColorPanel.setOpaque(false);
metalColorPanel.setLayout(metalColorLayout);
adempiereColorPanel.setLayout(adempiereColorLayout);
adempiereColorPanel.setBorder(adempiereColorBorder);
adempiereColorPanel.setOpaque(false);
metalColorLayout.setColumns(3);
metalColorLayout.setHgap(5);
metalColorLayout.setRows(3);
metalColorLayout.setVgap(5);
adempiereColorLayout.setColumns(4);
adempiereColorLayout.setHgap(5);
adempiereColorLayout.setRows(2);
adempiereColorLayout.setVgap(5);
fontPanel.setLayout(fontLayout);
fontLayout.setColumns(3);
fontLayout.setHgap(5);
fontLayout.setRows(2);
fontLayout.setVgap(5);
centerLayout.setVgap(5);
fontBorder.setTitle(s_res.getString("Fonts"));
confirmPanel.setOpaque(false);
this.getContentPane().add(confirmPanel, BorderLayout.SOUTH);
confirmPanel.add(bCancel, null);
confirmPanel.add(bOK, null);
this.getContentPane().add(centerPanel, BorderLayout.CENTER);
centerPanel.add(metalColorPanel, BorderLayout.NORTH);
metalColorPanel.add(primary1, null);
metalColorPanel.add(primary2, null);
metalColorPanel.add(primary3, null);
metalColorPanel.add(secondary1, null);
metalColorPanel.add(secondary2, null);
metalColorPanel.add(secondary3, null);
metalColorPanel.add(white, null);
metalColorPanel.add(black, null);
centerPanel.add(adempiereColorPanel, BorderLayout.CENTER);
adempiereColorPanel.add(txt_error, null);
centerPanel.add(fontPanel, BorderLayout.SOUTH);
fontPanel.add(controlFont, null);
fontPanel.add(systemFont, null);
fontPanel.add(menuFont, null);
fontPanel.add(userFont, null);
fontPanel.add(windowFont, null);
fontPanel.add(smallFont, null);
adempiereColorPanel.add(error, null);
adempiereColorPanel.add(inactive, null);
adempiereColorPanel.add(txt_ok, null);
adempiereColorPanel.add(mandatory, null);
adempiereColorPanel.add(info, null);
bCancel.addActionListener(this);
bOK.addActionListener(this);
} // jbInit
/**
* Load Theme from current Setting (if MetalLookAndFeel)
*/
private void loadTheme()
{
if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel)
{
// AdempiereTheme.setTheme();
}
else // Not a Metal Theme
{
primary1.setEnabled(false);
primary2.setEnabled(false);
primary3.setEnabled(false);
secondary1.setEnabled(false);
secondary2.setEnabled(false);
secondary3.setEnabled(false);
}
} // loadTheme
/**
* Dynamic Init
*/
private void dynInit()
{
// Colors
primary1.setBackground(CompiereTheme.primary1);
primary2.setBackground(CompiereTheme.primary2);
primary3.setBackground(CompiereTheme.primary3);
secondary1.setBackground(CompiereTheme.secondary1);
secondary2.setBackground(CompiereTheme.secondary2);
secondary3.setBackground(CompiereTheme.secondary3);
//
white.setBackground(CompiereTheme.white);
black.setBackground(CompiereTheme.secondary3);
black.setForeground(CompiereTheme.black);
//
error.setBackground(CompiereTheme.error);
mandatory.setBackground(CompiereTheme.mandatory);
inactive.setBackground(CompiereTheme.inactive);
info.setBackground(CompiereTheme.info);
//
txt_ok.setBackground(CompiereTheme.white);
txt_ok.setForeground(CompiereTheme.txt_ok);
txt_error.setBackground(CompiereTheme.white); // AdempierePLAF.getFieldBackground_Normal()
txt_error.setForeground(CompiereTheme.txt_error);
// Fonts
controlFont.setFont(CompiereTheme.controlFont);
systemFont.setFont(CompiereTheme.systemFont);
userFont.setFont(CompiereTheme.userFont);
smallFont.setFont(CompiereTheme.smallFont);
menuFont.setFont(CompiereTheme.menuFont);
windowFont.setFont(CompiereTheme.windowFont);
} // dynInit
/**
* Action Listener
* @param e
*/
public void actionPerformed(ActionEvent e)
{
// Confirm
if (e.getSource() == bOK)
{
CompiereTheme.save();
dispose();
return;
}
// Cancel
else if (e.getSource() == bCancel)
{
dispose();
return;
}
try { // to capture errors when Cancel in JColorChooser
if (e.getSource() == primary1)
{
CompiereTheme.primary1 = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("Primary1"), CompiereTheme.primary1));
}
else if (e.getSource() == primary2)
{
CompiereTheme.primary2 = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("Primary2"), CompiereTheme.primary2));
}
else if (e.getSource() == primary3)
{
CompiereTheme.primary3 = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("Primary3"), CompiereTheme.primary3));
}
else if (e.getSource() == secondary1)
{
CompiereTheme.secondary1 = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("Secondary1"), CompiereTheme.secondary1));
}
else if (e.getSource() == secondary2)
{
CompiereTheme.secondary2 = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("Secondary2"), CompiereTheme.secondary2));
}
else if (e.getSource() == secondary3)
{
CompiereTheme.secondary3 = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("Secondary3"), CompiereTheme.secondary3));
}
else if (e.getSource() == error)
{
CompiereTheme.error = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("Error"), CompiereTheme.error));
}
else if (e.getSource() == mandatory)
{
CompiereTheme.mandatory = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("Mandatory"), CompiereTheme.mandatory));
}
else if (e.getSource() == inactive)
{
CompiereTheme.inactive = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("Inactive"), CompiereTheme.inactive));
}
else if (e.getSource() == info)
{
CompiereTheme.info = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("Info"), CompiereTheme.info));
}
else if (e.getSource() == black)
{
CompiereTheme.black = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("Black"), CompiereTheme.black));
}
else if (e.getSource() == white)
{
CompiereTheme.white = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("White"), CompiereTheme.white));
}
else if (e.getSource() == txt_ok)
{
CompiereTheme.txt_ok = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("TextOK"), CompiereTheme.txt_ok));
}
else if (e.getSource() == txt_error)
{
CompiereTheme.txt_error = new ColorUIResource(JColorChooser.showDialog
(this, s_res.getString("TextIssue"), CompiereTheme.txt_error));
}
else if (e.getSource() == controlFont)
{
CompiereTheme.controlFont = new FontUIResource(FontChooser.showDialog
(this, s_res.getString("ControlFont"), CompiereTheme.controlFont));
}
else if (e.getSource() == systemFont)
{
CompiereTheme.systemFont = new FontUIResource(FontChooser.showDialog
(this, s_res.getString("SystemFont"), CompiereTheme.systemFont));
}
else if (e.getSource() == userFont)
{
CompiereTheme.userFont = new FontUIResource(FontChooser.showDialog
(this, s_res.getString("UserFont"), CompiereTheme.userFont));
}
else if (e.getSource() == smallFont)
{
CompiereTheme.smallFont = new FontUIResource(FontChooser.showDialog
(this, s_res.getString("SmallFont"), CompiereTheme.smallFont));
}
else if (e.getSource() == menuFont)
{
CompiereTheme.menuFont = new FontUIResource(FontChooser.showDialog
(this, s_res.getString("MenuFont"), CompiereTheme.menuFont));
}
else if (e.getSource() == windowFont)
{
CompiereTheme.windowFont = new FontUIResource(FontChooser.showDialog
(this, s_res.getString("WindowTitleFont"), CompiereTheme.windowFont));
}
} catch (Exception ee) {} // to capture errors when Cancel in JColorChooser
dynInit();
} // actionPerformed
} // AdempiereThemeEditor

View File

@ -0,0 +1,115 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import javax.swing.plaf.*;
/**
* Adempiere default Blue Metal Color Theme
*
* @author Jorg Janke, Adam Michau
* @version $Id: AdempiereThemeBlueMetal.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereThemeInnova extends org.adempiere.plaf.AdempiereTheme
{
/**
* Adempiere default Theme Blue Metal
*/
public AdempiereThemeInnova()
{
setDefault();
s_theme = this;
s_name = NAME;
} // AdempiereThemeBlueMetal
/** Name */
public static final String NAME = "Adempiere Theme";
/**
* Set Defaults
*/
public void setDefault()
{
/** Blue 51,51,102 */
primary0 = new ColorUIResource(103, 152, 203);
/** Blue 102, 102, 153 */
//protected static ColorUIResource primary1;
primary1 = new ColorUIResource( 101, 138, 187);
/** Blue 153, 153, 204 */
primary2 = new ColorUIResource(103, 152, 203);
/** Blue 204, 204, 255 */
primary3= new ColorUIResource(233, 238, 245); //
/** Black */
//secondary0 = new ColorUIResource(0, 0, 0);
/** Gray 102, 102, 102 */
//protected static ColorUIResource secondary1;
secondary1= new ColorUIResource(190, 179, 153);
/** Gray 153, 153, 153 */
//protected static ColorUIResource secondary2;
secondary2= new ColorUIResource(246, 239, 224);
/** BlueGray 214, 224, 234 - background */
//protected static ColorUIResource secondary3;
secondary3= new ColorUIResource(251, 248, 241);
/** White */
//secondary4 = new ColorUIResource(255, 255, 255);
/** Black */
black = BLACK;
/** White */
white = WHITE;
/** Background for mandatory fields */
mandatory = new ColorUIResource(233, 238, 245); // blueish
/** Background for fields in error 180,220,143 */
error = new ColorUIResource(220, 241, 203); // green ;
/** Background for inactive fields */
inactive = new ColorUIResource(241,239,222);//241,239,222
/** Background for info fields */
info = new ColorUIResource(251, 248, 251); // somewhat white
/** Foreground Text OK */
txt_ok =new ColorUIResource(0, 153, 255); // blue ;
/** Foreground Text Error */
txt_error = new ColorUIResource(255, 0, 51); // red ;
/** Black */
// secondary0 = new ColorUIResource(0, 0, 0);
/** Control font */
controlFont = null;
_getControlTextFont();
/** System font */
systemFont = null;
_getSystemTextFont();
/** User font */
userFont = null;
_getUserTextFont();
/** Small font */
smallFont = null;
_getSubTextFont();
/** Window Title font */
windowFont = null;
_getWindowTitleFont();
/** Menu font */
menuFont = null;
_getMenuTextFont();
} // setDefault
} // AdempiereThemeBlueMetal

View File

@ -0,0 +1,109 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
/**
* Adempiere Toggle Button UI
*
* @author Jorg Janke
* @version $Id: AdempiereToggleButtonUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereToggleButtonUI extends MetalToggleButtonUI
{
/**
* Static Create UI
* @param c Component
* @return Adempiere ToggleButton UI
*/
public static ComponentUI createUI (JComponent c)
{
return s_toggleButtonUI;
} // createUI
/** UI shared */
private static AdempiereToggleButtonUI s_toggleButtonUI = new AdempiereToggleButtonUI();
/**************************************************************************
* Install Defaults
* @param b
*/
public void installDefaults(AbstractButton b)
{
super.installDefaults(b);
b.setOpaque(false);
} // installDefaults
/**
* Update -
* This method is invoked by <code>JComponent</code> when the specified
* component is being painted.
*
* By default this method will fill the specified component with
* its background color (if its <code>opaque</code> property is
* <code>true</code>) and then immediately call <code>paint</code>.
*
* @param g the <code>Graphics</code> context in which to paint
* @param c the component being painted
*
* @see #paint
* @see javax.swing.JComponent#paintComponent
*/
public void update(Graphics g, JComponent c)
{
if (c.isOpaque()) // flat background
// AdempiereColor.getDefaultBackground().paint(g, c);
AdempiereUtils.fillRectange((Graphics2D)g, c, CompiereLookAndFeel.ROUND);
paint (g, c);
} // update
/**
* Paint 3D Box
* @param g Graphics
* @param c Component
*/
public void paint(Graphics g, JComponent c)
{
super.paint(g, c);
AbstractButton b = (AbstractButton) c;
ButtonModel model = b.getModel();
boolean in = model.isPressed() || model.isSelected();
//
AdempiereUtils.paint3Deffect((Graphics2D)g, c, CompiereLookAndFeel.ROUND, !in);
} // paint
/**
* Don't get selected Color - use default (otherwise the pressed button is gray)
* @param g
* @param b
*/
protected void paintButtonPressed(Graphics g, AbstractButton b)
{
// if (b.isContentAreaFilled())
// {
// Dimension size = b.getSize();
// g.setColor(getSelectColor());
// g.fillRect(0, 0, size.width, size.height);
// }
} // paintButtonPressed
} // AdempiereToggleButton

View File

@ -0,0 +1,60 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
/**
* Adempiere Tool Bar
*
* @author Jorg Janke
* @version $Id: AdempiereToolBarUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereToolBarUI extends MetalToolBarUI
{
/**
* Create UI (own instance)
* @param c
* @return AdempiereToolBarUI
*/
public static ComponentUI createUI (JComponent c)
{
return new AdempiereToolBarUI();
} // createUI
/**
* Install UI - not Opaque
* @param c
*/
public void installUI( JComponent c )
{
super.installUI (c);
c.setOpaque(false);
} // installUI
/**
* JToolbar error : I just instanciate and display a toolbar
* in the AWT dispatcher thread. When the toolbar is repaint
* with a SwingUtilities.updateTreeView, buttons are larger
* than usual. Note that I have several toolbars
* == paint is done by Metal, so error is there ==
*/
} // AdempiereToolBarUI

View File

@ -0,0 +1,91 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
/**
* Tool Tip
*
* @author Jorg Janke
* @version $Id: AdempiereToolTipUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class AdempiereToolTipUI extends MetalToolTipUI
{
public static ComponentUI createUI(JComponent c)
{
return sharedInstance;
}
static AdempiereToolTipUI sharedInstance = new AdempiereToolTipUI();
private JToolTip tip;
public Dimension getPreferredSize(JComponent c)
{
tip = (JToolTip)c;
return super.getPreferredSize(c);
}
public void paint(Graphics g, JComponent c)
{
tip = (JToolTip)c;
super.paint(g, c);
}
/**
* Get Accelerator String
* @return string
*/
public String getAcceleratorString ()
{
String str = super.getAcceleratorString();
if (tip == null || isAcceleratorHidden ())
return str;
JComponent comp = tip.getComponent ();
if (comp == null || comp instanceof JTabbedPane || comp instanceof JMenuItem)
return str;
KeyStroke[] keys = comp.getRegisteredKeyStrokes ();
StringBuffer controlKeyStr = new StringBuffer();
for (int i = 0; i < keys.length; i++)
{
int mod = keys[i].getModifiers ();
int condition = comp.getConditionForKeyStroke (keys[i]);
if (condition == JComponent.WHEN_IN_FOCUSED_WINDOW)
{
String prefix = KeyEvent.getKeyModifiersText (mod);
if (prefix.length() > 1)
{
if (controlKeyStr.length() > 0)
controlKeyStr.append(" ");
controlKeyStr.append(prefix).append("-")
.append(KeyEvent.getKeyText(keys[i].getKeyCode()));
break; // just first
}
}
}
return controlKeyStr.toString();
} // getAcceleratorString
} // AdempierelToolTipUI

View File

@ -0,0 +1,472 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.io.*;
import java.net.*;
import java.util.logging.*;
import javax.swing.*;
import com.sun.image.codec.jpeg.*;
/**
* UI utilities
*
* @author Jorg Janke
* @version $Id: AdempiereUtils.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
*/
public class AdempiereUtils
{
/** Logger */
private static Logger log = Logger.getLogger(AdempiereUtils.class.getName());
/**
* Fill Background with Color.
* (Ususlly called from update methods)
*
* @param g2D Graphics
* @param c Component
* @param round paint round corners
*/
public static void fillRectange(Graphics2D g2D, JComponent c, boolean round)
{
// Paint in AdempiereColor?
AdempiereColor cc = null;
boolean stdCC = c.getClientProperty(AdempierePLAF.BACKGROUND_FILL) != null;
try
{
cc = (AdempiereColor)c.getClientProperty(AdempierePLAF.BACKGROUND);
}
catch (Exception e)
{
stdCC = true;
}
if (stdCC)
cc = AdempiereColor.getDefaultBackground();
// Paint AdempiereColor
if (cc != null)
{
// bounds is often not within Panel bouunds
cc.paint(g2D, c);
}
// Paint Flat Color
else
{
Paint paint = c.getBackground();
g2D.setPaint(paint);
//
RectangularShape rec = null;
if (round)
rec = new RoundRectangle2D.Float(0, 0, c.getWidth(),c.getHeight(), 15,15);
else
rec = new Rectangle(0,0, c.getWidth(),c.getHeight());
g2D.fill(rec);
}
} // fill Rectangle
/** Top Top Color - white 128 the higher the ligher */
static public final Color COL_1TOP = new Color(255, 255, 255, 128);
/** End Top Color - white 0 */
static public final Color COL_1END = new Color(255, 255, 255, 0);
/** Top End Color - black 0 */
static public final Color COL_2TOP = new Color(0, 0, 0, 0);
/** End End Color - black 64 the higher the darker */
static public final Color COL_2END = new Color(0, 0, 0, 64);
/**
* Paint 3D effect in (lighten in upper half, darken in lowerhalf)
* (called from paint methods)
*
* @param g2D Graphics
* @param r Ractangle
* @param round paint round corners
* @param out paint sticking out (not pressed)
*/
public static void paint3Deffect (Graphics2D g2D, Rectangle r, boolean round, boolean out)
{
// paint upper gradient
GradientPaint topPaint = null;
if (out)
topPaint = new GradientPaint(r.x, r.y, COL_1TOP, r.x, r.y+r.height/2, COL_1END);
else
topPaint = new GradientPaint(r.x, r.y, COL_2END, r.x, r.y+r.height/2, COL_2TOP);
g2D.setPaint(topPaint);
//
RectangularShape topRec = null;
if (round)
topRec = new RoundRectangle2D.Float(r.x,r.y, r.width,r.height/2, 15,15);
else
topRec = new Rectangle(r.x,r.y, r.width,r.height/2);
g2D.fill(topRec);
// paint lower gradient
GradientPaint endPaint = null; // upper left corner to lower left
if (out)
endPaint = new GradientPaint(r.x, r.y+r.height/2, COL_2TOP, r.x, r.y+r.height, COL_2END);
else
endPaint = new GradientPaint(r.x, r.y+r.height/2, COL_1END, r.x, r.y+r.height, COL_1TOP);
g2D.setPaint(endPaint);
//
RectangularShape endRec = null;
if (round)
endRec = new RoundRectangle2D.Float(r.x, r.y+r.height/2, r.width, r.height/2, 15,15);
else
endRec = new Rectangle(r.x, r.y+r.height/2, r.width, r.height/2);
g2D.fill(endRec);
} // paint3Deffect
/**
* Paint 3D effect in (lighten in upper half, darken in lowerhalf)
* (called from paint methods)
*
* @param g2D Graphics
* @param c Component
* @param round paint round corners
* @param out paint sticking out (not pressed)
*/
public static void paint3Deffect (Graphics2D g2D, JComponent c, boolean round, boolean out)
{
// paint upper gradient
GradientPaint topPaint = null;
if (out)
topPaint = new GradientPaint(0,0, COL_1TOP, 0,c.getHeight()/2, COL_1END);
else
topPaint = new GradientPaint(0,0, COL_2END, 0,c.getHeight()/2, COL_2TOP);
g2D.setPaint(topPaint);
//
RectangularShape topRec = null;
if (round)
topRec = new RoundRectangle2D.Float(0, 0, c.getWidth(),c.getHeight()/2, 15,15);
else
topRec = new Rectangle(0,0, c.getWidth(),c.getHeight()/2);
g2D.fill(topRec);
// paint lower gradient
GradientPaint endPaint = null;
if (out)
endPaint = new GradientPaint(0, c.getHeight()/2, COL_2TOP, 0,c.getHeight(), COL_2END);
else
endPaint = new GradientPaint(0, c.getHeight()/2, COL_1END, 0,c.getHeight(), COL_1TOP);
g2D.setPaint(endPaint);
//
RectangularShape endRec = null;
if (round)
endRec = new RoundRectangle2D.Float(0, c.getHeight()/2, c.getWidth(),c.getHeight()/2, 15,15);
else
endRec = new Rectangle(0, c.getHeight()/2, c.getWidth(), c.getHeight()/2);
g2D.fill(endRec);
} // paint3Deffect
/*************************************************************************
* Helper to simplify creation of translucent colors
* @param c Color
* @param alpha alpha
* @return Translucent Color
*/
static public Color getTranslucentColor(Color c, int alpha)
{
return new Color(c.getRed(), c.getGreen(), c.getBlue(), alpha);
} // getTranslucentColor
/**
* Set Not Buffered. Recursive for all contained components
* @param c
*/
static public void setNotBuffered (Component c)
{
if (c instanceof JComponent)
((JComponent)c).setDoubleBuffered(false);
if (c instanceof Container)
{
Component[] cc = ((Container)c).getComponents();
for (int i = 0; i < cc.length; i++)
setNotBuffered(cc[i]);
}
} // setNotBuffered
/*************************************************************************/
/** Component for media tracker */
protected final static Component s_component = new Component() {};
/** Media tracker */
protected final static MediaTracker s_tracker = new MediaTracker(s_component);
/**
* load the image located at path.
*
* @param path location of image file in local file system
* - otherwise relative to class
* @return loaded image at path or url
* @see java.io.File#toURL()
*/
public static synchronized Image loadImage(String path)
{
Image image = null;
try
{
File file = new File(path);
URL url = file.toURL();
image = loadImage(url);
}
catch (MalformedURLException e)
{
log.severe("Path= " + path + " - " + e.getMessage());
}
return image;
} // loadImage
/**
* Load the image located at URL.
*
* @param url URL where the image file is located.
* @return loaded image at path or url
* @see java.io.File#toURL()
*/
public static synchronized Image loadImage(URL url)
{
Image image = null;
image = Toolkit.getDefaultToolkit().getImage(url);
if (image != null)
{
s_tracker.addImage(image, 0);
try
{
s_tracker.waitForAll();
}
catch (InterruptedException e)
{
log.severe("Url= " + url + " - " + e.getMessage());
s_tracker.removeImage(image);
image = null;
}
finally
{
if (image != null)
s_tracker.removeImage(image);
if (s_tracker.isErrorAny())
{
log.severe("Tracker: " + s_tracker.getErrorsAny()[0]);
image = null;
}
if (image != null)
{
if (image.getWidth(null) < 0 || image.getHeight(null) < 0)
{
log.severe("Image=0");
image = null;
}
}
}
}
return image;
} // loadImage
/**
* Load an image from a given file into a BufferedImage.
* The image is returned in the format defined by the imageType parameter.
* Note that this is special cased for JPEG images where loading is performed
* outside the standard media tracker, for efficiency reasons.
*
* @param file File where the image file is located.
* @param imageType one of the image type defined in the BufferedImage class.
* @return loaded image at path or url
* @see java.awt.image.BufferedImage
*/
public static synchronized BufferedImage loadBufferedImage(File file, int imageType)
{
BufferedImage image = null;
try
{
URL url = file.toURL();
image = loadBufferedImage(url, imageType);
}
catch (MalformedURLException e)
{
log.severe("File: " + file + " - " + e.getMessage());
}
return image;
} // loadBufferedImage
/**
* Load an image from a given path into a BufferedImage.
* The image is returned in the format defined by the imageType parameter.
* Note that this is special cased for JPEG images where loading is performed
* outside the standard media tracker, for efficiency reasons.
*
* @param path Name of file where the image file is located.
* @param imageType one of the image type defined in the BufferedImage class.
* @return loaded image at path or url
* @see java.awt.image.BufferedImage
*/
public static synchronized BufferedImage loadBufferedImage(String path, int imageType)
{
File file = new File(path);
BufferedImage image = null;
try
{
URL url = file.toURL();
image = loadBufferedImage(url, imageType);
}
catch (MalformedURLException e)
{
log.severe("Path: " + path + " - " + e.getMessage());
}
return image;
} // loadBufferedImage
/**
* Loads an image from a given URL into a BufferedImage.
* The image is returned in the format defined by the imageType parameter.
* Note that this is special cased for JPEG images where loading is performed
* outside the standard media tracker, for efficiency reasons.
*
* @param url URL where the image file is located.
* @param imageType one of the image type defined in the BufferedImage class.
* @return loaded image at path or url
* @see java.awt.image.BufferedImage
*/
public static synchronized BufferedImage loadBufferedImage(URL url, int imageType)
{
BufferedImage image = null;
// Special handling for JPEG images to avoid extra processing if possible.
if (url == null || !url.toString().toLowerCase().endsWith(".jpg"))
{
Image tmpImage = loadImage(url);
if (tmpImage != null)
{
image = new BufferedImage(tmpImage.getWidth(null), tmpImage.getHeight(null), imageType);
Graphics2D g = image.createGraphics();
g.drawImage(tmpImage, 0, 0, null);
g.dispose();
}
}
else
{
BufferedImage tmpImage = loadBufferedJPEGImage(url);
if (tmpImage != null)
{
if (tmpImage.getType() != imageType)
{
log.config("Incompatible JPEG image type: creating new buffer image");
image = new BufferedImage(tmpImage.getWidth(null), tmpImage.getHeight(null), imageType);
Graphics2D g = image.createGraphics();
g.drawImage(tmpImage, 0, 0, null);
g.dispose();
}
else
image = tmpImage;
}
}
return image;
} // loadBufferedImage
/**
* Load a JPEG image from a given location.
*
* @param url URL where the image file is located.
* @return loaded image at path or url
*/
public static synchronized BufferedImage loadBufferedJPEGImage (URL url)
{
BufferedImage image = null;
if (url != null)
{
InputStream in = null;
try
{
in = url.openStream();
JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(in);
image = decoder.decodeAsBufferedImage();
}
catch (Exception e)
{
log.severe("URL: " + url + " - " + e.getMessage());
image = null;
}
finally
{
try
{
if (in != null)
in.close();
}
catch (IOException ioe)
{
log.severe("URL: " + url + " - " + ioe.getMessage());
}
}
if (image != null)
{
log.config("Image type : " + image.getType());
if (image.getWidth() <= 0 || image.getHeight() <= 0)
{
log.severe("URL: " + url + " =0");
image = null;
}
}
}
return image;
}
/*************************************************************************
* Convenience function for determining ComponentOrientation.
* Copied from MetalUtils
* @param c Component
* @return true, if left to right
*/
public static boolean isLeftToRight (Component c)
{
return c.getComponentOrientation().isLeftToRight();
} // isLeftToRight
/** Debug SequenceNo */
private static int s_no = 0;
/**
* Print Oarent of Component
* @param c component
*/
static void printParents (JComponent c)
{
if (c.getName() == null)
c.setName("C" + String.valueOf(s_no++));
System.out.print(c.getName());
System.out.print(" - " + c.getClass().getName());
System.out.println (" ** " + c.isOpaque() + " bg=" + (c.getClientProperty(AdempierePLAF.BACKGROUND) != null));
//
Container container = c.getParent();
while (container != null)
{
System.out.print (" - " + container.getName() + " " + container.getClass().getName()
+ " ** " + container.isOpaque());
if (container instanceof JComponent)
System.out.print (" bg=" + (((JComponent)container).getClientProperty(AdempierePLAF.BACKGROUND) != null));
System.out.println ();
container = container.getParent();
}
} // printParents
} // AdempiereTuils

View File

@ -0,0 +1,58 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ViewportUI;
import javax.swing.plaf.basic.BasicViewportUI;
/**
* Adempiere View Point
*
* @author Jorg Janke
* @version $Id: AdempiereViewportUI.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
*/
public class AdempiereViewportUI extends BasicViewportUI
{
/** Shared UI object */
private static ViewportUI viewportUI;
/**
* Create UI
* @param c
* @return AdempiereViewpointUI
*/
public static ComponentUI createUI (JComponent c)
{
if (viewportUI == null)
viewportUI = new AdempiereViewportUI();
return viewportUI;
} // createUI
/**
* Install UI
* @param c
*/
public void installUI(JComponent c)
{
super.installUI(c);
// will be ignored as set in constructor after updateUI - Sun bug: 4677611
c.setOpaque(false);
} // installUI
} // AdempiereViewpointUI

View File

@ -0,0 +1,44 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
/*
* @(#)AquaTheme.java 1.9 04/07/26
*/
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
/**
* This class describes a theme using "blue-green" colors.
*
* 1.9 07/26/04
* @author Steve Wilson
*/
public class AquaTheme extends DefaultMetalTheme {
public String getName() { return "Aqua"; }
private final ColorUIResource primary1 = new ColorUIResource(102, 153, 153);
private final ColorUIResource primary2 = new ColorUIResource(128, 192, 192);
private final ColorUIResource primary3 = new ColorUIResource(159, 235, 235);
protected ColorUIResource getPrimary1() { return primary1; }
protected ColorUIResource getPrimary2() { return primary2; }
protected ColorUIResource getPrimary3() { return primary3; }
}

View File

@ -0,0 +1,59 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
/*
* @(#)CharcoalTheme.java 1.9 04/07/26
*/
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
/**
* This class describes a theme using gray colors.
*
* 1.9 07/26/04
* @author Steve Wilson
*/
public class CharcoalTheme extends DefaultMetalTheme {
public String getName() { return "Charcoal"; }
private final ColorUIResource primary1 = new ColorUIResource(66, 33, 66);
private final ColorUIResource primary2 = new ColorUIResource(90, 86, 99);
private final ColorUIResource primary3 = new ColorUIResource(99, 99, 99);
private final ColorUIResource secondary1 = new ColorUIResource(0, 0, 0);
private final ColorUIResource secondary2 = new ColorUIResource(51, 51, 51);
private final ColorUIResource secondary3 = new ColorUIResource(102, 102, 102);
private final ColorUIResource black = new ColorUIResource(222, 222, 222);
private final ColorUIResource white = new ColorUIResource(0, 0, 0);
protected ColorUIResource getPrimary1() { return primary1; }
protected ColorUIResource getPrimary2() { return primary2; }
protected ColorUIResource getPrimary3() { return primary3; }
protected ColorUIResource getSecondary1() { return secondary1; }
protected ColorUIResource getSecondary2() { return secondary2; }
protected ColorUIResource getSecondary3() { return secondary3; }
protected ColorUIResource getBlack() { return black; }
protected ColorUIResource getWhite() { return white; }
}

View File

@ -0,0 +1,289 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.Color;
import java.util.logging.*;
import javax.swing.plaf.ColorUIResource;
/**
* Color Blind Utilities.
* These utilities help to show how color blind/challenged see colors.
*
* Created by Thomas Wolfmaier.
* Copyright (C) 1999-2005 HCIRN.
* All rights reserved.
* @see <a href="http://www.hcirn.com">HCIRN</a>
*
* @author Thomas Wolfmaier
* @version $Id: ColorBlind.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
*/
public class ColorBlind
{
/** Color Blindness Type - 0=none */
public static final String[] COLORBLIND_TYPE =
{"", "Protanopia", "Deuteranopia", "Tritanopia"};
public static final int NORMAL = 0;
public static final int PROTANOPIA = 1;
public static final int DEUTERANOPIA = 2;
public static final int TRITANOPIA = 3;
/*************************************************************************/
private static final double[][] confusionPoints =
{ {0.735, 0.265},
{1.140, -0.140},
{0.171, -0.003}
};
private static final double[][][] colorAxes =
{ {{0.115807, 0.073581}, {0.471899, 0.527051}},
{{0.102776, 0.102864}, {0.505845, 0.493211}},
{{0.045391, 0.294976}, {0.665764, 0.334011}}
};
private static final double[][] RGBtoXYZMatrix =
{ {0.430574, 0.341550, 0.178325},
{0.222015, 0.706655, 0.071330},
{0.020183, 0.129553, 0.939180}
};
private static final double[][] XYZtoRGBMatrix =
{ { 3.063218, -1.393325, -0.475802},
{-0.969243, 1.875966, 0.041555},
{ 0.067871, -0.228834, 1.069251}
};
private static final double[] whitePoint =
{ 0.312713, 0.329016, 0.358271
};
private static final double gamma = 2.2;
/** Color Blind Type */
private static int s_colorType = NORMAL;
/** Logger */
private static Logger log = Logger.getLogger(ColorBlind.class.getName());
/**
* Set Color Type for Color Blind view
* @param colorType (0 = none)
*/
public static void setColorType (int colorType)
{
if (colorType > 0 && colorType < 4)
s_colorType = colorType;
else
s_colorType = 0;
if (s_colorType != 0)
log.config(COLORBLIND_TYPE[colorType]);
} // setColorType
/**
* Get Color Type for Color Blind view
* @return colorType (0 = none)
*/
public static int getColorType ()
{
return s_colorType;
} // getColorType
/**************************************************************************
* Convert "normal" color to Dichromat Color based on set color type
* @param color Java Color object containing values for RGB
* @return Dichromat Color
*/
public static ColorUIResource getDichromatColorUIResource (ColorUIResource color)
{
if (s_colorType == NORMAL)
return color;
return new ColorUIResource(getDichromatColorUIResource (color, s_colorType));
} // convertToDichromatColorUIResource
/**
* Convert "normal" color to Dichromat Color
* @param color Java Color object containing values for RGB
* @param colorType PROTANOPIA = 1, DEUTERANOPIA = 2 or TRITANOPIA = 3 as declared above
* @return Dichromat Color
*/
public static Color getDichromatColorUIResource (ColorUIResource color, int colorType)
{
if (s_colorType == NORMAL)
return color;
return new ColorUIResource(getDichromatColor (color, s_colorType));
} // convertToDichromatColorUIResource
/**
* Convert "normal" color to Dichromat Color based on set color type
* @param color Java Color object containing values for RGB
* @return Dichromat Color
*/
public static Color getDichromatColor (Color color)
{
if (s_colorType == NORMAL)
return color;
return getDichromatColor (color, s_colorType);
} // convertToDichromatColor
/**
* Convert "normal" color to Dichromat Color
* @param color Java Color object containing values for RGB
* @param colorType PROTANOPIA = 1, DEUTERANOPIA = 2 or TRITANOPIA = 3 as declared above
* @return Dichromat Color
*/
public static Color getDichromatColor (Color color, int colorType)
{
// check type & return if not valid
int type = 0;
if (colorType > 0 && colorType < 4)
type = colorType;
// No conversion or no color
if (type == 0 || color == null)
return color;
type--; // correct to zero based
// Return white & black - not converted
if (color.equals(Color.black) || color.equals(Color.white))
return color;
double red = color.getRed();
double green = color.getGreen();
double blue = color.getBlue();
// System.out.println("Red: " + red + " Green: " + green + " Blue: " + blue);
double X = RGBtoXYZMatrix[0][0] * Math.pow(red / 255.0, gamma) +
RGBtoXYZMatrix[0][1] * Math.pow(green / 255.0, gamma) +
RGBtoXYZMatrix[0][2] * Math.pow(blue / 255.0, gamma);
double Y = RGBtoXYZMatrix[1][0] * Math.pow(red / 255.0, gamma) +
RGBtoXYZMatrix[1][1] * Math.pow(green / 255.0, gamma) +
RGBtoXYZMatrix[1][2] * Math.pow(blue / 255.0, gamma);
double Z = RGBtoXYZMatrix[2][0] * Math.pow(red / 255.0, gamma) +
RGBtoXYZMatrix[2][1] * Math.pow(green / 255.0, gamma) +
RGBtoXYZMatrix[2][2] * Math.pow(blue / 255.0, gamma);
// System.out.println("X: " + X + " Y: " + Y + " Z: " + Z);
double x = 0.0;
double y = 0.0;
if ((X + Y + Z) != 0.0)
{
x = X / (X + Y + Z);
y = Y / (X + Y + Z);
}
// System.out.println("x: " + x + " y: " + y + " Y: " + Y);
double Yn = Y;
double Xn = (whitePoint[0] * Yn) / whitePoint[1];
double Zn = (whitePoint[2] * Yn) / whitePoint[1];
double xc = confusionPoints[type][0];
double yc = confusionPoints[type][1];
double x1 = colorAxes[type][0][0];
double y1 = colorAxes[type][0][1];
double x2 = colorAxes[type][1][0];
double y2 = colorAxes[type][1][1];
double ap = (y2 - y1) / (x2 - x1);
double bp = y1 - (x1 * ap);
// System.out.println("ap: " + ap + " bp: " + bp);
double a;
if (x < xc)
a = (yc - y) / (xc - x);
else
a = (y - yc) / (x - xc);
double b = y - (x * a);
// System.out.println("a: " + a + " b: " + b);
x = (bp - b) / (a - ap);
y = a * x + b;
// System.out.println("x: " + x + " y: " + y);
X = 0.0;
Z = 0.0;
if (y != 0)
{
X = x * (Y / y);
Z = (1 - x - y) * (Y / y);
}
// System.out.println("X: " + X + " Y: " + Y + " Z: " + Z);
red = XYZtoRGBMatrix[0][0] * X +
XYZtoRGBMatrix[0][1] * Y +
XYZtoRGBMatrix[0][2] * Z;
green = XYZtoRGBMatrix[1][0] * X +
XYZtoRGBMatrix[1][1] * Y +
XYZtoRGBMatrix[1][2] * Z;
blue = XYZtoRGBMatrix[2][0] * X +
XYZtoRGBMatrix[2][1] * Y +
XYZtoRGBMatrix[2][2] * Z;
// System.out.println("Red: " + red + " Green: " + green + " Blue: " + blue);
double reddiff = XYZtoRGBMatrix[0][0] * (Xn - X) +
XYZtoRGBMatrix[0][1] * (Yn - Y) +
XYZtoRGBMatrix[0][2] * (Zn - Z);
double greendiff = XYZtoRGBMatrix[1][0] * (Xn - X) +
XYZtoRGBMatrix[1][1] * (Yn - Y) +
XYZtoRGBMatrix[1][2] * (Zn - Z);
double bluediff = XYZtoRGBMatrix[2][0] * (Xn - X) +
XYZtoRGBMatrix[2][1] * (Yn - Y) +
XYZtoRGBMatrix[2][2] * (Zn - Z);
double cr = ((red < 0.0 ? 0.0 : 1.0) - red) / reddiff;
double cg = ((green < 0.0 ? 0.0 : 1.0) - green) / greendiff;
double cb = ((blue < 0.0 ? 0.0 : 1.0) - blue) / bluediff;
// System.out.println("cr: " + cr + " cg: " + cg + " cb: " + cb);
double c1 = (cr < 0 || cr > 1) ? 0 : cr;
double c2 = (cg < 0 || cg > 1) ? 0 : cg;
double c3 = (cb < 0 || cb > 1) ? 0 : cb;
double c = Math.max(c1, Math.max(c2, c3));
// System.out.println("c: " + c);
red = red + c * reddiff;
green = green + c * greendiff;
blue = blue + c * bluediff;
// System.out.println("Red: " + red + " Green: " + green + " Blue: " + blue);
red = Math.pow(red, 1.0 / gamma);
green = Math.pow(green, 1.0 / gamma);
blue = Math.pow(blue, 1.0 / gamma);
// System.out.println("Red: " + red + " Green: " + green + " Blue: " + blue);
// System.out.println("Red: " + red * 255.0 + " Green: " + green * 255.0 + " Blue: " + blue * 255.0);
Color retValue = new Color((float)red, (float)green, (float)blue);
log.fine("Color " + color.getRed() + "-" + color.getGreen() + "-" + color.getBlue()
+ " -> " + retValue.getRed() + "-" + retValue.getGreen() + "-" + retValue.getBlue() + " <- " + COLORBLIND_TYPE[colorType]);
return retValue;
} // convertToDichromatColor
} // ColorBlind

View File

@ -0,0 +1,242 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import javax.swing.*;
import javax.swing.plaf.metal.*;
/**
* Adempiere Look & Feel.
* We wanted a nice UI not the battleship gray based stuff.
* I guess a matter of taste.
* <code>
* :
* UIManager.setLookAndFeel(new com.adempiere.plaf.AdempiereLookAndFeel());
* // or UIManager.setLookAndFeel("com.adempiere.plaf.AdempiereLookAndFeel");
* </code>
*
* @author Jorg Janke
* @version $Id: AdempiereLookAndFeel.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class CompiereLookAndFeel extends MetalLookAndFeel
{
/**
* Constructor
*/
public CompiereLookAndFeel()
{
super();
// System.setProperty("awt.visualbell", "true");
} // AdempiereLookAndFeel
/** The name */
public static final String NAME = "Compiere";
/** The Theme */
private static CompiereTheme s_adempiereTheme = new CompiereThemeBlueMetal();
private static MetalTheme s_theme = s_adempiereTheme;
/** Paint Round Corners */
protected static boolean ROUND = false;
/**
* The Name
* @return Name
*/
public String getName()
{
return NAME;
} // getName
/**
* The ID
* @return Name
*/
public String getID()
{
return NAME;
} // getID
/**
* The Description
* @return description
*/
public String getDescription()
{
return "Adempiere Look & Feel - (c) 2001-2005 Jorg Janke";
} // getDescription
/**************************************************************************
* Get/Create Defaults
* @return UI Defaults
*/
public UIDefaults getDefaults()
{
// System.out.println("AdempiereLookAndFeel.getDefaults");
// Theme already created/set
MetalLookAndFeel.setCurrentTheme(s_theme);
UIDefaults defaults = super.getDefaults(); // calls init..Defaults
return defaults;
} // getDefaults
/**
* Creates the mapping from UI class IDs to <code>ComponentUI</code> classes,
* putting the ID-<code>ComponentUI</code> pairs in the passed-in defaults table.
* Each <code>JComponent</code> class specifies its own UI class ID string.
*
* @param table UI Defaults
*/
protected void initClassDefaults(UIDefaults table)
{
// System.out.println("AdempiereLookAndFeel.initClassDefaults");
super.initClassDefaults( table);
// Overwrite
putDefault (table, "PanelUI");
putDefault (table, "ButtonUI");
putDefault (table, "ToggleButtonUI");
putDefault (table, "TabbedPaneUI");
putDefault (table, "TableHeaderUI");
putDefault (table, "RadioButtonUI");
putDefault (table, "CheckBoxUI");
putDefault (table, "ComboBoxUI");
putDefault (table, "MenuUI");
putDefault (table, "MenuBarUI");
putDefault (table, "MenuItemUI");
putDefault (table, "CheckBoxMenuItemUI");
putDefault (table, "ToolBarUI");
putDefault (table, "RootPaneUI");
putDefault (table, "ViewportUI");
putDefault (table, "SplitPaneUI");
putDefault (table, "ScrollPaneUI");
putDefault (table, "LabelUI");
putDefault (table, "ToolTipUI");
putDefault (table, "TextAreaUI");
} // initClassDefaults
/**
* Put "uiKey - ClassName" pair in UIDefaults
* @param table
* @param uiKey
*/
private void putDefault (UIDefaults table, String uiKey)
{
try
{
String className = "org.compiere.plaf.Adempiere" + uiKey;
table.put(uiKey, className);
}
catch (Exception ex)
{
ex.printStackTrace();
}
} // putDefault
/**
* For overwriting Component defaults
* @param table
*/
protected void initSystemColorDefaults (UIDefaults table)
{
// System.out.println("AdempiereLookAndFeel.initSystemColorDefaults");
super.initSystemColorDefaults( table);
// we made the color a bit darker
// table.put("textHighlight", AdempiereUtils.getTranslucentColor(getTextHighlightColor(), 128));
} // initSystemColorDefaults
/**
* For overwriting Component defaults
* @param table
*/
protected void initComponentDefaults (UIDefaults table)
{
// System.out.println("AdempiereLookAndFeel.initComponentDefaults");
super.initComponentDefaults( table);
// ComboBox defaults
Color c = table.getColor("TextField.background");
table.put("ComboBox.background", c);
table.put("ComboBox.listBackground", c);
} // initComponentDefaults
/**************************************************************************
* Create Default Thems
*/
protected void createDefaultTheme()
{
setCurrentTheme(s_theme);
} // createDefaultTheme
/**
* Set Current Theme
* @param theme metal theme
*/
public static void setCurrentTheme (MetalTheme theme)
{
if (theme != null)
s_theme = theme;
MetalLookAndFeel.setCurrentTheme(s_theme);
} // setCurrentTheme
/**
* Get Current Theme
* @return Metal Theme
*/
public static MetalTheme getCurrentTheme()
{
return s_theme;
} // getCurrentTheme
/**
* Get Adempiere Theme
* @return Metal Theme
*/
public static CompiereTheme getAdempiereTheme()
{
return s_adempiereTheme;
} // getCurrentTheme
/**
* Error Feedback.
* <p>
* Invoked when the user attempts an invalid operation,
* such as pasting into an uneditable <code>JTextField</code>
* that has focus.
* </p>
* <p>
* If the user has enabled visual error indication on
* the desktop, this method will flash the caption bar
* of the active window. The user can also set the
* property awt.visualbell=true to achieve the same
* results.
* </p>
* @param component Component the error occured in, may be
* null indicating the error condition is
* not directly associated with a
* <code>Component</code>.
*/
public void provideErrorFeedback (Component component)
{
super.provideErrorFeedback (component);
} // provideErrorFeedback
} // AdempiereLookAndFeel

View File

@ -0,0 +1,601 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import java.util.logging.*;
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
import org.compiere.util.*;
import sun.awt.*;
/**
* Adempiere User definable Theme (if used in Metal L&F).
* In other Environments, it provides UI extensions (e.g. Error Color)
*
* @author Jorg Janke
* @version $Id: AdempiereTheme.java,v 1.4 2006/07/30 00:52:23 jjanke Exp $
*/
public class CompiereTheme extends MetalTheme
{
/**
* Constructor - nop
*/
public CompiereTheme()
{
} // AdempiereTheme
/**
* Return Theme Name
* @return Theme Name
*/
public String getName()
{
return s_name;
} // getName
/**
* String Representation
* @return info
*/
public String toString ()
{
return s_name;
} // toString
/**
* Set Default Colors
*/
protected void setDefault()
{
} // setDefault
/** Static Initializer */
static
{
s_theme = new CompiereThemeBlueMetal();
}
/** Theme Name */
protected static String s_name = "Compiere Theme";
/** Logger */
protected static Logger log = Logger.getLogger(CompiereTheme.class.getName());
/** Active Theme */
protected static CompiereTheme s_theme = null;
/** Blue 51,51,102 */
protected static ColorUIResource primary0 = new ColorUIResource(51, 51, 102);
/** Blue 102, 102, 153 */
protected static ColorUIResource primary1;
/** Blue 153, 153, 204 */
protected static ColorUIResource primary2;
/** Blue 204, 204, 255 */
protected static ColorUIResource primary3;
/** Black */
protected final ColorUIResource secondary0 = new ColorUIResource(0, 0, 0);
/** Gray 102, 102, 102 */
protected static ColorUIResource secondary1;
/** Gray 153, 153, 153 */
protected static ColorUIResource secondary2;
/** BlueGray 214, 224, 234 - background */
protected static ColorUIResource secondary3;
/** White */
protected final ColorUIResource secondary4 = new ColorUIResource(255, 255, 255);
/** Black */
protected static ColorUIResource black;
/** White */
protected static ColorUIResource white;
/** Background for mandatory fields */
protected static ColorUIResource mandatory;
/** Background for fields in error */
protected static ColorUIResource error;
/** Background for inactive fields */
protected static ColorUIResource inactive;
/** Background for info fields */
protected static ColorUIResource info;
/** Foreground Text OK */
protected static ColorUIResource txt_ok;
/** Foreground Text Error */
protected static ColorUIResource txt_error;
/** Control font */
protected static FontUIResource controlFont;
/** System font */
protected static FontUIResource systemFont;
/** User font */
protected static FontUIResource userFont;
/** Small font */
protected static FontUIResource smallFont;
/** Window Title font */
protected static FontUIResource windowFont;
/** Menu font */
protected static FontUIResource menuFont;
/** Default Font */
public static final String FONT_DEFAULT = "Dialog";
/** Default Font Size */
public static final int FONT_SIZE = 12;
/**
* Set Theme to current Metal Theme and copy it
*/
public static void setTheme ()
{
log.fine("");
AppContext context = AppContext.getAppContext();
MetalTheme copyFrom = (MetalTheme)context.get("currentMetalTheme");
boolean flat = Ini.isPropertyBool(Ini.P_UI_FLAT);
setTheme (copyFrom, flat);
} // setTheme
/**
* Set Theme to current Metal Theme and copy it
* @param copyFrom theme
* @param flat flat colors
*/
public static void setTheme (MetalTheme copyFrom, boolean flat)
{
if (copyFrom == null || copyFrom instanceof CompiereTheme)
return;
log.fine(copyFrom.getName() + " - Flat=" + flat);
// May not be correct, if Themes overwrites default methods
primary1 = copyFrom.getPrimaryControlDarkShadow();
primary2 = copyFrom.getPrimaryControlShadow();
primary3 = copyFrom.getPrimaryControl();
secondary1 = copyFrom.getControlDarkShadow();
secondary2 = copyFrom.getControlShadow();
secondary3 = copyFrom.getControl();
AdempierePanelUI.setDefaultBackground(new AdempiereColor(secondary3, flat));
white = copyFrom.getPrimaryControlHighlight();
black = copyFrom.getPrimaryControlInfo();
//
controlFont = copyFrom.getControlTextFont();
systemFont = copyFrom.getSystemTextFont();
userFont = copyFrom.getUserTextFont();
smallFont = copyFrom.getSubTextFont();
menuFont = copyFrom.getMenuTextFont();
windowFont = copyFrom.getWindowTitleFont();
} // setTheme
/**************************************************************************
* Get Primary 1 (blue in default Metal Theme)
* @return color
*/
public ColorUIResource getPrimary1()
{
return ColorBlind.getDichromatColorUIResource(primary1);
}
public ColorUIResource getPrimary2()
{
return ColorBlind.getDichromatColorUIResource(primary2);
}
public ColorUIResource getPrimary3()
{
return ColorBlind.getDichromatColorUIResource(primary3);
}
/**
* Get Seconary 1 (gray in default Metal Theme)
* @return color
*/
public ColorUIResource getSecondary0()
{
return ColorBlind.getDichromatColorUIResource(secondary0);
}
public ColorUIResource getSecondary1()
{
return ColorBlind.getDichromatColorUIResource(secondary1);
}
public ColorUIResource getSecondary2()
{
return ColorBlind.getDichromatColorUIResource(secondary2);
}
public ColorUIResource getSecondary3()
{
return ColorBlind.getDichromatColorUIResource(secondary3);
}
public ColorUIResource getSecondary4()
{
return ColorBlind.getDichromatColorUIResource(secondary4);
}
public ColorUIResource getBlack()
{
return ColorBlind.getDichromatColorUIResource(black);
}
public ColorUIResource getWhite()
{
return ColorBlind.getDichromatColorUIResource(white);
}
/**
* Control Font (plain)
* @return font
*/
protected static FontUIResource _getControlTextFont()
{
if (controlFont == null)
{
try
{
controlFont = new FontUIResource(Font.getFont("swing.plaf.metal.controlFont",
new Font(FONT_DEFAULT, Font.PLAIN, FONT_SIZE)));
}
catch (Exception e)
{
controlFont = new FontUIResource(FONT_DEFAULT, Font.PLAIN, FONT_SIZE);
}
}
return controlFont;
}
public FontUIResource getControlTextFont() {return _getControlTextFont();}
/**
* System Font
* @return font
*/
protected static FontUIResource _getSystemTextFont()
{
if (systemFont == null)
{
try
{
systemFont = new FontUIResource(Font.getFont("swing.plaf.metal.systemFont",
new Font(FONT_DEFAULT, Font.PLAIN, FONT_SIZE)));
}
catch (Exception e)
{
systemFont = new FontUIResource(FONT_DEFAULT, Font.PLAIN, FONT_SIZE);
}
}
return systemFont;
}
public FontUIResource getSystemTextFont() {return _getSystemTextFont();}
/**
* User Font
* @return font
*/
protected static FontUIResource _getUserTextFont()
{
if (userFont == null)
{
try
{
userFont = new FontUIResource(Font.getFont("swing.plaf.metal.userFont",
new Font(FONT_DEFAULT, Font.PLAIN, FONT_SIZE)));
}
catch (Exception e)
{
userFont = new FontUIResource(FONT_DEFAULT, Font.PLAIN, FONT_SIZE);
}
}
return userFont;
}
public FontUIResource getUserTextFont() {return _getUserTextFont();}
/**
* Menu
* @return font
*/
protected static FontUIResource _getMenuTextFont()
{
if (menuFont == null)
{
try
{
menuFont = new FontUIResource(Font.getFont("swing.plaf.metal.menuFont",
new Font(FONT_DEFAULT, Font.PLAIN, FONT_SIZE)));
}
catch (Exception e)
{
menuFont = new FontUIResource(FONT_DEFAULT, Font.PLAIN, FONT_SIZE);
}
}
return menuFont;
}
public FontUIResource getMenuTextFont() {return _getMenuTextFont();}
/**
* Window Title
* @return font
*/
protected static FontUIResource _getWindowTitleFont()
{
if (windowFont == null)
{
try
{
windowFont = new FontUIResource(Font.getFont("swing.plaf.metal.windowFont",
new Font(FONT_DEFAULT, Font.BOLD, FONT_SIZE+2)));
}
catch (Exception e)
{
windowFont = new FontUIResource(FONT_DEFAULT, Font.BOLD, FONT_SIZE+2);
}
}
return windowFont;
}
public FontUIResource getWindowTitleFont() {return _getWindowTitleFont();}
/**
* Sub Text
* @return font
*/
protected static FontUIResource _getSubTextFont()
{
if (smallFont == null)
{
try
{
smallFont = new FontUIResource(Font.getFont("swing.plaf.metal.smallFont",
new Font(FONT_DEFAULT, Font.PLAIN, FONT_SIZE-2)));
}
catch (Exception e)
{
smallFont = new FontUIResource(FONT_DEFAULT, Font.PLAIN, FONT_SIZE-2);
}
}
return smallFont;
}
public FontUIResource getSubTextFont() {return _getSubTextFont();}
// Static property info
private static final String P_Primary1 = "#ColorPrimary1";
private static final String P_Primary2 = "#ColorPrimary2";
private static final String P_Primary3 = "#ColorPrimary3";
private static final String P_Secondary1 = "#ColorSecondary1";
private static final String P_Secondary2 = "#ColorSecondary2";
private static final String P_Secondary3 = "#ColorSecondary3";
private static final String P_Black = "#ColorBlack";
private static final String P_White = "#ColorWhite";
private static final String P_Error = "#ColorError";
private static final String P_Info = "#ColorInfo";
private static final String P_Mandatory = "#ColorMandatory";
private static final String P_Inactive = "#ColorInactive";
private static final String P_Txt_OK = "#ColorTextOK";
private static final String P_Txt_Error = "#ColorTextError";
//
private static final String P_Control = "#FontControl";
private static final String P_System = "#FontSystem";
private static final String P_User = "#FontUser";
private static final String P_Small = "#FontSmall";
private static final String P_Window = "#FontWindow";
private static final String P_Menu = "#FontMenu";
/** Background Color */
protected static final String P_AdempiereColor = "#AdempiereColor";
/**
* Save information in Properties
*/
public static void save ()
{
log.config(AdempiereColor.getDefaultBackground().toString());
//
Ini.setProperty(P_Primary1, getColorAsString(primary1));
Ini.setProperty(P_Primary2, getColorAsString(primary2));
Ini.setProperty(P_Primary3, getColorAsString(primary3));
Ini.setProperty(P_Secondary1, getColorAsString(secondary1));
Ini.setProperty(P_Secondary2, getColorAsString(secondary2));
Ini.setProperty(P_Secondary3, getColorAsString(secondary3));
Ini.setProperty(P_Error, getColorAsString(error));
Ini.setProperty(P_Info, getColorAsString(info));
Ini.setProperty(P_Mandatory, getColorAsString(mandatory));
Ini.setProperty(P_Inactive, getColorAsString(inactive));
Ini.setProperty(P_White, getColorAsString(white));
Ini.setProperty(P_Black, getColorAsString(black));
Ini.setProperty(P_Txt_OK, getColorAsString(txt_ok));
Ini.setProperty(P_Txt_Error, getColorAsString(txt_error));
//
Ini.setProperty(P_Control, ((Font)controlFont).toString());
Ini.setProperty(P_System, ((Font)systemFont).toString());
Ini.setProperty(P_User, ((Font)userFont).toString());
Ini.setProperty(P_Small, ((Font)smallFont).toString());
Ini.setProperty(P_Window, ((Font)windowFont).toString());
Ini.setProperty(P_Menu, ((Font)menuFont).toString());
//
AdempiereColor cc = AdempiereColor.getDefaultBackground();
Ini.setProperty(P_AdempiereColor, cc.toString());
} // save
/**
* Parses Color into String representation.
* Required as SystemColors and Alpha Colors have different formats
* @param c Color
* @return [r=102,g=102,b=153,a=255]
* @see #parseColor
*/
public static String getColorAsString (Color c)
{
if (c == null)
c = SystemColor.control;
StringBuffer sb = new StringBuffer("[r=").append(c.getRed())
.append(",g=").append(c.getGreen())
.append(",b=").append(c.getBlue())
.append(",a=").append(c.getAlpha())
.append("]");
// System.out.println(sb.toString());
return sb.toString();
} // getColorAsString
/**
* Load Properties from Ini
*/
public static void load ()
{
primary1 = parseColor (Ini.getProperty(P_Primary1), primary1);
primary2 = parseColor (Ini.getProperty(P_Primary2), primary2);
primary3 = parseColor (Ini.getProperty(P_Primary3), primary3);
secondary1 = parseColor (Ini.getProperty(P_Secondary1), secondary1);
secondary2 = parseColor (Ini.getProperty(P_Secondary2), secondary2);
secondary3 = parseColor (Ini.getProperty(P_Secondary3), secondary3);
error = parseColor(Ini.getProperty(P_Error), error);
info = parseColor(Ini.getProperty(P_Info), info);
mandatory = parseColor(Ini.getProperty(P_Mandatory), mandatory);
inactive = parseColor(Ini.getProperty(P_Inactive), inactive);
white = parseColor(Ini.getProperty(P_White), white);
black = parseColor(Ini.getProperty(P_Black), black);
txt_ok = parseColor(Ini.getProperty(P_Txt_OK), txt_ok);
txt_error = parseColor(Ini.getProperty(P_Txt_Error), txt_error);
//
controlFont = parseFont(Ini.getProperty(P_Control), controlFont);
systemFont = parseFont(Ini.getProperty(P_System), systemFont);
userFont = parseFont(Ini.getProperty(P_User), userFont);
smallFont = parseFont(Ini.getProperty(P_Small), smallFont);
windowFont = parseFont(Ini.getProperty(P_Window), windowFont);
menuFont = parseFont(Ini.getProperty(P_Menu), menuFont);
//
AdempiereColor cc = AdempiereColor.parse(Ini.getProperty(P_AdempiereColor));
AdempiereColor.setDefaultBackground(cc);
} // load
/**
* Reset Info in Properties
*/
public static void reset ()
{
/**
Ini.remove (P_Primary1);
Ini.remove (P_Primary2);
Ini.remove (P_Primary3);
Ini.remove (P_Secondary1);
Ini.remove (P_Secondary2);
Ini.remove (P_Secondary3);
Ini.remove (P_Error);
Ini.remove (P_Info);
Ini.remove (P_Mandatory);
Ini.remove (P_Inactive);
Ini.remove (P_White);
Ini.remove (P_Black);
Ini.remove (P_Txt_OK);
Ini.remove (P_Txt_Error);
//
Ini.remove (P_Control);
Ini.remove (P_System);
Ini.remove (P_User);
Ini.remove (P_Small);
Ini.remove (P_Window);
Ini.remove (P_Menu);
// AdempiereColor
Ini.remove(P_AdempiereColor);
**/
// Initialize
Ini.setProperty(Ini.P_UI_LOOK, CompiereLookAndFeel.NAME);
Ini.setProperty(Ini.P_UI_THEME, s_name);
//
if (s_theme != null)
s_theme.setDefault();
// Background
// AdempiereColor cc = new AdempiereColor(SystemColor.control); // flat Windows 212-208-200
// AdempiereColor cc = new AdempiereColor(secondary3); // flat Metal 204-204-204
AdempiereColor cc = new AdempiereColor(secondary3, false);
AdempiereColor.setDefaultBackground (cc);
//
save(); // save properties
} // reset
/**
* Parse Color.
* <p>
* Color - [r=102,g=102,b=153,a=0]
*
* @param information string information to be parsed
* @param stdColor color used if info cannot parsed
* @return color
* @see #getColorAsString
*/
protected static ColorUIResource parseColor (String information, ColorUIResource stdColor)
{
if (information == null
|| information.length() == 0
|| information.trim().length() == 0)
return stdColor;
// System.out.print("ParseColor=" + info);
try
{
int r = Integer.parseInt(information.substring(information.indexOf("r=")+2, information.indexOf(",g=")));
int g = Integer.parseInt(information.substring(information.indexOf("g=")+2, information.indexOf(",b=")));
int b = 0;
int a = 255;
if (information.indexOf("a=") == -1)
b = Integer.parseInt(information.substring(information.indexOf("b=")+2, information.indexOf("]")));
else
{
b = Integer.parseInt(information.substring(information.indexOf("b=")+2, information.indexOf(",a=")));
a = Integer.parseInt(information.substring(information.indexOf("a=")+2, information.indexOf("]")));
}
ColorUIResource retValue = new ColorUIResource(new Color(r, g, b, a));
// System.out.println(" - " + retValue.toString());
return retValue;
}
catch (Exception e)
{
log.config(information + " - cannot parse: " + e.toString());
}
return stdColor;
} // parseColor
/**
* Parse Font
* <p>
* javax.swing.plaf.FontUIResource[family=dialog.bold,name=Dialog,style=bold,size=12]
*
* @param information string information to be parsed
* @param stdFont font used if info cannot be parsed
* @return font
*/
private static FontUIResource parseFont(String information, FontUIResource stdFont)
{
if (information == null
|| information.length() == 0
|| information.trim().length() == 0)
return stdFont;
// System.out.print("ParseFont=" + info);
try
{
String name = information.substring(information.indexOf("name=")+5, information.indexOf(",style="));
String s = information.substring(information.indexOf("style=")+6, information.indexOf(",size="));
int style = Font.PLAIN;
if (s.equals("bold"))
style = Font.BOLD;
else if (s.equals("italic"))
style = Font.ITALIC;
else if (s.equals("bolditalic"))
style = Font.BOLD | Font.ITALIC;
int size = Integer.parseInt(information.substring(information.indexOf(",size=")+6, information.lastIndexOf("]")));
FontUIResource retValue = new FontUIResource(name,style,size);
// System.out.println(" - " + retValue.toString());
return retValue;
}
catch (Exception e)
{
log.config(information + " - cannot parse: " + e.toString());
}
return stdFont;
} // parseFont
} // AdempiereTheme

View File

@ -0,0 +1,100 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import javax.swing.plaf.*;
/**
* Adempiere default Blue Metal Color Theme
*
* @author Jorg Janke, Adam Michau
* @version $Id: AdempiereThemeBlueMetal.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class CompiereThemeBlueMetal extends CompiereTheme
{
/**
* Adempiere default Theme Blue Metal
*/
public CompiereThemeBlueMetal()
{
setDefault();
s_theme = this;
s_name = NAME;
} // AdempiereThemeBlueMetal
/** Name */
public static final String NAME = "Compiere Theme";
/**
* Set Defaults
*/
protected void setDefault()
{
/** Blue 102, 102, 153 */
primary1 = new ColorUIResource(102, 102, 153);
/** Blue 153, 153, 204 */
primary2 = new ColorUIResource(153, 153, 204);
/** Blue 204, 204, 255 */
primary3 = new ColorUIResource(204, 204, 255);
/** Gray 102, 102, 102 */
secondary1 = new ColorUIResource(102, 102, 102);
/** Gray 153, 153, 153 */
secondary2 = new ColorUIResource(153, 153, 153);
/** BlueGray 214, 224, 234 - background */
secondary3 = new ColorUIResource(205, 215, 231);
/** Black */
black = new ColorUIResource(Color.black);
/** White */
white = new ColorUIResource(Color.white);
/** Background for mandatory fields */
mandatory = new ColorUIResource(224, 224, 255); // blue-isch
/** Background for fields in error */
error = new ColorUIResource(255, 204, 204); // red-isch
/** Background for inactive fields */
inactive = new ColorUIResource(234, 234, 234); // light gray
/** Background for info fields */
info = new ColorUIResource(253, 237, 207); // light yellow
/** Foreground Text OK */
txt_ok = new ColorUIResource(51, 51, 102); // dark blue
/** Foreground Text Error */
txt_error = new ColorUIResource(204, 0, 0); // dark red
/** Control font */
controlFont = null;
_getControlTextFont();
/** System font */
systemFont = null;
_getSystemTextFont();
/** User font */
userFont = null;
_getUserTextFont();
/** Small font */
smallFont = null;
_getSubTextFont();
/** Window Title font */
windowFont = null;
_getWindowTitleFont();
/** Menu font */
menuFont = null;
_getMenuTextFont();
} // setDefault
} // AdempiereThemeBlueMetal

View File

@ -0,0 +1,100 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import javax.swing.plaf.*;
/**
* Adempiere Theme Ice
*
* @author Jorg Janke, Adam Michau
* @version $Id: AdempiereThemeIce.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class CompiereThemeIce extends CompiereTheme
{
/**
* Adempiere Theme: Ice
*/
public CompiereThemeIce ()
{
setDefault();
s_theme = this;
s_name = NAME;
} // AdempiereThemeBlueMetal
/** Name */
public static final String NAME = "Compiere Ice";
/**
* Set Defaults
*/
protected void setDefault()
{
/** Blue 102, 102, 153 */
primary1 = new ColorUIResource(210, 226, 239);
/** Blue 153, 153, 204 */
primary2 = new ColorUIResource(233, 240, 248);
/** Blue 204, 204, 255 */
primary3 = new ColorUIResource(167, 198, 227);
/** Gray 102, 102, 102 */
secondary1 = new ColorUIResource(102, 102, 102);
/** Gray 153, 153, 153 */
secondary2 = new ColorUIResource(153, 153, 153);
/** BlueGray 214, 224, 234 - background */
secondary3 = new ColorUIResource(210, 226, 239);
/** Black */
black = new ColorUIResource(Color.black);
/** White */
white = new ColorUIResource(Color.white);
/** Background for mandatory fields */
mandatory = new ColorUIResource(224, 224, 255); // blue-isch
/** Background for fields in error */
error = new ColorUIResource(255, 204, 204); // red-isch
/** Background for inactive fields */
inactive = new ColorUIResource(234, 234, 234); // light gray
/** Background for info fields */
info = new ColorUIResource(253, 237, 207); // light yellow
/** Foreground Text OK */
txt_ok = new ColorUIResource(51, 51, 102); // dark blue
/** Foreground Text Error */
txt_error = new ColorUIResource(204, 0, 0); // dark red
/** Control font */
controlFont = null;
_getControlTextFont();
/** System font */
systemFont = null;
_getSystemTextFont();
/** User font */
userFont = null;
_getUserTextFont();
/** Small font */
smallFont = null;
_getSubTextFont();
/** Window Title font */
windowFont = null;
_getWindowTitleFont();
/** Menu font */
menuFont = null;
_getMenuTextFont();
} // setDefault
} // AdempiereThemeIce

View File

@ -0,0 +1,177 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
/*
* @(#)ContrastTheme.java 1.10 04/07/26
*/
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;
import javax.swing.plaf.metal.*;
import javax.swing.*;
import javax.swing.border.*;
/**
* This class describes a higher-contrast Metal Theme.
*
* @version 1.10 07/26/04
* @author Michael C. Albers, Jorg Janke
*/
public class ContrastTheme extends DefaultMetalTheme
{
public String getName ()
{
return "Contrast";
}
private final ColorUIResource primary1
= new ColorUIResource (0, 0, 0);
private final ColorUIResource primary2
= new ColorUIResource (204, 204, 204);
private final ColorUIResource primary3
= new ColorUIResource (255, 255, 255);
private final ColorUIResource primaryHighlight
= new ColorUIResource (102, 102, 102);
private final ColorUIResource secondary2
= new ColorUIResource (204, 204, 204);
private final ColorUIResource secondary3
= new ColorUIResource (255, 255, 255);
private final ColorUIResource controlHighlight
= new ColorUIResource (102, 102, 102);
protected ColorUIResource getPrimary1 ()
{
return primary1;
}
protected ColorUIResource getPrimary2 ()
{
return primary2;
}
protected ColorUIResource getPrimary3 ()
{
return primary3;
}
public ColorUIResource getPrimaryControlHighlight ()
{
return primaryHighlight;
}
protected ColorUIResource getSecondary2 ()
{
return secondary2;
}
protected ColorUIResource getSecondary3 ()
{
return secondary3;
}
public ColorUIResource getControlHighlight ()
{
return super.getSecondary3 ();
}
public ColorUIResource getFocusColor ()
{
return getBlack ();
}
public ColorUIResource getTextHighlightColor ()
{
return getBlack ();
}
public ColorUIResource getHighlightedTextColor ()
{
return getWhite ();
}
public ColorUIResource getMenuSelectedBackground ()
{
return getBlack ();
}
public ColorUIResource getMenuSelectedForeground ()
{
return getWhite ();
}
public ColorUIResource getAcceleratorForeground ()
{
return getBlack ();
}
public ColorUIResource getAcceleratorSelectedForeground ()
{
return getWhite ();
}
public void addCustomEntriesToTable (UIDefaults table)
{
Border blackLineBorder = new BorderUIResource
(new LineBorder(getBlack ()));
Border whiteLineBorder = new BorderUIResource(
new LineBorder(getWhite()));
//
Object textBorder = new BorderUIResource (new CompoundBorder
(blackLineBorder, new BasicBorders.MarginBorder()));
// Enhancements
Object[] defaults = new Object[]
{
"ToolTip.border", blackLineBorder,
"TitledBorder.border", blackLineBorder,
"TextField.border", textBorder,
"PasswordField.border", textBorder,
"TextArea.border", textBorder,
"TextPane.border", textBorder,
"EditorPane.border", textBorder,
//
"ComboBox.background", getWindowBackground (),
"ComboBox.foreground", getUserTextColor (),
"ComboBox.selectionBackground", getTextHighlightColor (),
"ComboBox.selectionForeground", getHighlightedTextColor (),
"ProgressBar.foreground", getUserTextColor (),
"ProgressBar.background", getWindowBackground (),
"ProgressBar.selectionForeground", getWindowBackground (),
"ProgressBar.selectionBackground", getUserTextColor (),
"OptionPane.errorDialog.border.background", getPrimary1 (),
"OptionPane.errorDialog.titlePane.foreground", getPrimary3 (),
"OptionPane.errorDialog.titlePane.background", getPrimary1 (),
"OptionPane.errorDialog.titlePane.shadow", getPrimary2 (),
"OptionPane.questionDialog.border.background", getPrimary1 (),
"OptionPane.questionDialog.titlePane.foreground", getPrimary3 (),
"OptionPane.questionDialog.titlePane.background", getPrimary1 (),
"OptionPane.questionDialog.titlePane.shadow", getPrimary2 (),
"OptionPane.warningDialog.border.background", getPrimary1 (),
"OptionPane.warningDialog.titlePane.foreground", getPrimary3 (),
"OptionPane.warningDialog.titlePane.background", getPrimary1 (),
"OptionPane.warningDialog.titlePane.shadow", getPrimary2 (),
};
table.putDefaults (defaults);
}
}

View File

@ -0,0 +1,58 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
/*
* @(#)EmeraldTheme.java 1.9 04/07/26
*/
import javax.swing.plaf.*;
import javax.swing.plaf.metal.*;
/**
* This class describes a theme using glowing green colors.
*
* @version 1.9 07/26/04
* @author Jeff Dinkins
*/
public class EmeraldTheme extends DefaultMetalTheme {
public String getName()
{
return "Emerald";
}
private final ColorUIResource primary1 = new ColorUIResource(51, 142, 71);
private final ColorUIResource primary2 = new ColorUIResource(102, 193, 122);
private final ColorUIResource primary3 = new ColorUIResource(153, 244, 173);
protected ColorUIResource getPrimary1 ()
{
return primary1;
}
protected ColorUIResource getPrimary2 ()
{
return primary2;
}
protected ColorUIResource getPrimary3 ()
{
return primary3;
}
}

View File

@ -0,0 +1,306 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import org.compiere.swing.*;
/**
* Font Chooser Dialog
*
* @author Jorg Janke
* @version $Id: FontChooser.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class FontChooser extends CDialog
implements ActionListener
{
/**
* Show Dialog with initial font and return selected font
* @param owner Base window
* @param title Chooser Title
* @param initFont initial font
* @return selected font
*/
public static Font showDialog (Dialog owner, String title, Font initFont)
{
Font retValue = initFont;
FontChooser fc = new FontChooser(owner, title, initFont);
retValue = fc.getFont();
fc = null;
return retValue;
} // showDialog
/**************************************************************************
* Constructor
*
* @param owner Base window
* @param title Chooser Title
* @param initFont Initial Font
*/
public FontChooser(Dialog owner, String title, Font initFont)
{
super(owner, title, true);
try
{
jbInit();
dynInit();
setFont(initFont);
AdempierePLAF.showCenterScreen(this);
}
catch(Exception ex)
{
System.err.println ("FontChooser");
ex.printStackTrace();
}
} // FontChooser
/**
* IDE Constructor
*/
public FontChooser()
{
this (null, s_res.getString("FontChooser"), null);
} // FontChooser
static ResourceBundle s_res = ResourceBundle.getBundle("org.compiere.plaf.PlafRes");
/** Static list of Styles */
public static FontStyle[] s_list = {
new FontStyle(s_res.getString("Plain"), Font.PLAIN),
new FontStyle(s_res.getString("Italic"), Font.ITALIC),
new FontStyle(s_res.getString("Bold"), Font.BOLD),
new FontStyle(s_res.getString("BoldItalic"), Font.BOLD|Font.ITALIC)};
private Font m_font = super.getFont();
private Font m_retFont = null;
private boolean m_setting = false;
private CPanel mainPanel = new CPanel();
private BorderLayout mainLayout = new BorderLayout();
private CPanel selectPanel = new CPanel();
private CLabel nameLabel = new CLabel();
private CComboBox fontName = new CComboBox();
private CLabel sizeLabel = new CLabel();
private CLabel styleLabel = new CLabel();
private CComboBox fontStyle = new CComboBox();
private CComboBox fontSize = new CComboBox();
private JTextArea fontTest = new JTextArea();
private JTextArea fontInfo = new JTextArea();
private GridBagLayout selectLayout = new GridBagLayout();
private CPanel confirmPanel = new CPanel();
private CButton bCancel = AdempierePLAF.getCancelButton();
private CButton bOK = AdempierePLAF.getOKButton();
private FlowLayout confirmLayout = new FlowLayout();
/**
* Static Layout
* @throws Exception
*/
private void jbInit() throws Exception
{
mainPanel.setLayout(mainLayout);
nameLabel.setText(s_res.getString("Name"));
selectPanel.setLayout(selectLayout);
sizeLabel.setText(s_res.getString("Size"));
styleLabel.setText(s_res.getString("Style"));
fontTest.setText(s_res.getString("TestString"));
fontTest.setLineWrap(true);
fontTest.setWrapStyleWord(true);
fontTest.setBackground(AdempierePLAF.getFieldBackground_Inactive());
fontTest.setBorder(BorderFactory.createLoweredBevelBorder());
fontTest.setPreferredSize(new Dimension(220, 100));
fontInfo.setText(s_res.getString("FontString"));
fontInfo.setLineWrap(true);
fontInfo.setWrapStyleWord(true);
fontInfo.setBackground(AdempierePLAF.getFieldBackground_Inactive());
fontInfo.setOpaque(false);
fontInfo.setEditable(false);
confirmPanel.setLayout(confirmLayout);
confirmLayout.setAlignment(FlowLayout.RIGHT);
confirmPanel.setOpaque(false);
selectPanel.setOpaque(false);
getContentPane().add(mainPanel);
mainPanel.add(selectPanel, BorderLayout.CENTER);
selectPanel.add(nameLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
selectPanel.add(fontName, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
selectPanel.add(sizeLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
selectPanel.add(styleLabel, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
selectPanel.add(fontStyle, new GridBagConstraints(1, 2, 2, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
selectPanel.add(fontSize, new GridBagConstraints(1, 1, 2, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0));
selectPanel.add(fontTest, new GridBagConstraints(0, 3, 2, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(20, 5, 5, 5), 0, 0));
selectPanel.add(fontInfo, new GridBagConstraints(0, 4, 2, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(10, 5, 10, 5), 0, 0));
//
mainPanel.add(confirmPanel, BorderLayout.SOUTH);
confirmPanel.add(bCancel, null);
confirmPanel.add(bOK, null);
bCancel.addActionListener(this);
bOK.addActionListener(this);
} // jbInit
/**
* Dynamic Init
*/
private void dynInit()
{
String[] names = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
Arrays.sort(names);
for (int i = 0; i < names.length; i++)
fontName.addItem(names[i]);
fontName.addActionListener(this);
//
for (int i = 6; i < 32; i++)
fontSize.addItem(String.valueOf(i));
fontSize.addActionListener(this);
//
for (int i = 0; i < s_list.length; i++)
fontStyle.addItem(s_list[i]);
fontStyle.addActionListener(this);
} // dynInit
/**
* Set Font - sets font for chooser - not the component font
* @param font
*/
public void setFont(Font font)
{
if (font == null)
return;
// Log.trace("FontChooser.setFont - " + font.toString());
if (m_retFont == null)
m_retFont = font;
//
fontTest.setFont(font);
fontInfo.setFont(font);
fontInfo.setText(font.toString());
//
m_setting = true;
fontName.setSelectedItem(font.getName());
if (!fontName.getSelectedItem().equals(font.getName()))
System.err.println("FontChooser.setFont" + fontName.getSelectedItem().toString() + " <> " + font.getName());
//
fontSize.setSelectedItem(String.valueOf(font.getSize()));
if (!fontSize.getSelectedItem().equals(String.valueOf(font.getSize())))
System.err.println("FontChooser.setFont" + fontSize.getSelectedItem() + " <> " + font.getSize());
// find style
for (int i = 0; i < s_list.length; i++)
if (s_list[i].getID() == font.getStyle())
fontStyle.setSelectedItem(s_list[i]);
if (((FontStyle)fontStyle.getSelectedItem()).getID() != font.getStyle())
System.err.println("FontChooser.setFont" + ((FontStyle)fontStyle.getSelectedItem()).getID() + " <> " + font.getStyle());
//
m_font = font;
this.pack();
m_setting = false;
} // setFont
/**
* Return selected font
* @return font
*/
public Font getFont()
{
return m_retFont;
} // getFont
/**
* ActionListener
* @param e
*/
public void actionPerformed(ActionEvent e)
{
if (m_setting)
return;
if (e.getSource() == bOK)
{
m_retFont = m_font;
dispose();
}
else if (e.getSource() == bCancel)
dispose();
else if (e.getSource() == fontName)
{
String s = fontName.getSelectedItem().toString();
m_font = new Font(s, m_font.getStyle(), m_font.getSize());
}
else if (e.getSource() == fontSize)
{
String s = fontSize.getSelectedItem().toString();
m_font = new Font(m_font.getName(), m_font.getStyle(), Integer.parseInt(s));
}
else if (e.getSource() == fontStyle)
{
FontStyle fs = (FontStyle)fontStyle.getSelectedItem();
m_font = new Font(m_font.getName(), fs.getID(), m_font.getSize());
}
// System.out.println("NewFont - " + m_font.toString());
setFont(m_font);
} // actionPerformed
} // FontChooser
/**
* Font Style Value Object
*/
class FontStyle
{
/**
* Create FontStyle
* @param name
* @param id
*/
public FontStyle(String name, int id)
{
m_name = name;
m_id = id;
} // FontStyle
private String m_name;
private int m_id;
/**
* Get Name
* @return name
*/
public String toString()
{
return m_name;
} // getName
/**
* Get int value of Font Style
* @return id
*/
public int getID()
{
return m_id;
} // getID
} // FontStyle

View File

@ -0,0 +1,131 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Jorg Janke
* @version $Id: PlafRes.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class PlafRes extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "Background Color Type" },
{ "BackColType_Flat", "Flat" },
{ "BackColType_Gradient", "Gradient" },
{ "BackColType_Lines", "Lines" },
{ "BackColType_Texture", "Texture" },
//
{ "LookAndFeelEditor", "Look & Feel Editor" },
{ "LookAndFeel", "Look & Feel" },
{ "Theme", "Theme" },
{ "EditAdempiereTheme", "Edit Adempiere Theme" },
{ "SetDefault", "Default Background" },
{ "SetDefaultColor", "Background Color" },
{ "ColorBlind", "Color Deficiency" },
{ "Example", "Example" },
{ "Reset", "Reset" },
{ "OK", "OK" },
{ "Cancel", "Cancel" },
//
{ "AdempiereThemeEditor", "Adempiere Theme Editor" },
{ "MetalColors", "Metal Colors" },
{ "AdempiereColors", "Adempiere Colors" },
{ "AdempiereFonts", "Adempiere Fonts" },
{ "Primary1Info", "Shadow, Separator" },
{ "Primary1", "Primary 1" },
{ "Primary2Info", "Focus Line, Selected Menu" },
{ "Primary2", "Primary 2" },
{ "Primary3Info", "Table Selected Row, Selected Text, ToolTip Background" },
{ "Primary3", "Primary 3" },
{ "Secondary1Info", "Border Lines" },
{ "Secondary1", "Secondary 1" },
{ "Secondary2Info", "Inactive Tabs, Pressed Fields, Inactive Border + Text" },
{ "Secondary2", "Secondary 2" },
{ "Secondary3Info", "Background" },
{ "Secondary3", "Secondary 3" },
//
{ "ControlFontInfo", "Control Font" },
{ "ControlFont", "Label Font" },
{ "SystemFontInfo", "Tool Tip, Tree nodes" },
{ "SystemFont", "System Font" },
{ "UserFontInfo", "User Entered Data" },
{ "UserFont", "Field Font" },
// { "SmallFontInfo", "Reports" },
{ "SmallFont", "Small Font" },
{ "WindowTitleFont", "Title Font" },
{ "MenuFont", "Menu Font" },
//
{ "MandatoryInfo", "Mandatory Field Background" },
{ "Mandatory", "Mandatory" },
{ "ErrorInfo", "Error Field Background" },
{ "Error", "Error" },
{ "InfoInfo", "Info Field Background" },
{ "Info", "Info" },
{ "WhiteInfo", "Lines" },
{ "White", "White" },
{ "BlackInfo", "Lines, Text" },
{ "Black", "Black" },
{ "InactiveInfo", "Inactive Field Background" },
{ "Inactive", "Inactive" },
{ "TextOKInfo", "OK Text Foreground" },
{ "TextOK", "Text - OK" },
{ "TextIssueInfo", "Error Text Foreground" },
{ "TextIssue", "Text - Error" },
//
{ "FontChooser", "Font Chooser" },
{ "Fonts", "Fonts" },
{ "Plain", "Plain" },
{ "Italic", "Italic" },
{ "Bold", "Bold" },
{ "BoldItalic", "Bold & Italic" },
{ "Name", "Name" },
{ "Size", "Size" },
{ "Style", "Style" },
{ "TestString", "This is just a Test! The quick brown Fox is doing something. 12,3456.78 LetterLOne = l1 LetterOZero = O0" },
{ "FontString", "Font" },
//
{ "AdempiereColorEditor", "Adempiere Color Editor" },
{ "AdempiereType", "Color Type" },
{ "GradientUpperColor", "Gradient Upper Color" },
{ "GradientLowerColor", "Gradient Lower Color" },
{ "GradientStart", "Gradient Start" },
{ "GradientDistance", "Gradient Distance" },
{ "TextureURL", "Texture URL" },
{ "TextureAlpha", "Texture Alpha" },
{ "TextureTaintColor", "Texture Taint Color" },
{ "LineColor", "Line Color" },
{ "LineBackColor", "Background Color" },
{ "LineWidth", "Line Width" },
{ "LineDistance", "Line Distance" },
{ "FlatColor", "Flat Color" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,132 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
* @author Nizar Khalifa Sallem - OXIA Tunisia
* @version $Id: PlafRes_ar.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class PlafRes_ar extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "\u0646\u0648\u0639 \u0644\u0648\u0646 \u0627\u0644\u062e\u0644\u0641\u064a\u0651\u064e\u0629" },
{ "BackColType_Flat", "\u0645\u0633\u0637\u0651\u064e\u062d" },
{ "BackColType_Gradient", "\u062a\u062f\u0631\u0651\u064f\u062c" },
{ "BackColType_Lines", "\u0623\u0633\u0637\u0631" },
{ "BackColType_Texture", "\u0646\u0633\u064a\u062c" },
//
{ "LookAndFeelEditor", "\u0645\u0639\u0650\u062f \u0623\u0646\u0638\u0631 \u0648 \u0623\u062d\u0633" },
{ "LookAndFeel", "\u0623\u0646\u0638\u0631 \u0648 \u0623\u062d\u0633" },
{ "Theme", "\u0633\u0645\u0629" },
{ "EditAdempiereTheme", "\u0623\u0639\u062f \u0633\u0645\u0629 \u0643\u0645\u0628\u064a\u0631" },
{ "SetDefault", "\u0627\u0644\u062e\u0644\u0641\u064a\u0651\u064e\u0629 \u0627\u0644\u0627\u0650\u0641\u062a\u0631\u0627\u0636\u064a\u0651\u064e\u0629" },
{ "SetDefaultColor", "\u0644\u0648\u0646 \u0627\u0644\u062e\u0644\u0641\u064a\u0651\u064e\u0629" },
{ "ColorBlind", "\u0639\u0645\u0649 \u0627\u0644\u0623\u0644\u0648\u0627\u0646" },
{ "Example", "\u0645\u062b\u0627\u0644" },
{ "Reset", "\u0625\u0639\u0627\u062f\u0629 \u0636\u0628\u0637" },
{ "OK", "\u0646\u0639\u0645" },
{ "Cancel", "\u0625\u0644\u063a\u0627\u0621" },
//
{ "AdempiereThemeEditor", "\u0645\u0639\u062f \u0633\u0645\u0629 \u0643\u0645\u0628\u064a\u0631" },
{ "MetalColors", "\u0623\u0644\u0648\u0627\u0646 \u0645\u0639\u062f\u0646\u064a\u0651\u064e\u0629" },
{ "AdempiereColors", "\u0623\u0644\u0648\u0627\u0646 \u0643\u0645\u0628\u064a\u0631" },
{ "AdempiereFonts", "\u062e\u0637\u0648\u0637 \u0643\u0645\u0628\u064a\u0631" },
{ "Primary1Info", "\u0638\u0644\u060c \u0641\u0627\u0635\u0644" },
{ "Primary1", "\u0623\u0648\u0651\u064e\u0644\u064a 1" },
{ "Primary2Info", "\u0633\u0637\u0631 \u0645\u0631\u0643\u0651\u064e\u0632 \u0639\u0644\u064a\u0647\u060c \u0642\u0627\u0626\u0645\u0629 \u0645\u062e\u062a\u0627\u0631\u0629" },
{ "Primary2", "\u0623\u0648\u0651\u064e\u0644\u064a 2" },
{ "Primary3Info", "\u0633\u0637\u0631 \u0645\u062e\u062a\u0627\u0631 \u0645\u0646 \u062c\u062f\u0648\u0644\u060c \u0646\u0635 \u0645\u062e\u062a\u0627\u0631\u060c \u062e\u0644\u0641\u064a\u0651\u064e\u0629 \u0646\u0635 \u0639\u0631\u0636\u064a" },
{ "Primary3", "\u0623\u0648\u0651\u064e\u0644\u064a 3" },
{ "Secondary1Info", "\u0623\u0633\u0637\u0631 \u062d\u062f" },
{ "Secondary1", "\u062b\u0627\u0646\u0648\u064a 1" },
{ "Secondary2Info", "\u062c\u062f\u0648\u0644\u0627\u062a \u062e\u0627\u0645\u0644\u0629\u060c \u062e\u0627\u0646\u0627\u062a \u0645\u0636\u063a\u0648\u0637\u0629\u060c \u062d\u062f \u062e\u0627\u0645\u0644 +\u0646\u0635" },
{ "Secondary2", "\u062b\u0627\u0646\u0648\u064a 2" },
{ "Secondary3Info", "\u062e\u0644\u0641\u064a\u0651\u064e\u0629" },
{ "Secondary3", "\u062b\u0627\u0646\u0648\u064a 3" },
//
{ "ControlFontInfo", "\u062e\u0637 \u0645\u0631\u0627\u0642\u0628\u0629" },
{ "ControlFont", "\u062e\u0637 \u062c\u0630\u0627\u0630\u0629" },
{ "SystemFontInfo", "\u0646\u0635 \u0639\u0631\u0636\u064a\u060c \u0639\u0642\u062f \u0634\u062c\u0631\u0629" },
{ "SystemFont", "\u062e\u0637 \u0627\u0644\u0646\u0638\u0627\u0645" },
{ "UserFontInfo", "\u0628\u064a\u0627\u0646\u0627\u062a \u0645\u062f\u062e\u0644\u0629 \u0645\u0646 \u0627\u0644\u0645\u0633\u062a\u0639\u0645\u0644" },
{ "UserFont", "\u062e\u0637 \u062d\u0642\u0644" },
// { "SmallFontInfo", "\u062a\u0642\u0627\u0631\u064a\u0631" },
{ "SmallFont", "\u062e\u0637 \u0635\u063a\u064a\u0631" },
{ "WindowTitleFont", "\u062e\u0637 \u0639\u0646\u0648\u0627\u0646" },
{ "MenuFont", "\u062e\u0637 \u0642\u0627\u0626\u0645\u0629" },
//
{ "MandatoryInfo", "\u062e\u0644\u0641\u064a\u0651\u064e\u0629 \u062d\u0642\u0644 \u0625\u062c\u0628\u0627\u0631\u064a" },
{ "Mandatory", "\u0625\u062c\u0628\u0627\u0631\u064a" },
{ "ErrorInfo", "\u062e\u0644\u0641\u064a\u0651\u064e\u0629 \u062d\u0642\u0644 \u062e\u0627\u0637\u0626"},
{ "Error", "\u062e\u0637\u0623" },
{ "InfoInfo", "\u062e\u0644\u0641\u064a\u0651\u064e\u0629 \u062d\u0642\u0644 \u0628\u064a\u0627\u0646\u0627\u062a" },
{ "Info", "\u0628\u064a\u0627\u0646\u0627\u062a" },
{ "WhiteInfo", "\u0623\u0633\u0637\u0631" },
{ "White", "\u0623\u0628\u064a\u0636" },
{ "BlackInfo", "\u0623\u0633\u0637\u0631\u060c \u0646\u0635" },
{ "Black", "\u0623\u0633\u0648\u062f" },
{ "InactiveInfo", "\u062e\u0644\u0641\u064a\u0651\u064e\u0629 \u062d\u0642\u0644 \u062e\u0627\u0645\u0644" },
{ "Inactive", "\u062e\u0627\u0645\u0644" },
{ "TextOKInfo", "\u0623\u0645\u0627\u0645\u064a\u0651\u064e\u0629 \u0646\u0635 \u0635\u062d\u064a\u062d" },
{ "TextOK", "\u0646\u0635 - \u0635\u062d\u064a\u062d" },
{ "TextIssueInfo", "\u0623\u0645\u0627\u0645\u064a\u0651\u064e\u0629 \u0646\u0635 \u062e\u0627\u0637\u0626" },
{ "TextIssue", "\u0646\u0635 - \u062e\u0637\u0623" },
//
{ "FontChooser", "\u0645\u062e\u062a\u0627\u0631 \u0627\u0644\u062e\u0637" },
{ "Fonts", "\u062e\u0637\u0648\u0637" },
{ "Plain", "\u0645\u0644\u0622\u0646" },
{ "Italic", "\u0645\u0627\u0626\u0644" },
{ "Bold", "\u0633\u0645\u064a\u0643" },
{ "BoldItalic", "\u0633\u0645\u064a\u0643 \u0648 \u0645\u0627\u0626\u0644" },
{ "Name", "\u0627\u0650\u0633\u0645" },
{ "Size", "\u062d\u062c\u0645" },
{ "Style", "\u0645\u0638\u0647\u0631" },
{ "TestString", "\u0647\u0630\u0627 \u0627\u0650\u062e\u062a\u0628\u0627\u0631 \u0641\u0642\u0637\u060c \u0627\u0644\u062b\u0639\u0644\u0628 \u0627\u0644\u0628\u0646\u064a \u0627\u0644\u0633\u0631\u064a\u0639 \u0623\u0643\u0644 \u0634\u064a\u0626\u0627 \u0645\u0627. 12,3456789" },
{ "FontString", "\u062e\u0637" },
//
{ "AdempiereColorEditor", "\u0645\u0639\u062f \u0623\u0644\u0648\u0627\u0646 \u0643\u0645\u0628\u064a\u0631" },
{ "AdempiereType", "\u0646\u0648\u0639 \u0627\u0644\u0644\u0651\u064e\u0648\u0646" },
{ "GradientUpperColor", "\u0644\u0648\u0646 \u0627\u0644\u062a\u062f\u0631\u0651\u064f\u062c \u0627\u0644\u0639\u0644\u0648\u064a" },
{ "GradientLowerColor", "\u0644\u0648\u0646 \u0627\u0644\u062a\u062f\u0631\u0651\u064f\u062c \u0627\u0644\u0633\u0651\u064f\u0641\u0644\u064a" },
{ "GradientStart", "\u0628\u062f\u0627\u064a\u0629 \u0627\u0644\u062a\u062f\u0631\u0651\u064f\u062c" },
{ "GradientDistance", "\u062a\u0628\u0627\u0639\u062f \u0627\u0644\u062a\u062f\u0631\u0651\u064f\u062c" },
{ "TextureURL", "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0646\u0633\u064a\u062c" },
{ "TextureAlpha", "\u0634\u0641\u0627\u0641\u064a\u0651\u064e\u0629 \u0627\u0644\u0646\u0633\u064a\u062c" },
{ "TextureTaintColor", "\u0644\u0648\u0646 \u0635\u0628\u063a\u0629 \u0627\u0644\u0646\u0633\u064a\u062c" },
{ "LineColor", "\u0644\u0648\u0646 \u0627\u0644\u0633\u0651\u064e\u0637\u0631" },
{ "LineBackColor", "\u0644\u0648\u0646 \u0627\u0644\u062e\u0644\u0641\u064a\u0651\u064e\u0629" },
{ "LineWidth", "\u0639\u0631\u0636 \u0627\u0644\u0633\u0637\u0631" },
{ "LineDistance", "\u062a\u0628\u0627\u0639\u062f \u0627\u0644\u0633\u0637\u0631" },
{ "FlatColor", "\u0644\u0648\u0646 \u0645\u0633\u0637\u0651\u064e\u062d" }
};
/**
* Get Contents
* @return contents
* @uml.property name="contents"
*/
public Object[][] getContents()
{
return contents;
}
} // Res_ar_TN

View File

@ -0,0 +1,131 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Plamen Niikolov
* @version $Id: PlafRes_bg.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class PlafRes_bg extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "\u0422\u0438\u043f \u043d\u0430 \u0446\u0432\u0435\u0442\u0430 \u043d\u0430 \u0444\u043e\u043d\u0430" },
{ "BackColType_Flat", "\u0420\u0430\u0432\u0435\u043d(\u041f\u043b\u044a\u0442\u0435\u043d)" },
{ "BackColType_Gradient", "\u041f\u0440\u0435\u043b\u0438\u0432\u0430\u0449" },
{ "BackColType_Lines", "\u041b\u0438\u043d\u0438\u0438" },
{ "BackColType_Texture", "\u041a\u043e\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0446\u0438\u044f" },
//
{ "LookAndFeelEditor", "\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043d\u0430 \u0432\u0438\u0434 \u043f\u043e\u0442\u0440\u0435\u0431.\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441" },
{ "LookAndFeel", "\u0412\u0438\u0434 \u043d\u0430 \u043f\u043e\u0442\u0440\u0435\u0431.\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441" },
{ "Theme", "\u0422\u0435\u043c\u0430" },
{ "EditAdempiereTheme", "\u0420\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043d\u0430 \u0442\u0435\u043c\u0430" },
{ "SetDefault", "\u041f\u043e\u0434\u0440\u0430\u0437\u0431" },
{ "SetDefaultColor", "\u0426\u0432\u044f\u0442 \u043d\u0430 \u0444\u043e\u043d\u0430" },
{ "ColorBlind", "\u0414\u043e\u043f\u044a\u043b\u0432\u0430\u0449 \u0446\u0432\u044f\u0442" },
{ "Example", "\u041f\u0440\u0438\u043c\u0435\u0440" },
{ "Reset", "\u041d\u0430\u0447\u0430\u043b\u043d\u043e \u0441\u044a\u0441\u0442\u043e\u044f\u043d\u0438\u0435" },
{ "OK", "\u0414\u0430" },
{ "Cancel", "\u041e\u0442\u043a\u0430\u0437" },
//
{ "AdempiereThemeEditor", "\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043d\u0430 \u0442\u0435\u043c\u0438" },
{ "MetalColors", "\u041c\u0435\u0442\u0430\u043b\u043d\u0438 \u0446\u0432\u0435\u0442\u043e\u0432\u0435" },
{ "AdempiereColors", "\u0426\u0432\u0435\u0442\u043e\u0432\u0435" },
{ "AdempiereFonts", "\u0428\u0440\u0438\u0444\u0442\u043e\u0432\u0435" },
{ "Primary1Info", "\u0421\u044f\u043d\u043a\u0430, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b" },
{ "Primary1", "\u041e\u0441\u043d\u043e\u0432\u0435\u043d 1" },
{ "Primary2Info", "\u0424\u043e\u043a\u0443\u0441 \u043b\u0438\u043d\u0438\u044f, \u0421\u0435\u043b\u0435\u043a\u0442\u0438\u0440\u0430\u043d\u043e \u043c\u0435\u043d\u044e" },
{ "Primary2", "\u041e\u0441\u043d\u043e\u0432\u0435\u043d 2" },
{ "Primary3Info", "\u0421\u0435\u043b\u0435\u043a\u0442\u0438\u0440\u0430\u043d \u0440\u0435\u0434 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u0421\u0435\u043b\u0435\u043a\u0442\u0438\u0440\u0430\u043d \u0442\u0435\u043a\u0441\u0442,\u0424\u043e\u043d \u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u0430 \u043f\u043e\u043c\u043e\u0449" },
{ "Primary3", "\u041e\u0441\u043d\u043e\u0432\u0435\u043d 3" },
{ "Secondary1Info", "\u041b\u0438\u043d\u0438\u044f \u043d\u0430 \u0440\u0430\u043c\u043a\u0430\u0442\u0430" },
{ "Secondary1", "\u0421\u043f\u043e\u043c\u0430\u0433\u0430\u0442\u0435\u043b\u0435\u043d 1" },
{ "Secondary2Info", "\u041d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0438 \u043f\u0430\u043d\u0435\u043b\u0438, \u041d\u0430\u0442\u0438\u0441\u043d\u0430\u0442\u0438 \u043f\u043e\u043b\u0435\u0442\u0430, \u041d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u0438 \u0440\u0430\u043c\u043a\u0438 \u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0435" },
{ "Secondary2", "\u0421\u043f\u043e\u043c\u0430\u0433\u0430\u0442\u0435\u043b\u0435\u043d 2" },
{ "Secondary3Info", "\u0424\u043e\u043d" },
{ "Secondary3", "\u0421\u043f\u043e\u043c\u0430\u0433\u0430\u0442\u0435\u043b\u0435\u043d 3" },
//
{ "ControlFontInfo", "\u041a\u043e\u043d\u0442\u0440\u043e\u043b \u043d\u0430 \u0448\u0440\u0438\u0444\u0442\u043e\u0432\u0435\u0442\u0435" },
{ "ControlFont", "\u0428\u0440\u0438\u0444\u0442 \u043d\u0430 \u0435\u0442\u0438\u043a\u0435\u0442\u0438\u0442\u0435" },
{ "SystemFontInfo", "\u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u0430 \u043f\u043e\u043c\u043e\u0449, \u0434\u044a\u0440\u0432\u043e\u0432\u0438\u0434\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430" },
{ "SystemFont", "\u0421\u0438\u0441\u0442\u0435\u043c\u0435\u043d \u0448\u0440\u0438\u0444\u0442" },
{ "UserFontInfo", "\u0414\u0430\u043d\u043d\u0438 \u0432\u044a\u0432\u0435\u0434\u0435\u043d\u0438 \u043e\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f" },
{ "UserFont", "\u0428\u0440\u0438\u0444\u0442 \u043d\u0430 \u043f\u043e\u043b\u0435" },
// { "SmallFontInfo", "Reports" },
{ "SmallFont", "\u041c\u0430\u043b\u044a\u043a \u0448\u0440\u0438\u0444\u0442" },
{ "WindowTitleFont", "\u0428\u0440\u0438\u0444\u0442 \u043d\u0430 \u0437\u0430\u0433\u043b\u0430\u0432\u0438\u0435\u0442\u043e" },
{ "MenuFont", "\u0428\u0440\u0438\u0444\u0442 \u043d\u0430 \u043c\u0435\u043d\u044e\u0442\u043e" },
//
{ "MandatoryInfo", "\u0424\u043e\u043d \u043d\u0430 \u0437\u0430\u0434\u044a\u043b\u0436\u0438\u0442\u0435\u043b\u043d\u043e\u0442\u043e \u043f\u043e\u043b\u0435" },
{ "Mandatory", "\u0417\u0430\u0434\u044a\u043b\u0436\u0438\u0442\u0435\u043b\u0435\u043d" },
{ "ErrorInfo", "\u0424\u043e\u043d \u043d\u0430 \u043f\u043e\u043b\u0435 \u0437\u0430 \u0433\u0440\u0435\u0448\u043a\u0430" },
{ "Error", "\u0413\u0440\u0435\u0448\u043a\u0430" },
{ "InfoInfo", "\u0424\u043e\u043d \u043d\u0430 \u043f\u043e\u043b\u0435\u0442\u043e \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f" },
{ "Info", "\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f" },
{ "WhiteInfo", "\u041b\u0438\u043d\u0438\u0438" },
{ "White", "\u0411\u044f\u043b" },
{ "BlackInfo", "\u041b\u0438\u043d\u0438\u0438, \u0442\u0435\u043a\u0441\u0442" },
{ "Black", "\u0427\u0435\u0440\u0435\u043d" },
{ "InactiveInfo", "\u0424\u043e\u043d \u043d\u0430 \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043b\u0435" },
{ "Inactive", "\u041d\u0435\u0430\u043a\u0442\u0438\u0432\u0435\u043d" },
{ "TextOKInfo", "\u0426\u0432\u044f\u0442 \u043d\u0430 \u0448\u0440\u0438\u0444\u0442\u0430 \u043f\u0440\u0438 \u041e\u041a" },
{ "TextOK", "\u0412\u0430\u043b\u0438\u0434\u0435\u043d \u0442\u0435\u043a\u0441\u0442" },
{ "TextIssueInfo", "\u0426\u0432\u044f\u0442 \u043d \u0430\u0448\u0440\u0438\u0444\u0442\u0430 \u043f\u0440\u0438 \u0433\u0440\u0435\u0448\u043a\u0430" },
{ "TextIssue", "\u0413\u0440\u0435\u0448\u0435\u043d \u0442\u0435\u043a\u0441\u0442" },
//
{ "FontChooser", "\u0418\u0437\u0431\u043e\u0440 \u043d\u0430 \u0448\u0440\u0438\u0444\u0442" },
{ "Fonts", "\u0428\u0440\u0438\u0444\u0442\u043e\u0432\u0435" },
{ "Plain", "\u041e\u0431\u0438\u043a\u043d\u043e\u0432\u0435\u043d" },
{ "Italic", "\u041d\u0430\u043a\u043b\u043e\u043d\u0435\u043d" },
{ "Bold", "\u0423\u0434\u0435\u0431\u0435\u043b\u0435\u043d" },
{ "BoldItalic", "\u0423\u0434\u0435\u0431\u0435\u043b\u0435\u043d \u0438 \u043d\u0430\u043a\u043b\u043e\u043d\u0435\u043d" },
{ "Name", "\u0418\u043c\u0435" },
{ "Size", "\u0420\u0430\u0437\u043c\u0435\u0440" },
{ "Style", "\u0421\u0442\u0438\u043b" },
{ "TestString", "\u0422\u043e\u0432\u0430 \u0435 \u0441\u0430\u043c\u043e \u0442\u0435\u0441\u0442! \u0411\u044a\u0440\u0437\u0430\u0442\u0430 \u043a\u0430\u0444\u044f\u0432\u0430 \u043b\u0438\u0441\u0438\u0446\u0430 \u043f\u0440\u0430\u0432\u0438 \u043d\u0435\u0449\u043e. 12,3456.78 LetterLOne = l1 LetterOZero = O0" },
{ "FontString", "\u0428\u0440\u0438\u0444\u0442" },
//
{ "AdempiereColorEditor", "\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043d\u0430 \u0446\u0432\u0435\u0442\u043e\u0432\u0435" },
{ "AdempiereType", "\u0422\u0438\u043f \u043d\u0430 \u0446\u0432\u0435\u0442\u043e\u0432\u0435\u0442\u0435" },
{ "GradientUpperColor", "\u041f\u0440\u0435\u043b\u0438\u0432\u0430\u043d\u0435 \u0433\u043e\u0440\u0435\u043d \u0446\u0432\u044f\u0442" },
{ "GradientLowerColor", "\u041f\u0440\u0435\u043b\u0438\u0432\u0430\u043d\u0435 \u0434\u043e\u043b\u0435\u043d \u0446\u0432\u044f\u0442" },
{ "GradientStart", "\u041d\u0430\u0447\u0430\u043b\u043e \u043d\u0430 \u043f\u0440\u0435\u043b\u0438\u0432\u043a\u0430" },
{ "GradientDistance", "\u0414\u044a\u043b\u0436\u0438\u043d\u0430 \u043d\u0430 \u043f\u0440\u0435\u043b\u0438\u0432\u043a\u0430" },
{ "TextureURL", "\u041c\u0435\u0441\u0442\u043e\u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u0441\u043d\u0441\u0438\u0441\u0442\u0435\u043d\u0446\u0438\u044f\u0442\u0430" },
{ "TextureAlpha", "\u0422\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u0410\u043b\u0444\u0430" },
{ "TextureTaintColor", "\u0422\u0435\u043a\u0441\u0442\u0443\u0440\u0430 \u0446\u0432\u044f\u0442 - \u043f\u0435\u0442\u043d\u043e, \u0441\u043b\u0435\u0434\u0430" },
{ "LineColor", "\u0426\u0432\u044f\u0442 \u043d\u0430 \u043b\u0438\u043d\u0438\u044f" },
{ "LineBackColor", "\u0426\u0432\u044f\u0442 \u043d\u0430 \u0444\u043e\u043d\u0430" },
{ "LineWidth", "\u0414\u0435\u0431\u0435\u043b\u0438\u043d\u0430 \u043d\u0430 \u043b\u0438\u043d\u0438\u044f" },
{ "LineDistance", "\u0414\u044a\u043b\u0436\u0438\u043d\u0430 \u043d\u0430 \u043b\u0438\u043d\u0438\u044f" },
{ "FlatColor", "\u0420\u0430\u0432\u0435\u043d(\u041f\u043b\u044a\u0442\u0435\u043d) \u0446\u0432\u044f\u0442" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,131 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Jaume Teixi
* @version $Id: PlafRes_ca.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
*/
public class PlafRes_ca extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "Tipus Color Fons" },
{ "BackColType_Flat", "Pla" },
{ "BackColType_Gradient", "Gradient" },
{ "BackColType_Lines", "L<EFBFBD>nes" },
{ "BackColType_Texture", "Textura" },
//
{ "LookAndFeelEditor", "Editor Aparen<65>a i Comportament" },
{ "LookAndFeel", "Aparen<EFBFBD>a i Comportament" },
{ "Theme", "Tema" },
{ "EditAdempiereTheme", "Editar Tema Adempiere" },
{ "SetDefault", "Fons Per Defecte" },
{ "SetDefaultColor", "Color Fons" },
{ "ColorBlind", "Defici<EFBFBD>ncia Color" },
{ "Example", "Exemple" },
{ "Reset", "Reiniciar" },
{ "OK", "D'Acord" },
{ "Cancel", "Cancel.lar" },
//
{ "AdempiereThemeEditor", "Editor Tema Adempiere" },
{ "MetalColors", "Colors Metal" },
{ "AdempiereColors", "Colors Adempiere" },
{ "AdempiereFonts", "Fonts Adempiere" },
{ "Primary1Info", "Ombra, Separador" },
{ "Primary1", "Primari 1" },
{ "Primary2Info", "L<EFBFBD>nia Focus, Men<65> Seleccionat" },
{ "Primary2", "Primari 2" },
{ "Primary3Info", "Taula Fila Seleccionada, Texte Seleccionat, Indicador Fons" },
{ "Primary3", "Primari 3" },
{ "Secondary1Info", "L<EFBFBD>nies Marc" },
{ "Secondary1", "Secondari 1" },
{ "Secondary2Info", "Pestanyes Innactives, Camps Premuts, Texte + Marc Innactius" },
{ "Secondary2", "Secondari 2" },
{ "Secondary3Info", "Fons" },
{ "Secondary3", "Secondari 3" },
//
{ "ControlFontInfo", "Font Control" },
{ "ControlFont", "Font Etiqueta" },
{ "SystemFontInfo", "Indicador, Nodes Arbre" },
{ "SystemFont", "Font Sistema" },
{ "UserFontInfo", "Dades Entrades Per l'Usuari" },
{ "UserFont", "Font Camp" },
// { "SmallFontInfo", "Informes" },
{ "SmallFont", "Font Petita" },
{ "WindowTitleFont", "Font T<>tol" },
{ "MenuFont", "Font Men<65>" },
//
{ "MandatoryInfo", "Camp de Fons Obligatori" },
{ "Mandatory", "Obligatori" },
{ "ErrorInfo", "Camp de Fons Error" },
{ "Error", "Error" },
{ "InfoInfo", "Camp de Fons Informaci<63>" },
{ "Info", "Informaci<EFBFBD>" },
{ "WhiteInfo", "L<EFBFBD>nies" },
{ "White", "Blanc" },
{ "BlackInfo", "L<EFBFBD>nies, Text" },
{ "Black", "Negre" },
{ "InactiveInfo", "Camp de Fons Innactiu" },
{ "Inactive", "Innactiu" },
{ "TextOKInfo", "Texte Superior OK" },
{ "TextOK", "Texte - OK" },
{ "TextIssueInfo", "Texte Superior Error" },
{ "TextIssue", "Texte - Error" },
//
{ "FontChooser", "Escollidor Font" },
{ "Fonts", "Fonts" },
{ "Plain", "Plana" },
{ "Italic", "It<EFBFBD>lica" },
{ "Bold", "Negreta" },
{ "BoldItalic", "Negreta & It<49>lica" },
{ "Name", "Nom" },
{ "Size", "Tamany" },
{ "Style", "Estil" },
{ "TestString", "Aix<EFBFBD> <20>s nom<6F>s una Prova! La Guineu marr<72> r<>pida <20>st<73> fent quelcom. 12,3456.78 LetterLOne = l1 LetterOZero = O0" },
{ "FontString", "Font" },
//
{ "AdempiereColorEditor", "Editor Color Adempiere" },
{ "AdempiereType", "Tipus Color" },
{ "GradientUpperColor", "Color Dalt Degradat" },
{ "GradientLowerColor", "Color Baix Degradat" },
{ "GradientStart", "Inici Degradat" },
{ "GradientDistance", "Dist<EFBFBD>ncia Degradat" },
{ "TextureURL", "Textura URL" },
{ "TextureAlpha", "Textura Alfa" },
{ "TextureTaintColor", "Textura Color Corrupci<63>" },
{ "LineColor", "Color L<>nia" },
{ "LineBackColor", "Color Fons" },
{ "LineWidth", "Ampla L<>nia" },
{ "LineDistance", "Dist<EFBFBD>ncia L<>nia" },
{ "FlatColor", "Color Pla" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,131 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Jorg Janke
* @version $Id: PlafRes_da.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
*/
public class PlafRes_da extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "Baggrund: Farvetype" },
{ "BackColType_Flat", "Fast" },
{ "BackColType_Gradient", "Farveforløb" },
{ "BackColType_Lines", "Linjer" },
{ "BackColType_Texture", "Struktur" },
//
{ "LookAndFeelEditor", "Redigér & udseende" },
{ "LookAndFeel", "Udseende" },
{ "Theme", "Tema" },
{ "EditAdempiereTheme", "Redigér Adempiere tema" },
{ "SetDefault", "Baggrund: Standard" },
{ "SetDefaultColor", "Baggrundsfarve" },
{ "ColorBlind", "Farvereduktion" },
{ "Example", "Eksempel" },
{ "Reset", "Gendan" },
{ "OK", "OK" },
{ "Cancel", "Annullér" },
//
{ "AdempiereThemeEditor", "Adempiere-tema: Redigér" },
{ "MetalColors", "Metal-farver" },
{ "AdempiereColors", "Adempiere-farver" },
{ "AdempiereFonts", "Adempiere-skrifttyper" },
{ "Primary1Info", "Skygge, Separator" },
{ "Primary1", "Primær 1" },
{ "Primary2Info", "Markeret element, Markeret menu" },
{ "Primary2", "Primær 2" },
{ "Primary3Info", "Markeret række i tabel, Markeret tekst, Værktøjstip - baggr." },
{ "Primary3", "Prim<EFBFBD>r 3" },
{ "Secondary1Info", "Rammelinjer" },
{ "Secondary1", "Sekundær 1" },
{ "Secondary2Info", "Ikke-aktive faner, Markerede felter, Ikke-aktiv ramme + tekst" },
{ "Secondary2", "Sekundær 2" },
{ "Secondary3Info", "Baggrund" },
{ "Secondary3", "Sekundær 3" },
//
{ "ControlFontInfo", "Skrifttype: Knapper" },
{ "ControlFont", "Skrifttype: Etiket" },
{ "SystemFontInfo", "Værktøjstip, Strukturknuder" },
{ "SystemFont", "Skrifttype: System" },
{ "UserFontInfo", "Anvend" },
{ "UserFont", "Skrifttype: Felt" },
// { "SmallFontInfo", "Rapporter" },
{ "SmallFont", "Lille" },
{ "WindowTitleFont", "Skrifttype: Titellinje" },
{ "MenuFont", "Skrifttype: Menu" },
//
{ "MandatoryInfo", "Tvungen feltbaggrund" },
{ "Mandatory", "Tvungen" },
{ "ErrorInfo", "Fejl: Feltbaggrund" },
{ "Error", "Fejl" },
{ "InfoInfo", "Info: Feltbaggrund" },
{ "Info", "Info" },
{ "WhiteInfo", "Linjer" },
{ "White", "Hvid" },
{ "BlackInfo", "Linjer, Tekst" },
{ "Black", "Sort" },
{ "InactiveInfo", "Inaktiv feltbaggrund" },
{ "Inactive", "Inaktiv" },
{ "TextOKInfo", "OK: Tekstforgrund" },
{ "TextOK", "Tekst: OK" },
{ "TextIssueInfo", "Fejl: Tekstforgrund" },
{ "TextIssue", "Tekst: Fejl" },
//
{ "FontChooser", "Skriftype" },
{ "Fonts", "Skrifttyper" },
{ "Plain", "Normal" },
{ "Italic", "Kursiv" },
{ "Bold", "Fed" },
{ "BoldItalic", "Fed & kursiv" },
{ "Name", "Navn" },
{ "Size", "Størrelse" },
{ "Style", "Type" },
{ "TestString", "Dette er en prøve! 12.3456,78 BogstavLEn = l1 BogstavONul = O0" },
{ "FontString", "Skrifttype" },
//
{ "AdempiereColorEditor", "Adempiere-farveeditor" },
{ "AdempiereType", "Farvetype" },
{ "GradientUpperColor", "Farveforløb: Farve 1" },
{ "GradientLowerColor", "Farveforløb: Farve 2" },
{ "GradientStart", "Farveforløb: Start" },
{ "GradientDistance", "Farveforløb: Afstand" },
{ "TextureURL", "Struktur: URL" },
{ "TextureAlpha", "Struktur: Alpha" },
{ "TextureTaintColor", "Struktur: Pletvis" },
{ "LineColor", "Linjefarve" },
{ "LineBackColor", "Baggrundsfarve" },
{ "LineWidth", "Linjebredde" },
{ "LineDistance", "Linjeafstand" },
{ "FlatColor", "Fast farve" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,130 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel (German)
*
* @author Jorg Janke
* @version $Id: PlafRes_de.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
*/
public class PlafRes_de extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "Hintergrund Farbtyp" },
{ "BackColType_Flat", "Flach" },
{ "BackColType_Gradient", "Gradient" },
{ "BackColType_Lines", "Linie" },
{ "BackColType_Texture", "Textur" },
//
{ "LookAndFeelEditor", "Benutzeroberfl<EFBFBD>che Editor" },
{ "LookAndFeel", "Oberfl<EFBFBD>che" },
{ "Theme", "Thema" },
{ "EditAdempiereTheme", "Adempiere Thema bearbeiten" },
{ "SetDefault", "Standard Hintergrund" },
{ "SetDefaultColor", "Hintergrund Farbe" },
{ "ColorBlind", "Farbblindheit" },
{ "Example", "Beispiel" },
{ "Reset", "Zur<EFBFBD>cksetzen" },
{ "OK", "Ja" },
{ "Cancel", "Abbruch" },
//
{ "AdempiereThemeEditor", "Adempiere Thema Editor" },
{ "MetalColors", "Metal Farben" },
{ "AdempiereColors", "Adempiere Farben" },
{ "AdempiereFonts", "Adempiere Schriften" },
{ "Primary1Info", "Schatten, Separator" },
{ "Primary1", "Prim<EFBFBD>r 1" },
{ "Primary2Info", "Fokuslinien, Aktives Men<65>" },
{ "Primary2", "Prim<EFBFBD>r 2" },
{ "Primary3Info", "Tabelle Selected Row, Selected Text, Tool Tip Hintergrund" },
{ "Primary3", "Prim<EFBFBD>r 3" },
{ "Secondary1Info", "Rahmen Lines" },
{ "Secondary1", "Sekund<EFBFBD>r 1" },
{ "Secondary2Info", "Inaktive Tabs, Pressed Felder, Inaktive Rahmen + Text" },
{ "Secondary2", "Sekund<EFBFBD>r 2" },
{ "Secondary3Info", "Hintergrund" },
{ "Secundary3", "Sekund<EFBFBD>r 3" },
//
{ "ControlFontInfo", "Labels" },
{ "ControlFont", "Standard Schrift" },
{ "SystemFontInfo", "Tool Tip" },
{ "SystemFont", "System Schrift" },
{ "UserFontInfo", "Entered Data" },
{ "UserFont", "Nutzer Schrift" },
{ "SmallFont", "Kleine Schrift" },
{ "WindowTitleFont", "Titel Schrift" },
{ "MenuFont", "Men<EFBFBD> Schrift" },
//
{ "MandatoryInfo", "Erforderliches Feld Hintergrund" },
{ "Mandatory", "Erforderlich" },
{ "ErrorInfo", "Fehler Feld Hintergrund" },
{ "Error", "Fehler" },
{ "InfoInfo", "Info Feld Hintergrund" },
{ "Info", "Info" },
{ "WhiteInfo", "Linien" },
{ "White", "Wei<EFBFBD>" },
{ "BlackInfo", "Linien, Text" },
{ "Black", "Schwarz" },
{ "InactiveInfo", "Inaktiv Feld Hintergrund" },
{ "Inactive", "Inaktiv" },
{ "TextOKInfo", "OK Text Fordergrund" },
{ "TextOK", "Text - OK" },
{ "TextIssueInfo", "Fehler Text Fordergrund" },
{ "TextIssue", "Text - Fehler" },
//
{ "FontChooser", "Schrift Auswahl" },
{ "Fonts", "Schriften" },
{ "Plain", "Normal" },
{ "Italic", "Italic" },
{ "Bold", "Fett" },
{ "BoldItalic", "Fett & Italic" },
{ "Name", "Name" },
{ "Size", "Gr<EFBFBD><EFBFBD>e" },
{ "Style", "Stil" },
{ "TestString", "Dies ist nur ein Test! The quick brown Fox is doing something. 12,3456.78 BuchstabeLEins = l1 BuchstabeONull = O0" },
{ "FontString", "Schrift" },
//
{ "AdempiereColorEditor", "Adempiere Farben Auswahl" },
{ "AdempiereType", "Farbtyp" },
{ "GradientUpperColor", "Gradient obere Farbe" },
{ "GradientLowerColor", "Gradient untere Farbe" },
{ "GradientStart", "Gradient Start" },
{ "GradientDistance", "Gradient Distanz" },
{ "TextureURL", "Textur URL" },
{ "TextureAlpha", "Textur Alpha" },
{ "TextureTaintColor", "Textur T<>nung Farbe" },
{ "LineColor", "Linie Farbe" },
{ "LineBackColor", "Hintergrund Farbe" },
{ "LineWidth", "Linie Breite" },
{ "LineDistance", "Linie Distanz" },
{ "FlatColor", "Flache Farbe" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res_de

View File

@ -0,0 +1,131 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Jorg Janke
* @version $Id: PlafRes_fa.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class PlafRes_fa extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "\u0646\u0648\u0639 \u0631\u0646\u06af \u0632\u0645\u064a\u0646\u0647" },
{ "BackColType_Flat", "\u0645\u0633\u0637\u062d" },
{ "BackColType_Gradient", "\u0634\u064a\u0628 \u062f\u0627\u0631" },
{ "BackColType_Lines", "\u062e\u0637\u0648\u0637" },
{ "BackColType_Texture", "\u0634\u0627\u0644\u0648\u062f\u0647" },
//
{ "LookAndFeelEditor", "\u0648\u064a\u0631\u0627\u0633\u062a\u0627\u0631 \u0645\u0631\u0628\u0648\u0637 \u0628\u0647 \u0638\u0627\u0647\u0631 \u0648 \u0639\u0645\u0644" },
{ "LookAndFeel", "\u0638\u0627\u0647\u0631 \u0648 \u0639\u0645\u0644" },
{ "Theme", "\u062a\u0645" },
{ "EditAdempiereTheme", "\u0648\u064a\u0631\u0627\u064a\u0634 \u062a\u0645 \u06a9\u0627\u0645\u067e\u064a\u0631\u0647" },
{ "SetDefault", "\u0632\u0645\u064a\u0646\u0647 \u067e\u064a\u0634 \u0641\u0631\u0636" },
{ "SetDefaultColor", "\u0631\u0646\u06af \u0632\u0645\u064a\u0646\u0647" },
{ "ColorBlind", "\u0646\u0642\u0635 \u0631\u0646\u06af" },
{ "Example", "\u0645\u062b\u0627\u0644" },
{ "Reset", "\u0628\u0627\u0632\u0646\u0634\u0627\u0646\u062f\u0646" },
{ "OK", "\u062a\u0635\u0648\u064a\u0628" },
{ "Cancel", "\u0644\u063a\u0648" },
//
{ "AdempiereThemeEditor", "\u0648\u064a\u0631\u0627\u064a\u0633\u062a\u0627\u0631 \u062a\u0645 \u06a9\u0627\u0645\u067e\u064a\u0631\u0647" },
{ "MetalColors", "\u0631\u0646\u06af\u0647\u0627\u06cc \u0645\u062a\u0627\u0644" },
{ "AdempiereColors", "\u0631\u0646\u06af\u0647\u0627\u06cc \u06a9\u0627\u0645\u067e\u064a\u0631\u0647" },
{ "AdempiereFonts", "\u0641\u0648\u0646\u062a \u06a9\u0627\u0645\u067e\u064a\u0631\u0647" },
{ "Primary1Info", "\u0633\u0627\u064a\u0647\u060c \u062c\u062f\u0627\u06a9\u0646\u0646\u062f\u0647" },
{ "Primary1", "\u0627\u0648\u0644\u064a\u0647 1" },
{ "Primary2Info", "\u062e\u0637 \u0645\u0648\u0631\u062f \u062a\u0627\u06a9\u064a\u062f\u060c \u0645\u0646\u0648\u06cc \u0627\u0646\u062a\u062e\u0627\u0628 \u0634\u062f\u0647" },
{ "Primary2", "\u0627\u0648\u0644\u064a\u0647 2" },
{ "Primary3Info", "\u0631\u062f\u064a\u0641 \u062c\u062f\u0648\u0644 \u0627\u0646\u062a\u062e\u0627\u0628 \u0634\u062f\u0647\u060c \u0645\u062a\u0646 \u0627\u0646\u062a\u062e\u0627\u0628 \u0634\u062f\u0647\u060c \u0632\u0645\u064a\u0646\u0647 \u062a\u0648\u0644\u062a\u064a\u067e" },
{ "Primary3", "\u0627\u0648\u0644\u064a\u0647 3" },
{ "Secondary1Info", "\u062e\u0637\u0648\u0637 \u0645\u0631\u0632\u06cc" },
{ "Secondary1", "\u062b\u0627\u0646\u0648\u064a\u0647 1" },
{ "Secondary2Info", "\u062c\u062f\u0627\u0648\u0644 \u0639\u064a\u0631\u0641\u0639\u0627\u0644\u060c \u0641\u064a\u0644\u062f\u0647\u0627\u06cc \u0641\u0634\u0627\u0631 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647\u060c \u0645\u0631\u0632 \u063a\u064a\u0631\u0641\u0639\u0627\u0644 \u0648 \u0645\u062a\u0646" },
{ "Secondary2", "\u062b\u0627\u0646\u0648\u064a\u0647 2" },
{ "Secondary3Info", "\u0632\u0645\u064a\u0646\u0647" },
{ "Secondary3", "\u062b\u0627\u0646\u0648\u064a\u0647 3" },
//
{ "ControlFontInfo", "\u0641\u0648\u0646\u062a \u06a9\u0646\u062a\u0631\u0644" },
{ "ControlFont", "\u0641\u0648\u0646\u062a \u0628\u0631\u0686\u0633\u0628" },
{ "SystemFontInfo", "\u062a\u0648\u0644\u062a\u064a\u067e\u060c \u0646\u062f\u0647\u0627\u06cc \u062f\u0631\u062e\u062a" },
{ "SystemFont", "\u0641\u0648\u0646\u062a \u0633\u064a\u0633\u062a\u0645" },
{ "UserFontInfo", "\u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u0648\u0627\u0631\u062f \u0634\u062f\u0647 \u0628\u0648\u0633\u064a\u0644\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0646\u062f\u0647" },
{ "UserFont", "\u0641\u0648\u0646\u062a \u0641\u064a\u0644\u062f" },
// { "SmallFontInfo", "\u06af\u0632\u0627\u0631\u0634\u0627\u062a" },
{ "SmallFont", "\u0641\u0648\u0646\u062a \u06a9\u0648\u0686\u06a9" },
{ "WindowTitleFont", "\u0641\u0648\u0646\u062a \u0639\u0646\u0648\u0627\u0646" },
{ "MenuFont", "\u0641\u0648\u0646\u062a \u0645\u0646\u0648" },
//
{ "MandatoryInfo", "\u0632\u0645\u064a\u0646\u0647 \u0641\u064a\u0644\u062f \u0627\u0644\u0632\u0627\u0645\u06cc" },
{ "Mandatory", "\u0627\u0644\u0632\u0627\u0645\u06cc" },
{ "ErrorInfo", "\u0632\u0645\u064a\u0646\u0647 \u0641\u064a\u0644\u062f \u062e\u0637\u0627" },
{ "Error", "\u062e\u0637\u0627" },
{ "InfoInfo", "\u0632\u0645\u064a\u0646\u0647 \u0641\u064a\u0644\u062f \u0627\u0637\u0644\u0627\u0639\u0627\u062a\u06cc" },
{ "Info", "\u0627\u0637\u0644\u0627\u0639\u0627\u062a\u06cc" },
{ "WhiteInfo", "\u062e\u0637\u0648\u0637" },
{ "White", "\u0633\u0641\u064a\u062f" },
{ "BlackInfo", "\u062e\u0637\u0648\u0637\u060c \u0645\u062a\u0646" },
{ "Black", "\u0633\u064a\u0627\u0647" },
{ "InactiveInfo", "\u0632\u0645\u064a\u0646\u0647 \u0641\u064a\u0644\u062f \u063a\u064a\u0631\u0641\u0639\u0627\u0644" },
{ "Inactive", "\u063a\u064a\u0631\u0641\u0639\u0627\u0644" },
{ "TextOKInfo", "\u0631\u0646\u06af \u0645\u062a\u0646 \u062a\u0635\u0648\u064a\u0628" },
{ "TextOK", "\u0645\u062a\u0646 - \u062a\u0635\u0648\u064a\u0628" },
{ "TextIssueInfo", "\u0631\u0646\u06af \u0645\u062a\u0646 \u062e\u0637\u0627" },
{ "TextIssue", "\u0645\u062a\u0646 - \u062e\u0637\u0627" },
//
{ "FontChooser", "\u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u0646\u062f\u0647 \u0641\u0648\u0646\u062a" },
{ "Fonts", "\u0641\u0648\u0646\u062a\u0647\u0627" },
{ "Plain", "\u0633\u0627\u062f\u0647" },
{ "Italic", "\u062d\u0631\u0648\u0641 \u06a9\u062c" },
{ "Bold", "\u0633\u064a\u0627\u0647" },
{ "BoldItalic", "\u0633\u064a\u0627\u0647 \u0648 \u06a9\u062c" },
{ "Name", "\u0646\u0627\u0645" },
{ "Size", "\u0627\u0646\u062f\u0627\u0632\u0647" },
{ "Style", "\u0633\u0628\u06a9" },
{ "TestString", "\u0627\u064a\u0646 \u064a\u06a9 \u062a\u0633\u062a \u0627\u0633\u062a! \u0631\u0648\u0628\u0627\u0647 \u0642\u0647\u0648\u0647 \u0627\u06cc \u062f\u0631 \u062d\u0627\u0644 \u0627\u0646\u062c\u0627\u0645 \u06a9\u0627\u0631\u06cc \u0627\u0633\u062a." },
{ "FontString", "\u0641\u0648\u0646\u062a" },
//
{ "AdempiereColorEditor", "\u0648\u064a\u0631\u0627\u0633\u062a\u0627\u0631 \u0631\u0646\u06af \u06a9\u0627\u0645\u067e\u064a\u0631\u0647" },
{ "AdempiereType", "\u0646\u0648\u0639 \u0631\u0646\u06af" },
{ "GradientUpperColor", "\u0631\u0646\u06af \u0628\u0627\u0644\u0627\u06cc \u0634\u064a\u0628" },
{ "GradientLowerColor", "\u0631\u0646\u06af \u067e\u0627\u064a\u064a\u0646 \u0634\u064a\u0628" },
{ "GradientStart", "\u0634\u0631\u0648\u0639 \u0634\u064a\u0628" },
{ "GradientDistance", "\u0645\u0633\u0627\u0641\u062a \u0634\u064a\u0628" },
{ "TextureURL", "\u064a\u0648 \u0622\u0631 \u0622\u0644 \u0628\u0627\u0641\u062a" },
{ "TextureAlpha", "\u0628\u0627\u0641\u062a \u0622\u0644\u0641\u0627" },
{ "TextureTaintColor", "\u0631\u0646\u06af \u0628\u0627\u0641\u062a \u0644\u06a9\u0647 \u062f\u0627\u0631" },
{ "LineColor", "\u0631\u0646\u06af \u062e\u0637" },
{ "LineBackColor", "\u0631\u0646\u06af \u0632\u0645\u064a\u0646\u0647" },
{ "LineWidth", "\u067e\u0647\u0646\u0627\u06cc \u062e\u0637" },
{ "LineDistance", "\u0641\u0627\u0635\u0644\u0647 \u062e\u0637" },
{ "FlatColor", "\u0631\u0646\u06af \u0645\u0633\u0637\u062d" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,134 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel for Finnish Language
*
* @author Petteri Soininen (petteri.soininen@netorek.fi)
* @version $Id: PlafRes_fi.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class PlafRes_fi extends ListResourceBundle
{
/**
* Data
*/
static final Object[][] contents = new String[][]
{
{ "BackColType", "Taustan v<>rityyppi" },
{ "BackColType_Flat", "Yksiv<EFBFBD>ri" },
{ "BackColType_Gradient", "Gradientti" },
{ "BackColType_Lines", "Viiva" },
{ "BackColType_Texture", "Kuviointi" },
//
{ "LookAndFeelEditor", "K<EFBFBD>ytt<EFBFBD>tuntuman muokkaus" },
{ "LookAndFeel", "K<EFBFBD>ytt<EFBFBD>tuntuma" },
{ "Theme", "Teema" },
{ "EditAdempiereTheme", "Muokkaa Adempiere-teemaa" },
{ "SetDefault", "Oletustaustav<EFBFBD>ri" },
{ "SetDefaultColor", "Taustav<EFBFBD>ri" },
{ "ColorBlind", "V<EFBFBD>risokeus" },
{ "Example", "Esimerkki" },
{ "Reset", "Nollaa" },
{ "OK", "Hyv<EFBFBD>ksy" },
{ "Cancel", "Peruuta" },
//
{ "AdempiereThemeEditor", "Adempiere-teeman muokkaus" },
{ "MetalColors", "Metalliv<EFBFBD>rit" },
{ "AdempiereColors", "Adempiere-v<>rit" },
{ "AdempiereFonts", "Adempiere-kirjasimet" },
{ "Primary1Info", "Varjostin, Erotin" },
{ "Primary1", "Ensisijainen 1" },
{ "Primary2Info", "Focus-viiva, Valitty Valikko" },
{ "Primary2", "Ensisijainen 2" },
{ "Primary3Info", "Taulun Valittu Rivi, Valittu Teksti, ToolTip Tausta" },
{ "Primary3", "Ensisijainen 3" },
{ "Secondary1Info", "Reunaviivat" },
{ "Secondary1", "Toissijainen 1" },
{ "Secondary2Info", "Ei-aktiiviset Tabulaattorit, Painetut Kent<6E>t, Ei-aktiivinen Reuna + Teksti" },
{ "Secondary2", "Toissijainen 2" },
{ "Secondary3Info", "Tausta" },
{ "Secondary3", "Toissijainen 3" },
//
{ "ControlFontInfo", "Kontrollikirjasin" },
{ "ControlFont", "Nimikekirjasin" },
{ "SystemFontInfo", "Tool Tip, Puun Solmut" },
{ "SystemFont", "J<EFBFBD>rjestelm<EFBFBD>kirjasin" },
{ "UserFontInfo", "K<EFBFBD>ytt<EFBFBD>j<EFBFBD>n Sy<53>tt<74>m<EFBFBD> Tieto" },
{ "UserFont", "Kentt<EFBFBD>kirjasin" },
// { "SmallFontInfo", "Raportit" },
{ "SmallFont", "Pieni Kirjasin" },
{ "WindowTitleFont", "Otsikkokirjasin" },
{ "MenuFont", "Valikkokirjasin" },
//
{ "MandatoryInfo", "Pakollinen Kentt<74>tausta" },
{ "Mandatory", "Pakollinen" },
{ "ErrorInfo", "Virhekent<EFBFBD>n Tausta" },
{ "Error", "Virhe" },
{ "InfoInfo", "Tietokent<EFBFBD>n Tausta" },
{ "Info", "Tieto" },
{ "WhiteInfo", "Viivat" },
{ "White", "Valkoinen" },
{ "BlackInfo", "Viivat, Teksti" },
{ "Black", "Musta" },
{ "InactiveInfo", "Ei-aktiivinen Kentt<74>tausta" },
{ "Inactive", "Ei-aktiivinen" },
{ "TextOKInfo", "Hyv<EFBFBD>ksy Teksti Edusta" },
{ "TextOK", "Teksti - Hyv<79>ksy" },
{ "TextIssueInfo", "Virhetekstin Edusta" },
{ "TextIssue", "Teksti - Virhe" },
//
{ "FontChooser", "Kirjasimen Valitsin" },
{ "Fonts", "Kirjasimet" },
{ "Plain", "Tavallinen" },
{ "Italic", "Kursiivi" },
{ "Bold", "Lihavoitu" },
{ "BoldItalic", "Lihavoitu ja Kursiivi" },
{ "Name", "Nimi" },
{ "Size", "Koko" },
{ "Style", "Tyyli" },
{ "TestString", "T<EFBFBD>m<EFBFBD> on vain Testi! Nopea ruskea Kettu suorittaa jotain. 12,3456.78 LetterLOne = l1 LetterOZero = O0" },
{ "FontString", "Kirjasin" },
//
{ "AdempiereColorEditor", "Adempiere-v<>rimuokkaus" },
{ "AdempiereType", "V<EFBFBD>rityyppi" },
{ "GradientUpperColor", "Gradientin Ylempi V<>ri" },
{ "GradientLowerColor", "Gradientin Alempi V<>ri" },
{ "GradientStart", "Gradientin Alku" },
{ "GradientDistance", "Gradientin Et<45>isyys" },
{ "TextureURL", "Kuvioinnin URL" },
{ "TextureAlpha", "Kuvioinnin Alpha" },
{ "TextureTaintColor", "Kuvioinnin Korvausv<73>ri" },
{ "LineColor", "Viivan V<>ri" },
{ "LineBackColor", "Taustan V<>ri" },
{ "LineWidth", "Viivan Paksuus" },
{ "LineDistance", "Viivan Et<45>isyys" },
{ "FlatColor", "Tavallinen V<>ri" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,124 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel (French)
*
* @author Jean-Luc SCHEIDEGGER
* @version $Id: PlafRes_fr.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
*/
public class PlafRes_fr extends ListResourceBundle
{
/** Translation Content */
static final Object[][] contents = new String[][]
{
{ "BackColType", "Type de Couleur de Fond" },
{ "BackColType_Flat", "Flat" },
{ "BackColType_Gradient", "Gradient" },
{ "BackColType_Lines", "Lignes" },
{ "BackColType_Texture", "Texture" },
{ "LookAndFeelEditor", "Look & Feel Editor" },
{ "LookAndFeel", "Look & Feel" },
{ "Theme", "Th\350me" },
{ "EditAdempiereTheme", "Editer Th\350me Adempiere" },
{ "SetDefault", "Couleur de Fond par D\351faut" },
{ "SetDefaultColor", "Couleur de Fond" },
{ "ColorBlind", "Couleur Deficiency" },
{ "Example", "Exemple" },
{ "Reset", "Remettre" },
{ "OK", "OK" },
{ "Cancel", "Annuler" },
{ "AdempiereThemeEditor", "Editeur de Th\350me Adempiere" },
{ "MetalColors", "Couleurs M\351tal" },
{ "AdempiereColors", "Couleurs Adempiere" },
{ "AdempiereFonts", "Polices Adempiere" },
{ "Primary1Info", "Label Text" },
{ "Primary1", "Primary 1" },
{ "Primary2Info", "Focus Line, Selected CheckBox" },
{ "Primary2", "Primary 2" },
{ "Primary3Info", "Table Selected Row, Selected Text, ToolTip Background" },
{ "Primary3", "Primary 3" },
{ "Secondary1Info", "Border Lines" },
{ "Secondary1", "Secondary 1" },
{ "Secondary2Info", "Inactive Tabs, Pressed Fields, Inactive Border + Text" },
{ "Secondary2", "Secondary 2" },
{ "Secondary3Info", "Background" },
{ "Secondary3", "Secondary 3" },
{ "ControlFontInfo", "Control Font" },
{ "ControlFont", "Label Font" },
{ "SystemFontInfo", "Tool Tip, Tree nodes" },
{ "SystemFont", "System Font" },
{ "UserFontInfo", "User Entered Data" },
{ "UserFont", "Field Font" },
{ "SmallFont", "Small Font" },
{ "WindowTitleFont", "Title Font" },
{ "MenuFont", "Menu Font" },
{ "MandatoryInfo", "Mandatory Field Background" },
{ "Mandatory", "Mandatory" },
{ "ErrorInfo", "Error Field Background" },
{ "Error", "Error" },
{ "InfoInfo", "Info Field Background" },
{ "Info", "Info" },
{ "WhiteInfo", "Lines" },
{ "White", "White" },
{ "BlackInfo", "Lines, Text" },
{ "Black", "Black" },
{ "InactiveInfo", "Inactive Field Background" },
{ "Inactive", "Inactive" },
{ "TextOKInfo", "OK Text Foreground" },
{ "TextOK", "Text - OK" },
{ "TextIssueInfo", "Error Text Foreground" },
{ "TextIssue", "Text - Error" },
{ "FontChooser", "Font Chooser" },
{ "Fonts", "Fonts" },
{ "Plain", "Plain" },
{ "Italic", "Italic" },
{ "Bold", "Bold" },
{ "BoldItalic", "Bold & Italic" },
{ "Name", "Name" },
{ "Size", "Size" },
{ "Style", "Style" },
{ "TestString", "This is just a Test! The quick brown Fox is doing something. 12,3456.78 LetterLOne = l1 LetterOZero = O0" },
{ "FontString", "Font" },
{ "AdempiereColorEditor", "Adempiere Couleur Editor" },
{ "AdempiereType", "Couleur Type" },
{ "GradientUpperColor", "Gradient Upper Couleur" },
{ "GradientLowerColor", "Gradient Lower Couleur" },
{ "GradientStart", "Gradient Start" },
{ "GradientDistance", "Gradient Distance" },
{ "TextureURL", "Texture URL" },
{ "TextureAlpha", "Texture Alpha" },
{ "TextureTaintColor", "Texture Taint Couleur" },
{ "LineColor", "Line Couleur" },
{ "LineBackColor", "Background Couleur" },
{ "LineWidth", "Line Width" },
{ "LineDistance", "Line Distance" },
{ "FlatColor", "Flat Couleur" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
} // fetContents
} // PlafRes_fr

View File

@ -0,0 +1,132 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Marko Bubalo
* @version $Id: PlafRes_hr.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class PlafRes_hr extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "Tip pozadine" },
{ "BackColType_Flat", "Flat" },
{ "BackColType_Gradient", "Gradient" },
{ "BackColType_Lines", "Liije" },
{ "BackColType_Texture", "Teksture" },
//
{ "LookAndFeelEditor", "Urediva<EFBFBD> izgleda" },
{ "LookAndFeel", "Izgled" },
{ "Theme", "Tema" },
{ "EditAdempiereTheme", "Ure<EFBFBD>ivanje Adempiere teme" },
{ "SetDefault", "Uobi<EFBFBD>ajena pozadina" },
{ "SetDefaultColor", "Boja pozadine" },
{ "ColorBlind", "Color Deficiency" },
{ "Example", "Primjer" },
{ "Reset", "Poni<EFBFBD>titi" },
{ "OK", "U redu" },
{ "Cancel", "Otkazati" },
//
{ "AdempiereThemeEditor", "Ure<EFBFBD>ivanje Adempiere teme" },
{ "MetalColors", "Metal Colors" },
{ "AdempiereColors", "Adempiere Colors" },
{ "AdempiereFonts", "Adempiere Fonts" },
{ "Primary1Info", "Shadow, Separator" },
{ "Primary1", "Primary 1" },
{ "Primary2Info", "Focus Line, Selected Menu" },
{ "Primary2", "Primary 2" },
{ "Primary3Info", "Table Selected Row, Selected Text, ToolTip Background" },
{ "Primary3", "Primary 3" },
{ "Secondary1Info", "Border Lines" },
{ "Secondary1", "Secondary 1" },
{ "Secondary2Info", "Inactive Tabs, Pressed Fields, Inactive Border + Text" },
{ "Secondary2", "Secondary 2" },
{ "Secondary3Info", "Background" },
{ "Secondary3", "Secondary 3" },
//
{ "ControlFontInfo", "Control Font" },
{ "ControlFont", "Label Font" },
{ "SystemFontInfo", "Tool Tip, Tree nodes" },
{ "SystemFont", "System Font" },
{ "UserFontInfo", "User Entered Data" },
{ "UserFont", "Field Font" },
// { "SmallFontInfo", "Reports" },
{ "SmallFont", "Small Font" },
{ "WindowTitleFont", "Title Font" },
{ "MenuFont", "Menu Font" },
//
{ "MandatoryInfo", "Mandatory Field Background" },
{ "Mandatory", "Mandatory" },
{ "ErrorInfo", "Error Field Background" },
{ "Error", "Error" },
{ "InfoInfo", "Info Field Background" },
{ "Info", "Info" },
{ "WhiteInfo", "Lines" },
{ "White", "White" },
{ "BlackInfo", "Lines, Text" },
{ "Black", "Black" },
{ "InactiveInfo", "Inactive Field Background" },
{ "Inactive", "Inactive" },
{ "TextOKInfo", "OK Text Foreground" },
{ "TextOK", "Text - OK" },
{ "TextIssueInfo", "Error Text Foreground" },
{ "TextIssue", "Text - Error" },
//
{ "FontChooser", "Font Chooser" },
{ "Fonts", "Fonts" },
{ "Plain", "Plain" },
{ "Italic", "Italic" },
{ "Bold", "Bold" },
{ "BoldItalic", "Bold & Italic" },
{ "Name", "Name" },
{ "Size", "Size" },
{ "Style", "Style" },
{ "TestString", "This is just a Test! The quick brown Fox is doing something. 12,3456.78 LetterLOne = l1 LetterOZero = O0" },
{ "FontString", "Font" },
//
{ "AdempiereColorEditor", "Adempiere Color Editor" },
{ "AdempiereType", "Color Type" },
{ "GradientUpperColor", "Gradient Upper Color" },
{ "GradientLowerColor", "Gradient Lower Color" },
{ "GradientStart", "Gradient Start" },
{ "GradientDistance", "Gradient Distance" },
{ "TextureURL", "Texture URL" },
{ "TextureAlpha", "Texture Alpha" },
{ "TextureTaintColor", "Texture Taint Color" },
{ "LineColor", "Line Color" },
{ "LineBackColor", "Background Color" },
{ "LineWidth", "Line Width" },
{ "LineDistance", "Line Distance" },
{ "FlatColor", "Flat Color" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,131 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Halim Englen
* @version $Id: PlafRes_in.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class PlafRes_in extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "Tipe Warna Latar Belakang" },
{ "BackColType_Flat", "Rata" },
{ "BackColType_Gradient", "Gradien" },
{ "BackColType_Lines", "Garis" },
{ "BackColType_Texture", "Textur" },
//
{ "LookAndFeelEditor", "Editor Look & Feel" },
{ "LookAndFeel", "Look & Feel" },
{ "Theme", "Tema" },
{ "EditAdempiereTheme", "Ubah Tema Adempiere" },
{ "SetDefault", "Latar Belakang Asal" },
{ "SetDefaultColor", "Warna Latar Belakang" },
{ "ColorBlind", "Defisiensi Warna" },
{ "Example", "Contoh" },
{ "Reset", "Reset" },
{ "OK", "OK" },
{ "Cancel", "Batal" },
//
{ "AdempiereThemeEditor", "Adempiere Tema Editor" },
{ "MetalColors", "Warna Metal" },
{ "AdempiereColors", "Warna Adempiere" },
{ "AdempiereFonts", "Adempiere Fonts" },
{ "Primary1Info", "Bayangan, Pemisah" },
{ "Primary1", "Utama 1" },
{ "Primary2Info", "Baris Fokus, Menu yang Dipilih" },
{ "Primary2", "Utama 2" },
{ "Primary3Info", "Table Selected Row, Selected Text, ToolTip Background" },
{ "Primary3", "Utama 3" },
{ "Secondary1Info", "Border Lines" },
{ "Secondary1", "Sekunder 1" },
{ "Secondary2Info", "Inactive Tabs, Pressed Fields, Inactive Border + Text" },
{ "Secondary2", "Sekunder 2" },
{ "Secondary3Info", "Background" },
{ "Secondary3", "Sekunder 3" },
//
{ "ControlFontInfo", "Control Font" },
{ "ControlFont", "Label Font" },
{ "SystemFontInfo", "Tool Tip, Tree nodes" },
{ "SystemFont", "System Font" },
{ "UserFontInfo", "User Entered Data" },
{ "UserFont", "Field Font" },
// { "SmallFontInfo", "Reports" },
{ "SmallFont", "Small Font" },
{ "WindowTitleFont", "Title Font" },
{ "MenuFont", "Menu Font" },
//
{ "MandatoryInfo", "Mandatory Field Background" },
{ "Mandatory", "Mandatory" },
{ "ErrorInfo", "Error Field Background" },
{ "Error", "Error" },
{ "InfoInfo", "Info Field Background" },
{ "Info", "Info" },
{ "WhiteInfo", "Lines" },
{ "White", "Putih" },
{ "BlackInfo", "Lines, Text" },
{ "Black", "Hitam" },
{ "InactiveInfo", "Inactive Field Background" },
{ "Inactive", "Inactive" },
{ "TextOKInfo", "OK Text Foreground" },
{ "TextOK", "Text - OK" },
{ "TextIssueInfo", "Error Text Foreground" },
{ "TextIssue", "Text - Error" },
//
{ "FontChooser", "Font Chooser" },
{ "Fonts", "Fonts" },
{ "Plain", "Plain" },
{ "Italic", "Italic" },
{ "Bold", "Bold" },
{ "BoldItalic", "Bold & Italic" },
{ "Name", "Nama" },
{ "Size", "Ukuran" },
{ "Style", "Gaya" },
{ "TestString", "This is just a Test! The quick brown Fox is doing something. 12,3456.78 LetterLOne = l1 LetterOZero = O0" },
{ "FontString", "Font" },
//
{ "AdempiereColorEditor", "Editor Warna Adempiere" },
{ "AdempiereType", "Tipe Warna" },
{ "GradientUpperColor", "Warna Atas Gradien" },
{ "GradientLowerColor", "Warna Bawah Gradien" },
{ "GradientStart", "Mulai Gradien" },
{ "GradientDistance", "Jarak Gradien" },
{ "TextureURL", "Textur URL" },
{ "TextureAlpha", "Textur Alpha" },
{ "TextureTaintColor", "Textur Warna Taint" },
{ "LineColor", "Warna Baris" },
{ "LineBackColor", "Warna Latar Belakang" },
{ "LineWidth", "Lebar Baris" },
{ "LineDistance", "Jarak Baris" },
{ "FlatColor", "Warna Flat" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,213 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Gabriele Vivinetto - gabriele.mailing@rvmgroup.it
* @version $Id: PlafRes_it.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class PlafRes_it extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
//{ "BackColType", "Background Color Type" },
{ "BackColType", "Tipo Colore di Sfondo" },
//{ "BackColType_Flat", "Flat" },
{ "BackColType_Flat", "Piatto" },
//{ "BackColType_Gradient", "Gradient" },
{ "BackColType_Gradient", "Gradiente" },
//{ "BackColType_Lines", "Lines" },
{ "BackColType_Lines", "Linee" },
//{ "BackColType_Texture", "Texture" }, //Need to be checked. How to translate "Texture" ?
{ "BackColType_Texture", "Texture" },
//
//{ "LookAndFeelEditor", "Look & Feel Editor" }, //Need to be checked
{ "LookAndFeelEditor", "Editor aspetto" },
//{ "LookAndFeel", "Look & Feel" },
{ "LookAndFeel", "Aspetto" },
//{ "Theme", "Theme" },
{ "Theme", "Tema" },
//{ "EditAdempiereTheme", "Edit Adempiere Theme" }, //Need to be checked
{ "EditAdempiereTheme", "Modifica Tema di Adempiere" },
//{ "SetDefault", "Default Background" },
{ "SetDefault", "Sfondo di Default" },
//{ "SetDefaultColor", "Background Color" },
{ "SetDefaultColor", "Colore di Sfondo" },
//{ "ColorBlind", "Color Deficiency" }, //Need to be checked
{ "ColorBlind", "Mancanza di Colore" },
//{ "Example", "Example" },
{ "Example", "Esempio" },
//{ "Reset", "Reset" }, //Need to be checked
{ "Reset", "Resetta" },
//{ "OK", "OK" },
{ "OK", "OK" },
//{ "Cancel", "Cancel" },
{ "Cancel", "Cancella" },
//
//{ "AdempiereThemeEditor", "Adempiere Theme Editor" }, //Need to be checked
{ "AdempiereThemeEditor", "Editor di Tema Adempiere" },
//{ "MetalColors", "Metal Colors" },
{ "MetalColors", "Colori Metallici" },
//{ "AdempiereColors", "Adempiere Colors" },
{ "AdempiereColors", "Colori di Adempiere" },
//{ "AdempiereFonts", "Adempiere Fonts" }, //Need to be checked. Mantain the word "Font" ?
{ "AdempiereFonts", "Caratteri di Adempiere" },
//{ "Primary1Info", "Shadow, Separator" }, //Need to be checked
{ "Primary1Info", "Ombra, Separatore" },
//{ "Primary1", "Primary 1" },
{ "Primary1", "Primario 1" },
//{ "Primary2Info", "Focus Line, Selected Menu" }, //Need to be checked
{ "Primary2Info", "Linea di Selezione, Menu Selezionato" },
//{ "Primary2", "Primary 2" },
{ "Primary2", "Primario 2" },
//{ "Primary3Info", "Table Selected Row, Selected Text, ToolTip Background" }, //Need to be checked
{ "Primary3Info", "Riga di Tabella Selezionata, Testo Selezionato, Sfondo ToolTip " },
//{ "Primary3", "Primary 3" },
{ "Primary3", "Primario 3" },
//{ "Secondary1Info", "Border Lines" },
{ "Secondary1Info", "Linee di Bordo" },
//{ "Secondary1", "Secondary 1" },
{ "Secondary1", "Secondario 1" },
//{ "Secondary2Info", "Inactive Tabs, Pressed Fields, Inactive Border + Text" }, //Need to be checked
{ "Secondary2Info", "Tab inattive, Campi selezionati, Bordo + Testo inattivo" },
//{ "Secondary2", "Secondary 2" },
{ "Secondary2", "Secondario 2" },
//{ "Secondary3Info", "Background" },
{ "Secondary3Info", "Sfondo" },
//{ "Secondary3", "Secondary 3" },
{ "Secondary3", "Secondario 3" },
//
//{ "ControlFontInfo", "Control Font" }, //Need to be checked
{ "ControlFontInfo", "Font di Controllo" },
//{ "ControlFont", "Label Font" }, //Need to be checked
{ "ControlFont", "Font di Etichetta" },
//{ "SystemFontInfo", "Tool Tip, Tree nodes" }, //Need to be checked
{ "SystemFontInfo", "Tool Tip, Nodi ad Albero" },
//{ "SystemFont", "System Font" }, //Need to be checked
{ "SystemFont", "Carattere di Sistema" },
//{ "UserFontInfo", "User Entered Data" },
{ "UserFontInfo", "Dati immessi dall'utente" },
//{ "UserFont", "Field Font" }, //Need to be checked
{ "UserFont", "Carattere del Campo" },
// { "SmallFontInfo", "Reports" },
//{ "SmallFont", "Small Font" }, //Need to be checked
{ "SmallFont", "Carattere piccolo" },
//{ "WindowTitleFont", "Title Font" }, //Need to be checked
{ "WindowTitleFont", "Carattere Titolo" },
//{ "MenuFont", "Menu Font" }, //Need to be checked
{ "MenuFont", "Carattere Menu" },
//
//{ "MandatoryInfo", "Mandatory Field Background" },
{ "MandatoryInfo", "Sfondo Campo Obbligatorio" },
//{ "Mandatory", "Mandatory" },
{ "Mandatory", "Obbligatorio" },
//{ "ErrorInfo", "Error Field Background" },
{ "ErrorInfo", "Sfondo Campo di Errore" },
//{ "Error", "Error" },
{ "Error", "Errore" },
//{ "InfoInfo", "Info Field Background" }, //Need to be checked. Is it better "Informativo" ? What with the following ?
{ "InfoInfo", "Sfondo Campo Informazione" },
//{ "Info", "Info" },
{ "Info", "Informazione" },
//{ "WhiteInfo", "Lines" },
{ "WhiteInfo", "Linee" },
//{ "White", "White" },
{ "White", "Bianco" },
//{ "BlackInfo", "Lines, Text" },
{ "BlackInfo", "Linee, Testo" },
//{ "Black", "Black" },
{ "Black", "Nero" },
//{ "InactiveInfo", "Inactive Field Background" },
{ "InactiveInfo", "Sfondo Campo Inattivo" },
//{ "Inactive", "Inactive" },
{ "Inactive", "Inattivo" },
//{ "TextOKInfo", "OK Text Foreground" }, //Need to be checked. How to translate Foreground ?
{ "TextOKInfo", "Colore Testo OK" },
//{ "TextOK", "Text - OK" }, //Need to be checked
{ "TextOK", "Testo - OK" },
//{ "TextIssueInfo", "Error Text Foreground" }, //Need to be checked
{ "TextIssueInfo", "Colore Testo di Errore" },
//{ "TextIssue", "Text - Error" },
{ "TextIssue", "Testo - Error" },
//
//{ "FontChooser", "Font Chooser" }, //Need to be checked
{ "FontChooser", "Selezionatore Carattere" },
//{ "Fonts", "Fonts" }, //Need to be checked
{ "Fonts", "Caratteri" },
//{ "Plain", "Plain" }, //Need to be checked
{ "Plain", "Normale" },
//{ "Italic", "Italic" },
{ "Italic", "Corsivo" },
//{ "Bold", "Bold" },
{ "Bold", "Grassetto" },
//{ "BoldItalic", "Bold & Italic" },
{ "BoldItalic", "Grassetto & Corsivo" },
//{ "Name", "Name" },
{ "Name", "Nome" },
//{ "Size", "Size" },
{ "Size", "Dimensione" },
//{ "Style", "Style" },
{ "Style", "Stile" },
//{ "TestString", "This is just a Test! The quick brown Fox is doing something. 12,3456.78 LetterLOne = l1 LetterOZero = O0" },
{ "TestString", "Questo <20> solo un Test! La veloce volpe marrone st<73> facendo qualcosa. 12,3456.78 LetteraLUno = l1 LetteraOZero = O0" },
//{ "FontString", "Font" },
{ "FontString", "Carattere" }, //Need to be checked
//
//{ "AdempiereColorEditor", "Adempiere Color Editor" }, //Need to be checked
{ "AdempiereColorEditor", "Editor di Colori Adempiere" },
//{ "AdempiereType", "Color Type" },
{ "AdempiereType", "Tipo Colore" },
//{ "GradientUpperColor", "Gradient Upper Color" },
{ "GradientUpperColor", "Colore Gradiente Superiore" },
//{ "GradientLowerColor", "Gradient Lower Color" },
{ "GradientLowerColor", "Colore Gradiente Inferiore" },
//{ "GradientStart", "Gradient Start" },
{ "GradientStart", "Inizio Gradiente" },
//{ "GradientDistance", "Gradient Distance" },
{ "GradientDistance", "Distanza Gradiente" },
//{ "TextureURL", "Texture URL" }, //Need to be checked. How to translate "Texture" ?
{ "TextureURL", "URL Texture" },
//{ "TextureAlpha", "Texture Alpha" }, //Need to be checked. How to translate ?
{ "TextureAlpha", "Texture Alpha" },
//{ "TextureTaintColor", "Texture Taint Color" }, //Need to be checked. How to translate ?
{ "TextureTaintColor", "Texture Taint Color" },
//{ "LineColor", "Line Color" },
{ "LineColor", "Colore Linea" },
//{ "LineBackColor", "Background Color" },
{ "LineBackColor", "Colore Sfondo" },
//{ "LineWidth", "Line Width" },
{ "LineWidth", "Spessore Linea" },
//{ "LineDistance", "Line Distance" },
{ "LineDistance", "Distanza Linea" },
//{ "FlatColor", "Flat Color" }
{ "FlatColor", "Colore Piatto" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,131 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Stefan Christians
* @version $Id: PlafRes_ja.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class PlafRes_ja extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "\u80cc\u666f\u306e\u30b9\u30bf\u30a4\u30eb" },
{ "BackColType_Flat", "\u5358\u8272" },
{ "BackColType_Gradient", "\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3" },
{ "BackColType_Lines", "\u30e9\u30a4\u30f3" },
{ "BackColType_Texture", "\u30c6\u30ad\u30b9\u30c1\u30e3\u30fc" },
//
{ "LookAndFeelEditor", "\u5916\u898b\u30fb\u30a8\u30c7\u30a3\u30bf" },
{ "LookAndFeel", "\u5916\u898b" },
{ "Theme", "\u30c6\u30fc\u30de" },
{ "EditAdempiereTheme", "\u30b3\u30f3\u30d4\u30a8\u30fc\u30ec\u306e\u30c6\u30fc\u30de\u30fb\u30a8\u30c7\u30a3\u30bf" },
{ "SetDefault", "\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u80cc\u666f" },
{ "SetDefaultColor", "\u80cc\u666f\u306e\u8272" },
{ "ColorBlind", "\u8272\u76f2\u76ee" },
{ "Example", "\u4f8b" },
{ "Reset", "\u30ea\u30bb\u30c3\u30c8" },
{ "OK", "OK" },
{ "Cancel", "\u30ad\u30e3\u30f3\u30bb\u30eb" },
//
{ "AdempiereThemeEditor", "\u30b3\u30f3\u30d4\u30a8\u30fc\u30ec\u30fb\u30c6\u30fc\u30de\u30fb\u30a8\u30c7\u30a3\u30bf" },
{ "MetalColors", "\u30e1\u30bf\u30eb\u8272" },
{ "AdempiereColors", "\u30b3\u30f3\u30d4\u30a8\u30fc\u30ec\u306e\u8272" },
{ "AdempiereFonts", "\u30b3\u30f3\u30d4\u30a8\u30fc\u30ec\u306e\u30d5\u30a9\u30f3\u30c8" },
{ "Primary1Info", "\u5f71\u3001\u30bb\u30d1\u30ec\u30fc\u30bf" },
{ "Primary1", "\u4e00\u756a\u76ee\u306e1" },
{ "Primary2Info", "\u30d5\u30a9\u30fc\u30ab\u30b9\u304c\u6709\u308b\u30e9\u30a4\u30f3\u3001\u9078\u629e\u3057\u305f\u30e1\u30cb\u30e5\u30fc" },
{ "Primary2", "\u4e00\u756a\u76ee\u306e2" },
{ "Primary3Info", "\u9078\u629e\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u306e\u884c\u3001\u9078\u629e\u3057\u305f\u30c6\u30ad\u30b9\u30c8\u3001\u30c4\u30fc\u30eb\u30fb\u30c1\u30c3\u30d7\u306e\u80cc\u666f" },
{ "Primary3", "\u4e00\u756a\u76ee\u306e3" },
{ "Secondary1Info", "\u5883\u754c\u7dda" },
{ "Secondary1", "\u4e8c\u756a\u76ee\u306e1" },
{ "Secondary2Info", "\u4e0d\u6d3b\u6027\u30bf\u30d6\u3001\u62bc\u4e0b\u3057\u305f\u30d5\u30a3\u30fc\u30eb\u30c9\u3001\u4e0d\u6d3b\u6027\u5883\u754c\u3068\u30c6\u30ad\u30b9\u30c8" },
{ "Secondary2", "\u4e8c\u756a\u76ee\u306e2" },
{ "Secondary3Info", "\u80cc\u666f" },
{ "Secondary3", "\u4e8c\u756a\u76ee\u306e3" },
//
{ "ControlFontInfo", "\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u30d5\u30a9\u30f3\u30c8" },
{ "ControlFont", "\u30e9\u30d9\u30eb\u306e\u30d5\u30a9\u30f3\u30c8" },
{ "SystemFontInfo", "\u30c4\u30fc\u30eb\u30fb\u30c1\u30c3\u30d7\u3001\u30c4\u30ea\u30fc" },
{ "SystemFont", "\u30b7\u30b9\u30c6\u30e0\u30d5\u30a9\u30f3\u30c8" },
{ "UserFontInfo", "\u30e6\u30fc\u30b6\u304c\u5165\u529b\u3057\u305f\u30c7\u30fc\u30bf" },
{ "UserFont", "\u30d5\u30a3\u30fc\u30eb\u30c9\u30d5\u30a9\u30f3\u30c8" },
// { "SmallFontInfo", "\u30ec\u30dd\u30fc\u30c8" },
{ "SmallFont", "\u5c0f\u30d5\u30a9\u30f3\u30c8" },
{ "WindowTitleFont", "\u30bf\u30a4\u30c8\u30eb\u30d5\u30a9\u30f3\u30c8" },
{ "MenuFont", "\u30e1\u30cb\u30e5\u30fc\u30d5\u30a9\u30f3\u30c8" },
//
{ "MandatoryInfo", "\u5fc5\u9808\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u80cc\u666f" },
{ "Mandatory", "\u5fc5\u9808" },
{ "ErrorInfo", "\u30a8\u30e9\u30fc\u30fb\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u80cc\u666f" },
{ "Error", "\u30a8\u30e9\u30fc" },
{ "InfoInfo", "\u60c5\u5831\u30fb\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u80cc\u666f" },
{ "Info", "\u60c5\u5831" },
{ "WhiteInfo", "\u30e9\u30a4\u30f3" },
{ "White", "\u767d" },
{ "BlackInfo", "\u30e9\u30a4\u30f3\u3068\u30c6\u30ad\u30b9\u30c8" },
{ "Black", "\u9ed2" },
{ "InactiveInfo", "\u4e0d\u6d3b\u6027\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u80cc\u666f" },
{ "Inactive", "\u4e0d\u6d3b\u6027" },
{ "TextOKInfo", "OK\u30fb\u30c6\u30ad\u30b9\u30c8\u306e\u524d\u666f" },
{ "TextOK", "\u30c6\u30ad\u30b9\u30c8 - OK" },
{ "TextIssueInfo", "\u30a8\u30e9\u30fc\u30fb\u30c6\u30ad\u30b9\u30c8\u306e\u524d\u666f" },
{ "TextIssue", "\u30c6\u30ad\u30b9\u30c8 - \u30a8\u30e9\u30fc" },
//
{ "FontChooser", "\u30d5\u30a9\u30f3\u30c8\u306e\u9078\u629e" },
{ "Fonts", "\u30d5\u30a9\u30f3\u30c8" },
{ "Plain", "\u666e\u901a" },
{ "Italic", "\u659c\u4f53" },
{ "Bold", "\u592a\u5b57" },
{ "BoldItalic", "\u592a\u5b57\u3068\u659c\u4f53" },
{ "Name", "\u30d5\u30a1\u30df\u30ea" },
{ "Size", "\u30b5\u30a4\u30ba" },
{ "Style", "\u30b9\u30bf\u30a4\u30eb" },
{ "TestString", "This is just a Test! The quick brown Fox is doing something. 12,3456.78 LetterLOne = l1 LetterOZero = O0" },
{ "FontString", "\u30d5\u30a9\u30f3\u30c8" },
//
{ "AdempiereColorEditor", "\u30b3\u30f3\u30d4\u30a8\u30fc\u30ec\u306e\u8272\u30fb\u30a8\u30c7\u30a3\u30bf" },
{ "AdempiereType", "\u8272\u578b" },
{ "GradientUpperColor", "\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u4e0a\u306e\u8272" },
{ "GradientLowerColor", "\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u4e0b\u306e\u8272" },
{ "GradientStart", "\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u306e" },
{ "GradientDistance", "\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u8ddd\u96e2" },
{ "TextureURL", "\u30c6\u30ad\u30b9\u30c1\u30e3\u30fc\u306eURL" },
{ "TextureAlpha", "\u30c6\u30ad\u30b9\u30c1\u30e3\u30fc\u306e\u03b1\u5024" },
{ "TextureTaintColor", "\u30c6\u30ad\u30b9\u30c1\u30e3\u30fc\u306e\u6c5a\u308c\u8272" },
{ "LineColor", "\u30e9\u30a4\u30f3\u306e\u8272" },
{ "LineBackColor", "\u30e9\u30a4\u30f3\u306e\u80cc\u666f\u8272" },
{ "LineWidth", "\u30e9\u30a4\u30f3\u306e\u5e45" },
{ "LineDistance", "\u30e9\u30a4\u30f3\u306e\u8ddd\u96e2" },
{ "FlatColor", "\u5358\u8272" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,131 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Robin Hoo
* @version $Id: PlafRes_ml.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
*/
public class PlafRes_ml extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "Jenis Warna Latar Belakang" },
{ "BackColType_Flat", "Flat" },
{ "BackColType_Gradient", "Gradient" },
{ "BackColType_Lines", "Lines" },
{ "BackColType_Texture", "Texture" },
//
{ "LookAndFeelEditor", "Look & Feel Editor" },
{ "LookAndFeel", "Look & Feel" },
{ "Theme", "Theme" },
{ "EditAdempiereTheme", "Edit Adempiere Theme" },
{ "SetDefault", "Default Background" },
{ "SetDefaultColor", "Background Color" },
{ "ColorBlind", "Color Deficiency" },
{ "Example", "Example" },
{ "Reset", "Reset" },
{ "OK", "OK" },
{ "Cancel", "Batal" },
//
{ "AdempiereThemeEditor", "Adempiere Theme Editor" },
{ "MetalColors", "Metal Colors" },
{ "AdempiereColors", "Adempiere Colors" },
{ "AdempiereFonts", "Adempiere Fonts" },
{ "Primary1Info", "Shadow, Separator" },
{ "Primary1", "Primary 1" },
{ "Primary2Info", "Focus Line, Selected Menu" },
{ "Primary2", "Primary 2" },
{ "Primary3Info", "Table Selected Row, Selected Text, ToolTip Background" },
{ "Primary3", "Primary 3" },
{ "Secondary1Info", "Border Lines" },
{ "Secondary1", "Secondary 1" },
{ "Secondary2Info", "Inactive Tabs, Pressed Fields, Inactive Border + Text" },
{ "Secondary2", "Secondary 2" },
{ "Secondary3Info", "Background" },
{ "Secondary3", "Secondary 3" },
//
{ "ControlFontInfo", "Control Font" },
{ "ControlFont", "Label Font" },
{ "SystemFontInfo", "Tool Tip, Tree nodes" },
{ "SystemFont", "System Font" },
{ "UserFontInfo", "User Entered Data" },
{ "UserFont", "Field Font" },
// { "SmallFontInfo", "Reports" },
{ "SmallFont", "Small Font" },
{ "WindowTitleFont", "Title Font" },
{ "MenuFont", "Menu Font" },
//
{ "MandatoryInfo", "Mandatory Field Background" },
{ "Mandatory", "Mandatory" },
{ "ErrorInfo", "Error Field Background" },
{ "Error", "Error" },
{ "InfoInfo", "Info Field Background" },
{ "Info", "Info" },
{ "WhiteInfo", "Lines" },
{ "White", "White" },
{ "BlackInfo", "Lines, Text" },
{ "Black", "Black" },
{ "InactiveInfo", "Inactive Field Background" },
{ "Inactive", "Inactive" },
{ "TextOKInfo", "OK Text Foreground" },
{ "TextOK", "Text - OK" },
{ "TextIssueInfo", "Error Text Foreground" },
{ "TextIssue", "Text - Error" },
//
{ "FontChooser", "Font Chooser" },
{ "Fonts", "Fonts" },
{ "Plain", "Plain" },
{ "Italic", "Italic" },
{ "Bold", "Bold" },
{ "BoldItalic", "Bold & Italic" },
{ "Name", "Name" },
{ "Size", "Size" },
{ "Style", "Style" },
{ "TestString", "This is just a Test! The quick brown Fox is doing something. 12,3456.78 LetterLOne = l1 LetterOZero = O0" },
{ "FontString", "Font" },
//
{ "AdempiereColorEditor", "Adempiere Color Editor" },
{ "AdempiereType", "Color Type" },
{ "GradientUpperColor", "Gradient Upper Color" },
{ "GradientLowerColor", "Gradient Lower Color" },
{ "GradientStart", "Gradient Start" },
{ "GradientDistance", "Gradient Distance" },
{ "TextureURL", "Texture URL" },
{ "TextureAlpha", "Texture Alpha" },
{ "TextureTaintColor", "Texture Taint Color" },
{ "LineColor", "Line Color" },
{ "LineBackColor", "Background Color" },
{ "LineWidth", "Line Width" },
{ "LineDistance", "Line Distance" },
{ "FlatColor", "Flat Color" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,132 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Eldir Tomassen
* @version $Id: PlafRes_nl.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
*/
public class PlafRes_nl extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "Achtergrond Kleur Type" },
{ "BackColType_Flat", "Egaal" },
{ "BackColType_Gradient", "Verloop" },
{ "BackColType_Lines", "Lijnen" },
{ "BackColType_Texture", "Reli<EFBFBD>f" },
//
{ "LookAndFeelEditor", "Look & Feel Editor" },
{ "LookAndFeel", "Look & Feel" },
{ "Theme", "Thema" },
{ "EditAdempiereTheme", "Adempiere Theme Bewerken" },
{ "SetDefault", "Standaard Achtergrond" },
{ "SetDefaultColor", "Achtergrond Kleur" },
{ "ColorBlind", "Kleur Verloop" },
{ "Example", "Voorbeeld" },
{ "Reset", "Ongedaan maken" },
{ "OK", "OK" },
{ "Cancel", "Annuleren" },
//
{ "AdempiereThemeEditor", "Adempiere Thema Editor" },
{ "MetalColors", "Metaal Kleuren" },
{ "AdempiereColors", "Adempiere Kleuren" },
{ "AdempiereFonts", "Adempiere Lettertypen" },
{ "Primary1Info", "Shaduw, Schijdingsteken" },
{ "Primary1", "Primair 1" },
{ "Primary2Info", "Schijdingslijn, Geselecteerd Menu" },
{ "Primary2", "Primair 2" },
{ "Primary3Info", "Tabel Geselecteerde Rij, Geselecteerde Tekst, ToolTip Achtergrond" },
{ "Primary3", "Primair 3" },
{ "Secondary1Info", "Begrenzing Lijnen" },
{ "Secondary1", "Secundair 2" },
{ "Secondary2Info", "Inactieve Tabs, Geselecteerde Velden, Inactieve Begrenzing + Tekst" },
{ "Secondary2", "Secundait 2" },
{ "Secondary3Info", "Achtergrond" },
{ "Secondary3", "Secondair 3" },
//
{ "ControlFontInfo", "Beheer Lettertype" },
{ "ControlFont", "Label Lettertype" },
{ "SystemFontInfo", "Tool Tip, Boom Iconen" },
{ "SystemFont", "Systeem Letterype" },
{ "UserFontInfo", "Door Gebruiker ingevoerde gegevens" },
{ "UserFont", "Veld Lettertype" },
// { "SmallFontInfo", "Reports" },
{ "SmallFont", "Klein Lettertype" },
{ "WindowTitleFont", "Titel Lettertype" },
{ "MenuFont", "Menu Lettertype" },
//
{ "MandatoryInfo", "Verplicht Veld Achtergrond" },
{ "Mandatory", "Verplicht" },
{ "ErrorInfo", "Foutief Veld Achtergrond" },
{ "Error", "Foutief" },
{ "InfoInfo", "Informatie Veld Achtergrond" },
{ "Info", "Informatie" },
{ "WhiteInfo", "Lijnen" },
{ "White", "Wit" },
{ "BlackInfo", "Lijnen, Tekst" },
{ "Black", "Zwart" },
{ "InactiveInfo", "Inactief Veld Achtergrond" },
{ "Inactive", "Inactief" },
{ "TextOKInfo", "OK Tekst Voorgrond" },
{ "TextOK", "Tekst - OK" },
{ "TextIssueInfo", "Foutief Tekst Voorgrond" },
{ "TextIssue", "Tekst - Foutief" },
//
{ "FontChooser", "Lettertype Selecteren" },
{ "Fonts", "Lettertypen" },
{ "Plain", "Normaal" },
{ "Italic", "Schuin" },
{ "Bold", "Vet" },
{ "BoldItalic", "Vet & Schuin" },
{ "Name", "Naam" },
{ "Size", "Formaat" },
{ "Style", "Stijl" },
{ "TestString", "Dit is een test! De thema brwoser is bezig. 12,3456.78 LetterLOne = l1 LetterOZero = O0" },
{ "FontString", "Lettertype" },
//
{ "AdempiereColorEditor", "Adempiere Kleur Editor" },
{ "AdempiereType", "Kleur Type" },
{ "GradientUpperColor", "Verloop Bovenste Kleur" },
{ "GradientLowerColor", "Verloop Onderste Kleur" },
{ "GradientStart", "Verloop Start" },
{ "GradientDistance", "Verloop Afstand" },
{ "TextureURL", "Textuur URL" },
{ "TextureAlpha", "Textuur Alpha" },
{ "TextureTaintColor", "Textuur Taint Kleur" },
{ "LineColor", "Lijn Kleur" },
{ "LineBackColor", "Achtergrond Kleur" },
{ "LineWidth", "Lijn Breedte" },
{ "LineDistance", "Lijn Reikwijdte" },
{ "FlatColor", "Egale Kleur" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,131 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Norwegian Translation Texts for Look & Feel
*
* @author Olaf Slazak L<EFBFBD>ken
* @version $Id: PlafRes_no.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class PlafRes_no extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "Bakgrunns Farge Type" },
{ "BackColType_Flat", "Flat" },
{ "BackColType_Gradient", "Gradient" },
{ "BackColType_Lines", "Linjer" },
{ "BackColType_Texture", "Texture" },
//
{ "LookAndFeelEditor", "Utseende Egenskaper" },
{ "LookAndFeel", "Utseende" },
{ "Theme", "Sjanger" },
{ "EditAdempiereTheme", "Rediger Adempiere Sjanger" },
{ "SetDefault", "Standard Bakgrunn" },
{ "SetDefaultColor", "Bakgrunn Farge" },
{ "ColorBlind", "Farge Deficiency" },
{ "Example", "Eksempel" },
{ "Reset", "Angre" },
{ "OK", "OK" },
{ "Cancel", "Avbryt" },
//
{ "AdempiereThemeEditor", "Rediger Adempiere Sjanger" },
{ "MetalColors", "Metal Farger" },
{ "AdempiereColors", "Adempiere Farger" },
{ "AdempiereFonts", "Adempiere Fonter" },
{ "Primary1Info", "Sygger, Separator" },
{ "Primary1", "Primary 1" },
{ "Primary2Info", "Fokus Linje, Valgte " },
{ "Primary2", "Primary 2" },
{ "Primary3Info", "Table Selected Row, Selected Text, ToolTip Background" },
{ "Primary3", "Primary 3" },
{ "Secondary1Info", "Border Lines" },
{ "Secondary1", "Secondary 1" },
{ "Secondary2Info", "Inactive Tabs, Pressed Fields, Inactive Border + Text" },
{ "Secondary2", "Secondary 2" },
{ "Secondary3Info", "Background" },
{ "Secondary3", "Secondary 3" },
//
{ "ControlFontInfo", "Kontrol Font" },
{ "ControlFont", "Label Font" },
{ "SystemFontInfo", "Systemets Font Info" },
{ "SystemFont", "Systemets Fonter" },
{ "UserFontInfo", "Bruker Innlagt Data" },
{ "UserFont", "Felt Fonter" },
// { "SmallFontInfo", "Reports" },
{ "SmallFont", "Sm<EFBFBD> Fonter" },
{ "WindowTitleFont", "Titell Fonter" },
{ "MenuFont", "Meny Fonter" },
//
{ "MandatoryInfo", "Mandatory Field Background" },
{ "Mandatory", "Mandatory" },
{ "ErrorInfo", "Error Field Background" },
{ "Error", "Error" },
{ "InfoInfo", "Info Field Background" },
{ "Info", "Info" },
{ "WhiteInfo", "Lines" },
{ "White", "White" },
{ "BlackInfo", "Lines, Text" },
{ "Black", "Black" },
{ "InactiveInfo", "Inactive Field Background" },
{ "Inactive", "Inactive" },
{ "TextOKInfo", "OK Text Foreground" },
{ "TextOK", "Text - OK" },
{ "TextIssueInfo", "Error Text Foreground" },
{ "TextIssue", "Text - Error" },
//
{ "FontChooser", "Font Chooser" },
{ "Fonts", "Fonts" },
{ "Plain", "Plain" },
{ "Italic", "Italic" },
{ "Bold", "Bold" },
{ "BoldItalic", "Bold & Italic" },
{ "Name", "Name" },
{ "Size", "Size" },
{ "Style", "Style" },
{ "TestString", "This is just a Test! The quick brown Fox is doing something. 12,3456.78 LetterLOne = l1 LetterOZero = O0" },
{ "FontString", "Font" },
//
{ "AdempiereColorEditor", "Adempiere Color Editor" },
{ "AdempiereType", "Color Type" },
{ "GradientUpperColor", "Gradient Upper Color" },
{ "GradientLowerColor", "Gradient Lower Color" },
{ "GradientStart", "Gradient Start" },
{ "GradientDistance", "Gradient Distance" },
{ "TextureURL", "Texture URL" },
{ "TextureAlpha", "Texture Alpha" },
{ "TextureTaintColor", "Texture Taint Color" },
{ "LineColor", "Line Color" },
{ "LineBackColor", "Background Color" },
{ "LineWidth", "Line Width" },
{ "LineDistance", "Line Distance" },
{ "FlatColor", "Flat Color" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,130 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Adam Bodurka
* @version $Id: PlafRes_pl.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class PlafRes_pl extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "Typ koloru t\u0142a" },
{ "BackColType_Flat", "P\u0142aski" },
{ "BackColType_Gradient", "Stopniowany" },
{ "BackColType_Lines", "Linie" },
{ "BackColType_Texture", "Tekstura" },
//
{ "LookAndFeelEditor", "Edytor Wygl\u0105du" },
{ "LookAndFeel", "Wygl\u0105d" },
{ "Theme", "Temat" },
{ "EditAdempiereTheme", "Edytuj Temat Compiera" },
{ "SetDefault", "Domy\u015blne T\u0142o" },
{ "SetDefaultColor", "Domy\u015blny Kolor" },
{ "Example", "Przyk\u0142ad" },
{ "Reset", "Resetuj" },
{ "OK", "OK" },
{ "Cancel", "Anuluj" },
//
{ "AdempiereThemeEditor", "Edytor Tematu Compiera" },
{ "MetalColors", "Kolory Metalowe" },
{ "AdempiereColors", "Kolory Compiera" },
{ "AdempiereFonts", "Czcionki Compiera" },
{ "Primary1Info", "Tekst Etykiety" },
{ "Primary1", "Podstawowy 1" },
{ "Primary2Info", "Linia Fokusu, Wybrany CheckBox" },
{ "Primary2", "Podstawowy 2" },
{ "Primary3Info", "Wybrany Wiersz Tabeli, Wybrany Tekst, T\u0142o Podpowiedzi" },
{ "Primary3", "Podstawowy 3" },
{ "Secondary1Info", "Linie Obramowania" },
{ "Secondary1", "Drugorz\u0119dny 1" },
{ "Secondary2Info", "Nieaktywne Zak\u0142adki, Naci\u015bni\u0119te Pola, Nieaktywna Ramka + Tekst" },
{ "Secondary2", "Drugorz\u0119dny 2" },
{ "Secondary3Info", "T\u0142o" },
{ "Secondary3", "Drugorz\u0119dny 3" },
//
{ "ControlFontInfo", "Czcionka Kontrolki" },
{ "ControlFont", "Czcionka Etykiety" },
{ "SystemFontInfo", "Podpowiedzi, Ga\u0142\u0119zie drzewa" },
{ "SystemFont", "Czcionka Systemowa" },
{ "UserFontInfo", "Dane wprowadzone przez U\u017cytkownika" },
{ "UserFont", "Czcionka Pola" },
// { "SmallFontInfo", "Raporty" },
{ "SmallFont", "Ma\u0142a Czcionka" },
{ "WindowTitleFont", "Czcionka Tytu\u0142u" },
{ "MenuFont", "Czcionka Menu" },
//
{ "MandatoryInfo", "Obowi\u0105zkowe T\u0142o Pola" },
{ "Mandatory", "Obowi\u0105zkowe" },
{ "ErrorInfo", "B\u0142\u0105d T\u0142a Pola" },
{ "Error", "B\u0142\u0105d" },
{ "InfoInfo", "Informacja T\u0142a Pola" },
{ "Info", "Informacja" },
{ "WhiteInfo", "Linie" },
{ "White", "Bia\u0142y" },
{ "BlackInfo", "Linie, Tekst" },
{ "Black", "Czarny" },
{ "InactiveInfo", "Nieaktywne T\u0142o Pola" },
{ "Inactive", "Nieaktywny" },
{ "TextOKInfo", "OK Pierwszoplanowy Tekst" },
{ "TextOK", "Tekst - OK" },
{ "TextIssueInfo", "B\u0142\u0105d Pierwszoplanowego Tekstu" },
{ "TextIssue", "Tekst - B\u0142\u0105d" },
//
{ "FontChooser", "Wyb\u00f3r Czcionki" },
{ "Fonts", "Czcionki" },
{ "Plain", "G\u0142adki" },
{ "Italic", "Kursywa" },
{ "Bold", "Pogrubiony" },
{ "BoldItalic", "Pogrubiony i Kursywa" },
{ "Name", "Nazwa" },
{ "Size", "Rozmiar" },
{ "Style", "Styl" },
{ "TestString", "To jest tylko test!" },
{ "FontString", "Czcionka" },
//
{ "AdempiereColorEditor", "Edytor Koloru Compiera" },
{ "AdempiereType", "Typ Koloru" },
{ "GradientUpperColor", "G\u00f3rny Kolor Stopniowania" },
{ "GradientLowerColor", "Dolny Kolor Stopniowania" },
{ "GradientStart", "Pocz\u0105tek Stopniowania" },
{ "GradientDistance", "Odst\u0119p Stopniowania" },
{ "TextureURL", "Tekstura URL" },
{ "TextureAlpha", "Tekstura Alpha" },
{ "TextureTaintColor", "Kolor t\u0142a Tekstury" },
{ "LineColor", "Kolor Linii" },
{ "LineBackColor", "Kolor T\u0142a" },
{ "LineWidth", "Grubo\u015b\u0107 Linii" },
{ "LineDistance", "Odst\u0119p Linii" },
{ "FlatColor", "Kolor P\u0142aski" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,131 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Jesse Jr
* @version $Id: PlafRes_pt.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class PlafRes_pt extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "Tipo da Cor de Fundo" },
{ "BackColType_Flat", "Plano" },
{ "BackColType_Gradient", "D<EFBFBD>grad<EFBFBD>" },
{ "BackColType_Lines", "Linhas" },
{ "BackColType_Texture", "Textura" },
//
{ "LookAndFeelEditor", "Editor: Look & Feel" },
{ "LookAndFeel", "Look & Feel" },
{ "Theme", "Tema" },
{ "EditAdempiereTheme", "Editar Tema Adempiere" },
{ "SetDefault", "Fundo Padr<64>o" },
{ "SetDefaultColor", "Cor de Fundo" },
{ "ColorBlind", "Defici<EFBFBD>ncia de Cor" },
{ "Example", "Exemplo" },
{ "Reset", "Reinicializar" },
{ "OK", "OK" },
{ "Cancel", "Cancelar" },
//
{ "AdempiereThemeEditor", "Adempiere: Editor de Temas" },
{ "MetalColors", "Cores Metal" },
{ "AdempiereColors", "Cores Adempiere" },
{ "AdempiereFonts", "Fontes Adempiere" },
{ "Primary1Info", "Sombra, Separador" },
{ "Primary1", "Prim<EFBFBD>rio 1" },
{ "Primary2Info", "Linha de Foco, Menu Selecionado" },
{ "Primary2", "Prim<EFBFBD>rio 2" },
{ "Primary3Info", "Linha da Tabele Selecionada, Texto Selecionado, Fundo Dicas" },
{ "Primary3", "Prim<EFBFBD>rio 3" },
{ "Secondary1Info", "Bordas de Linhas" },
{ "Secondary1", "Secund<EFBFBD>rio 1" },
{ "Secondary2Info", "Tabs Inativas, Campos Pressed, Borda Inativa + Texto" },
{ "Secondary2", "Secund<EFBFBD>rio 2" },
{ "Secondary3Info", "<EFBFBD>rea de Fundo" },
{ "Secondary3", "Secund<EFBFBD>rio 3" },
//
{ "ControlFontInfo", "Controle de Fonte" },
{ "ControlFont", "R<EFBFBD>tulo da Fonte" },
{ "SystemFontInfo", "Tool Tip, Tree nodes" },
{ "SystemFont", "System Font" },
{ "UserFontInfo", "Entrada de Dados pelo Usu<73>rio" },
{ "UserFont", "Fonte dos Campos" },
// { "SmallFontInfo", "Relat<EFBFBD>rios" },
{ "SmallFont", "Fonte pequena" },
{ "WindowTitleFont", "Fonte do T<>tulo" },
{ "MenuFont", "Fonte do Menu" },
//
{ "MandatoryInfo", "Fundo de Campos Obrigat<61>rios" },
{ "Mandatory", "Obrigat<EFBFBD>rio" },
{ "ErrorInfo", "Fundo de Campo de Erro" },
{ "Error", "Erro" },
{ "InfoInfo", "Fundo de Campos Informativos" },
{ "Info", "Info" },
{ "WhiteInfo", "Linhas" },
{ "White", "Branco" },
{ "BlackInfo", "Linhas, Texto" },
{ "Black", "Preto" },
{ "InactiveInfo", "Fundo de Campo Inativo" },
{ "Inactive", "Inativo" },
{ "TextOKInfo", "OK Fundo do Texto" },
{ "TextOK", "Texto - OK" },
{ "TextIssueInfo", "Fundo do Texto de Erro" },
{ "TextIssue", "Texto - Erro" },
//
{ "FontChooser", "Selecionar Fonte" },
{ "Fonts", "Fontes" },
{ "Plain", "Plano" },
{ "Italic", "It<EFBFBD>lico" },
{ "Bold", "Negrito" },
{ "BoldItalic", "Negrito & It<49>lico" },
{ "Name", "Nome" },
{ "Size", "Tamanho" },
{ "Style", "Estilo" },
{ "TestString", "Somente teste! The quick brown Fox is doing something. 12,3456.78 LetterLOne = l1 LetterOZero = O0" },
{ "FontString", "Fonte" },
//
{ "AdempiereColorEditor", "Adempiere: Editor de Cores" },
{ "AdempiereType", "Tipo de Cor" },
{ "GradientUpperColor", "Cor D<>grad<61> Superior" },
{ "GradientLowerColor", "Cor D<>grad<61> Inferior" },
{ "GradientStart", "In<EFBFBD>cio do D<>grad<61>" },
{ "GradientDistance", "Dist<EFBFBD>ncia do D<>grad<61>" },
{ "TextureURL", "URL Textura" },
{ "TextureAlpha", "Alfa Textura" },
{ "TextureTaintColor", "Colora<EFBFBD><EFBFBD>o da Textura" },
{ "LineColor", "Cor da Linha" },
{ "LineBackColor", "Cores de Fundo" },
{ "LineWidth", "Largura da Linha" },
{ "LineDistance", "Dist<EFBFBD>ncia das linhas" },
{ "FlatColor", "Cores Planas" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

View File

@ -0,0 +1,131 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
* by the Free Software Foundation. This program is distributed in the hope *
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* You should have received a copy of the GNU General Public License along *
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
*****************************************************************************/
package org.compiere.plaf;
import java.util.ListResourceBundle;
/**
* Translation Texts for Look & Feel
*
* @author Jorg Janke
* @version $Id: PlafRes_ro.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*/
public class PlafRes_ro extends ListResourceBundle
{
/** The data */
static final Object[][] contents = new String[][]
{
{ "BackColType", "Tip al culorii de fundal" },
{ "BackColType_Flat", "Plin" },
{ "BackColType_Gradient", "Gradient" },
{ "BackColType_Lines", "Linii" },
{ "BackColType_Texture", "Ha\u015fur\u0103" },
//
{ "LookAndFeelEditor", "Editor de aspect grafic" },
{ "LookAndFeel", "Aspect grafic" },
{ "Theme", "Tem\u0103" },
{ "EditAdempiereTheme", "Editare a temei Adempiere" },
{ "SetDefault", "Fundal implicit" },
{ "SetDefaultColor", "Culoare de fundal" },
{ "ColorBlind", "Deficien\u0163\u0103 cromatic\u0103" },
{ "Example", "Exemplu" },
{ "Reset", "Reini\u0163ializare" },
{ "OK", "OK" },
{ "Cancel", "Anulare" },
//
{ "AdempiereThemeEditor", "Editor de tem\u0103 grafic\u0103" },
{ "MetalColors", "Culori metalice" },
{ "AdempiereColors", "Culori Adempiere" },
{ "AdempiereFonts", "Font-uri Adempiere" },
{ "Primary1Info", "Umbr\u0103, separator" },
{ "Primary1", "Principal 1" },
{ "Primary2Info", "Linie curent\u0103, meniu selectat" },
{ "Primary2", "Principal 2" },
{ "Primary3Info", "R\u00e2nd de tabel selectat, text selectat, fundal pentru indica\u0163ii" },
{ "Primary3", "Principal 3" },
{ "Secondary1Info", "Margini" },
{ "Secondary1", "Secundar 1" },
{ "Secondary2Info", "File inactive, butoane ap\u0103sate, margini \u015fi text inactive" },
{ "Secondary2", "Secundar 2" },
{ "Secondary3Info", "Fundal" },
{ "Secondary3", "Secundar 3" },
//
{ "ControlFontInfo", "Font pentru obiecte grafice" },
{ "ControlFont", "Font pentru etichete" },
{ "SystemFontInfo", "Indica\u0163ii, noduri \u00een arborescen\u0163e" },
{ "SystemFont", "Font de sistem" },
{ "UserFontInfo", "Date introduse de utilizator" },
{ "UserFont", "Font pentru c\u00e2mpuri" },
// { "SmallFontInfo", "Font pentru rapoarte" },
{ "SmallFont", "Font de dimensiune mic\u0103" },
{ "WindowTitleFont", "Font pentru titluri" },
{ "MenuFont", "Font de meniuri" },
//
{ "MandatoryInfo", "Fundal pentru c\u00e2mpuri obligatorii" },
{ "Mandatory", "Obligatoriu" },
{ "ErrorInfo", "Fundal pentru c\u00e2mpuri cu valori eronate" },
{ "Error", "Erori" },
{ "InfoInfo", "Fundal pentru c\u00e2mpuri de informare" },
{ "Info", "Informare" },
{ "WhiteInfo", "R\u00e2nduri goale" },
{ "White", "\"Alb\"" },
{ "BlackInfo", "Linii, text" },
{ "Black", "\"Negru\"" },
{ "InactiveInfo", "Fundal pentru c\u00e2mpuri inactive" },
{ "Inactive", "Inactiv" },
{ "TextOKInfo", "Culoare pentru mesaje de confirmare" },
{ "TextOK", "Text de confirmare" },
{ "TextIssueInfo", "Culoare pentru mesaje de eroare" },
{ "TextIssue", "Text de eroare" },
//
{ "FontChooser", "Selector de font-uri" },
{ "Fonts", "Font-uri" },
{ "Plain", "Normal" },
{ "Italic", "Cursiv" },
{ "Bold", "Aldin" },
{ "BoldItalic", "Aldin \u015fi cursiv" },
{ "Name", "Nume" },
{ "Size", "Dimensiune" },
{ "Style", "Stil" },
{ "TestString", "Acesta este un test! Ziua bun\u0103 se cunoa\u015fte de diminea\u0163\u0103. 123.456,78 Lunu = l1 Ozero = O0" },
{ "FontString", "Font" },
//
{ "AdempiereColorEditor", "Editor de culoare " },
{ "AdempiereType", "Tip de culoare" },
{ "GradientUpperColor", "Culoare superioar\u0103 pentru gradient" },
{ "GradientLowerColor", "Culoare inferioar\u0103 pentru gradient" },
{ "GradientStart", "\u00cenceput de gradient" },
{ "GradientDistance", "Distan\u0163\u0103 de gradient" },
{ "TextureURL", "URL pentru ha\u015fur\u0103" },
{ "TextureAlpha", "Masc\u0103 alpha pentru ha\u015fur\u0103" },
{ "TextureTaintColor", "Nuan\u0163\u0103 a ha\u015furii" },
{ "LineColor", "Culoare de desenare" },
{ "LineBackColor", "Culoare de fundal" },
{ "LineWidth", "L\u0103\u0163imea liniei" },
{ "LineDistance", "Distan\u0163a \u00eentre linii" },
{ "FlatColor", "Culoare plin\u0103" }
};
/**
* Get Contents
* @return contents
*/
public Object[][] getContents()
{
return contents;
}
} // Res

Some files were not shown because too many files have changed in this diff Show More