| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
package org.kuali.student.common.ui.client.widgets.buttonlayout; |
| 17 |
|
|
| 18 |
|
import org.kuali.student.common.ui.client.widgets.KSButton; |
| 19 |
|
|
| 20 |
|
import com.google.gwt.user.client.ui.DockPanel; |
| 21 |
|
import com.google.gwt.user.client.ui.HasAlignment; |
| 22 |
|
import com.google.gwt.user.client.ui.SimplePanel; |
| 23 |
|
import com.google.gwt.user.client.ui.VerticalPanel; |
| 24 |
|
import com.google.gwt.user.client.ui.Widget; |
| 25 |
|
|
|
|
|
| 0% |
Uncovered Elements: 42 (42) |
Complexity: 10 |
Complexity Density: 0.33 |
|
| 26 |
|
public class ButtonColumn extends ButtonLayoutTwoGroups{ |
| 27 |
|
private VerticalPanel topPanel = new VerticalPanel(); |
| 28 |
|
private VerticalPanel bottomPanel = new VerticalPanel(); |
| 29 |
|
private SimplePanel contentPanel = new SimplePanel(); |
| 30 |
|
private DockPanel mainPanel = new DockPanel(); |
| 31 |
|
private Widget content = null; |
| 32 |
|
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
| 33 |
0
|
public ButtonColumn(){... |
| 34 |
0
|
setupDefaultStyles(); |
| 35 |
0
|
mainPanel.add(contentPanel, DockPanel.WEST); |
| 36 |
0
|
mainPanel.add(topPanel, DockPanel.NORTH); |
| 37 |
0
|
mainPanel.setVerticalAlignment(HasAlignment.ALIGN_BOTTOM); |
| 38 |
0
|
mainPanel.add(bottomPanel, DockPanel.SOUTH); |
| 39 |
0
|
this.initWidget(mainPanel); |
| 40 |
|
} |
| 41 |
|
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 2 |
Complexity Density: 0.25 |
|
| 42 |
0
|
public ButtonColumn(boolean contentRight){... |
| 43 |
0
|
setupDefaultStyles(); |
| 44 |
0
|
if(contentRight){ |
| 45 |
0
|
mainPanel.add(contentPanel, DockPanel.EAST); |
| 46 |
|
} |
| 47 |
|
else{ |
| 48 |
0
|
mainPanel.add(contentPanel, DockPanel.WEST); |
| 49 |
|
} |
| 50 |
0
|
mainPanel.add(topPanel, DockPanel.NORTH); |
| 51 |
0
|
mainPanel.setVerticalAlignment(HasAlignment.ALIGN_BOTTOM); |
| 52 |
0
|
mainPanel.add(bottomPanel, DockPanel.SOUTH); |
| 53 |
0
|
this.initWidget(mainPanel); |
| 54 |
|
} |
| 55 |
|
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 56 |
0
|
private void setupDefaultStyles(){... |
| 57 |
0
|
mainPanel.addStyleName("KS-Button-Column-MainPanel"); |
| 58 |
0
|
topPanel.addStyleName("KS-Button-Column-TopPanel"); |
| 59 |
0
|
bottomPanel.addStyleName( "KS-Button-Column-BottomPanel"); |
| 60 |
0
|
contentPanel.addStyleName("KS-Button-Column-ContentPanel"); |
| 61 |
|
} |
| 62 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 63 |
0
|
@Override... |
| 64 |
|
protected void onLoad() { |
| 65 |
0
|
super.onLoad(); |
| 66 |
0
|
if(content != null){ |
| 67 |
0
|
mainPanel.setHeight(content.getOffsetHeight() + "px"); |
| 68 |
|
} |
| 69 |
|
} |
| 70 |
|
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 71 |
0
|
@Override... |
| 72 |
|
public void setContent(Widget w) { |
| 73 |
0
|
contentPanel.setWidget(w); |
| 74 |
0
|
content = w; |
| 75 |
|
} |
| 76 |
|
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 77 |
0
|
@Override... |
| 78 |
|
public void addButtonToPrimaryGroup(KSButton button) { |
| 79 |
0
|
button.addStyleName("KS-Button-Column-Button"); |
| 80 |
0
|
topPanel.add(button); |
| 81 |
0
|
buttons.add(button); |
| 82 |
|
} |
| 83 |
|
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 84 |
0
|
@Override... |
| 85 |
|
public void addButtonToSecondaryGroup(KSButton button) { |
| 86 |
0
|
button.addStyleName("KS-Button-Column-Button"); |
| 87 |
0
|
bottomPanel.add(button); |
| 88 |
0
|
buttons.add(button); |
| 89 |
|
} |
| 90 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 91 |
0
|
@Override... |
| 92 |
|
public void addButton(KSButton button) { |
| 93 |
0
|
this.addButtonToPrimaryGroup(button); |
| 94 |
|
|
| 95 |
|
} |
| 96 |
|
} |