From 0843ba946f678c812e9b0d7873c8863221c06b9f Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 27 Nov 2006 07:57:49 +0000 Subject: [PATCH] * New look and feel and theme selection UI. The old editor is still there but not used. * Make compiere swing components works better under window and plastic look and feel. * Rename org.compiere.plaf.Adempiere*UI classes back to org.compiere.plaf.Compiere*UI. This is to make a clean separation between the new AdempiereLookAndFeel and the old CompiereLookAndFeel. Any class used by AdempiereLookAndFeel should goes into the org.adempiere.plaf package instead. As part of the exercise, AdempierePLAF is moved from org.compiere.plaf to org.adempiere.plaf * Fixed some bug related UI painting issue after switching of look and feel. It is still not perfect but much better. * Added a logout icon. Feel free to replace this if you have a better one. Please email me or post into the SF Developer forum is I break anything. Also, I haven't tested the new code under Linux yet and some localization work to be done. --- base/src/org/compiere/model/GridWindow.java | 2 +- base/src/org/compiere/model/MColor.java | 20 +++++++++---------- .../report/core/ResultTableCellRenderer.java | 2 ++ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/base/src/org/compiere/model/GridWindow.java b/base/src/org/compiere/model/GridWindow.java index 59cea08695..46f911623f 100644 --- a/base/src/org/compiere/model/GridWindow.java +++ b/base/src/org/compiere/model/GridWindow.java @@ -198,7 +198,7 @@ public class GridWindow implements Serializable * Get Color * @return AdempiereColor or null */ - public AdempiereColor getColor() + public CompiereColor getColor() { if (m_vo.AD_Color_ID == 0) return null; diff --git a/base/src/org/compiere/model/MColor.java b/base/src/org/compiere/model/MColor.java index f726011a98..7bcddec6c2 100644 --- a/base/src/org/compiere/model/MColor.java +++ b/base/src/org/compiere/model/MColor.java @@ -95,7 +95,7 @@ public class MColor extends X_AD_Color * see org.compiere.grid.ed.VColor#getAdempiereColor * @return AdempiereColor */ - public AdempiereColor getAdempiereColor() + public CompiereColor getAdempiereColor() { if (get_ID() == 0) return null; @@ -107,26 +107,26 @@ public class MColor extends X_AD_Color log.log(Level.SEVERE, "MColor.getAdempiereColor - No ColorType"); return null; } - AdempiereColor cc = null; + CompiereColor cc = null; // - if (ColorType.equals(AdempiereColor.TYPE_FLAT)) + if (ColorType.equals(CompiereColor.TYPE_FLAT)) { - cc = new AdempiereColor(getColor(true), true); + cc = new CompiereColor(getColor(true), true); } - else if (ColorType.equals(AdempiereColor.TYPE_GRADIENT)) + else if (ColorType.equals(CompiereColor.TYPE_GRADIENT)) { int RepeatDistance = getRepeatDistance(); String StartPoint = getStartPoint(); int startPoint = StartPoint == null ? 0 : Integer.parseInt(StartPoint); - cc = new AdempiereColor(getColor(true), getColor(false), startPoint, RepeatDistance); + cc = new CompiereColor(getColor(true), getColor(false), startPoint, RepeatDistance); } - else if (ColorType.equals(AdempiereColor.TYPE_LINES)) + else if (ColorType.equals(CompiereColor.TYPE_LINES)) { int LineWidth = getLineWidth(); int LineDistance = getLineDistance(); - cc = new AdempiereColor(getColor(false), getColor(true), LineWidth, LineDistance); + cc = new CompiereColor(getColor(false), getColor(true), LineWidth, LineDistance); } - else if (ColorType.equals(AdempiereColor.TYPE_TEXTURE)) + else if (ColorType.equals(CompiereColor.TYPE_TEXTURE)) { int AD_Image_ID = getAD_Image_ID(); String url = getURL(AD_Image_ID); @@ -134,7 +134,7 @@ public class MColor extends X_AD_Color return null; BigDecimal ImageAlpha = getImageAlpha(); float compositeAlpha = ImageAlpha == null ? 0.7f : ImageAlpha.floatValue(); - cc = new AdempiereColor(url, getColor(true), compositeAlpha); + cc = new CompiereColor(url, getColor(true), compositeAlpha); } return cc; } // getAdempiereColor diff --git a/base/src/org/compiere/report/core/ResultTableCellRenderer.java b/base/src/org/compiere/report/core/ResultTableCellRenderer.java index 193f36e55b..f1b217fa62 100644 --- a/base/src/org/compiere/report/core/ResultTableCellRenderer.java +++ b/base/src/org/compiere/report/core/ResultTableCellRenderer.java @@ -20,6 +20,8 @@ import java.awt.*; import java.text.*; import javax.swing.*; import javax.swing.table.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.plaf.*; import org.compiere.util.*;