Reversion revision 882

This commit is contained in:
Carlos Ruiz 2006-12-10 16:23:19 +00:00
parent 4549ba57de
commit 027ac5c1ba
2 changed files with 4 additions and 59 deletions

View File

@ -13,30 +13,20 @@
* For the text or an alternative of this public license, you may reach us * * 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 * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html * * or via info@compiere.org or http://www.compiere.org/license.html *
* Contributor(s): kisitomomo *
*****************************************************************************/ *****************************************************************************/
package org.compiere.plaf; package org.compiere.plaf;
import javax.swing.AbstractButton; import javax.swing.AbstractButton;
import javax.swing.JCheckBox;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.*; import javax.swing.plaf.basic.*;
import javax.swing.plaf.metal.MetalCheckBoxUI; import javax.swing.plaf.metal.MetalCheckBoxUI;
import java.awt.Color;
import java.awt.Graphics;
import org.adempiere.plaf.*;
import com.jgoodies.looks.plastic.PlasticLookAndFeel;
/** /**
* Check Box UI * Check Box UI
* *
* @author Jorg Janke * @author Jorg Janke
* @version $Id: AdempiereCheckBoxUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $ * @version $Id: AdempiereCheckBoxUI.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*
* globalqss: integrate kisitomomo patch
* [ 1612136 ] checkbox look and feel improved
* https://sourceforge.net/tracker/index.php?func=detail&aid=1612136&group_id=176962&atid=879334
*/ */
public class CompiereCheckBoxUI extends MetalCheckBoxUI public class CompiereCheckBoxUI extends MetalCheckBoxUI
{ {
@ -47,7 +37,6 @@ public class CompiereCheckBoxUI extends MetalCheckBoxUI
*/ */
public static ComponentUI createUI (JComponent b) public static ComponentUI createUI (JComponent b)
{ {
return s_checkBoxUI; return s_checkBoxUI;
} // createUI } // createUI
@ -75,36 +64,4 @@ public class CompiereCheckBoxUI extends MetalCheckBoxUI
return new CompiereButtonListener(b); return new CompiereButtonListener(b);
} // createButtonListener } // createButtonListener
//kisito code
@Override
protected Color getDisabledTextColor() {
return AdempiereTheme.DARKEN_STOP;
}
private static void drawCheck(Graphics g, int x, int y) {
g.translate(x, y);
g.drawLine(3, 5, 3, 5);
g.fillRect(3, 6, 2, 2);
g.drawLine(4, 8, 9, 3);
g.drawLine(5, 8, 9, 4);
g.drawLine(5, 9, 9, 5);
g.translate(-x, -y);
}
public synchronized void paint(java.awt.Graphics g, JComponent c) {
super.paint(g,c);
JCheckBox chk=(JCheckBox)c;
if(!chk.isEnabled()) {
g.setColor(PlasticLookAndFeel.getControlDarkShadow());
g.drawRect(0, 3, 11, 11);
if(chk.getModel().isSelected())
{
drawCheck(g,0,4);
}
}
}
// end kisito
} // AdempiereCheckBoxUI } // AdempiereCheckBoxUI

View File

@ -13,7 +13,6 @@
* For the text or an alternative of this public license, you may reach us * * 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 * * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html * * or via info@compiere.org or http://www.compiere.org/license.html *
* Contributor(s): kisitomomo *
*****************************************************************************/ *****************************************************************************/
package org.compiere.swing; package org.compiere.swing;
@ -22,17 +21,14 @@ import java.awt.Color;
import javax.swing.Action; import javax.swing.Action;
import javax.swing.Icon; import javax.swing.Icon;
import javax.swing.JCheckBox; import javax.swing.JCheckBox;
import org.compiere.plaf.*;
import org.adempiere.plaf.AdempierePLAF;
/** /**
* Adempiere CheckBox * Adempiere CheckBox
* *
* @author Jorg Janke * @author Jorg Janke
* @version $Id: CCheckBox.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $ * @version $Id: CCheckBox.java,v 1.2 2006/07/30 00:52:24 jjanke Exp $
*
* globalqss: integrate kisitomomo patch
* [ 1612136 ] checkbox look and feel improved
* https://sourceforge.net/tracker/index.php?func=detail&aid=1612136&group_id=176962&atid=879334
*/ */
public class CCheckBox extends JCheckBox implements CEditor public class CCheckBox extends JCheckBox implements CEditor
{ {
@ -43,7 +39,6 @@ public class CCheckBox extends JCheckBox implements CEditor
{ {
super (); super ();
init(); init();
setUI(new CompiereCheckBoxUI()); //kisito code
} }
/** /**
@ -204,7 +199,6 @@ public class CCheckBox extends JCheckBox implements CEditor
* Set Background * Set Background
* @param bg * @param bg
*/ */
@Override
public void setBackground (Color bg) public void setBackground (Color bg)
{ {
if (bg.equals(getBackground())) if (bg.equals(getBackground()))
@ -299,12 +293,6 @@ public class CCheckBox extends JCheckBox implements CEditor
} }
return text; return text;
} // createMnemonic } // createMnemonic
/* @Override
public Icon getIcon() {
return null;
}
*/
} // CCheckBox } // CCheckBox