项目:esup-ecandidat
文件:I18nField.java
/**
* Constructeur,initialisation du champs
* @param listeLangueEnService
* @param langueParDefaut
* @param libelleBtnPlus
*/
public I18nField(Langue langueParDefaut,List<Langue> listeLangueEnService,String libelleBtnPlus) {
super();
setrequired(false);
this.langueParDefaut = langueParDefaut;
this.listeLangueEnService = listeLangueEnService;
listLayoutTraductions = new ArrayList<HorizontalLayout>();
listeTraduction = new ArrayList<I18nTraduction>();
layoutComplet = new VerticalLayout();
layoutComplet.setSpacing(true);
layoutLangue = new VerticalLayout();
layoutLangue.setSpacing(true);
layoutComplet.addComponent(layoutLangue);
btnAddLangue = new OneClickButton(libelleBtnPlus,FontAwesome.PLUS_SQUARE_O);
btnAddLangue.setVisible(false);
btnAddLangue.addStyleName(ValoTheme.BUTTON_TINY);
layoutComplet.addComponent(btnAddLangue);
btnAddLangue.addClickListener(e->{
layoutLangue.addComponent(getLangueLayout(null));
checkVisibleAddLangue();
centerWindow();
});
}
项目:holon-vaadin7
文件:ExampleDialog.java
public void dialog1() {
// tag::dialog1[]
Dialog dialog = Components.dialog() // <1>
.draggable(false) // <2>
.closable(true) // <3>
.resizable(true) // <4>
.modal(true) // <5>
.message("Dialog message","dialog.message.code") // <6>
.okButtonConfigurator(cfg -> cfg.caption("Done").icon(FontAwesome.CHECK_CIRCLE_O)) // <7>
.withCloseListener((window,action) -> { // <8>
// ...
}).build();
dialog.open(); // <9>
dialog.close(); // <10>
// end::dialog1[]
}
项目:esup-ecandidat
文件:CandidatCreerCompteView.java
/**
* Rafraichi le panel de connexion sans compte
*/
private void refreshConnexionPanelStudent() {
vlConnexionIsstudent.removeAllComponents();
OneClickButton logBtn = new OneClickButton(
applicationContext.getMessage("btnConnect",null,UI.getCurrent().getLocale()),FontAwesome.SIGN_OUT);
logBtn.addClickListener(e -> {
userController.connectCAS();
});
HorizontalLayout hlConnect = new HorizontalLayout();
hlConnect.setSpacing(true);
Label labelConnect = new Label(
applicationContext.getMessage("accueilView.connect.cas",UI.getCurrent().getLocale()));
hlConnect.addComponent(labelConnect);
hlConnect.setComponentAlignment(labelConnect,Alignment.MIDDLE_LEFT);
hlConnect.addComponent(logBtn);
hlConnect.setComponentAlignment(logBtn,Alignment.MIDDLE_CENTER);
vlConnexionIsstudent.addComponent(hlConnect);
}
项目:esup-ecandidat
文件:CandidatViewTemplate.java
/** Ajoute des boutons de navigation
* @param prevIoUsView
* @param nextView
*/
public void setNavigationButton(String prevIoUsView,String nextView){
if (prevIoUsView!=null){
OneClickButton btnPrevIoUs = new OneClickButton(applicationContext.getMessage("btnPrevIoUs",FontAwesome.ARROW_CIRCLE_O_LEFT);
btnPrevIoUs.addClickListener(e->uiController.navigateto(prevIoUsView));
titleLayout.addComponent(btnPrevIoUs);
titleLayout.setComponentAlignment(btnPrevIoUs,Alignment.MIDDLE_LEFT);
}
if (nextView!=null){
OneClickButton btnNext = new OneClickButton(applicationContext.getMessage("btnNext",FontAwesome.ARROW_CIRCLE_O_RIGHT);
btnNext.addStyleName(ValoTheme.BUTTON_ICON_ALIGN_RIGHT);
btnNext.addClickListener(e->uiController.navigateto(nextView));
titleLayout.addComponent(btnNext);
titleLayout.setComponentAlignment(btnNext,Alignment.MIDDLE_RIGHT);
}
}
项目:esup-ecandidat
文件:MainUI.java
/**
* Construit le menu
*/
private void buildMenu() {
menu.addStyleName(ValoTheme.MENU_PART);
final OneClickButton showMenu = new OneClickButton(applicationContext.getMessage("mainUi.menu",getLocale()),FontAwesome.LIST);
showMenu.addStyleName(ValoTheme.BUTTON_PRIMARY);
showMenu.addStyleName(ValoTheme.BUTTON_SMALL);
showMenu.addStyleName(StyleConstants.VALO_MENU_TOGGLE);
showMenu.addClickListener(e -> {
if (menu.getStyleName().contains(StyleConstants.VALO_MENU_VISIBLE)) {
menu.removeStyleName(StyleConstants.VALO_MENU_VISIBLE);
} else {
menu.addStyleName(StyleConstants.VALO_MENU_VISIBLE);
}
});
menu.addComponent(showMenu);
menuButtonLayout.setPrimaryStyleName(StyleConstants.VALO_MENUITEMS);
menu.addComponent(menuButtonLayout);
constructMainMenu();
}
项目:esup-ecandidat
文件:SearchAnneeUnivApoField.java
/**
* Constructeur,initialisation du champs
* @param libelleBtnFind
*/
public SearchAnneeUnivApoField(String libelleBtnFind) {
super();
layout = new HorizontalLayout();
layout.setSpacing(true);
anneeField = new TextField();
anneeField.addValuechangelistener(e->showOrHideError());
anneeField.setNullRepresentation("");
anneeField.setReadOnly(true);
btnSearch = new OneClickButton(libelleBtnFind,FontAwesome.SEARCH);
btnSearch.addClickListener(e->{
SearchAnneeUnivApoWindow window = new SearchAnneeUnivApoWindow();
window.addAnneeUniListener(a->changeFieldValue(a));
UI.getCurrent().addWindow(window);
});
layout.addComponent(anneeField);
layout.addComponent(btnSearch);
}
项目:esup-ecandidat
文件:GridFormatting.java
/**
* Formate les colonnes en boolean : Ajoute une case a cocher a la place de O et
* N
*
* @param propertys
*/
private void addBooleanColumns(String... propertys) {
for (String property : propertys) {
Column col = getColumn(property).setRenderer(new HtmlRenderer(),new StringToBooleanConverter(
"<div style=width:100%;text-align:center>" + FontAwesome.CHECK_SQUARE_O.getHtml()
+ "</div>","<div style=width:100%;text-align:center>" + FontAwesome.SQUARE_O.getHtml() + "</div>"));
col.setWidth(119);
}
}
/**
* 创建删除按钮
* @return
*/
private Button createDeleteButton() {
Button deleteButton = new Button("删除",FontAwesome.CLOSE);
deleteButton.addStyleName(ValoTheme.BUTTON_DANGER);
deleteButton.addClickListener((Button.ClickListener) clickEvent -> {
//validate
Collection<Object> items = grid.getSelectedRows();
if(items.size() == 0){
Notification.show("请选中要删除的行!",Notification.Type.ERROR_MESSAGE);
return;
}
//batch delete
for (Object object : items) {
Item item = grid.getContainerDataSource().getItem(object);
if (item != null) {
Long id = (Long) item.getItemProperty("序号").getValue();
zookeeperConsumerRepository.delete(id);
}
}
search();
});
return deleteButton;
}
/**
* 创建保存按钮
* @return
*/
private Button createSaveButton() {
Button saveButton = new Button("保存",FontAwesome.CHECK);
saveButton.addStyleName(ValoTheme.BUTTON_PRIMARY);
saveButton.addClickListener((Button.ClickListener) clickEvent -> {
String name = nameField.getValue();
if (StringUtils.isEmpty(name)) {
Notification.show("服务名称不能为空!",Notification.Type.ERROR_MESSAGE);
return;
}
//insert data
ZookeeperApp zookeeperApp = new ZookeeperApp();
zookeeperApp.setName(name);
zookeeperAppRepository.save(zookeeperApp);
isAddSuccess = true;
close();
});
return saveButton;
}
/**
* 创建删除按钮
* @return
*/
private Button createDeleteButton() {
Button deleteButton = new Button("删除",Notification.Type.ERROR_MESSAGE);
return;
}
//batch delete
for (Object object : items) {
Item item = grid.getContainerDataSource().getItem(object);
if(item != null){
Long id = (Long) item.getItemProperty("序号").getValue();
zookeeperAppRepository.delete(id);
}
}
search();
});
return deleteButton;
}
/**
* 添加节点
* @param dubboServiceBean
* @param serviceName
* @param node
*/
private void addServiceNode(dubboServiceBean dubboServiceBean,String serviceName,String node) {
String serviceNode = serviceName + "->" + node;
viewTree.addItem(serviceNode);
viewTree.setParent(serviceNode,serviceName);
viewTree.expandItem(serviceNode);
List<String> nodeList = null;
if ("providers".equals(node)) {
nodeList = dubboServiceBean.getProvidersList();
} else if ("consumers".equals(node)) {
nodeList = dubboServiceBean.getConsumersList();
}
if (nodeList != null) {
for (String _node : nodeList) {
String url = dubboSwitchTool.decode(_node);
viewTree.addItem(url);
viewTree.setParent(url,_node);
viewTree.setItemIcon(url,FontAwesome.STAR_O);
viewTree.setChildrenAllowed(url,false);
}
}
}
/**
* 创建删除按钮
* @return
*/
private Button createDeleteButton() {
Button deleteButton = new Button("删除",Notification.Type.ERROR_MESSAGE);
return;
}
//batch delete
for (Object object : items) {
Item item = grid.getContainerDataSource().getItem(object);
if (item != null) {
Long id = (Long) item.getItemProperty("序号").getValue();
zookeeperProviderRepository.delete(id);
}
}
search();
});
return deleteButton;
}
项目:imotSpot
文件:DashboardView.java
private Component buildEditButton() {
Button result = new Button();
result.setId(EDIT_ID);
result.setIcon(FontAwesome.EDIT);
result.addStyleName("icon-edit");
result.addStyleName(ValoTheme.BUTTON_ICON_ONLY);
result.setDescription("Add Imot");
result.addClickListener(new ClickListener() {
@Override
public void buttonClick(final ClickEvent event) {
getUI().addWindow(
new AddingImot(DashboardView.this,titleLabel
.getValue()));
}
});
return result;
}
项目:imotSpot
文件:DashboardMenu.java
private Component buildToggleButton() {
Button valoMenuToggleButton = new Button("Menu",new ClickListener() {
@Override
public void buttonClick(final ClickEvent event) {
if (getCompositionRoot().getStyleName().contains(STYLE_VISIBLE)) {
getCompositionRoot().removeStyleName(STYLE_VISIBLE);
} else {
getCompositionRoot().addStyleName(STYLE_VISIBLE);
}
}
});
valoMenuToggleButton.setIcon(FontAwesome.LIST);
valoMenuToggleButton.addStyleName("valo-menu-toggle");
valoMenuToggleButton.addStyleName(ValoTheme.BUTTON_BORDERLESS);
valoMenuToggleButton.addStyleName(ValoTheme.BUTTON_SMALL);
return valoMenuToggleButton;
}
项目:kumoreg
文件:AttendeeDetailWindow.java
public AttendeeDetailWindow(AttendeePrintView parentView,AttendeeSearchPresenter handler) {
super("Attendee Detail");
this.handler = handler;
this.parentView = parentView;
setIcon(FontAwesome.USER);
center();
setModal(true);
setWidth(1100,Unit.PIXELS);
setHeight(800,Unit.PIXELS);
VerticalLayout verticalLayout = new VerticalLayout();
verticalLayout.setMargin(false);
verticalLayout.setSpacing(true);
form = new AttendeeDetailForm(this);
form.setAllFieldsButCheckIndisabled();
verticalLayout.addComponent(form);
verticalLayout.addComponent(buildSaveCancel());
setContent(verticalLayout);
btnSave.setClickShortcut(ShortcutAction.KeyCode.ENTER);
btnSave.addStyleName(ValoTheme.BUTTON_PRIMARY);
}
项目:kumoreg
文件:WarningWindow.java
public WarningWindow(String message) {
super("Warning");
setIcon(FontAwesome.WARNING);
setModal(true);
center();
lblMessage.setValue(message);
VerticalLayout verticalLayout = new VerticalLayout();
verticalLayout.setMargin(true);
verticalLayout.setSpacing(true);
verticalLayout.addComponent(lblMessage);
verticalLayout.addComponent(btnOk);
btnOk.focus();
btnOk.addClickListener((Button.ClickListener) clickEvent -> this.close());
setContent(verticalLayout);
btnOk.setClickShortcut(ShortcutAction.KeyCode.ENTER);
btnOk.addStyleName(ValoTheme.BUTTON_DANGER);
}
项目:vaadin-vertx-samples
文件:DashboardView.java
private Component buildEditButton() {
Button result = new Button();
result.setId(EDIT_ID);
result.setIcon(FontAwesome.EDIT);
result.addStyleName("icon-edit");
result.addStyleName(ValoTheme.BUTTON_ICON_ONLY);
result.setDescription("Edit Dashboard");
result.addClickListener(new ClickListener() {
@Override
public void buttonClick(final ClickEvent event) {
getUI().addWindow(
new DashboardEdit(DashboardView.this,titleLabel
.getValue()));
}
});
return result;
}
项目:vaadin-vertx-samples
文件:DashboardMenu.java
private Component buildToggleButton() {
Button valoMenuToggleButton = new Button("Menu",new ClickListener() {
@Override
public void buttonClick(final ClickEvent event) {
if (getCompositionRoot().getStyleName().contains(STYLE_VISIBLE)) {
getCompositionRoot().removeStyleName(STYLE_VISIBLE);
} else {
getCompositionRoot().addStyleName(STYLE_VISIBLE);
}
}
});
valoMenuToggleButton.setIcon(FontAwesome.LIST);
valoMenuToggleButton.addStyleName("valo-menu-toggle");
valoMenuToggleButton.addStyleName(ValoTheme.BUTTON_BORDERLESS);
valoMenuToggleButton.addStyleName(ValoTheme.BUTTON_SMALL);
return valoMenuToggleButton;
}
项目:vaadin-vertx-samples
文件:ProfilePreferencesWindow.java
private Component buildPreferencesTab() {
VerticalLayout root = new VerticalLayout();
root.setCaption("Preferences");
root.setIcon(FontAwesome.COGS);
root.setSpacing(true);
root.setMargin(true);
root.setSizefull();
Label message = new Label("Not implemented in this demo");
message.setSizeUndefined();
message.addStyleName(ValoTheme.LABEL_LIGHT);
root.addComponent(message);
root.setComponentAlignment(message,Alignment.MIDDLE_CENTER);
return root;
}
项目:hawkbit-examples
文件:SimulatorView.java
@Override
public String convertToPresentation(final Status value,final Class<? extends String> targettype,final Locale locale) {
switch (value) {
case UNKNWON:
return "<span class=\"v-icon grayicon\" style=\"font-family: " + FontAwesome.FONT_FAMILY
+ ";\"color\":\"gray\";\">&#x" + Integer.toHexString(FontAwesome.QUESTION_CIRCLE.getCodepoint())
+ HTML_SPAN;
case PednING:
return "<span class=\"v-icon yellowicon\" style=\"font-family: " + FontAwesome.FONT_FAMILY
+ ";\"color\":\"yellow\";\">&#x" + Integer.toHexString(FontAwesome.REFRESH.getCodepoint())
+ HTML_SPAN;
case FINISH:
return "<span class=\"v-icon greenicon\" style=\"font-family: " + FontAwesome.FONT_FAMILY
+ ";\"color\":\"green\";\">&#x" + Integer.toHexString(FontAwesome.CHECK_CIRCLE.getCodepoint())
+ HTML_SPAN;
case ERROR:
return "<span class=\"v-icon redicon\" style=\"font-family: " + FontAwesome.FONT_FAMILY
+ ";\"color\":\"red\";\">&#x"
+ Integer.toHexString(FontAwesome.EXCLAMATION_CIRCLE.getCodepoint()) + HTML_SPAN;
default:
throw new IllegalStateException("unkNown value");
}
}
项目:hawkbit-examples
文件:GenerateDialog.java
private void createOkButton(final GenerateDialogCallback callback) {
this.buttonOk = new Button("generate");
buttonOk.setImmediate(true);
buttonOk.setIcon(FontAwesome.GEARS);
buttonOk.addClickListener(event -> {
try {
callback.okButton(namePrefixTextField.getValue(),tenantTextField.getValue(),Integer.valueOf(amountTextField.getValue().replace(".","").replace(",","")),Integer.valueOf(pollDelayTextField.getValue().replace(".",new URL(pollUrlTextField.getValue()),gatewayTokenTextField.getValue(),(Protocol) protocolGroup.getValue());
} catch (final NumberFormatException | MalformedURLException e) {
LOGGER.info(e.getMessage(),e);
}
GenerateDialog.this.close();
});
}
项目:bookery
文件:BatchJobCard.java
private HorizontalLayout createHeader() {
captionLabel = new Label("some.batchjob");
Button deleteBatchJob = new Button(null,new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
presenter.deleteBatchJob(jobConfig);
for (BatchJobCard.Listener listener : listeners) {
listener.jobDeleted(BatchJobCard.this);
}
}
});
deleteBatchJob.setIcon(FontAwesome.TIMES_CIRCLE);
deleteBatchJob.addStyleName("borderless");
deleteBatchJob.addStyleName("icon-only");
HorizontalLayout captionLayout = new HorizontalLayout();
captionLayout.addStyleName("v-panel-caption");
captionLayout.setWidth("100%");
captionLayout.addComponents(captionLabel,deleteBatchJob);
captionLayout.setExpandratio(captionLabel,1);
return captionLayout;
}
public HorizontalLayout createtopBar() {
TextField filter = new TextField();
filter.setStyleName("filter-textfield");
filter.setInputPrompt("Filter");
ResetButtonForTextField.extend(filter);
filter.setImmediate(true);
filter.addTextchangelistener(event -> table.setFilter(event.getText()));
newProduct = new Button("New product");
newProduct.addStyleName(ValoTheme.BUTTON_PRIMARY);
newProduct.setIcon(FontAwesome.PLUS_CIRCLE);
newProduct.addClickListener(event -> viewLogic.newProduct());
HorizontalLayout topLayout = new HorizontalLayout();
topLayout.setSpacing(true);
topLayout.setWidth("100%");
topLayout.addComponent(filter);
topLayout.addComponent(newProduct);
topLayout.setComponentAlignment(filter,Alignment.MIDDLE_LEFT);
topLayout.setExpandratio(filter,1);
topLayout.setStyleName("top-bar");
return topLayout;
}
public MainScreen(MyUI ui) {
setStyleName("main-screen");
CssLayout viewContainer = new CssLayout();
viewContainer.addStyleName("valo-content");
viewContainer.setSizefull();
//final Navigator navigator = new Navigator(ui,viewContainer);
final Navigator navigator = new discoveryNavigator(ui,viewContainer);
navigator.setErrorView(ErrorView.class);
menu = new Menu(navigator);
menu.addView(new SampleCrudView(),SampleCrudView.VIEW_NAME,FontAwesome.EDIT);
menu.addView(new AboutView(),AboutView.VIEW_NAME,FontAwesome.INFO_CIRCLE);
navigator.addViewchangelistener(viewchangelistener);
addComponent(menu);
addComponent(viewContainer);
setExpandratio(viewContainer,1);
setSizefull();
}
项目:hawkbit
文件:UploadStatusInfoWindow.java
private void resizeWindow(final ClickEvent event) {
if (FontAwesome.EXPAND.equals(event.getButton().getIcon())) {
event.getButton().setIcon(FontAwesome.COMPRESS);
setwindowMode(WindowMode.MAXIMIZED);
resetColumnWidth();
grid.getColumn(STATUS).setExpandratio(0);
grid.getColumn(PROGRESS).setExpandratio(1);
grid.getColumn(FILE_NAME).setExpandratio(2);
grid.getColumn(REASON).setExpandratio(3);
grid.getColumn(SPUILabelDeFinitions.NAME_VERSION).setExpandratio(4);
mainLayout.setSizefull();
} else {
event.getButton().setIcon(FontAwesome.EXPAND);
setwindowMode(WindowMode.norMAL);
setColumnWidth();
setPopupSizeInMinMode();
}
}
项目:hawkbit
文件:ArtifactDetailsLayout.java
private void addGeneratedColumnButton(final Table table) {
table.addGeneratedColumn(ACTION,new ColumnGenerator() {
private static final long serialVersionUID = 1L;
@Override
public Button generateCell(final Table source,final Object itemId,final Object columnId) {
final String fileName = (String) table.getContainerDataSource().getItem(itemId)
.getItemProperty(PROVIDED_FILE_NAME).getValue();
final Button deleteIcon = SPUIComponentProvider.getButton(
fileName + "-" + UIComponentIdProvider.UPLOAD_FILE_DELETE_ICON,"",SPUILabelDeFinitions.disCARD,ValoTheme.BUTTON_TINY + " " + "blueicon",true,FontAwesome.TRASH_O,SPUIButtonStyleSmallNoBorder.class);
deleteIcon.setData(itemId);
deleteIcon.addClickListener(event -> confirmAndDeleteArtifact((Long) itemId,fileName));
return deleteIcon;
}
});
}
项目:FontAwesomeRenderer
文件:DemoUI.java
@Override
protected void init(VaadinRequest request) {
// Show it in the middle of the screen
final VerticalLayout layout = new VerticalLayout();
layout.setStyleName("demoContentLayout");
layout.setSizefull();
setContent(layout);
Grid grid = new Grid();
grid.addColumn("name",String.class).setHeaderCaption("Name");
grid.addColumn("icon",String.class)
.setHeaderCaption("icon")
.setRenderer(new FontIconRenderer(e -> Notification.show(e.toString())));
grid.getDefaultHeaderRow().join("name","icon").setText("Brand");
grid.addRow("Android",FontAwesome.ANDROID.getHtml());
grid.addRow("Ios",FontAwesome.APPLE.getHtml());
grid.addRow("Who cares",FontAwesome.WINDOWS.getHtml());
layout.addComponent(grid);
}
项目:hawkbit
文件:AbstractDeleteActionsLayout.java
private DragAndDropWrapper createDeleteWrapperLayout() {
final Button dropToDelete = new Button(i18n.getMessage("label.components.drop.area"));
dropToDelete.setCaptionAsHtml(true);
dropToDelete.setIcon(FontAwesome.TRASH_O);
dropToDelete.addStyleName(ValoTheme.BUTTON_BORDERLESS);
dropToDelete.addStyleName("drop-to-delete-button");
dropToDelete.addStyleName(SPUIStyleDeFinitions.ACTION_BUTTON);
dropToDelete.addStyleName(SPUIStyleDeFinitions.DEL_ACTION_BUTTON);
dropToDelete.addStyleName("delete-icon");
final DragAndDropWrapper wrapper = new DragAndDropWrapper(dropToDelete);
wrapper.setStyleName(ValoTheme.BUTTON_PRIMARY);
wrapper.setId(getDeleteAreaId());
wrapper.setDropHandler(this);
wrapper.addStyleName("delete-button-border");
return wrapper;
}
private HierarchicalContainer createNavigationContainer() {
HierarchicalContainer container = new HierarchicalContainer();
container.addContainerProperty("name",String.class,"?");
container.addContainerProperty("tecName","");
container.addContainerProperty("object",NavNode.class,null);
container.addContainerProperty("theme",false);
container.addContainerProperty("acl",Boolean.class,false);
container.addContainerProperty("pageType","");
container.addContainerProperty("hidden",false);
container.addContainerProperty("icon",FontAwesome.class,null);
String host = ((ControlUi)GuiUtil.getApi()).getHost();
VirtualHost vHost = MApi.lookup(CherryApi.class).findVirtualHost(host);
NavNode navRoot = vHost.getNavigationProvider().getNode("/");
try {
Item item = container.addItem(navRoot.getId());
fillItem(item,navRoot);
container.setParent(navRoot.getId(),null);
container.setChildrenAllowed(navRoot.getId(),true);
} catch (Throwable t) {
MLogUtil.log().i(t);
}
return container;
}
项目:hawkbit
文件:MultipleTargetFilter.java
/**
* Intialize component.
*/
private void buildComponents() {
filterByStatusFotter.init();
filterByButtons.addStyleName(SPUIStyleDeFinitions.NO_TOP_BORDER);
targetFilterQueryButtonsTab.init(customTargetTagFilterButtonClick);
if (permChecker.hasCreateTargetPermission() || permChecker.hasUpdateTargetPermission()) {
config = SPUIComponentProvider.getButton(UIComponentIdProvider.ADD_TARGET_TAG,FontAwesome.COG,SPUIButtonStyleSmallNoBorder.class);
config.addClickListener(event -> settingsIconClicked());
}
addStyleName(ValoTheme.ACCORdioN_BORDERLESS);
addTabs();
setSizefull();
switchToTabSelectedOnLoad();
addSelectedTabchangelistener(this);
}
项目:hybridbpm
文件:LookAndFeelLayout.java
public LookAndFeelLayout(BeanFieldGroup<DiagrammePreference> preferences) {
super(preferences);
addComponent(splitLayout);
chartSplit.addComponent(chartContainer);
chartSplit.addComponent(btnPreview);
btnPreview.setIcon(FontAwesome.PLAY);
chartSplit.setComponentAlignment(chartContainer,Alignment.MIDDLE_CENTER);
chartSplit.setExpandratio(chartContainer,1f);
chartSplit.setSizefull();
colourContainer.setSizefull();
splitLayout.setSizefull();
splitLayout.addComponent(chartSplit);
splitLayout.setSplitPosition(70f);
splitLayout.addComponent(colourContainer);
bindHandlers();
}
private void prepareComponents() {
name.setIcon(FontAwesome.ARROW_RIGHT);
name.setWidth(100,Unit.PERCENTAGE);
((AceEditor) valueEditor).setTheme(AceTheme.textmate);
((AceEditor) valueEditor).setShowGutter(true);
((AceEditor) valueEditor).setSizefull();
((AceEditor) valueEditor).setHeight(150,Unit.PIXELS);
if (Objects.equals(type,TYPE.INPUT)) {
((AceEditor) valueEditor).setMode(AceMode.groovy);
} else {
((AceEditor) valueEditor).setMode(AceMode.json);
}
valueEditor.setWidth(100,Unit.PERCENTAGE);
if (suggester != null) {
SuggestionExtension extension = new SuggestionExtension(suggester);
extension.setSuggestOnDot(false);
extension.extend(valueEditor);
}
}
private Button getPinBtn(final Object itemId) {
final Item item = getContainerDataSource().getItem(itemId);
final String name = (String) item.getItemProperty(SPUILabelDeFinitions.VAR_NAME).getValue();
final String version = (String) item.getItemProperty(SPUILabelDeFinitions.VAR_VERSION).getValue();
final distributionSetIdName distributionSetIdName = new distributionSetIdName((Long) itemId,name,version);
final Button pinBtn = new Button();
pinBtn.setIcon(FontAwesome.THUMB_TACK);
pinBtn.setHeightUndefined();
pinBtn.addStyleName(getPinStyle());
pinBtn.setData(distributionSetIdName);
pinBtn.setId(getPinButtonId(name,version));
pinBtn.setImmediate(true);
return pinBtn;
}
项目:hawkbit
文件:ManangementConfirmationWindowLayout.java
private void deletealldistributions(final ConfirmationTab tab) {
final Collection<Long> deletedIds = managementUIState.getDeleteddistributionList().stream()
.map(distributionSetIdName::getId).collect(Collectors.toList());
distributionSetManagement.delete(deletedIds);
eventBus.publish(this,new distributionTableEvent(BaseEntityEventType.REMOVE_ENTITY,deletedIds));
addToConsolitatedMsg(FontAwesome.TRASH_O.getHtml() + SPUILabelDeFinitions.HTML_SPACE
+ i18n.getMessage("message.dist.deleted",managementUIState.getDeleteddistributionList().size()));
removeDeleteddistributionsFromAssignmentTab();
removeCurrentTab(tab);
setActionMessage(i18n.getMessage("message.dist.delete.success"));
managementUIState.getTargetTableFilters().getPinneddistId()
.ifPresent(distId -> unPinDeletedDS(deletedIds,distId));
managementUIState.getDeleteddistributionList().clear();
}
public void initUI() {
removeAllComponents();
btnAdd.setCaption(("Add parameter"));
btnAdd.setStyleName(ValoTheme.BUTTON_LINK);
btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
setMargin(true);
setSpacing(true);
setWidth(100,Sizeable.Unit.PERCENTAGE);
for (FieldModel fieldModel : connectoModel.getInParameters()) {
FieldForm fieldForm = new FieldForm(FieldForm.CLASS_LIST_TYPE.BOTH);
fieldForm.setFieldModel(fieldModel);
addComponent(fieldForm);
}
addComponent(btnAdd);
setComponentAlignment(btnAdd,Alignment.MIDDLE_RIGHT);
}
项目:hybridbpm
文件:AbstractEditor.java
public AbstractEditor() {
setSizefull();
setSpacing(true);
setMargin(new MarginInfo(true,false,false));
addComponent(buttonbar);
setComponentAlignment(buttonbar,Alignment.MIDDLE_RIGHT);
addComponent(horizontalsplitpanel);
setExpandratio(horizontalsplitpanel,1f);
horizontalsplitpanel.setSizefull();
horizontalsplitpanel.setStyleName("transparent");
buttonbar.setSpacing(true);
buttonbar.setSpacing(true);
btnSave.setIcon(FontAwesome.SAVE);
btnSave.setStyleName(ValoTheme.BUTTON_BORDERLESS);
btnSave.addStyleName(ValoTheme.BUTTON_SMALL);
btnSave.addStyleName(ValoTheme.BUTTON_PRIMARY);
}
项目:hybridbpm
文件:DataEditor.java
private void prepareModeler() {
btnAdd.setCaption("Add field");
btnAdd.setIcon(FontAwesome.PLUS_CIRCLE);
btnAdd.setStyleName(ValoTheme.BUTTON_LINK);
btnAdd.addStyleName(ValoTheme.BUTTON_SMALL);
modelerLayout.setMargin(true);
modelerLayout.setSpacing(true);
modelerLayout.setWidth(100,Sizeable.Unit.PERCENTAGE);
for (FieldModel fieldModel : dataModel.getFields()) {
FieldForm fieldForm = new FieldForm(FieldForm.CLASS_LIST_TYPE.BOTH);
fieldForm.setFieldModel(fieldModel);
modelerLayout.addComponent(fieldForm);
}
modelerLayout.addComponent(btnAdd);
modelerLayout.setComponentAlignment(btnAdd,Alignment.MIDDLE_RIGHT);
}
private void saveAllAssignments(final ConfirmationTab tab) {
managedistUIState.getAssignedList().forEach((distIdName,softIdNameSet) -> {
final List<Long> softIds = softIdNameSet.stream().map(softIdName -> softIdName.getId())
.collect(Collectors.toList());
distributionSetManagement.assignSoftwareModules(distIdName.getId(),softIds);
});
int count = 0;
for (final Entry<distributionSetIdName,HashSet<SoftwareModuleIdName>> entry : managedistUIState
.getAssignedList().entrySet()) {
count += entry.getValue().size();
}
addToConsolitatedMsg(FontAwesome.TASKS.getHtml() + SPUILabelDeFinitions.HTML_SPACE
+ i18n.getMessage("message.software.assignment",new Object[] { count }));
managedistUIState.getAssignedList().clear();
managedistUIState.getConsolidateddistSoftwarewList().clear();
removeCurrentTab(tab);
eventBus.publish(this,SaveActionWindowEvent.SAVED_ASSIGNMENTS);
}
项目:componentrenderer
文件:ViewComponents.java
public static Component createFoodIcon(Customer cust) {
Label label = new Label(FontAwesome.HOURGLASS_2.getHtml(),ContentMode.HTML);
label.setHeight(24,Sizeable.Unit.PIXELS);
label.setWidth(30,Sizeable.Unit.PIXELS);
if (cust.getFood() == Customer.Food.HAMBURGER) {
label.setValue(FontAwesome.AMBULANCE.getHtml());
}
if (cust.getFood() == Customer.Food.FISH) {
label.setValue(FontAwesome.HEART.getHtml());
}
if (cust.getFood() == Customer.Food.vegetaBLES) {
label.setValue(FontAwesome.SUN_O.getHtml());
}
return label;
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。