use of org.compiere.plaf.CompiereColor in project adempiere by adempiere.
the class CTabbedPane method setBackground.
// init
/**************************************************************************
* Set Background - ignored by UI -
* @param bg ignored
*/
public void setBackground(Color bg) {
if (bg.equals(getBackground()))
return;
super.setBackground(bg);
setBackgroundColor(new CompiereColor(bg));
}
use of org.compiere.plaf.CompiereColor in project adempiere by adempiere.
the class CTabbedPane method toString.
/**
* String representation
* @return String representation
*/
public String toString() {
StringBuffer sb = new StringBuffer("CTabbedPane [");
sb.append(super.toString());
CompiereColor bg = getBackgroundColor();
if (bg != null)
sb.append(bg.toString());
sb.append("]");
return sb.toString();
}
use of org.compiere.plaf.CompiereColor in project adempiere by adempiere.
the class MColor method getAdempiereColor.
// saveNewSpecial
/**************************************************************************
* Get AdempiereColor.
* see org.compiere.grid.ed.VColor#getAdempiereColor
* @return AdempiereColor
*/
public CompiereColor getAdempiereColor() {
if (get_ID() == 0)
return null;
// Color Type
String ColorType = (String) getColorType();
if (ColorType == null) {
log.log(Level.SEVERE, "MColor.getAdempiereColor - No ColorType");
return null;
}
CompiereColor cc = null;
//
if (ColorType.equals(CompiereColor.TYPE_FLAT)) {
cc = new CompiereColor(getColor(true), true);
} else if (ColorType.equals(CompiereColor.TYPE_GRADIENT)) {
int RepeatDistance = getRepeatDistance();
String StartPoint = getStartPoint();
int startPoint = StartPoint == null ? 0 : Integer.parseInt(StartPoint);
cc = new CompiereColor(getColor(true), getColor(false), startPoint, RepeatDistance);
} else if (ColorType.equals(CompiereColor.TYPE_LINES)) {
int LineWidth = getLineWidth();
int LineDistance = getLineDistance();
cc = new CompiereColor(getColor(false), getColor(true), LineWidth, LineDistance);
} else if (ColorType.equals(CompiereColor.TYPE_TEXTURE)) {
int AD_Image_ID = getAD_Image_ID();
String url = getURL(AD_Image_ID);
if (url == null)
return null;
BigDecimal ImageAlpha = getImageAlpha();
float compositeAlpha = ImageAlpha == null ? 0.7f : ImageAlpha.floatValue();
cc = new CompiereColor(url, getColor(true), compositeAlpha);
}
return cc;
}
use of org.compiere.plaf.CompiereColor in project adempiere by adempiere.
the class CButton method setBackground.
// CButton
/***************************************************************************
* Set Background - Differentiates between system & user call. If User Call,
* sets Opaque & ContextAreaFilled to true
*
* @param bg
* background color
*/
public void setBackground(Color bg) {
if (bg.equals(getBackground()))
return;
super.setBackground(bg);
setBackgroundColor(new CompiereColor(bg));
this.repaint();
}
use of org.compiere.plaf.CompiereColor in project adempiere by adempiere.
the class CPanel method toString.
// getTabLevel
/**************************************************************************
* String representation
* @return String representation
*/
public String toString() {
StringBuffer sb = new StringBuffer("CPanel [");
sb.append(super.toString());
CompiereColor bg = getBackgroundColor();
if (bg != null)
sb.append(bg.toString());
sb.append("]");
return sb.toString();
}
Aggregations