styleBlue.js

basePathForCommonIcons = 'dFrame/images/common/'

grayColor = '#B5B2B5'

blueColor = '#3965A5'

contentBlueBgCol = '#637D9C'

DFrameAPI.preLoadImagesForButtonImage('Home', 'dFrame/doc/ExamplesStyles/blue/','home.gif', 'homeOver.gif', 'homeOver.gif', 'homeOver.gif')

DFrameAPI.preLoadImagesForButtonImage('Close', 'dFrame/doc/ExamplesStyles/blue/','close.gif', 'closeOver.gif', 'close.gif', 'closeOver.gif')

DFrameAPI.preLoadImagesForButtonImage('CloseDFrame', basePathForCommonIcons,'close-off-02.gif', 'close-on-02.gif', 'close-off-02.gif', 'close-on-02.gif')

DFrameAPI.preLoadImagesForButtonImage('arrows', basePathForCommonIcons,'menuArrow-Close.gif', '', 'menuArrow-Open.gif', '')

//============================================================================

// buttonStyle |

//============================================================================

var buttonStyle = new ButtonStyle ()

buttonStyle.setBordersColor ('#5A8CC2')

buttonStyle.setWidth (80)

buttonStyle.setHeight (22)

buttonStyle.setActivateOn ('UP');//OK

buttonStyle.setTextNormal ('#AFCDEF')

buttonStyle.setBgNormal (contentBlueBgCol)

buttonStyle.setBordersNormal (true)

buttonStyle.copyStyle('Normal', 'Roll')

buttonStyle.setTextRoll ('#ffffff')

buttonStyle.setBgRoll ('#000084')

buttonStyle.copyStyle('Roll', 'Down')

buttonStyle.copyStyle('Roll', 'Selected')

buttonStyle.copyStyle('Roll', 'RollSelected')

//============================================================================

// menuStyle |

//============================================================================

var menuStyle = new MenuStyle ()

menuStyle.setBordersWidth(0)

//menuStyle.setBordersColor('yellow')

menuStyle.setItemsSpacing ([10,5])

menuStyle.setMenuIndent ([0,10])

menuStyle.setIsTree(true)

menuStyle.setArrowImage('arrows')

//------------------------------------------------------------------

// default Button Style |

//------------------------------------------------------------------

var x = new ButtonStyle(buttonStyle)

menuStyle.setDefaultButtonStyle(x)

//------------------------------------------------------------------

// itemsStyle |

//------------------------------------------------------------------

var x = new ButtonStyle(buttonStyle)

x.setBordersColor(['#5A8CC2','#C25A8C'])

x.setBgNormal (['#637D9C','#18417B'])

x.copyStyle ('Normal', 'Roll')

x.setTextRoll ('#ffffff')

x.setBgRoll (['#000084','#830000'])

x.setBgSelected('')

x.copyStyle ('Roll', 'RollSelected')

x.copyStyle ('Normal', 'Selected')

menuStyle.setItemsStyle(x)

//============================================================================

// barStyle |

//============================================================================

var barStyle = new BarStyle ()

barStyle.setPos('TOP')

barStyle.setBordersColor('#31309C')

barStyle.setBackgroundColor(blueColor)

barStyle.setHeight(32)

//------------------------------------------------------------------

// default Button and /Menu Styles |

//------------------------------------------------------------------

barStyle.setDefaultButtonStyle(buttonStyle)

barStyle.setDefaultMenuStyle(menuStyle)

//============================================================================

// dFrameStyle |

//============================================================================

var dFrameStyle = new DFrameStyle ()

dFrameStyle.setPos ([0,0,100,100])

dFrameStyle.setBackgroundColor (blueColor)

dFrameStyle.setContentBgColor (contentBlueBgCol)

dFrameStyle.setBordersWidth(1)

dFrameStyle.setBordersColor (grayColor)

dFrameStyle.setMBordersWidth(0)

dFrameStyle.setTitleBar(true)

dFrameStyle.setScrollType ('Scroll')

//------------------------------------------------------------------

// default Bar Style |

//------------------------------------------------------------------

dFrameStyle.setDefaultBarStyle(barStyle)

//------------------------------------------------------------------

// default Context Menu Style !

//------------------------------------------------------------------

var x = new MenuStyle(menuStyle)

x.setBackgroundColor('#18417B')

x.setBordersWidth(1)

//x.setWidth(200)

dFrameStyle.setDefaultContextMenuStyle(x)

//------------------------------------------------------------------

// defaul tTask Bar Style |

//------------------------------------------------------------------

var x = new BarStyle(barStyle)

dFrameStyle.setDefaultTaskBarStyle(x)

//============================================================================

// defaultTitleBarStyle |

//============================================================================

var x = new BarStyle(barStyle)

x.setBackgroundColor(grayColor)

x.setBordersWidth(0)

x.setBordersHMargin(1)

x.setBordersVMargin(1)

x.setHeight(1)

x.setButtonImage('thisDFrame.closeFrame()', DFrameAPI.getImagesForButtonImage('CloseDFrame'))

var y = x.getDefaultButtonStyle()

y.setHeight(0)

y.setBordersWidth(0)

y.setLabelTopMargin(1)

y.setLabelBottomMargin(1)

y.setBgNormal(null)

y.setTextNormal('white')

y.setBosNormal(true)

dFrameStyle.setDefaultTitleBarStyle(x)