private void setupCSS() {

    if (position == UberfireDockPosition.SOUTH) {
      titlePanel.addStyleName(CSS.CSS().dockExpandedContentPanelSouth());
      title.addStyleName(CSS.CSS().dockExpandedLabelSouth());
      collapse.setIcon(IconType.CHEVRON_DOWN);
      collapse.addStyleName(CSS.CSS().dockExpandedButtonSouth());
    } else if (position == UberfireDockPosition.WEST) {
      title.addStyleName(CSS.CSS().dockExpandedLabelWest());
      collapse.setIcon(IconType.CHEVRON_LEFT);
      collapse.addStyleName(CSS.CSS().dockExpandedButtonWest());
    } else if (position == UberfireDockPosition.EAST) {
      title.addStyleName(CSS.CSS().dockExpandedLabelEast());
      collapse.setIcon(IconType.CHEVRON_RIGHT);
      collapse.addStyleName(CSS.CSS().dockExpandedButtonEast());
    }
    setupDockContentSize();
  }
示例#2
0
 /**
  * Sets the text of an optional heading. It is wrapped in {@code <h4>} tags and placed above the
  * text.
  */
 @Override
 public void setHeading(String text) {
   heading.setText(text);
   super.setHeading(heading.toString());
 }
 private void createTitle(String titleString) {
   title = new Heading(5);
   title.setText(titleString);
 }
示例#4
0
 private void setUp() {
   super.addStyleName(Constants.ALERT_BLOCK);
   heading.setStyleName(Constants.ALERT_HEADING);
   add(heading);
 }