当前位置: 首页>>代码示例>>Java>>正文


Java SimpleAttributeModifier类代码示例

本文整理汇总了Java中org.apache.wicket.behavior.SimpleAttributeModifier的典型用法代码示例。如果您正苦于以下问题:Java SimpleAttributeModifier类的具体用法?Java SimpleAttributeModifier怎么用?Java SimpleAttributeModifier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SimpleAttributeModifier类属于org.apache.wicket.behavior包,在下文中一共展示了SimpleAttributeModifier类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initContainerIconeContribuicoes

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
private void initContainerIconeContribuicoes() {
	containerIconeSugestoes = new WebMarkupContainer("containerIconeSugestoes") {
		private static final long serialVersionUID = 1L;

		@Override
		protected void onConfigure() {
			super.onConfigure();
			setVisible(Boolean.parseBoolean(UIUtils.getPortletPreferences().getValue("habilitaSugestoes", "true")));
			
			ArtigoDisplay objeto = WikiLegisArtigoPanel.this.getModelObject();
			if (objeto.getNumeroSugestoes() != 0)
				add(new SimpleAttributeModifier("class", "iconesSugestaoWikilegis"));

		}
	};
	containerIconeSugestoes.setOutputMarkupId(true);
	add(containerIconeSugestoes);
}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:19,代码来源:WikiLegisArtigoPanel.java

示例2: initContainerIconeComentarios

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
private void initContainerIconeComentarios() {
	containerIconeComentarios = new WebMarkupContainer("containerIconeComentarios") {
		private static final long serialVersionUID = 1L;

		@Override
		protected void onConfigure() {
			super.onConfigure();
			ArtigoDisplay objeto = WikiLegisArtigoPanel.this.getModelObject();
			if (objeto.getNumeroComentarios() != 0)
				add(new SimpleAttributeModifier("class", "iconesComentarioWikilegis"));
			else
				add(new SimpleAttributeModifier("class", "demaisIconesWikilegis"));

		}
	};
	containerIconeComentarios.setOutputMarkupId(true);
	add(containerIconeComentarios);

}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:20,代码来源:WikiLegisArtigoPanel.java

