Search in sources :

Example 6 with CompiereColor

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));
}
Also used : CompiereColor(org.compiere.plaf.CompiereColor)

Example 7 with CompiereColor

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();
}
Also used : CompiereColor(org.compiere.plaf.CompiereColor)

Example 8 with CompiereColor

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;
}
Also used : CompiereColor(org.compiere.plaf.CompiereColor) BigDecimal(java.math.BigDecimal)

Example 9 with CompiereColor

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();
}
Also used : CompiereColor(org.compiere.plaf.CompiereColor)

Example 10 with CompiereColor

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();
}
Also used : CompiereColor(org.compiere.plaf.CompiereColor)

Aggregations

CompiereColor (org.compiere.plaf.CompiereColor)11 BigDecimal (java.math.BigDecimal)3 Component (java.awt.Component)1 Dimension (java.awt.Dimension)1 Point (java.awt.Point)1 GridController (org.compiere.grid.GridController)1 GridSynchronizer (org.compiere.grid.GridSynchronizer)1 VSortTab (org.compiere.grid.VSortTab)1 VTabbedPane (org.compiere.grid.VTabbedPane)1 GridField (org.compiere.model.GridField)1 GridTab (org.compiere.model.GridTab)1 GridWindow (org.compiere.model.GridWindow)1 GridWindowVO (org.compiere.model.GridWindowVO)1 GridWorkbench (org.compiere.model.GridWorkbench)1 MColor (org.compiere.model.MColor)1 MQuery (org.compiere.model.MQuery)1 ValueNamePair (org.compiere.util.ValueNamePair)1