/** * Can be overridden by clients for custom style sheet * * @return the style sheet reference */ protected StyleSheetReference getStyleSheet() { return new StyleSheetReference("paletteCSS", getClass(), "palette.css"); }
/** * @see org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag) */ protected void onComponentTag(ComponentTag tag) { // Must be attached to a style tag checkComponentTag(tag, "link"); IValueMap attributes = tag.getAttributes(); attributes.put("rel", "stylesheet"); attributes.put("type", "text/css"); } }
/** * @see org.apache.wicket.Component#onComponentTag(org.apache.wicket.markup.ComponentTag) */ @Override protected void onComponentTag(ComponentTag tag) { // Must be attached to a style tag checkComponentTag(tag, "link"); IValueMap attributes = tag.getAttributes(); attributes.put("rel", "stylesheet"); attributes.put("type", "text/css"); } }
public NavigationComponent( @NotNull @NonNls String id, @NotNull final LinksDataView dataView, @Nullable ResourceReference styleSheetReference ) { super( id ); if ( styleSheetReference == null ) { add( new EmptyPanel( WicketConstants.ID_STYLE_SHEET ) ); } else { add( new StyleSheetReference( WicketConstants.ID_STYLE_SHEET, styleSheetReference ) ); } WebMarkupContainer container = new WebMarkupContainer( ID_NAVIGATION_UL ); add( container ); container.add( dataView ); } }
public NavigationComponent( @Nonnull @NonNls String id, @Nonnull final LinksDataView<?> dataView, @Nullable ResourceReference styleSheetReference ) { super( id ); if ( styleSheetReference == null ) { add( new EmptyPanel( WicketConstants.ID_STYLE_SHEET ) ); } else { add( new StyleSheetReference( WicketConstants.ID_STYLE_SHEET, styleSheetReference ) ); } WebMarkupContainer container = new WebMarkupContainer( NAVIGATION_UL ); add( container ); container.add( dataView ); //Adds the big reference container.add( new AbstractBehavior() { @Override public void onComponentTag( @Nonnull Component component, @Nonnull ComponentTag tag ) { if ( dataView.getRowCount() > 6 ) { tag.put( "id", "big" ); } else { tag.put( "id", "small" ); } } } ); } }