| 1 |  |   | 
  | 2 |  |   | 
  | 3 |  |   | 
  | 4 |  |   | 
  | 5 |  |   | 
  | 6 |  |   | 
  | 7 |  |   | 
  | 8 |  |   | 
  | 9 |  |   | 
  | 10 |  |   | 
  | 11 |  |   | 
  | 12 |  |   | 
  | 13 |  |   | 
  | 14 |  |   | 
  | 15 |  |   | 
  | 16 |  |  package org.kuali.student.common.ui.client.widgets; | 
  | 17 |  |   | 
  | 18 |  |  import com.google.gwt.user.client.ui.Composite; | 
  | 19 |  |  import com.google.gwt.user.client.ui.HTML; | 
  | 20 |  |  import com.google.gwt.user.client.ui.HasHorizontalAlignment; | 
  | 21 |  |  import com.google.gwt.user.client.ui.HasVerticalAlignment; | 
  | 22 |  |  import com.google.gwt.user.client.ui.HorizontalPanel; | 
  | 23 |  |  import com.google.gwt.user.client.ui.Image; | 
  | 24 |  |  import com.google.gwt.user.client.ui.SimplePanel; | 
  | 25 |  |  import com.google.gwt.user.client.ui.VerticalPanel; | 
  | 26 |  |  import com.google.gwt.user.client.ui.Widget; | 
  | 27 |  |   | 
  | 28 |  |  public class KSLandingPage extends Composite{ | 
  | 29 | 0 |          private VerticalPanel layout = new VerticalPanel(); | 
  | 30 | 0 |          private SimplePanel wrapper = new SimplePanel(); | 
  | 31 | 0 |          private HorizontalPanel titlePanel = new HorizontalPanel(); | 
  | 32 | 0 |          private HorizontalPanel titleWidgetsPanel = new HorizontalPanel(); | 
  | 33 | 0 |          private HorizontalPanel innerLayout = new HorizontalPanel(); | 
  | 34 | 0 |          private VerticalPanel contentLayout = new VerticalPanel(); | 
  | 35 | 0 |          private VerticalPanel descLayout = new VerticalPanel(); | 
  | 36 | 0 |          private SimplePanel content = new SimplePanel(); | 
  | 37 | 0 |          private KSLabel titleLabel = new KSLabel(); | 
  | 38 | 0 |          private HTML largeDescription = new HTML(); | 
  | 39 |  |   | 
  | 40 | 0 |          public KSLandingPage(String title, String largeDescription){ | 
  | 41 | 0 |                  this.titleLabel.setText(title); | 
  | 42 | 0 |                  this.largeDescription.setHTML(largeDescription); | 
  | 43 | 0 |                  titlePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM); | 
  | 44 | 0 |                  titlePanel.add(titleLabel); | 
  | 45 | 0 |                  titlePanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT); | 
  | 46 | 0 |                  titlePanel.add(titleWidgetsPanel); | 
  | 47 | 0 |                  descLayout.add(this.largeDescription); | 
  | 48 | 0 |                  contentLayout.add(descLayout); | 
  | 49 | 0 |                  contentLayout.add(content); | 
  | 50 | 0 |                  innerLayout.add(contentLayout); | 
  | 51 | 0 |                  layout.add(titlePanel); | 
  | 52 | 0 |                  layout.add(innerLayout); | 
  | 53 | 0 |                  wrapper.setWidget(layout); | 
  | 54 | 0 |                  this.largeDescription.addStyleName("KS-LandingPage-Description"); | 
  | 55 | 0 |                  this.titleLabel.addStyleName("KS-LandingPage-Title"); | 
  | 56 | 0 |                  this.layout.addStyleName("KS-LandingPage-Panel"); | 
  | 57 | 0 |                  this.innerLayout.addStyleName("KS-LandingPage-ContentPanel"); | 
  | 58 | 0 |                  this.titlePanel.addStyleName("KS-LandingPage-TitlePanel"); | 
  | 59 | 0 |                  this.wrapper.addStyleName("KS-LandingPage"); | 
  | 60 |  |   | 
  | 61 | 0 |                  this.initWidget(wrapper); | 
  | 62 |  |   | 
  | 63 | 0 |          } | 
  | 64 |  |   | 
  | 65 | 0 |          public KSLandingPage(String title, Image mainImage, String largeDescription){ | 
  | 66 | 0 |                  this.titleLabel.setText(title); | 
  | 67 | 0 |                  this.largeDescription.setHTML(largeDescription); | 
  | 68 | 0 |                  innerLayout.add(mainImage); | 
  | 69 |  |   | 
  | 70 | 0 |                  titlePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM); | 
  | 71 | 0 |                  titlePanel.add(titleLabel); | 
  | 72 | 0 |                  titlePanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT); | 
  | 73 | 0 |                  titlePanel.add(titleWidgetsPanel); | 
  | 74 | 0 |                  descLayout.add(this.largeDescription); | 
  | 75 | 0 |                  contentLayout.add(descLayout); | 
  | 76 | 0 |                  contentLayout.add(content); | 
  | 77 | 0 |                  innerLayout.add(contentLayout); | 
  | 78 |  |   | 
  | 79 | 0 |                  layout.add(titlePanel); | 
  | 80 | 0 |                  layout.add(innerLayout); | 
  | 81 | 0 |                  wrapper.setWidget(layout); | 
  | 82 | 0 |                  this.largeDescription.addStyleName("KS-LandingPage-Description"); | 
  | 83 | 0 |                  this.titleLabel.addStyleName("KS-LandingPage-Title"); | 
  | 84 | 0 |                  this.layout.addStyleName("KS-LandingPage-Panel"); | 
  | 85 | 0 |                  this.innerLayout.addStyleName("KS-LandingPage-ContentPanel"); | 
  | 86 | 0 |                  this.titlePanel.addStyleName("KS-LandingPage-TitlePanel"); | 
  | 87 | 0 |                  this.wrapper.addStyleName("KS-LandingPage"); | 
  | 88 | 0 |                  this.titleWidgetsPanel.addStyleName("KS-LandingPage-TitleWidgetsPanel"); | 
  | 89 |  |   | 
  | 90 | 0 |                  this.initWidget(wrapper); | 
  | 91 | 0 |          } | 
  | 92 |  |   | 
  | 93 |  |          public void setContent(Widget content){ | 
  | 94 | 0 |                  this.content.setWidget(content); | 
  | 95 | 0 |          } | 
  | 96 |  |   | 
  | 97 |  |          public void setSubDescWidget(Widget sub){ | 
  | 98 | 0 |                  descLayout.add(sub); | 
  | 99 | 0 |          } | 
  | 100 |  |   | 
  | 101 |  |          public void addTitlePanelWidget(Widget widget){ | 
  | 102 | 0 |                  titleWidgetsPanel.setSpacing(5); | 
  | 103 | 0 |                  titleWidgetsPanel.add(widget); | 
  | 104 | 0 |          } | 
  | 105 |  |  } |