if ( _name == null ) _name = this.getName(); if ( _name == null ) { if ( getICObjectInstanceID() != -1 ) _name = "nav_"+Integer.toString(getICObjectInstanceID()); else _name = "nav_"+Double.toString(Math.random()); } _hoverName  = "hover_"+_name; _subName = "sub_"+_name; _subHoverName = "subHover_"+_name;
if (_name == null) _name = this.getName(); if (_name == null) { if (getICObjectInstanceID() != -1) _name = "nav_" + Integer.toString(getICObjectInstanceID()); else _name = "nav_" + Double.toString(Math.random()); } _hoverName = "hover_" + _name; _subName = "sub_" + _name; _subHoverName = "subHover_" + _name;  if (fontStyle == null) { fontStyle = IWStyleManager.getInstance().getStyle("A"); }
  private void setStyles() {    if ( _name == null )      _name = this.getName();    if ( _name == null ) {      if ( getICObjectInstanceID() != -1 )	_name = "nav_"+Integer.toString(getICObjectInstanceID());      else	_name = "nav_"+Double.toString(Math.random());    }    _hoverName  = "hover_"+_name;    _subName = "sub_"+_name;    _subHoverName = "subHover_"+_name;    if ( getParentPage() != null && fontStyle != null) {      TextStyler styler = new TextStyler(fontStyle);      if ( fontHoverUnderline )	styler.setStyleValue(StyleConstants.ATTRIBUTE_TEXT_DECORATION,StyleConstants.TEXT_DECORATION_UNDERLINE);      if ( fontHoverColor != null )	styler.setStyleValue(StyleConstants.ATTRIBUTE_COLOR,fontHoverColor);      getParentPage().setStyleDefinition("A."+_name,fontStyle);      getParentPage().setStyleDefinition("A."+_name+":hover",styler.getStyleString());      TextStyler styler2 = new TextStyler(fontStyle);      if ( highlightFontColor != null )	styler2.setStyleValue(StyleConstants.ATTRIBUTE_COLOR,highlightFontColor);      String style = styler2.getStyleString();      getParentPage().setStyleDefinition("A."+_hoverName,style);      if ( fontHoverUnderline )	styler2.setStyleValue(StyleConstants.ATTRIBUTE_TEXT_DECORATION,StyleConstants.TEXT_DECORATION_UNDERLINE);      if ( fontHoverColor != null )	styler2.setStyleValue(StyleConstants.ATTRIBUTE_COLOR,fontHoverColor);      getParentPage().setStyleDefinition("A."+_hoverName+":hover",styler2.getStyleString());    }    else {      _styles = false;    }    if ( getParentPage() != null && subFontStyle != null) {      TextStyler styler = new TextStyler(subFontStyle);      if ( subFontHoverUnderline )	styler.setStyleValue(StyleConstants.ATTRIBUTE_TEXT_DECORATION,StyleConstants.TEXT_DECORATION_UNDERLINE);      if ( subFontHoverColor != null )	styler.setStyleValue(StyleConstants.ATTRIBUTE_COLOR,subFontHoverColor);      getParentPage().setStyleDefinition("A."+_subName,subFontStyle);      getParentPage().setStyleDefinition("A."+_subName+":hover",styler.getStyleString());      TextStyler styler2 = new TextStyler(subFontStyle);      if ( subHighlightFontColor != null )	styler2.setStyleValue(StyleConstants.ATTRIBUTE_COLOR,subHighlightFontColor);      String style = styler2.getStyleString();      getParentPage().setStyleDefinition("A."+_subHoverName,style);      if ( subFontHoverUnderline )	styler2.setStyleValue(StyleConstants.ATTRIBUTE_TEXT_DECORATION,StyleConstants.TEXT_DECORATION_UNDERLINE);      if ( subFontHoverColor != null )	styler2.setStyleValue(StyleConstants.ATTRIBUTE_COLOR,subFontHoverColor);      getParentPage().setStyleDefinition("A."+_subHoverName+":hover",styler2.getStyleString());    }    else {      _subStyles = false;    }  }