public Font getNotationFontForContext ( int notationContext ) { try { Font baseNotationFont = ( ( MusicalFont ) getTemplate ( ) . getAttributeObject ( ScoreAttribute . NOTATION_FONT ) ) . getFont ( ) ; switch ( notationContext ) { case NOTATION_CONTEXT_GRACENOTE : return baseNotationFont . deriveFont ( getTemplate ( ) . getAttributeSize ( ScoreAttribute . NOTATION_GRACENOTE_SIZE ) ) ; case NOTATION_CONTEXT_TEMPO : return baseNotationFont . deriveFont ( getTemplate ( ) . getAttributeSize ( ScoreAttribute . NOTATION_TEMPO_SIZE ) ) ; case NOTATION_CONTEXT_NOTE : default : return baseNotationFont . deriveFont ( getTemplate ( ) . getAttributeSize ( ScoreAttribute . NOTATION_SIZE ) ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; throw new RuntimeException ( e ) ; } }
Return the notation for from the given notation context