public static void registerTipLayout ( String prefix , TipLayout layout ) { LayoutReg reg = new LayoutReg ( ) ; reg . prefix = prefix ; reg . layout = layout ; _layouts . insertSorted ( reg ) ; }
It may be desirable to layout object tips specially depending on what sort of actions they represent so we allow different tip layout algorithms to be registered for particular object prefixes . The registration is simply a list searched from longest string to shortest string for the first match to an object s action .