| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.ajax.CtxMenuManager
public class CtxMenuManager
This manager provides a way to generate dynamically letters for specific new entries in contextual menus. Its provides also convenient methods to insert letters at the good place in ctx menu letters array.
| Method Summary | |
|---|---|
 char[] | 
addEntry(char[] letters,
         Object id,
         char c,
         boolean after)
Create a new char array with the letter associated to this id the place after or before the one of the letter c.  | 
 char[] | 
addEntry(char[] letters,
         Object id,
         int index)
Create a new char array with the letter associated to this id at the given index.  | 
 char[] | 
addEntry(char[] letters,
         Object id,
         Object idPreviousEntry,
         boolean after)
Create a new char array with the letter associated to this id the place after or before the one of the letter bounds to the idPreviousEntry.  | 
 char[] | 
addEntryAtBottom(char[] letters,
                 Object id)
Create a new char array with the letter associated to this id at the end.  | 
 char[] | 
addEntryAtTop(char[] letters,
              Object id)
Create a new char array with the letter associated to this id at the top.  | 
 char | 
createMenuEntry(Object id,
                Class<? extends AbstractCtxMenu> ctxMenuClazz)
Retrieve or create a letter and associates it with the id for this ctx menu.  | 
static CtxMenuManager | 
getInstance()
 | 
 boolean | 
isCurrent(Object id,
          char letter)
Tell if the given id corresponds to the given letter in the menu.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static CtxMenuManager getInstance()
public char createMenuEntry(Object id,
                            Class<? extends AbstractCtxMenu> ctxMenuClazz)
id - an object to handle the new entryctxMenuClazz - the given ctx menu
public boolean isCurrent(Object id,
                         char letter)
id - letter - 
public char[] addEntryAtBottom(char[] letters,
                               Object id)
letters - the previous char arrayid - 
public char[] addEntryAtTop(char[] letters,
                            Object id)
letters - the previous char arrayid - 
public char[] addEntry(char[] letters,
                       Object id,
                       int index)
letters - the previous char arrayid - index - the index (from 0 to letters.length) of the new letter
public char[] addEntry(char[] letters,
                       Object id,
                       char c,
                       boolean after)
letters - the previous char arrayid - c - the letterafter - to place the new entry after the previous one (otherwise, before)
public char[] addEntry(char[] letters,
                       Object id,
                       Object idPreviousEntry,
                       boolean after)
letters - the previous char arrayid - idPreviousEntry - the id that bounds to the letterafter - to place the new entry after the previous one (otherwise, before)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||