diff --git a/client/src/org/compiere/apps/AEnv.java b/client/src/org/compiere/apps/AEnv.java index a0716abb0e..134a9d9c83 100644 --- a/client/src/org/compiere/apps/AEnv.java +++ b/client/src/org/compiere/apps/AEnv.java @@ -891,5 +891,25 @@ public final class AEnv } } } // cacheReset + + /** + * Update all windows after look and feel changes. + * @since 2006-11-27 + */ + public static void updateUI() + { + Set updated = Env.updateUI(); + JFrame top = Env.getWindow(0); + if (top instanceof AMenu) + { + CFrame[] frames = ((AMenu)top).getWindowManager().getWindows(); + for (CFrame f : frames) + { + if (updated.contains(f)) continue; + SwingUtilities.updateComponentTreeUI(f); + updated.add(f); + } + } + } } // AEnv \ No newline at end of file diff --git a/client/src/org/compiere/apps/AGlassPane.java b/client/src/org/compiere/apps/AGlassPane.java index 0f2a50ef38..a0fc28a14b 100644 --- a/client/src/org/compiere/apps/AGlassPane.java +++ b/client/src/org/compiere/apps/AGlassPane.java @@ -19,6 +19,8 @@ package org.compiere.apps; import java.awt.*; import java.awt.event.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.db.*; import org.compiere.plaf.*; import java.util.logging.*; diff --git a/client/src/org/compiere/apps/ALogin.java b/client/src/org/compiere/apps/ALogin.java index 5583167dbc..d98cefb331 100644 --- a/client/src/org/compiere/apps/ALogin.java +++ b/client/src/org/compiere/apps/ALogin.java @@ -22,6 +22,8 @@ import java.sql.*; import java.util.*; import javax.swing.*; import javax.swing.event.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.*; import org.compiere.db.*; import org.compiere.grid.ed.*; diff --git a/client/src/org/compiere/apps/ALoginTest.java b/client/src/org/compiere/apps/ALoginTest.java index 8f45780cf1..52cc566347 100644 --- a/client/src/org/compiere/apps/ALoginTest.java +++ b/client/src/org/compiere/apps/ALoginTest.java @@ -23,6 +23,7 @@ import java.net.*; import java.sql.*; import javax.swing.*; +import org.adempiere.plaf.AdempierePLAF; import org.compiere.plaf.*; import org.compiere.swing.*; diff --git a/client/src/org/compiere/apps/APanel.java b/client/src/org/compiere/apps/APanel.java index d3394d2d07..585a53dbc5 100644 --- a/client/src/org/compiere/apps/APanel.java +++ b/client/src/org/compiere/apps/APanel.java @@ -553,7 +553,7 @@ public final class APanel extends CPanel else // normal tab { GridController gc = new GridController(); // Timing: ca. .1 sec - AdempiereColor cc = mWindow.getColor(); + CompiereColor cc = mWindow.getColor(); if (cc != null) gc.setBackgroundColor(cc); // set color on Window level gc.initGrid(gTab, false, m_curWindowNo, this, mWindow); // will set color on Tab level diff --git a/client/src/org/compiere/apps/ATask.java b/client/src/org/compiere/apps/ATask.java index 1aba3ffc7a..bd8859dadc 100644 --- a/client/src/org/compiere/apps/ATask.java +++ b/client/src/org/compiere/apps/ATask.java @@ -21,6 +21,7 @@ import java.awt.event.*; import java.util.logging.*; import javax.swing.*; +import org.adempiere.plaf.AdempierePLAF; import org.compiere.*; import org.compiere.plaf.*; import org.compiere.util.*; diff --git a/client/src/org/compiere/apps/Attachment.java b/client/src/org/compiere/apps/Attachment.java index e2e00bf331..9357a66676 100644 --- a/client/src/org/compiere/apps/Attachment.java +++ b/client/src/org/compiere/apps/Attachment.java @@ -21,10 +21,13 @@ import java.awt.event.*; import java.io.*; import java.util.logging.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.model.*; import org.compiere.plaf.*; import org.compiere.swing.*; import org.compiere.util.*; + import com.qoppa.pdf.*; import com.qoppa.pdfViewer.*; diff --git a/client/src/org/compiere/apps/Help.java b/client/src/org/compiere/apps/Help.java index f773cb75f6..b08d1dabbf 100644 --- a/client/src/org/compiere/apps/Help.java +++ b/client/src/org/compiere/apps/Help.java @@ -22,6 +22,7 @@ import java.net.*; import javax.swing.*; import java.util.logging.*; +import org.adempiere.plaf.AdempierePLAF; import org.compiere.model.*; import org.compiere.plaf.*; import org.compiere.swing.*; diff --git a/client/src/org/compiere/apps/OnlineHelp.java b/client/src/org/compiere/apps/OnlineHelp.java index a58b68734a..fdcdb2efe8 100644 --- a/client/src/org/compiere/apps/OnlineHelp.java +++ b/client/src/org/compiere/apps/OnlineHelp.java @@ -24,6 +24,8 @@ import javax.swing.*; import javax.swing.event.*; import javax.swing.text.*; import javax.swing.text.html.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.plaf.*; /** diff --git a/client/src/org/compiere/apps/Preference.java b/client/src/org/compiere/apps/Preference.java index 9dba24fac6..21e1d9cd83 100644 --- a/client/src/org/compiere/apps/Preference.java +++ b/client/src/org/compiere/apps/Preference.java @@ -24,8 +24,13 @@ import java.util.logging.*; import javax.swing.*; import javax.swing.border.Border; import javax.swing.event.*; +import javax.swing.plaf.metal.MetalLookAndFeel; +import javax.swing.plaf.metal.MetalTheme; import javax.swing.table.*; // +import org.adempiere.plaf.PLAFEditor; +import org.adempiere.plaf.PLAFEditorPanel; +import org.adempiere.plaf.AdempierePLAF; import org.compiere.db.*; import org.compiere.grid.ed.*; import org.compiere.minigrid.*; @@ -40,6 +45,9 @@ import org.compiere.util.*; * * @author Jorg Janke * @version $Id: Preference.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $ + * + * @author Low Heng Sin + * @version 2006-11-27 */ public final class Preference extends CDialog implements ActionListener, ListSelectionListener @@ -109,7 +117,6 @@ public final class Preference extends CDialog private CCheckBox showAcct = new CCheckBox(); private CCheckBox showAdvanced = new CCheckBox(); private CCheckBox cacheWindow = new CCheckBox(); - private CButton uiTheme = new CButton(); private CLabel lPrinter = new CLabel(); private CPrinter fPrinter = new CPrinter(); private CLabel lDate = new CLabel(); @@ -128,6 +135,8 @@ public final class Preference extends CDialog private CButton bRoleInfo = new CButton(Msg.translate(Env.getCtx(), "AD_Role_ID")); private CPanel configPanel = new CPanel(); + + private PLAFEditorPanel plafEditor = new PLAFEditorPanel(); /** * Static Init. @@ -157,8 +166,6 @@ public final class Preference extends CDialog traceFile.setText(Msg.getMsg(Env.getCtx(), "TraceFile", true)); traceFile.setToolTipText(Msg.getMsg(Env.getCtx(), "TraceFile", false)); - uiTheme.setText(Msg.getMsg(Env.getCtx(), "UITheme", true)); - uiTheme.setToolTipText(Msg.getMsg(Env.getCtx(), "UITheme", false)); autoCommit.setText(Msg.getMsg(Env.getCtx(), "AutoCommit", true)); autoCommit.setToolTipText(Msg.getMsg(Env.getCtx(), "AutoCommit", false)); autoNew.setText(Msg.getMsg(Env.getCtx(), "AutoNew", true)); @@ -193,7 +200,6 @@ public final class Preference extends CDialog panel.setLayout(panelLayout); panel.add(tabPane, BorderLayout.CENTER); // Customize -// tabPane.add(customizePane, Msg.getMsg(Env.getCtx(), "Preference")); tabPane.add(customizePane, Msg.getMsg(Env.getCtx(), "Preference")); customizePane.setLayout(customizeLayout); customizePane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); @@ -273,9 +279,10 @@ public final class Preference extends CDialog ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 0, 2, 0), 0, 0)); CPanel themePanel = new CPanel(); - themePanel.add(uiTheme); - //TODO - tabPane.add(themePanel, uiTheme.getText()); + themePanel.setLayout(new GridLayout(1, 1)); + + themePanel.add(plafEditor); + tabPane.add(themePanel, Msg.getMsg(Env.getCtx(), "UITheme", true)); configPanel.setLayout(new BorderLayout()); configPanel.add(infoArea, BorderLayout.CENTER); @@ -287,7 +294,6 @@ public final class Preference extends CDialog tabPane.add(configPanel, "Info"); // Info -// tabPane.add(contextPane, Msg.getMsg(Env.getCtx(), "Context")); tabPane.add(contextPane, Msg.getMsg(Env.getCtx(), "Context")); contextPane.setLayout(icontextLayout); contextPane.add(contextListScrollPane, BorderLayout.CENTER); @@ -365,12 +371,7 @@ public final class Preference extends CDialog */ public void actionPerformed(ActionEvent e) { - // UI Change - if (e.getSource() == uiTheme) - { - new AdempierePLAFEditor(this, false); - } - else if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL)) + if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL)) dispose(); else if (e.getActionCommand().equals(ConfirmPanel.A_OK)) cmd_save(); @@ -399,8 +400,6 @@ public final class Preference extends CDialog infoArea.setCaretPosition(0); // -- Load Settings -- - // UI - uiTheme.addActionListener(this); // AutoCommit autoCommit.setSelected(Env.isAutoCommit(Env.getCtx())); autoNew.setSelected(Env.isAutoNew(Env.getCtx())); @@ -539,6 +538,36 @@ public final class Preference extends CDialog if (ts != null) Env.setContext(Env.getCtx(), "#Date", ts); + //UI + ValueNamePair laf = plafEditor.getSelectedLook(); + ValueNamePair theme = plafEditor.getSelectedTheme(); + if ( laf != null ) { + String clazz = laf.getValue(); + String currentLaf = UIManager.getLookAndFeel().getClass().getName(); + if (clazz != null && clazz.length() > 0 && !currentLaf.equals(clazz)) + { + //laf changed + AdempierePLAF.setPLAF(laf, theme, true); + AEnv.updateUI(); + } + else + { + if (UIManager.getLookAndFeel() instanceof MetalLookAndFeel) + { + MetalTheme currentTheme = MetalLookAndFeel.getCurrentTheme(); + String themeClass = currentTheme.getClass().getName(); + String sTheme = theme.getValue(); + if (sTheme != null && sTheme.length() > 0 && !sTheme.equals(themeClass)) + { + ValueNamePair plaf = new ValueNamePair(UIManager.getLookAndFeel().getName(), + UIManager.getLookAndFeel().getClass().getName()); + AdempierePLAF.setPLAF(plaf, theme, true); + AEnv.updateUI(); + } + } + } + } + Ini.saveProperties(Ini.isClient()); dispose(); } // cmd_save diff --git a/client/src/org/compiere/apps/ProcessDialog.java b/client/src/org/compiere/apps/ProcessDialog.java index ba189513ee..13a7c72be5 100644 --- a/client/src/org/compiere/apps/ProcessDialog.java +++ b/client/src/org/compiere/apps/ProcessDialog.java @@ -21,6 +21,8 @@ import java.awt.event.*; import java.sql.*; import java.util.logging.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.plaf.*; import org.compiere.print.*; import org.compiere.process.*; diff --git a/client/src/org/compiere/apps/StatusBar.java b/client/src/org/compiere/apps/StatusBar.java index 11f75f4de1..f47b5b5aca 100644 --- a/client/src/org/compiere/apps/StatusBar.java +++ b/client/src/org/compiere/apps/StatusBar.java @@ -19,6 +19,8 @@ package org.compiere.apps; import java.awt.*; import java.awt.event.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.model.*; import org.compiere.plaf.*; import org.compiere.swing.*; diff --git a/client/src/org/compiere/apps/form/VAllocation.java b/client/src/org/compiere/apps/form/VAllocation.java index dc78b55c7f..579d99c717 100644 --- a/client/src/org/compiere/apps/form/VAllocation.java +++ b/client/src/org/compiere/apps/form/VAllocation.java @@ -27,6 +27,8 @@ import java.util.logging.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.table.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.grid.ed.*; import org.compiere.minigrid.*; @@ -135,7 +137,7 @@ public class VAllocation extends CPanel */ private void jbInit() throws Exception { - AdempiereColor.setBackground(this); + CompiereColor.setBackground(this); // mainPanel.setLayout(mainLayout); dateLabel.setText(Msg.getMsg(Env.getCtx(), "Date")); diff --git a/client/src/org/compiere/apps/form/VCharge.java b/client/src/org/compiere/apps/form/VCharge.java index 40f37e4b34..5707a7c507 100644 --- a/client/src/org/compiere/apps/form/VCharge.java +++ b/client/src/org/compiere/apps/form/VCharge.java @@ -24,6 +24,8 @@ import java.util.logging.*; import javax.swing.*; import javax.swing.border.*; import javax.swing.table.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.minigrid.*; import org.compiere.model.*; @@ -109,7 +111,7 @@ public class VCharge extends CPanel */ private void jbInit() throws Exception { - AdempiereColor.setBackground(this); + CompiereColor.setBackground(this); newBorder = new TitledBorder(""); accountBorder = new TitledBorder(""); mainPanel.setLayout(mainLayout); diff --git a/client/src/org/compiere/apps/form/VFileImport.java b/client/src/org/compiere/apps/form/VFileImport.java index 3887931585..bfad0880b2 100644 --- a/client/src/org/compiere/apps/form/VFileImport.java +++ b/client/src/org/compiere/apps/form/VFileImport.java @@ -101,7 +101,7 @@ public class VFileImport extends CPanel */ private void jbInit() throws Exception { - AdempiereColor.setBackground(this); + CompiereColor.setBackground(this); bFile.setText(Msg.getMsg(Env.getCtx(), "FileImportFile")); bFile.setToolTipText(Msg.getMsg(Env.getCtx(), "FileImportFileInfo")); bFile.addActionListener(this); diff --git a/client/src/org/compiere/apps/form/VInOutGen.java b/client/src/org/compiere/apps/form/VInOutGen.java index ebc4f8a88f..35b3c72e63 100644 --- a/client/src/org/compiere/apps/form/VInOutGen.java +++ b/client/src/org/compiere/apps/form/VInOutGen.java @@ -25,6 +25,8 @@ import java.util.*; import java.util.logging.*; import javax.swing.*; import javax.swing.event.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.grid.ed.*; import org.compiere.minigrid.*; @@ -113,7 +115,7 @@ public class VInOutGen extends CPanel */ void jbInit() throws Exception { - AdempiereColor.setBackground(this); + CompiereColor.setBackground(this); // selPanel.setLayout(selPanelLayout); lWarehouse.setLabelFor(fWarehouse); diff --git a/client/src/org/compiere/apps/form/VInvoiceGen.java b/client/src/org/compiere/apps/form/VInvoiceGen.java index 7c3dcaac50..81b76ac7ff 100644 --- a/client/src/org/compiere/apps/form/VInvoiceGen.java +++ b/client/src/org/compiere/apps/form/VInvoiceGen.java @@ -25,6 +25,8 @@ import java.util.*; import java.util.logging.*; import javax.swing.*; import javax.swing.event.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.grid.ed.*; import org.compiere.minigrid.*; @@ -112,7 +114,7 @@ public class VInvoiceGen extends CPanel */ void jbInit() throws Exception { - AdempiereColor.setBackground(this); + CompiereColor.setBackground(this); // selPanel.setLayout(selPanelLayout); lOrg.setLabelFor(fOrg); diff --git a/client/src/org/compiere/apps/form/VMatch.java b/client/src/org/compiere/apps/form/VMatch.java index 9fb331a122..494e5f80bb 100644 --- a/client/src/org/compiere/apps/form/VMatch.java +++ b/client/src/org/compiere/apps/form/VMatch.java @@ -289,7 +289,7 @@ public class VMatch extends CPanel xMatchedToTable.prepareTable(layout, "", "", true, ""); // Visual - AdempiereColor.setBackground (this); + CompiereColor.setBackground (this); // Listener matchFrom.addActionListener(this); diff --git a/client/src/org/compiere/apps/form/VPayPrint.java b/client/src/org/compiere/apps/form/VPayPrint.java index bc6897f5bf..d5063efa7c 100644 --- a/client/src/org/compiere/apps/form/VPayPrint.java +++ b/client/src/org/compiere/apps/form/VPayPrint.java @@ -105,7 +105,7 @@ public class VPayPrint extends CPanel */ private void jbInit() throws Exception { - AdempiereColor.setBackground(this); + CompiereColor.setBackground(this); // southPanel.setLayout(southLayout); southLayout.setAlignment(FlowLayout.RIGHT); diff --git a/client/src/org/compiere/apps/form/VPaySelect.java b/client/src/org/compiere/apps/form/VPaySelect.java index 99f8676a5c..9391573176 100644 --- a/client/src/org/compiere/apps/form/VPaySelect.java +++ b/client/src/org/compiere/apps/form/VPaySelect.java @@ -125,7 +125,7 @@ public class VPaySelect extends CPanel */ private void jbInit() throws Exception { - AdempiereColor.setBackground(this); + CompiereColor.setBackground(this); // mainPanel.setLayout(mainLayout); parameterPanel.setLayout(parameterLayout); diff --git a/client/src/org/compiere/apps/form/VSetup.java b/client/src/org/compiere/apps/form/VSetup.java index d74636d6e9..2b3545c05f 100644 --- a/client/src/org/compiere/apps/form/VSetup.java +++ b/client/src/org/compiere/apps/form/VSetup.java @@ -22,6 +22,8 @@ import java.io.*; import java.sql.*; import java.util.logging.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.model.*; import org.compiere.plaf.*; @@ -106,7 +108,7 @@ public class VSetup extends CPanel */ private void jbInit() throws Exception { - AdempiereColor.setBackground(this); + CompiereColor.setBackground(this); centerPanel.setLayout(centerLayout); String optional = Msg.translate(Env.getCtx(), "Optional"); // diff --git a/client/src/org/compiere/apps/form/VTrxMaterial.java b/client/src/org/compiere/apps/form/VTrxMaterial.java index 49c1f9a310..7497684ac3 100644 --- a/client/src/org/compiere/apps/form/VTrxMaterial.java +++ b/client/src/org/compiere/apps/form/VTrxMaterial.java @@ -109,7 +109,7 @@ public class VTrxMaterial extends CPanel */ void jbInit() throws Exception { - AdempiereColor.setBackground(this); + CompiereColor.setBackground(this); mainPanel.setLayout(mainLayout); mainLayout.setVgap(10); parameterPanel.setLayout(parameterLayout); diff --git a/client/src/org/compiere/apps/search/FindValueRenderer.java b/client/src/org/compiere/apps/search/FindValueRenderer.java index b23a5f89a2..f63984d15f 100644 --- a/client/src/org/compiere/apps/search/FindValueRenderer.java +++ b/client/src/org/compiere/apps/search/FindValueRenderer.java @@ -20,6 +20,8 @@ import java.awt.*; import java.sql.*; import javax.swing.*; import javax.swing.table.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.model.*; import org.compiere.plaf.*; import java.util.logging.*; diff --git a/client/src/org/compiere/apps/search/InfoAsset.java b/client/src/org/compiere/apps/search/InfoAsset.java index a906056995..10e9464c4f 100644 --- a/client/src/org/compiere/apps/search/InfoAsset.java +++ b/client/src/org/compiere/apps/search/InfoAsset.java @@ -18,6 +18,8 @@ package org.compiere.apps.search; import java.awt.*; import java.sql.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.grid.ed.*; import org.compiere.minigrid.*; diff --git a/client/src/org/compiere/apps/search/InfoBPartner.java b/client/src/org/compiere/apps/search/InfoBPartner.java index 4569e82e56..70ee9041dc 100644 --- a/client/src/org/compiere/apps/search/InfoBPartner.java +++ b/client/src/org/compiere/apps/search/InfoBPartner.java @@ -20,6 +20,8 @@ import java.awt.*; import java.math.*; import java.sql.*; import java.util.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.grid.ed.*; import org.compiere.minigrid.*; diff --git a/client/src/org/compiere/apps/search/InfoCashLine.java b/client/src/org/compiere/apps/search/InfoCashLine.java index 9970cb40cc..b866a2b33e 100644 --- a/client/src/org/compiere/apps/search/InfoCashLine.java +++ b/client/src/org/compiere/apps/search/InfoCashLine.java @@ -20,6 +20,8 @@ import java.awt.*; import java.math.*; import java.sql.*; import java.util.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.grid.ed.*; import org.compiere.minigrid.*; diff --git a/client/src/org/compiere/apps/search/InfoGeneral.java b/client/src/org/compiere/apps/search/InfoGeneral.java index 933c7cd54c..0adb682238 100644 --- a/client/src/org/compiere/apps/search/InfoGeneral.java +++ b/client/src/org/compiere/apps/search/InfoGeneral.java @@ -22,6 +22,8 @@ import java.sql.*; import java.util.*; import java.util.logging.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.minigrid.*; import org.compiere.plaf.*; diff --git a/client/src/org/compiere/apps/search/InfoInOut.java b/client/src/org/compiere/apps/search/InfoInOut.java index ad2a10420f..44b8c3bb60 100644 --- a/client/src/org/compiere/apps/search/InfoInOut.java +++ b/client/src/org/compiere/apps/search/InfoInOut.java @@ -19,6 +19,8 @@ package org.compiere.apps.search; import java.awt.*; import java.sql.*; import java.util.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.grid.ed.*; import org.compiere.minigrid.*; diff --git a/client/src/org/compiere/apps/search/InfoInvoice.java b/client/src/org/compiere/apps/search/InfoInvoice.java index fe1bc7f516..d9b4cc68be 100644 --- a/client/src/org/compiere/apps/search/InfoInvoice.java +++ b/client/src/org/compiere/apps/search/InfoInvoice.java @@ -20,6 +20,8 @@ import java.awt.*; import java.math.*; import java.sql.*; import java.util.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.grid.ed.*; import org.compiere.minigrid.*; diff --git a/client/src/org/compiere/apps/search/InfoOrder.java b/client/src/org/compiere/apps/search/InfoOrder.java index 3fb0ed8a61..8b5b7740eb 100644 --- a/client/src/org/compiere/apps/search/InfoOrder.java +++ b/client/src/org/compiere/apps/search/InfoOrder.java @@ -20,6 +20,8 @@ import java.awt.*; import java.math.*; import java.sql.*; import java.util.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.grid.ed.*; import org.compiere.minigrid.*; diff --git a/client/src/org/compiere/apps/search/InfoPayment.java b/client/src/org/compiere/apps/search/InfoPayment.java index 7c06280d4a..bfdfc0e3c3 100644 --- a/client/src/org/compiere/apps/search/InfoPayment.java +++ b/client/src/org/compiere/apps/search/InfoPayment.java @@ -20,6 +20,8 @@ import java.awt.*; import java.math.*; import java.sql.*; import java.util.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.grid.ed.*; import org.compiere.minigrid.*; diff --git a/client/src/org/compiere/apps/search/InfoProduct.java b/client/src/org/compiere/apps/search/InfoProduct.java index 2b61f3d5d9..69c5be6a41 100644 --- a/client/src/org/compiere/apps/search/InfoProduct.java +++ b/client/src/org/compiere/apps/search/InfoProduct.java @@ -23,6 +23,7 @@ import java.sql.*; import java.util.*; import java.util.logging.*; // +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.grid.ed.*; import org.compiere.minigrid.*; diff --git a/client/src/org/compiere/apps/search/VSchedulePanel.java b/client/src/org/compiere/apps/search/VSchedulePanel.java index a8130b1fe1..9c78879f04 100644 --- a/client/src/org/compiere/apps/search/VSchedulePanel.java +++ b/client/src/org/compiere/apps/search/VSchedulePanel.java @@ -247,7 +247,7 @@ public class VSchedulePanel extends JComponent implements MouseListener if (!where.intersects(clipBounds)) continue; // Header Background - AdempiereUtils.paint3Deffect(g2D, where, false, true); + CompiereUtils.paint3Deffect(g2D, where, false, true); g2D.setPaint(Color.blue); TextLayout layout = new TextLayout (getHeading(i), g2D.getFont(), g2D.getFontRenderContext()); float hh = layout.getAscent() + layout.getDescent(); diff --git a/client/src/org/compiere/apps/search/VScheduleTimePanel.java b/client/src/org/compiere/apps/search/VScheduleTimePanel.java index 8675eb95c5..c03dd8db58 100644 --- a/client/src/org/compiere/apps/search/VScheduleTimePanel.java +++ b/client/src/org/compiere/apps/search/VScheduleTimePanel.java @@ -241,7 +241,7 @@ public class VScheduleTimePanel extends JComponent // Header Background Rectangle where = new Rectangle(0, 0, w, getHeaderHeight()); - AdempiereUtils.paint3Deffect(g2D, where, false, true); + CompiereUtils.paint3Deffect(g2D, where, false, true); // heading TextLayout layout = null; diff --git a/client/src/org/compiere/apps/wf/WFPanel.java b/client/src/org/compiere/apps/wf/WFPanel.java index a0f6dce5b2..e105de7165 100644 --- a/client/src/org/compiere/apps/wf/WFPanel.java +++ b/client/src/org/compiere/apps/wf/WFPanel.java @@ -22,6 +22,8 @@ import java.beans.*; import java.util.*; import java.util.logging.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.apps.form.*; import org.compiere.model.*; @@ -122,7 +124,7 @@ public class WFPanel extends CPanel private void jbInit() throws Exception { this.setLayout(mainLayout); - AdempiereColor.setBackground(this); + CompiereColor.setBackground(this); southPanel.setLayout(southLayout); // Center this.add(new JScrollPane(centerPanel), BorderLayout.CENTER); diff --git a/client/src/org/compiere/grid/VCreateFromShipment.java b/client/src/org/compiere/grid/VCreateFromShipment.java index a5d52b23e8..59bbb291eb 100644 --- a/client/src/org/compiere/grid/VCreateFromShipment.java +++ b/client/src/org/compiere/grid/VCreateFromShipment.java @@ -23,6 +23,8 @@ import java.sql.*; import java.util.*; import java.util.logging.*; import javax.swing.table.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.grid.ed.*; import org.compiere.model.*; import org.compiere.plaf.*; diff --git a/client/src/org/compiere/grid/VPayment.java b/client/src/org/compiere/grid/VPayment.java index 67fd31d939..3ccd48430b 100644 --- a/client/src/org/compiere/grid/VPayment.java +++ b/client/src/org/compiere/grid/VPayment.java @@ -24,6 +24,8 @@ import java.text.*; import java.util.*; import java.util.logging.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.grid.ed.*; import org.compiere.model.*; diff --git a/client/src/org/compiere/grid/ed/Calendar.java b/client/src/org/compiere/grid/ed/Calendar.java index 0a9ba696f3..91d936d734 100644 --- a/client/src/org/compiere/grid/ed/Calendar.java +++ b/client/src/org/compiere/grid/ed/Calendar.java @@ -24,6 +24,8 @@ import java.util.*; import java.util.logging.*; import javax.swing.*; import javax.swing.event.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.plaf.*; import org.compiere.swing.*; import org.compiere.util.*; diff --git a/client/src/org/compiere/grid/ed/Editor.java b/client/src/org/compiere/grid/ed/Editor.java index 2a1bc43d95..7ddceb616f 100644 --- a/client/src/org/compiere/grid/ed/Editor.java +++ b/client/src/org/compiere/grid/ed/Editor.java @@ -21,6 +21,8 @@ import java.awt.event.*; import java.io.*; import javax.swing.*; import javax.swing.event.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.plaf.*; import org.compiere.swing.*; diff --git a/client/src/org/compiere/grid/ed/VAccount.java b/client/src/org/compiere/grid/ed/VAccount.java index 4f7a8ac733..666fdf8a24 100644 --- a/client/src/org/compiere/grid/ed/VAccount.java +++ b/client/src/org/compiere/grid/ed/VAccount.java @@ -21,6 +21,8 @@ import java.awt.event.*; import java.beans.*; import java.sql.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.model.*; import org.compiere.plaf.*; import org.compiere.swing.*; diff --git a/client/src/org/compiere/grid/ed/VAssignment.java b/client/src/org/compiere/grid/ed/VAssignment.java index 1dee2f85cc..ec47bf9c81 100644 --- a/client/src/org/compiere/grid/ed/VAssignment.java +++ b/client/src/org/compiere/grid/ed/VAssignment.java @@ -22,6 +22,8 @@ import java.beans.*; import java.sql.*; import java.text.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.search.*; import org.compiere.model.*; import org.compiere.plaf.*; diff --git a/client/src/org/compiere/grid/ed/VBPartner.java b/client/src/org/compiere/grid/ed/VBPartner.java index 917e3ec028..af42bc337a 100644 --- a/client/src/org/compiere/grid/ed/VBPartner.java +++ b/client/src/org/compiere/grid/ed/VBPartner.java @@ -20,6 +20,8 @@ import java.awt.*; import java.awt.event.*; import java.util.logging.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.model.*; import org.compiere.plaf.*; diff --git a/client/src/org/compiere/grid/ed/VCellEditor.java b/client/src/org/compiere/grid/ed/VCellEditor.java index c2c25221b8..28f01f03fc 100644 --- a/client/src/org/compiere/grid/ed/VCellEditor.java +++ b/client/src/org/compiere/grid/ed/VCellEditor.java @@ -22,6 +22,8 @@ import java.beans.*; import java.util.*; import javax.swing.*; import javax.swing.table.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.model.*; import org.compiere.plaf.*; import org.compiere.util.*; diff --git a/client/src/org/compiere/grid/ed/VCellRenderer.java b/client/src/org/compiere/grid/ed/VCellRenderer.java index 1cde9d477e..4f8b09e176 100644 --- a/client/src/org/compiere/grid/ed/VCellRenderer.java +++ b/client/src/org/compiere/grid/ed/VCellRenderer.java @@ -20,11 +20,14 @@ import java.awt.*; import java.text.*; import javax.swing.*; import javax.swing.table.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.graph.*; import org.compiere.model.*; import org.compiere.plaf.*; import java.util.logging.*; import org.compiere.util.*; + import sun.security.krb5.internal.*; /** diff --git a/client/src/org/compiere/grid/ed/VColor.java b/client/src/org/compiere/grid/ed/VColor.java index f19229a6e8..bdceb94894 100644 --- a/client/src/org/compiere/grid/ed/VColor.java +++ b/client/src/org/compiere/grid/ed/VColor.java @@ -23,6 +23,8 @@ import java.math.*; import java.sql.*; import java.util.logging.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.model.*; import org.compiere.plaf.*; import org.compiere.swing.*; @@ -63,7 +65,7 @@ public class VColor extends CButton private GridTab m_mTab; private boolean m_mandatory; // private int m_AD_Color_ID = 0; - private AdempiereColor m_cc = null; + private CompiereColor m_cc = null; private Object m_value; /** Logger */ private static CLogger log = CLogger.getCLogger(VColor.class); @@ -111,7 +113,7 @@ public class VColor extends CButton else { setOpaque(false); - putClientProperty(AdempierePLAF.BACKGROUND, null); + putClientProperty(CompiereLookAndFeel.BACKGROUND, null); } repaint(); } // setValue @@ -166,11 +168,11 @@ public class VColor extends CButton * @return true if loaded * @see org.compiere.model.MColor#getAdempiereColor */ - private AdempiereColor getAdempiereColor() + private CompiereColor getAdempiereColor() { Integer AD_Color_ID = (Integer)m_mTab.getValue("AD_Color_ID"); log.fine("AD_Color_ID=" + AD_Color_ID); - AdempiereColor cc = null; + CompiereColor cc = null; // Color Type String ColorType = (String)m_mTab.getValue("ColorType"); @@ -180,27 +182,27 @@ public class VColor extends CButton return 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)) { Integer RepeatDistance = (Integer)m_mTab.getValue("RepeatDistance"); String StartPoint = (String)m_mTab.getValue("StartPoint"); int repeatDistance = RepeatDistance == null ? 0 : RepeatDistance.intValue(); 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)) { BigDecimal LineWidth = (BigDecimal)m_mTab.getValue("LineWidth"); BigDecimal LineDistance = (BigDecimal)m_mTab.getValue("LineDistance"); int lineWidth = LineWidth == null ? 0 : LineWidth.intValue(); int lineDistance = LineDistance == null ? 0 : LineDistance.intValue(); - 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)) { Integer AD_Image_ID = (Integer)m_mTab.getValue("AD_Image_ID"); String url = getURL(AD_Image_ID); @@ -208,7 +210,7 @@ public class VColor extends CButton return null; BigDecimal ImageAlpha = (BigDecimal)m_mTab.getValue("ImageAlpha"); float compositeAlpha = ImageAlpha == null ? 0.7f : ImageAlpha.floatValue(); - cc = new AdempiereColor(url, getColor(true), compositeAlpha); + cc = new CompiereColor(url, getColor(true), compositeAlpha); } else return null; @@ -277,7 +279,7 @@ public class VColor extends CButton public void actionPerformed (ActionEvent e) { // Show Dialog - AdempiereColor cc = AdempiereColorEditor.showDialog((JFrame)Env.getParent(this), m_cc); + CompiereColor cc = ColorEditor.showDialog((JFrame)Env.getParent(this), m_cc); if (cc == null) { log.info( "VColor.actionPerformed - no color"); diff --git a/client/src/org/compiere/grid/ed/VDate.java b/client/src/org/compiere/grid/ed/VDate.java index 56e63eea23..f6bd7a3d76 100644 --- a/client/src/org/compiere/grid/ed/VDate.java +++ b/client/src/org/compiere/grid/ed/VDate.java @@ -24,6 +24,8 @@ import java.text.*; import java.util.logging.*; import javax.swing.*; import javax.swing.text.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.model.*; import org.compiere.plaf.*; diff --git a/client/src/org/compiere/grid/ed/VDocAction.java b/client/src/org/compiere/grid/ed/VDocAction.java index 7b7841eb61..97115ae5c9 100644 --- a/client/src/org/compiere/grid/ed/VDocAction.java +++ b/client/src/org/compiere/grid/ed/VDocAction.java @@ -22,6 +22,8 @@ import java.sql.*; import java.util.*; import java.util.logging.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.model.*; import org.compiere.plaf.*; diff --git a/client/src/org/compiere/grid/ed/VFile.java b/client/src/org/compiere/grid/ed/VFile.java index c56847d1a1..5163a22f4d 100644 --- a/client/src/org/compiere/grid/ed/VFile.java +++ b/client/src/org/compiere/grid/ed/VFile.java @@ -23,6 +23,7 @@ import java.io.*; import javax.swing.*; +import org.adempiere.plaf.AdempierePLAF; import org.compiere.plaf.*; import org.compiere.swing.*; import org.compiere.util.*; diff --git a/client/src/org/compiere/grid/ed/VLine.java b/client/src/org/compiere/grid/ed/VLine.java index 11d6627736..ad4920ed78 100644 --- a/client/src/org/compiere/grid/ed/VLine.java +++ b/client/src/org/compiere/grid/ed/VLine.java @@ -18,6 +18,8 @@ package org.compiere.grid.ed; import java.awt.*; import javax.swing.border.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.plaf.*; import org.compiere.util.*; diff --git a/client/src/org/compiere/grid/ed/VLocation.java b/client/src/org/compiere/grid/ed/VLocation.java index 16515574eb..d20a91efc5 100644 --- a/client/src/org/compiere/grid/ed/VLocation.java +++ b/client/src/org/compiere/grid/ed/VLocation.java @@ -20,6 +20,8 @@ import java.awt.*; import java.awt.event.*; import java.beans.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.model.*; import org.compiere.plaf.*; import org.compiere.swing.*; diff --git a/client/src/org/compiere/grid/ed/VLocator.java b/client/src/org/compiere/grid/ed/VLocator.java index b1d17121b7..13eb2a7933 100644 --- a/client/src/org/compiere/grid/ed/VLocator.java +++ b/client/src/org/compiere/grid/ed/VLocator.java @@ -22,6 +22,8 @@ import java.beans.*; import java.sql.*; import java.util.logging.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.model.*; import org.compiere.plaf.*; diff --git a/client/src/org/compiere/grid/ed/VLocatorDialog.java b/client/src/org/compiere/grid/ed/VLocatorDialog.java index 9eb63a7474..fa34fc528b 100644 --- a/client/src/org/compiere/grid/ed/VLocatorDialog.java +++ b/client/src/org/compiere/grid/ed/VLocatorDialog.java @@ -21,6 +21,8 @@ import java.awt.event.*; import java.sql.*; import java.util.logging.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.model.*; import org.compiere.plaf.*; diff --git a/client/src/org/compiere/grid/ed/VMemo.java b/client/src/org/compiere/grid/ed/VMemo.java index b96aba1274..dbe9c6f2dd 100644 --- a/client/src/org/compiere/grid/ed/VMemo.java +++ b/client/src/org/compiere/grid/ed/VMemo.java @@ -20,6 +20,8 @@ import java.awt.*; import java.awt.event.*; import java.beans.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.plaf.*; import org.compiere.swing.*; diff --git a/client/src/org/compiere/grid/ed/VPAttribute.java b/client/src/org/compiere/grid/ed/VPAttribute.java index 9fecccbbe5..a12fcf45cf 100644 --- a/client/src/org/compiere/grid/ed/VPAttribute.java +++ b/client/src/org/compiere/grid/ed/VPAttribute.java @@ -21,6 +21,8 @@ import java.awt.event.*; import java.beans.*; import java.util.logging.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.model.*; import org.compiere.plaf.*; import org.compiere.swing.*; diff --git a/client/src/org/compiere/grid/ed/VPassword.java b/client/src/org/compiere/grid/ed/VPassword.java index daa2ba6592..e11bdec085 100644 --- a/client/src/org/compiere/grid/ed/VPassword.java +++ b/client/src/org/compiere/grid/ed/VPassword.java @@ -19,6 +19,7 @@ package org.compiere.grid.ed; import java.awt.event.*; import java.beans.*; +import org.adempiere.plaf.AdempierePLAF; import org.compiere.plaf.*; import org.compiere.swing.*; import org.compiere.model.*; diff --git a/client/src/org/compiere/grid/ed/VString.java b/client/src/org/compiere/grid/ed/VString.java index 195d17c842..f45f949d62 100644 --- a/client/src/org/compiere/grid/ed/VString.java +++ b/client/src/org/compiere/grid/ed/VString.java @@ -20,6 +20,8 @@ import java.awt.*; import java.awt.event.*; import java.beans.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.model.*; import org.compiere.plaf.*; import org.compiere.swing.*; diff --git a/client/src/org/compiere/grid/ed/VText.java b/client/src/org/compiere/grid/ed/VText.java index 423a27723a..b9431b8e01 100644 --- a/client/src/org/compiere/grid/ed/VText.java +++ b/client/src/org/compiere/grid/ed/VText.java @@ -20,6 +20,8 @@ import java.awt.*; import java.awt.event.*; import java.beans.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.plaf.*; import org.compiere.swing.*; diff --git a/client/src/org/compiere/grid/ed/VTextLong.java b/client/src/org/compiere/grid/ed/VTextLong.java index 540f115326..3e42e12746 100644 --- a/client/src/org/compiere/grid/ed/VTextLong.java +++ b/client/src/org/compiere/grid/ed/VTextLong.java @@ -20,6 +20,8 @@ import java.awt.*; import java.awt.event.*; import java.beans.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.plaf.*; import org.compiere.swing.*; import org.compiere.util.*; diff --git a/client/src/org/compiere/grid/ed/VURL.java b/client/src/org/compiere/grid/ed/VURL.java index 2a5725b86c..19f776d35b 100644 --- a/client/src/org/compiere/grid/ed/VURL.java +++ b/client/src/org/compiere/grid/ed/VURL.java @@ -21,6 +21,8 @@ import java.awt.event.*; import java.beans.*; import java.net.*; import javax.swing.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.model.*; import org.compiere.plaf.*; diff --git a/client/src/org/compiere/grid/tree/VTreePanel.java b/client/src/org/compiere/grid/tree/VTreePanel.java index d400a9e2b7..c3fe05351f 100644 --- a/client/src/org/compiere/grid/tree/VTreePanel.java +++ b/client/src/org/compiere/grid/tree/VTreePanel.java @@ -30,6 +30,8 @@ import javax.swing.*; import javax.swing.plaf.SplitPaneUI; import javax.swing.plaf.basic.BasicSplitPaneUI; import javax.swing.tree.*; + +import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.*; import org.compiere.model.*; import org.compiere.plaf.*; @@ -230,6 +232,8 @@ public final class VTreePanel extends CPanel southPanel.add(treeSearch, BorderLayout.EAST); this.add(southPanel, BorderLayout.SOUTH); // + centerSplitPane.setOpaque(false); + toolbar.setOpaque(false); centerSplitPane.add(treePane, JSplitPane.RIGHT); centerSplitPane.add(bar, JSplitPane.LEFT); centerSplitPane.setBorder(BorderFactory.createEmptyBorder()); @@ -871,6 +875,7 @@ public final class VTreePanel extends CPanel // label = label.substring(0, space); CButton button = new CButton(label); + button.setOpaque(false); button.setHorizontalAlignment(JButton.LEFT); button.setToolTipText(nd.getDescription()); button.setActionCommand(String.valueOf(nd.getNode_ID())); diff --git a/client/src/org/compiere/images/Logout16.GIF b/client/src/org/compiere/images/Logout16.GIF new file mode 100644 index 0000000000..95afd6dabe Binary files /dev/null and b/client/src/org/compiere/images/Logout16.GIF differ diff --git a/client/src/org/compiere/minigrid/CheckRenderer.java b/client/src/org/compiere/minigrid/CheckRenderer.java index e41214ac42..ff76aab723 100644 --- a/client/src/org/compiere/minigrid/CheckRenderer.java +++ b/client/src/org/compiere/minigrid/CheckRenderer.java @@ -20,6 +20,7 @@ import javax.swing.*; import javax.swing.table.*; import java.awt.*; +import org.adempiere.plaf.AdempierePLAF; import org.compiere.plaf.*; /**