PL-7593 Ability to style GroupBox as Vaadin Panel

This commit is contained in:
Nikita Petunin 2016-08-22 17:55:10 +04:00
parent 542f64bb13
commit d61039858b
4 changed files with 13 additions and 13 deletions

View File

@ -38,7 +38,7 @@ public class DesktopGroupBox extends DesktopAbstractBox implements GroupBoxLayou
protected List<ExpandedStateChangeListener> expandedStateChangeListeners;
protected boolean settingsEnabled = true;
protected boolean shownAsPanel;
protected boolean showAsPanel;
public DesktopGroupBox() {
collapsiblePanel = new CollapsiblePanel(super.getComposition());
@ -225,12 +225,12 @@ public class DesktopGroupBox extends DesktopAbstractBox implements GroupBoxLayou
@Override
public void setShowAsPanel(boolean showAsPanel) {
this.shownAsPanel = showAsPanel;
this.showAsPanel = showAsPanel;
}
@Override
public boolean isShowAsPanel() {
return shownAsPanel;
return showAsPanel;
}
@Override

View File

@ -55,7 +55,7 @@ public class GroupBoxLayoutLoader extends ContainerLoader<GroupBoxLayout> {
loadSpacing(resultComponent, element);
loadSubComponentsAndExpand(resultComponent, element);
loadShownAsPanel(resultComponent, element);
loadShowAsPanel(resultComponent, element);
}
protected void loadOrientation(GroupBoxLayout component, Element element) {
@ -74,7 +74,7 @@ public class GroupBoxLayoutLoader extends ContainerLoader<GroupBoxLayout> {
}
}
protected void loadShownAsPanel(GroupBoxLayout component, Element element) {
protected void loadShowAsPanel(GroupBoxLayout component, Element element) {
String showAsPanel = element.attributeValue("showAsPanel");
if (StringUtils.isNotEmpty(showAsPanel)) {
component.setShowAsPanel(Boolean.parseBoolean(showAsPanel));

View File

@ -164,7 +164,7 @@ public class CubaGroupBoxConnector extends PanelConnector {
widget.setCollapsable(getState().collapsable);
widget.setExpanded(getState().expanded);
widget.setShownAsPanel(getState().showAsPanel);
widget.setShowAsPanel(getState().showAsPanel);
if (!widgetInitialized) {
widget.init();

View File

@ -33,7 +33,7 @@ public class CubaGroupBoxWidget extends VPanel implements HasEnabled {
protected boolean collapsable = false;
protected boolean shownAsPanel = false;
protected boolean showAsPanel = false;
private boolean enabled = true;
@ -56,7 +56,7 @@ public class CubaGroupBoxWidget extends VPanel implements HasEnabled {
}
public void init() {
if (!isShownAsPanel()) {
if (!isShowAsPanel()) {
captionNode.setClassName(getStylePrimaryName() + "-caption");
contentNode.setClassName(getStylePrimaryName() + "-content");
bottomDecoration.setClassName(getStylePrimaryName() + "-deco");
@ -170,14 +170,14 @@ public class CubaGroupBoxWidget extends VPanel implements HasEnabled {
DOM.eventCancelBubble(event, true);
}
public void setShownAsPanel(boolean shownAsPanel) {
if (isShownAsPanel() != shownAsPanel) {
this.shownAsPanel = shownAsPanel;
public void setShowAsPanel(boolean showAsPanel) {
if (isShowAsPanel() != showAsPanel) {
this.showAsPanel = showAsPanel;
}
}
public boolean isShownAsPanel() {
return shownAsPanel;
public boolean isShowAsPanel() {
return showAsPanel;
}
public interface ExpandHandler {