示例3: LinkPanel

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
public LinkPanel(String wicketId, String bootstrapIcon, String linkCssClass, IModel<String> model,
		Class<? extends WebPage> clazz, PageParameters parameters, boolean newWindow) {
	super(wicketId);
	this.labelModel = model;
	Link<Void> link = null;
	if (parameters == null) {
		link = new BookmarkablePageLink<Void>("link", clazz);
	} else {
		link = new BookmarkablePageLink<Void>("link", clazz, parameters);
	}
	if (newWindow) {
		link.add(new SimpleAttributeModifier("target", "_blank"));
	}
	if (linkCssClass != null) {
		link.add(new SimpleAttributeModifier("class", linkCssClass));
	}
	Label icon = new Label("icon");
	if (StringUtils.isEmpty(bootstrapIcon)) {
		link.add(icon.setVisible(false));
	} else {
		WicketUtils.setCssClass(icon, bootstrapIcon);
		link.add(icon);
	}
	link.add(new Label("label", labelModel).setRenderBodyOnly(true));
	add(link);
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:27,代码来源:LinkPanel.java

示例4: initComponents

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
private void initComponents() {
    SimpleSearch simpleSearch = getSimpleSearch();
    
    add(new SearchFormCollectionPanel("collectionSearchPanel"));
    
    WebMarkupContainer contenuContainer = new WebMarkupContainer("contenuContainer");
    if (simpleSearch.getAdvancedSearchRule() != null) {
    	contenuContainer.add(new SimpleAttributeModifier("style", "width:530px; margin-left:0px;"));
    }
    
    
    add(contenuContainer);
    UserStatusPanel userStatusPanel = new UserStatusPanel("userStatusPanel", new Model(simpleSearch));
    if (simpleSearch.getAdvancedSearchRule() != null) {
    	userStatusPanel.add(new SimpleAttributeModifier("style", "width:100%;"));
    }
    contenuContainer.add(new SearchFormPanel("searchFormPanel", new Model(simpleSearch)));
    contenuContainer.add(userStatusPanel);
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:20,代码来源:SearchFormPage.java

示例5: newAddRuleButton

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
private Button newAddRuleButton(final SimpleSearch clonedSimpleSearch,
		final SearchRule rule) {
	Button addRule = new Button("addRule");
	
	SearchRule addedSearchRule;
	
	if (rule instanceof TextSearchRule) {
		addedSearchRule = rule.cloneRule();
	} else {
		addedSearchRule = SearchRulesFactory.getDefaultSearchRule();
	}
	
	String url = getAddRuleUrl(clonedSimpleSearch, rule, addedSearchRule);
	addRule.add(new SimpleAttributeModifier("name", "addRule"));
	addRule.add(new SimpleAttributeModifier("onclick", url));
	return addRule;
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:18,代码来源:AdvancedSearchPanel.java

示例6: onBeforeRender

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
@Override
protected void onBeforeRender() {
	String style;
	if (isAdvancedForm()) {
		style = "vertical-align: top; width:100%; margin-left:0px;";
	} else {
		style = "vertical-align: top;";
	}
	contenuContainer.add(new SimpleAttributeModifier("style", style));
	
       if (isAdvancedForm()) {
       	userStatusPanel.add(new SimpleAttributeModifier("style", "width:100%;"));
       	String idContainer = isAdvancedForm() ? "contenuRechAvancee" : "contenuRech";
       	userStatusContainer.add(new SimpleAttributeModifier("id", idContainer));
       }
	
	super.onBeforeRender();
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:19,代码来源:BaseSearchResultsPageHeaderPanel.java

示例7: GravatarImage

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
public GravatarImage(String id, PersonIdent person, int width, boolean linked) {
	super(id);

	String email = person.getEmailAddress() == null ? person.getName().toLowerCase() : person.getEmailAddress().toLowerCase();
	String hash = StringUtils.getMD5(email);
	Link<Void> link = new BookmarkablePageLink<Void>("link", GravatarProfilePage.class,
			WicketUtils.newObjectParameter(hash));
	link.add(new SimpleAttributeModifier("target", "_blank"));
	String url = ActivityUtils.getGravatarThumbnailUrl(email, width);
	ExternalImage image = new ExternalImage("image", url);
	WicketUtils.setCssClass(image, "gravatar");
	link.add(image);
	if (linked) {
		WicketUtils.setHtmlTooltip(link,
			MessageFormat.format("View Gravatar profile for {0}", person.getName()));
	} else {
		WicketUtils.setHtmlTooltip(link, person.getName());
	}
	add(link.setEnabled(linked));
	setVisible(GitBlit.getBoolean(Keys.web.allowGravatar, true));
}
 
开发者ID:BullShark,项目名称:IRCBlit,代码行数:22,代码来源:GravatarImage.java

示例8: MenuPanel

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
public MenuPanel(String id, List<MenuItem> menuItemList, final int selectedMenuItemIndex) {
  super(id);

  ListView<MenuItem> menuItems = new ListView<MenuItem>("menuItems", menuItemList) {
    int counter = 0;

    @Override
    protected void populateItem(ListItem<MenuItem> item) {
      MenuItem menuItem = item.getModelObject();
      BookmarkablePageLink<Page> link = new BookmarkablePageLink<Page>("menuItemLink",
          menuItem.getPageClass(), menuItem.getPageParameters());
      link.add(menuItem.getCaption());
      item.add(link);

      if (counter == selectedMenuItemIndex) {
        if (counter > 0)          
          item.add(new SimpleAttributeModifier("class", "delimiter selected"));
        else
          item.add(new SimpleAttributeModifier("class", "selected"));
      } else {
        if (counter > 0)
          item.add(new SimpleAttributeModifier("class", "delimiter"));          
      }
      counter++;
    }
  };
  add(menuItems);
}
 
开发者ID:ontopia,项目名称:ontopia,代码行数:29,代码来源:MenuPanel.java

示例9: addNewFieldValueCssClass

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
protected void addNewFieldValueCssClass(WebMarkupContainer component, FieldValuesModel fieldValuesModel, FieldValueModel fieldValueModel) {
    // add css class if field is new, there are no other exiting values, and the cardinality requires at least one value
//    Cardinality cardinality = fieldValuesModel.getFieldInstanceModel().getFieldInstance().getFieldAssignment().getCardinality();
//    if (!fieldValueModel.isExistingValue() && !fieldValuesModel.containsExisting() && cardinality.isMinOne()) 
//      component.add(new SimpleAttributeModifier("class", "newFieldValue"));
    
    // add css class if field value is new, and the display of it was user triggered.
    if (!fieldValueModel.isExistingValue() && fieldValuesModel.getShowExtraField() && fieldValuesModel.getShowExtraFieldUserTriggered()) 
      component.add(new SimpleAttributeModifier("class", "newFieldValue"));
  }
 
开发者ID:ontopia,项目名称:ontopia,代码行数:11,代码来源:AbstractFieldInstancePanel.java

示例10: initPlugins

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
private void initPlugins(){
	Label plugins = new Label("plugins");
	plugins.setVisible(Boolean.parseBoolean(UIUtils.getPortletPreferences().getValue("habilitaPlugins", "false")));
	
	String urlComunidade = getURLComunidade();
	String urlToShare = StringPool.BLANK;
	
	if(urlComunidade != null){
		urlToShare = "//www.facebook.com/plugins/like.php?href=#LINK#&amp;send=false&amp;layout=standard&amp;width=235&amp;";
		urlToShare = urlToShare.replace("#LINK#", urlComunidade);
		plugins.add(new SimpleAttributeModifier("src",urlToShare));
	}
	add(plugins);
}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:15,代码来源:HomePage.java

示例11: ExcluirEixoLink

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
public ExcluirEixoLink(String id, long eixoId) {
	super(id);
	this.eixoId = eixoId;
	this.add(new SimpleAttributeModifier(
			"onclick",
			"if(!confirm('Ao excluir o eixo, todas as propostas vinculadas ao mesmo também serão excluidas.Confirma exclusão?')) return false;"));
}
 
开发者ID:camaradosdeputadosoficial,项目名称:edemocracia,代码行数:8,代码来源:ExcluirEixoLink.java

示例12: addToolbarButton

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
protected void addToolbarButton(String wicketId, String iconClass, String label, String url) {
	Fragment button = new Fragment(wicketId, "toolbarLinkFragment", this);
	Label icon = new Label("icon");
	WicketUtils.setCssClass(icon, iconClass);
	button.add(icon);
	button.add(new Label("label", label));
	button.add(new SimpleAttributeModifier("href", url));
	add(button);
}
 
开发者ID:tomaswolf,项目名称:gerrit-gitblit-plugin,代码行数:10,代码来源:RepositoryPage.java

示例13: GravatarImage

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
public GravatarImage(String id, String username, String emailaddress, String cssClass, int width, boolean linked, boolean identicon) {
	super(id);

	String email = emailaddress == null ? username.toLowerCase() : emailaddress.toLowerCase();
	String hash = StringUtils.getMD5(email);
	Link<Void> link = new BookmarkablePageLink<Void>("link", GravatarProfilePage.class,
			WicketUtils.newObjectParameter(hash));
	link.add(new SimpleAttributeModifier("target", "_blank"));
	String url;
	if (identicon) {
		url = ActivityUtils.getGravatarIdenticonUrl(email, width);
	} else {
		url = ActivityUtils.getGravatarThumbnailUrl(email, width);
	}
	ExternalImage image = new ExternalImage("image", url);
	if (cssClass != null) {
		WicketUtils.setCssClass(image, cssClass);
	}
	link.add(image);
	if (linked) {
		WicketUtils.setHtmlTooltip(link,
			MessageFormat.format("View Gravatar profile for {0}", username));
	} else {
		WicketUtils.setHtmlTooltip(link, username);
	}
	add(link.setEnabled(linked));
	setVisible(GitBlit.getBoolean(Keys.web.allowGravatar, true));
}
 
开发者ID:warpfork,项目名称:gitblit,代码行数:29,代码来源:GravatarImage.java

示例14: RelevancePanel

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
public RelevancePanel(String id) {
	super(id);

	documentBoost = new RecordCollectionRelevancePanel("documentBoost").add(new SimpleAttributeModifier("style", "width:100%"));
       this.add(documentBoost);

	fieldBoost = new IndexFieldRelevancePanel("fieldBoost").add(new SimpleAttributeModifier("style", "width:100%"));
       this.add(fieldBoost);
       
	queryBoost = new QueryRelevancePanel("queryBoost").add(new SimpleAttributeModifier("style", "width:100%"));
       this.add(queryBoost);
       
       resultsRelevance = new ResultsRelevancePanel("resultsRelevance").add(new SimpleAttributeModifier("style", "width:100%"));
       this.add(resultsRelevance);
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:16,代码来源:RelevancePanel.java

示例15: DataPanel

import org.apache.wicket.behavior.SimpleAttributeModifier; //导入依赖的package包/类
public DataPanel(String id, int rowsPerPage) {
    super(id);
    List<IColumn> columns = getColumns();
    
    SortableListModel<T> sortableListModel = getSortableListModel();
    
    SortableDataProvider dataProvider = new SortableListDataProvider(sortableListModel);
    dataTable = new DataTable("dataTable", columns.toArray(new IColumn[0]), dataProvider, rowsPerPage);
    add(dataTable);
    dataTable.setOutputMarkupId(true);
    dataTable.setVersioned(false);
    dataTable.addTopToolbar(new AjaxFallbackHeadersToolbar(dataTable, dataProvider) {
        @Override
        protected WebMarkupContainer newSortableHeader(String borderId,
                String property, ISortStateLocator locator) {
            WebMarkupContainer sortableHeader = super.newSortableHeader(borderId, property, locator);
            sortableHeader.add(new SimpleAttributeModifier("scope", "col"));
            return sortableHeader;
        }
    });
    dataTable.addBottomToolbar(new AjaxNavigationToolbar(dataTable) {
        @Override
        protected PagingNavigator newPagingNavigator(String navigatorId,
                DataTable table) {
            return new AutoHidePagingNavigator(navigatorId, table);
        }
    });
    dataTable.addBottomToolbar(new NoRecordsToolbar(dataTable));
    dataTable.setItemReuseStrategy(new ReuseIfModelsEqualStrategy());
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:31,代码来源:DataPanel.java


注:本文中的org.apache.wicket.behavior.SimpleAttributeModifier类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。