boolean result = true; result = result && ( getName() == null ? that.getName() == null : getName().equals( that.getName() ) ); result = result && ( getInherit() == null ? that.getInherit() == null : getInherit().equals( that.getInherit() ) ); result = result && ( getRef() == null ? that.getRef() == null : getRef().equals( that.getRef() ) ); result = result && ( getImg() == null ? that.getImg() == null : getImg().equals( that.getImg() ) ); result = result && ( getAlt() == null ? that.getAlt() == null : getAlt().equals( that.getAlt() ) ); result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) ); result = result && ( getBorder() == null ? that.getBorder() == null : getBorder().equals( that.getBorder() ) ); result = result && ( getWidth() == null ? that.getWidth() == null : getWidth().equals( that.getWidth() ) ); result = result && ( getHeight() == null ? that.getHeight() == null : getHeight().equals( that.getHeight() ) ); result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) ); result = result && ( getItems() == null ? that.getItems() == null : getItems().equals( that.getItems() ) );
private List<Menu> mergeMenus( final List<Menu> childMenus, final List<Menu> parentMenus, final URLRebaser urlContainer ) { List<Menu> menus = new ArrayList<Menu>( childMenus.size() + parentMenus.size() ); for ( Menu menu : childMenus ) { menus.add( menu ); } int topCounter = 0; for ( Menu menu : parentMenus ) { if ( "top".equals( menu.getInherit() ) ) { final Menu clone = menu.clone(); rebaseMenuPaths( clone.getItems(), urlContainer ); menus.add( topCounter, clone ); topCounter++; } else if ( "bottom".equals( menu.getInherit() ) ) { final Menu clone = menu.clone(); rebaseMenuPaths( clone.getItems(), urlContainer ); menus.add( clone ); } } return menus; }
Menu menu = new Menu(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- ) menu.setName( getTrimmedValue( value ) ); menu.setInherit( getTrimmedValue( value ) ); menu.setInheritAsRef( getBooleanValue( getTrimmedValue( value ), "inheritAsRef", parser, "false" ) ); menu.setRef( getTrimmedValue( value ) ); menu.setImg( getTrimmedValue( value ) ); menu.setAlt( getTrimmedValue( value ) ); menu.setPosition( getTrimmedValue( value ) ); menu.setBorder( getTrimmedValue( value ) ); menu.setWidth( getTrimmedValue( value ) ); menu.setHeight( getTrimmedValue( value ) ); menu.setTitle( getTrimmedValue( value ) ); java.util.List items = menu.getItems(); if ( items == null ) menu.setItems( items );
if ( keepInheritedRefs && menu.isInheritAsRef() ) if ( menu.getName() == null ) menu.setName( i18n.getString( "site-tool", llocale, "decorationModel.menu.projectmodules" ) ); else if ( decorationModel.getMenuRef( "modules" ).getInherit() == null )
if ( keepInheritedRefs && menu.isInheritAsRef() ) if ( menu.getName() == null ) menu.setName( i18n.getString( "site-tool", llocale, "decorationModel.menu.parentproject" ) ); item.setName( parentProject.getName() ); item.setHref( parentUrl ); menu.addItem( item );
if ( menu.getName() == null ) menu.setName( i18n.getString( "site-tool", llocale, "decorationModel.menu.projectdocumentation" ) ); if ( menu.getItems().isEmpty() ) "decorationModel.menu.projectinformation" ), "/project-info.html", categoryReports, llocale ); menu.getItems().add( item ); found = true; "decorationModel.menu.projectreports" ), "/project-reports.html", categoryReports, llocale ); menu.getItems().add( item ); found = true;
private void extract( DecorationModel decoration, Sink sink, Locale locale ) { sink.head(); sink.title(); sink.text( i18n.getString( "site-plugin", locale, "site.sitemap.title" ) ); sink.title_(); sink.head_(); sink.body(); sink.section1(); sink.sectionTitle1(); sink.text( i18n.getString( "site-plugin", locale, "site.sitemap.section.title" ) ); sink.sectionTitle1_(); sink.paragraph(); sink.text( i18n.getString( "site-plugin", locale, "site.sitemap.description" ) ); sink.paragraph_(); for ( Menu menu : decoration.getMenus() ) { sink.section3(); sink.sectionTitle3(); sink.text( menu.getName() ); sink.sectionTitle3_(); sink.horizontalRule(); extractItems( menu.getItems(), sink ); sink.section3_(); } sink.section1_(); sink.body_(); }
/** * Method removeItem. * * @param menuItem */ public void removeItem( MenuItem menuItem ) { getItems().remove( menuItem ); } //-- void removeItem( MenuItem )
menu.setBorder(_menuBorder); menu.setBackground(_menuBackground); menu.setFont(_menuFont);
holder.getTitleView().setText(item.getTitle());
if ( keepInheritedRefs && menu.isInheritAsRef() ) if ( menu.getName() == null ) menu.setName( i18n.getString( "site-tool", llocale, "decorationModel.menu.projectmodules" ) ); else if ( decorationModel.getMenuRef( "modules" ).getInherit() == null )
if ( keepInheritedRefs && menu.isInheritAsRef() ) if ( menu.getName() == null ) menu.setName( i18n.getString( "site-tool", llocale, "decorationModel.menu.parentproject" ) ); item.setName( parentProject.getName() ); item.setHref( parentUrl ); menu.addItem( item );
if ( menu.getName() == null ) menu.setName( i18n.getString( "site-tool", llocale, "decorationModel.menu.projectdocumentation" ) ); if ( menu.getItems().isEmpty() ) "decorationModel.menu.projectinformation" ), "/project-info.html", categoryReports, llocale ); menu.getItems().add( item ); found = true; createCategoryMenu( i18n.getString( "site-tool", llocale, "decorationModel.menu.projectreports" ), "/project-reports.html", categoryReports, llocale ); menu.getItems().add( item ); found = true;
/** * Method addItem. * * @param menuItem */ public void addItem( MenuItem menuItem ) { getItems().add( menuItem ); } //-- void addItem( MenuItem )
menu.addItem( item );
if ( menu.getName() != null ) serializer.attribute( NAMESPACE, "name", menu.getName() ); if ( menu.getInherit() != null ) serializer.attribute( NAMESPACE, "inherit", menu.getInherit() ); if ( menu.isInheritAsRef() != false ) serializer.attribute( NAMESPACE, "inheritAsRef", String.valueOf( menu.isInheritAsRef() ) ); if ( menu.getRef() != null ) serializer.attribute( NAMESPACE, "ref", menu.getRef() ); if ( menu.getImg() != null ) serializer.attribute( NAMESPACE, "img", menu.getImg() ); if ( menu.getAlt() != null ) serializer.attribute( NAMESPACE, "alt", menu.getAlt() ); if ( ( menu.getPosition() != null ) && !menu.getPosition().equals( "left" ) ) serializer.attribute( NAMESPACE, "position", menu.getPosition() ); if ( menu.getBorder() != null )
protected void populateReportItems( DecorationModel decorationModel, Locale locale, Map<String, MavenReport> reportsByOutputName ) { for ( Menu menu : decorationModel.getMenus() ) { populateItemRefs( menu.getItems(), locale, reportsByOutputName ); } }
buf.append( getName() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "inherit = '" ); buf.append( getInherit() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "ref = '" ); buf.append( getRef() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "img = '" ); buf.append( getImg() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "alt = '" ); buf.append( getAlt() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "position = '" ); buf.append( getPosition() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "border = '" ); buf.append( getBorder() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "width = '" ); buf.append( getWidth() );
relativizeMenuPaths( menu.getItems(), baseUrl );