case Constants.W_NONE:
newBorder = null;
break;
default:
// The lineWeightInPixels handles all the values. CraigM: 28/01/2008.
newBorder = new LineBorderWithColour(jc.getForeground(), UIutils.getLineWeightInPixels(this.weight));
break;
}
jc.setBorder(newBorder);
} else if (jc instanceof JLabel || jc instanceof JTextComponent){
//PM:12/10/07
/*
* the borders for JLabels to match forte
* TF:14/11/07:Extended this for JTextComponents and handled the default case
* TF:22/11/07:TextGraphics now know how to pad themselves properly, so we no longer
* need the padding border.
*/
Border outsideBorder = null;
Border newBorder = null;
switch (this.weight){
case Constants.W_DEFAULT:
newBorder = BasicBorders.getTextFieldBorder();
break;
case Constants.W_NONE:
newBorder = BorderFactory.createEmptyBorder(TOP_PAD, LEFT_PAD, 0, 0);
break;
case Constants.W_HEAVY:
case Constants.W_MEDIUM:
case Constants.W_ONEPIXEL:
case Constants.W_THIN:
case Constants.W_THREEPIXELS:
case Constants.W_TWOPIXELS:
case Constants.W_VERYHEAVY:
case Constants.W_VERYTHIN:
outsideBorder = new LineBorderWithColour(jc.getForeground(), UIutils.getLineWeightInPixels(this.weight));
newBorder = BorderFactory.createCompoundBorder(outsideBorder, new EmptyBorder(TOP_PAD, LEFT_PAD, 0, 0));
break;
default:
newBorder = BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(), new EmptyBorder(TOP_PAD, LEFT_PAD, 0, 0));
break;