1 package com.teamkonzept.lib.templates; 2 3 import com.teamkonzept.lib.*; 4 5 10 public abstract class TKLabelTag extends TKTag { 11 12 13 public TKTemplateSyntax labelSyntax = null; 14 15 public String label; 16 17 21 public TKLabelTag( TKTemplateSyntax parent, String def, boolean hasSubTags ) throws TKTemplateSyntaxException 22 { 23 super( parent ); 24 labelSyntax = ( hasSubTags ? parent.newChild( def, parent.getSource(), hasSubTags ) : null ); 25 label = ( hasSubTags ? null : def ); 26 } 27 28 32 public String getRealLabel( TKTemplateData td ) throws TKTemplateSyntaxException 33 { 34 if( labelSyntax != null ) return labelSyntax.apply( td ); 35 return label; 36 } 37 38 42 public String getLabel( TKTemplateData td ) throws TKTemplateSyntaxException 43 { 44 return getRealLabel(td).toUpperCase(); 45 } 46 47 } 49 | Popular Tags |