use of org.gwtbootstrap3.client.ui.Label in project ovirt-engine by oVirt.
the class FunctionPolicyUnitPanel method initWidget.
@Override
public void initWidget() {
FlowPanel namePanel = getNamePanel(policyUnit);
if (!used) {
namePanel.setStyleName(style.unusedPolicyUnitStyle());
} else {
final Label weightLabel = createWeightLabel();
final Button downButton = createDownButton(weightLabel);
if (factor == 1) {
downButton.setEnabled(false);
}
Button upButton = createUpButton(weightLabel, downButton);
if (!locked || policyUnit.isEnabled()) {
namePanel.insert(upButton, 0);
}
namePanel.insert(weightLabel, 0);
if (!locked || policyUnit.isEnabled()) {
namePanel.insert(downButton, 0);
}
namePanel.setStyleName(style.usedFilterPolicyUnitStyle());
}
if (!policyUnit.isEnabled()) {
namePanel.getElement().getStyle().setOpacity(0.5);
}
setWidget(namePanel);
}
use of org.gwtbootstrap3.client.ui.Label in project ovirt-engine by oVirt.
the class AbstractMainWithDetailsTableView method setActiveTags.
public void setActiveTags(List<TagModel> tags) {
resultList.clear();
for (final TagModel tag : tags) {
ListItem tagItem = new ListItem();
Span label = new Span();
label.addStyleName(Styles.LABEL);
label.addStyleName(PatternflyConstants.PF_LABEL_INFO);
label.setText(tag.getName().getEntity());
Anchor deactivateAnchor = new Anchor();
Span closeIconSpan = new Span();
closeIconSpan.addStyleName(PatternflyIconType.PF_BASE.getCssName());
closeIconSpan.addStyleName(PatternflyIconType.PF_CLOSE.getCssName());
deactivateAnchor.add(closeIconSpan);
deactivateAnchor.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
tag.setSelection(false);
}
});
label.add(deactivateAnchor);
tagItem.add(label);
resultList.add(tagItem);
}
resultRow.setVisible(!tags.isEmpty());
}
use of org.gwtbootstrap3.client.ui.Label in project ovirt-engine by oVirt.
the class NetworkOutOfSyncPanel method createLabel.
private Label createLabel(String text, boolean boldText) {
Label output = new Label(text);
output.getElement().getStyle().setBackgroundColor(BACKGROUND_COLOR);
if (boldText) {
output.getElement().getStyle().setFontWeight(FontWeight.BOLD);
}
final String textColor = boldText ? WHITE_TEXT_COLOR : TEXT_COLOR;
output.getElement().getStyle().setColor(textColor);
return output;
}
use of org.gwtbootstrap3.client.ui.Label in project ovirt-engine by oVirt.
the class NetworkOutOfSyncPanel method addOutOfSyncRow.
private void addOutOfSyncRow(List<Label> values, TextAlign textAlign, boolean bottomBorderSolid) {
Row row = new Row();
Column mainColumn = new Column(MAIN_COLUMN_SIZE);
boolean firstTime = true;
for (Label label : values) {
Column subColumn;
if (firstTime) {
subColumn = new Column(PROPERTY_COLUMN_SIZE);
firstTime = false;
} else {
subColumn = new Column(COLUMN_SIZE);
subColumn.getElement().getStyle().setTextAlign(textAlign);
}
subColumn.add(label);
mainColumn.add(subColumn);
}
row.add(mainColumn);
if (bottomBorderSolid) {
Row container = new Row();
container.setPaddingBottom(4);
container.add(row);
// $NON-NLS-1$ //$NON-NLS-2$
container.getElement().getStyle().setProperty("margin", "0 0 4px");
// $NON-NLS-1$ //$NON-NLS-2$
container.getElement().getStyle().setProperty("borderBottomStyle", "solid");
// $NON-NLS-1$ //$NON-NLS-2$
container.getElement().getStyle().setProperty("borderWidth", "1px");
flowPanel.add(container);
} else {
flowPanel.add(row);
}
}
Aggregations