use of javax.swing.plaf.ColorUIResource in project adempiere by adempiere.
the class AdempiereThemeInnova method setDefault.
/**
* Set Defaults
*/
public void setDefault() {
/** Blue 51,51,102 */
primary0 = new ColorUIResource(103, 152, 203);
/** Blue 102, 102, 153 */
//protected static ColorUIResource primary1;
primary1 = new ColorUIResource(101, 138, 187);
/** Blue 153, 153, 204 */
primary2 = new ColorUIResource(103, 152, 203);
/** Blue 204, 204, 255 */
//
primary3 = new ColorUIResource(233, 238, 245);
/** Black */
//secondary0 = new ColorUIResource(0, 0, 0);
/** Gray 102, 102, 102 */
//protected static ColorUIResource secondary1;
secondary1 = new ColorUIResource(190, 179, 153);
/** Gray 153, 153, 153 */
//protected static ColorUIResource secondary2;
secondary2 = new ColorUIResource(246, 239, 224);
/** BlueGray 214, 224, 234 - background */
//protected static ColorUIResource secondary3;
secondary3 = new ColorUIResource(251, 248, 241);
/** White */
//secondary4 = new ColorUIResource(255, 255, 255);
/** Black */
black = BLACK;
/** White */
white = WHITE;
/** Background for mandatory fields */
// blueish
mandatory = new ColorUIResource(233, 238, 245);
/** Background for fields in error 180,220,143 */
// green ;
error = new ColorUIResource(220, 241, 203);
/** Background for inactive fields */
//241,239,222
inactive = new ColorUIResource(241, 239, 222);
/** Background for info fields */
// somewhat white
info = new ColorUIResource(251, 248, 251);
/** Foreground Text OK */
// blue ;
txt_ok = new ColorUIResource(0, 153, 255);
/** Foreground Text Error */
// red ;
txt_error = new ColorUIResource(255, 0, 51);
/** Black */
// secondary0 = new ColorUIResource(0, 0, 0);
/** Control font */
controlFont = null;
_getControlTextFont();
/** System font */
systemFont = null;
_getSystemTextFont();
/** User font */
userFont = null;
_getUserTextFont();
/** Small font */
smallFont = null;
_getSubTextFont();
/** Window Title font */
windowFont = null;
_getWindowTitleFont();
/** Menu font */
menuFont = null;
_getMenuTextFont();
}
use of javax.swing.plaf.ColorUIResource in project adempiere by adempiere.
the class InfoBPartner method statInit.
/**
* Static Setup - add fields to parameterPanel
*/
private void statInit() {
labelValue.setText(Msg.getMsg(Env.getCtx(), "Value"));
fieldValue.setBackground(AdempierePLAF.getInfoBackground());
fieldValue.addActionListener(this);
labelName.setText(Msg.getMsg(Env.getCtx(), "Name"));
fieldName.setBackground(AdempierePLAF.getInfoBackground());
fieldName.addActionListener(this);
labelContact.setText(Msg.getMsg(Env.getCtx(), "Contact"));
fieldContact.setBackground(AdempierePLAF.getInfoBackground());
fieldContact.addActionListener(this);
labelEMail.setText(Msg.getMsg(Env.getCtx(), "EMail"));
fieldEMail.setBackground(AdempierePLAF.getInfoBackground());
fieldEMail.addActionListener(this);
labelPostal.setText(Msg.getMsg(Env.getCtx(), "Postal"));
fieldPostal.setBackground(AdempierePLAF.getInfoBackground());
fieldPostal.addActionListener(this);
labelPhone.setText(Msg.translate(Env.getCtx(), "Phone"));
fieldPhone.setBackground(AdempierePLAF.getInfoBackground());
fieldPhone.addActionListener(this);
checkAND.setText(Msg.getMsg(Env.getCtx(), "SearchAND"));
checkAND.setToolTipText(Msg.getMsg(Env.getCtx(), "SearchANDInfo"));
checkAND.setSelected(true);
checkAND.addActionListener(this);
if (m_isSOTrx)
checkCustomer.setText(Msg.getMsg(Env.getCtx(), "OnlyCustomers"));
else
checkCustomer.setText(Msg.getMsg(Env.getCtx(), "OnlyVendors"));
checkCustomer.setSelected(m_isSOMatch);
checkCustomer.addActionListener(this);
//
p_criteriaGrid.add(labelValue, new ALayoutConstraint(0, 0));
p_criteriaGrid.add(fieldValue, null);
p_criteriaGrid.add(labelContact, null);
p_criteriaGrid.add(fieldContact, null);
p_criteriaGrid.add(labelPhone, null);
p_criteriaGrid.add(fieldPhone, null);
p_criteriaGrid.add(checkCustomer, null);
//
p_criteriaGrid.add(labelName, new ALayoutConstraint(1, 0));
p_criteriaGrid.add(fieldName, null);
p_criteriaGrid.add(labelEMail, null);
p_criteriaGrid.add(fieldEMail, null);
p_criteriaGrid.add(labelPostal, null);
p_criteriaGrid.add(fieldPostal, null);
p_criteriaGrid.add(checkAND, null);
// Contact Tab
ColumnInfo[] s_layoutContact = new ColumnInfo[] { new ColumnInfo(" ", "AD_User_ID", IDColumn.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_Greeting_ID"), "(SELECT g.Greeting from C_Greeting g WHERE g.C_Greeting_ID = AD_User.C_Greeting_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Title"), "Title", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "C_Location_ID"), "(SELECT a.Name from C_BPartner_Location a WHERE AD_User.C_BPartner_Location_ID=a.C_BPartner_Location_ID)", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone"), "Phone", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone2"), "Phone2", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Fax"), "Fax", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "EMail"), "EMail", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "LastContact"), "LastContact", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "LastResult"), "LastResult", String.class) };
// From Clause
String s_sqlFrom = "AD_User";
// Where Clause
String s_sqlWhere = "C_BPartner_ID = ? and IsActive = 'Y'";
m_sqlContact = contactTbl.prepareTable(s_layoutContact, s_sqlFrom, s_sqlWhere, false, "AD_User");
contactTbl.setPreferredSize(new Dimension(INFO_WIDTH, SCREEN_HEIGHT > 600 ? 255 : 110));
contactTbl.setRowSelectionAllowed(true);
contactTbl.setMultiSelection(false);
contactTbl.addMouseListener(this);
contactTbl.setShowTotals(false);
contactTbl.autoSize();
contactTbl.setBackground(new ColorUIResource(251, 248, 241));
contactTbl.setForeground(new ColorUIResource(251, 0, 0));
// Location Tab
ColumnInfo[] s_layoutAddress = new ColumnInfo[] { new ColumnInfo(" ", "l.C_BPartner_Location_ID", IDColumn.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Name"), "l.Name", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone"), "l.Phone", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Phone2"), "l.Phone2", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "Fax"), "l.Fax", String.class), // Replaced with parsed value
new ColumnInfo(Msg.translate(Env.getCtx(), "Address"), "a.Address1", String.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsShipTo"), "l.IsShipTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsBillTo"), "l.IsBillTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsRemitTo"), "l.IsRemitTo", Boolean.class), new ColumnInfo(Msg.translate(Env.getCtx(), "IsPayFrom"), "l.IsPayFrom", Boolean.class) };
ADDRESS_INDEX = 5;
/** From Clause */
String s_locationFrom = "C_BPartner_Location l" + " LEFT OUTER JOIN C_Location a ON (l.C_Location_ID=a.C_Location_ID)";
/** Where Clause */
String s_locationWhere = "l.C_BPartner_ID = ? and l.IsActive = 'Y'";
m_sqlAddress = addressTbl.prepareTable(s_layoutAddress, s_locationFrom, s_locationWhere, false, "l");
addressTbl.setPreferredSize(new Dimension(INFO_WIDTH, SCREEN_HEIGHT > 600 ? 255 : 110));
addressTbl.setRowSelectionAllowed(true);
addressTbl.setMultiSelection(false);
addressTbl.addMouseListener(this);
addressTbl.setShowTotals(false);
addressTbl.autoSize();
addressTbl.setBackground(new ColorUIResource(251, 248, 241));
addressTbl.setForeground(new ColorUIResource(251, 0, 0));
jTab.addTab(Msg.translate(Env.getCtx(), "Contact"), new JScrollPane(contactTbl));
jTab.addTab(Msg.translate(Env.getCtx(), "Location"), new JScrollPane(addressTbl));
jTab.setPreferredSize(new Dimension(INFO_WIDTH, SCREEN_HEIGHT > 600 ? 250 : 105));
tablePanel.setPreferredSize(new Dimension(INFO_WIDTH, SCREEN_HEIGHT > 600 ? 255 : 110));
tablePanel.setLayout(new BorderLayout());
tablePanel.add(jTab, BorderLayout.CENTER);
// Details Panel
p_detailTaskPane.setTitle(Msg.translate(Env.getCtx(), "ContactAndAddress"));
p_detailTaskPane.add(tablePanel, BorderLayout.CENTER);
p_detailTaskPane.setVisible(true);
}
use of javax.swing.plaf.ColorUIResource in project adempiere by adempiere.
the class CompiereColor method parseAttributres.
// toString
/**
* Parse String Representation and set Attributes
* @param str parse string
*/
private void parseAttributres(String str) {
if (str.indexOf("[Flat ") != -1) {
m_type = TYPE_FLAT;
m_primaryColor = ThemeUtils.parseColor(str, new ColorUIResource(m_primaryColor));
} else if (str.indexOf("[Gradient ") != -1) {
m_type = TYPE_GRADIENT;
m_primaryColor = ThemeUtils.parseColor(str.substring(str.indexOf(" Upper=") + 7, str.indexOf(",Lower=")), new ColorUIResource(m_primaryColor));
m_secondaryColor = ThemeUtils.parseColor(str.substring(str.indexOf(",Lower=") + 7, str.indexOf(",Start=")), new ColorUIResource(m_secondaryColor));
m_startPoint = Integer.parseInt(str.substring(str.indexOf(",Start=") + 7, str.indexOf(",RDistance=")));
setGradientRepeatDistance(str.substring(str.indexOf(",RDistance=") + 11, str.lastIndexOf(']')));
} else if (str.indexOf("[Line ") != -1) {
m_type = TYPE_LINES;
m_primaryColor = ThemeUtils.parseColor(str.substring(str.indexOf(" Color=") + 7, str.indexOf(",BackColor=")), new ColorUIResource(m_primaryColor));
m_secondaryColor = ThemeUtils.parseColor(str.substring(str.indexOf(",BackColor=") + 11, str.indexOf(",Width=")), new ColorUIResource(m_secondaryColor));
setLineWidth(str.substring(str.indexOf(",Width=") + 7, str.indexOf(",Distance=")));
setLineDistance(str.substring(str.indexOf(",Distance=") + 10, str.lastIndexOf(']')));
} else if (str.indexOf("[Texture ") != -1) {
m_type = TYPE_TEXTURE;
setTextureURL(str.substring(str.indexOf(" GraphURL=") + 10, str.indexOf(",Taint=")));
m_primaryColor = ThemeUtils.parseColor(str.substring(str.indexOf(",Taint=") + 7, str.indexOf(",Alpha=")), new ColorUIResource(m_primaryColor));
setTextureCompositeAlpha(str.substring(str.indexOf(",Alpha=") + 7, str.lastIndexOf(']')));
}
}
use of javax.swing.plaf.ColorUIResource in project adempiere by adempiere.
the class CompiereThemeBlueMetal method setDefault.
/**
* Set Defaults
*/
protected void setDefault() {
/** Blue 102, 102, 153 */
primary1 = new ColorUIResource(102, 102, 153);
/** Blue 153, 153, 204 */
primary2 = new ColorUIResource(153, 153, 204);
/** Blue 204, 204, 255 */
primary3 = new ColorUIResource(204, 204, 255);
/** Gray 102, 102, 102 */
secondary1 = new ColorUIResource(102, 102, 102);
/** Gray 153, 153, 153 */
secondary2 = new ColorUIResource(153, 153, 153);
/** BlueGray 214, 224, 234 - background */
secondary3 = new ColorUIResource(205, 215, 231);
/** Black */
black = new ColorUIResource(Color.black);
/** White */
white = new ColorUIResource(Color.white);
/** Background for mandatory fields */
// blue-isch
mandatory = new ColorUIResource(224, 224, 255);
/** Background for fields in error */
// red-isch
error = new ColorUIResource(255, 204, 204);
/** Background for inactive fields */
// light gray
inactive = new ColorUIResource(234, 234, 234);
/** Background for info fields */
// light yellow
info = new ColorUIResource(253, 237, 207);
/** Foreground Text OK */
// dark blue
txt_ok = new ColorUIResource(51, 51, 102);
/** Foreground Text Error */
// dark red
txt_error = new ColorUIResource(204, 0, 0);
/** Control font */
controlFont = null;
_getControlTextFont();
/** System font */
systemFont = null;
_getSystemTextFont();
/** User font */
userFont = null;
_getUserTextFont();
/** Small font */
smallFont = null;
_getSubTextFont();
/** Window Title font */
windowFont = null;
_getWindowTitleFont();
/** Menu font */
menuFont = null;
_getMenuTextFont();
}
use of javax.swing.plaf.ColorUIResource in project adempiere by adempiere.
the class CompiereThemeIce method setDefault.
/**
* Set Defaults
*/
protected void setDefault() {
/** Blue 102, 102, 153 */
primary1 = new ColorUIResource(210, 226, 239);
/** Blue 153, 153, 204 */
primary2 = new ColorUIResource(233, 240, 248);
/** Blue 204, 204, 255 */
primary3 = new ColorUIResource(167, 198, 227);
/** Gray 102, 102, 102 */
secondary1 = new ColorUIResource(102, 102, 102);
/** Gray 153, 153, 153 */
secondary2 = new ColorUIResource(153, 153, 153);
/** BlueGray 214, 224, 234 - background */
secondary3 = new ColorUIResource(210, 226, 239);
/** Black */
black = new ColorUIResource(Color.black);
/** White */
white = new ColorUIResource(Color.white);
/** Background for mandatory fields */
// blue-isch
mandatory = new ColorUIResource(224, 224, 255);
/** Background for fields in error */
// red-isch
error = new ColorUIResource(255, 204, 204);
/** Background for inactive fields */
// light gray
inactive = new ColorUIResource(234, 234, 234);
/** Background for info fields */
// light yellow
info = new ColorUIResource(253, 237, 207);
/** Foreground Text OK */
// dark blue
txt_ok = new ColorUIResource(51, 51, 102);
/** Foreground Text Error */
// dark red
txt_error = new ColorUIResource(204, 0, 0);
/** Control font */
controlFont = null;
_getControlTextFont();
/** System font */
systemFont = null;
_getSystemTextFont();
/** User font */
userFont = null;
_getUserTextFont();
/** Small font */
smallFont = null;
_getSubTextFont();
/** Window Title font */
windowFont = null;
_getWindowTitleFont();
/** Menu font */
menuFont = null;
_getMenuTextFont();
}
Aggregations