look and feel - make it clearer which tab is currently having focus.

This commit is contained in:
Heng Sin Low 2009-05-07 06:46:23 +00:00
parent 126417c1cc
commit d2f079985f
3 changed files with 72 additions and 31 deletions

View File

@ -74,19 +74,19 @@ public class ADButtonTabList extends Panel implements IADTabList, EventListener
int s = tabbox.getSelectedIndex();
if ( s == i) {
button.setSclass("adwindow-navbtn-sel");
button.setSclass("adwindow-navbtn-sel " + (tabPlacement == IADTab.LEFT ? "adwindow-left-navbtn-sel" : "adwindow-right-navbtn-sel"));
button.setDynamicProperty("disabled", null);
} else {
if (!tabbox.canNavigateTo(s, i)) {
button.setDynamicProperty("disabled", "disabled");
button.setSclass("adwindow-navbtn-dis");
button.setSclass("adwindow-navbtn-dis " + (tabPlacement == IADTab.LEFT ? "adwindow-left-navbtn-dis" : "adwindow-right-navbtn-dis"));
if (!tabbox.isDisplay(i))
button.setVisible(false);
else
button.setVisible(true);
} else {
button.setDynamicProperty("disabled", null);
button.setSclass("adwindow-navbtn-uns");
button.setSclass("adwindow-navbtn-uns " + (tabPlacement == IADTab.LEFT ? "adwindow-left-navbtn-uns" : "adwindow-right-navbtn-uns"));
button.setVisible(true);
}
}

View File

@ -125,7 +125,7 @@ public class ADWindowPanel extends AbstractADWindowPanel
layout.appendChild(west);
west.setSplittable(false);
west.setAutoscroll(true);
LayoutUtils.addSclass("adwindow-nav", west);
LayoutUtils.addSclass("adwindow-nav adwindow-left-nav", west);
adTab.setTabplacement(IADTab.LEFT);
adTab.getTabSelectionComponent().setParent(west);
}
@ -135,7 +135,7 @@ public class ADWindowPanel extends AbstractADWindowPanel
layout.appendChild(east);
east.setSplittable(false);
east.setAutoscroll(true);
LayoutUtils.addSclass("adwindow-nav", east);
LayoutUtils.addSclass("adwindow-nav adwindow-right-nav", east);
adTab.setTabplacement(IADTab.RIGHT);
adTab.getTabSelectionComponent().setParent(east);
}

View File

@ -105,6 +105,16 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
width: 200px;
}
.adwindow-left-nav {
border-right: 1px solid #7EAAC6;
border-left: none;
}
.adwindow-right-nav {
border-left: 1px solid #7EAAC6;
border-right: none;
}
.adwindow-nav-content {
background-color: #E0EAF7;
height: 100%;
@ -126,6 +136,20 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
font-weight: bold;
color: #274D5F;
cursor: pointer;
border-top: 1px solid #7EAAC6;
border-bottom: 1px solid #7EAAC6;
}
.adwindow-left-navbtn-sel {
border-left: 1px solid #7EAAC6;
border-right: none;
text-align: right;
}
.adwindow-right-navbtn-sel {
border-right: 1px solid #7EAAC6;
border-left: none;
text-align: left;
}
.adwindow-navbtn-uns {
@ -139,6 +163,23 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
background-color: #C4DCFB;
}
.adwindow-navbtn-uns, .adwindow-navbtn-dis {
border-top: 1px solid #CCCCCC;
border-bottom: 1px solid #CCCCCC;
}
.adwindow-left-navbtn-uns, .adwindow-left-navbtn-dis {
border-left: 1px solid #CCCCCC;
border-right: none;
text-align: right;
}
.adwindow-right-navbtn-uns, .adwindow-right-navbtn-dis {
border-right: 1px solid #CCCCCC;
border-left: none;
text-align: left;
}
<%-- ad tab --%>
.adtab-body {