PDA

View Full Version : Desktop Taskbar - How to add a icon on the right



Mebel
5 Apr 2011, 12:38 AM
Hello,

how its possible to add a small icon in the taskbar on the right.
Currently i only found that way to override the Desktop and override the TaskBar.
Sadly i have to override than all inner classes and have to copy the whole content auf TaskBar cause the inner classes not public or protected.

Any Ideas ?

best regards
Mebel

Mebel
5 Apr 2011, 2:13 AM
ok,

here my first solution. I override the Desktop and add the method (addBrandIcon)
In the ctor i call addBrandIcon(taskBar);
I have added to styles too.
The result is what i want. Looks well. Other ideas ?



private void addBrandIcon(LayoutContainer target) {
LayoutContainer brandContainer = new LayoutContainer();
brandContainer.setStyleName("desktop-brand");

LayoutContainer brandImage = new LayoutContainer();
brandImage.setStyleName("desktop-brand-image");
brandContainer.add(brandImage);

target.add(brandContainer);
target.layout(true);
}

styles:

.desktop-brand {
background-image: url(desktop/images/taskbar/black/taskbuttons-panel-bg.gif) !important;
background-repeat: repeat-x;
margin-top: 4px;
width:120px;
height:30px;
}

.desktop-brand-image {
background-image: url(images/brand.png) !important;
background-repeat: no-repeat;
height:30px;
}